| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These variables control whether pkg-config returns flags to search
directories that the toolchain would search by default anyway. Rust's
pkg-config-rs enables them by default, and some crates expect flags to
always be returned, even if they are technically unnecessary. Unsetting
these variables in the wrapper therefore breaks some crates. Having seen
how this works in detail, it would be fruitless to ask upstream to
change it.
These lines were originally added at a time when we expected other
non-Gentoo-based distributions to use crossdev. That didn't happen.
Gentoo itself doesn't set these variables anywhere that I can see. Even
if they were set, they are unlikely to break anything in practise now
that our cross builds are better behaved than they used to be.
Bug: https://bugs.gentoo.org/939334
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When cross-compiling, pkgconf behaves in a way that causes many packages
to install files to ${SYSROOT}/${SYSROOT}/... without
PKG_CONFIG_FDO_SYSROOT_RULES set.
I'm aware of at least gobject-introspection, modemmanager, and libp11,
but there are likely more.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perhaps this was a difference between pkg-config and pkgconf, but we
have not set PKG_CONFIG_SYSTEM_LIBRARY_PATH correctly since we began
setting it in 2014. It should include the SYSROOT. We also never set
PKG_CONFIG_SYSTEM_INCLUDE_PATH at all.
These variables tell pkg-config not to emit paths that the toolchain
would search in anyway. This helps to reduce the noise appearing in
newly-installed .pc files.
This change does assume that if you have set SYSROOT differently to the
toolchain's default, then you have also added the --sysroot argument to
your compiler flags. Neither Portage nor Gentoo currently do this for
you. cross-boss does, but it's not an officially supported solution. The
change could therefore potentially break things, but it's likely you'll
run into other problems if you don't add --sysroot anyway.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Closes: https://github.com/gentoo/crossdev/pull/13
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change makes it possible to use Clang instead of GCC in
Crossdev. As LLVM is already able to target other architectures,
provided that LLVM_TARGETS is set accordingly, the only thing needed
to do is compile builtins (compiler-rt) for the target triple. Note
that compiler-rt needs libc headers to target when building, and in
turn linux-headers needs to be installed for Linux targets, so most
stages except binutils and GCC are still there.
Currently having both a GCC and LLVM Crossdev environment installed
for the same triple is not supported since many ebuilds just use
/usr/${CTARGET} as a hardcoded sysroot, but I plan adding support.
Note: by standalone I mean a pure LLVM toolchain not dependent on an
existing GCC toolchain.
Bug: https://bugs.gentoo.org/680652
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Closes: https://github.com/gentoo/crossdev/pull/10
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
This helps with both cross-compiling into a prefix and cross-compiling
within a prefix.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Tools sometimes probe pkg-config to see if it itself works. Allow
those basic options through. We specifically don't parse the full
command line to keep the code simple, faster, and to avoid dealing
with ugly edge cases (like `pkg-config -- --help`).
Closes: https://bugs.gentoo.org/830840
Reported-by: Alexandra Parker <alex.iris.parker@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
pkg-config-0.24 was released over a decade ago. We can stop checking
for it now.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using --variable, pkgconf prepends PKG_CONFIG_SYSROOT_DIR to the
value when it starts with /, even though the original pkg-config
didn't do this. Upstream have confirmed that this is intentional
[1]. The original pkg-config is no longer maintained and will probably
be dropped from Gentoo.
$ PKG_CONFIG_SYSROOT_DIR=/foo pkgconf --variable=udevdir udev
/foo/lib/udev
$ PKG_CONFIG_SYSROOT_DIR=/foo pkg-config --variable=udevdir udev
/lib/udev
In some contexts, we do not want the SYSROOT to be prepended
here. This would normally just be a case of not setting
PKG_CONFIG_SYSROOT_DIR but our wrapper uses SYSROOT to set both
PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR. It will not set one
without the other but we need the latter to find the right .pc file in
the first place.
One example where this issue arises is Gentoo's udev eclass. Packages
installing udev rules call get_udevdir() to find out where to put
them. With ROOT=/foo SYSROOT=/foo, this will return something like
/foo/lib/udev but since ROOT is already handled by Portage when
merging, the rules will actually end up in /foo/foo/lib/udev.
This can be resolved by respecting PKG_CONFIG_SYSROOT_DIR, even when
it is set but blank. It is unlikely to be set more widely when using
cross-pkg-config so this should be safe.
[1] https://github.com/pkgconf/pkgconf/issues/69#issuecomment-48434876
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
URL: https://bugs.gentoo.org/570762
Reported-by: Fabio Rossi <rossi.f@inwind.it>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
| |
URL: https://bugs.gentoo.org/525068
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
| |
Since we're looking for the pkgconfig dir, let's probe it directly rather
than rely on specific C library files.
URL: https://bugs.gentoo.org/518790
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
Rather than hardcode /usr/lib, set PKG_CONFIG_SYSTEM_LIBRARY_PATH to the
right libdir paths. This should handle lib vs lib64 vs lib correctly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Now that the 0.24 release has been out for a few years, we can start
relying on its availability.
URL: https://bugs.gentoo.org/517530
Reported-by: Mike Marineau <mike@marineau.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
| |
If we already have SYSROOT set in the env, just go with that. This lets
us do multiple sysroots-per-target by manipulating the env. Idea based
on the work in ChromiumOS.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
We don't actually require 0.23+, and some distros (like Debian) are very
behind the times and lack even this version.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ned Ludd <solar@gentoo.org>
|
|
|
|
|
|
| |
chromium/gentoo build env -> http://codereview.appspot.com/206075
Signed-off-by: Ned Ludd <solar@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The latest pkg-config supports PKG_CONFIG_SYSROOT_DIR which handles -L/-I
munging on the fly, but it's slightly broken. So put all the pieces in
place for the next upstream release and in the mean time, do the munging
ourselves on the fly via sed.
This way packages that want runtime paths compiled in don't get the build
paths that were munged in the .pc file.
URL: http://bugs.gentoo.org/299990
URL: https://bugs.freedesktop.org/show_bug.cgi?id=16905
Reported-by: Andrew Gaffney <agaffney@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
Better than using our own custom version parser.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
These cause cross-scm comparisons a pita.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
This lets people copy the wrapper someplace and then nail down the dirs it
works with.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
|
|
|
|
|
|
|
| |
A few packages install their .pc files into /usr/share/pkgconfig. Rather
than debate whether this is broken, we can handle it pretty trivially.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
| |
Touchup comments and unify variable handling so it can be used
transparently in both Gentoo and the uClinux distribution.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|