| 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>
|
|
|
|
|
|
| |
This variable is deprecated in favour of repos.conf.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This is pointless because cross-pkg-config unsets it anyway. It's also
harmful because if a cross build needs to call CBUILD's pkg-config,
which doesn't use the wrapper, it will pick up .pc files from the wrong
location.
Bug: https://bugs.gentoo.org/936677
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reported by matoro when building coreutils for mipsel-unknown-linux-gnu. If
autoconf-2.72 is used, apparently this shows up, and the coreutils-9.4 dist
tarball was indeed built with it...
The symptoms are similar to bug #885485 but it's a different cause -- we
were exporting a dodgy cache value with a missing '$':
```
configure:14771: checking for uid_t
configure:14771: result: {ac_cv_type_uid_t=yes}
```
```
ac_cv_type_uid_t='{ac_cv_type_uid_t=yes}'
```
```
$ rg ac_cv_type_uid_t
wrappers/site/mipsel-linux-gnu:115:ac_cv_type_uid_t={ac_cv_type_uid_t=yes}
```
Bug: https://bugs.gentoo.org/885485
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
This can happen if you rm -rf the SYSROOT (rather than crossdev -C).
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Removing default option of disabling PAM as no longer needed in all tests done.
Signed-off-by: Ian Jordan <immoloism@gmail.com>
Closes: https://github.com/gentoo/crossdev/pull/16
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>
|
|
|
|
|
|
|
| |
It is probably better to look up the repo path at runtime anyway.
Bug: https://bugs.gentoo.org/908602
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sys_siglist was removed from glibc-2.32. Before now, for mipsel-linux-gnu,
we were forcing the cache var to 'yes', rather than 'no'. I suspect this
test would've worked correctly even without caching anyway, but it is what it
is.
Default to 'no' instead of 'yes'.
See also: https://lists.openembedded.org/g/openembedded-core/topic/dunfell_patch_site_make/77178472?p=
Closes: https://bugs.gentoo.org/791154
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The Python build assumes that tzset is broken when cross-compiling. We
can assume it works under Linux.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Closes: https://github.com/gentoo/crossdev/pull/8
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>
|
|
|
|
|
|
|
|
|
| |
Probably a typo, so accidentally got changed to `cache/binpkgs` instead of
`/var/cache/binpkgs`
Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Closes: https://github.com/gentoo/crossdev/pull/5
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Closes: https://github.com/gentoo/crossdev/pull/4
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Crossdev currently installs a dead symlink to cross-ebuild. This commit
creates it. Mostly copied from cross-emerge.
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Follow-up to 8b1b79e02cc36bc6f2b5583db6aeea333fb8d59b.
Sets
```
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
```
... to sort out flex and a bunch of other packages, like procps.
I was wondering why this never seemed to come up when doing cross
for other "standard" targets which we know work and are used often;
the answer is that we never had the -musl suffix CHOSTs covered.
(e.g. linux-gnu already has this set.)
Bug: https://bugs.gentoo.org/554032
Closes: https://bugs.gentoo.org/675368
Closes: https://bugs.gentoo.org/705800
See: 8b1b79e02cc36bc6f2b5583db6aeea333fb8d59b
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Modern location.
Signed-off-by: Sam James <sam@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>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/519636
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This is a bit obsolete. Few packages every used this setting, and
toolchain-funcs.eclass provides a suite of BUILD_xxx helpers that
ebuilds can leverage directly.
Closes: https://bugs.gentoo.org/727900
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
| |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today ::gentoo dropped support for EAPI=0 from multilib.eclass
and toolchain-funcs.eclass. Due to lack of error handling on
crossdev side srossdev derived wrong environment for $CTARGET
(and mostly fell back to CHOST).
This caused at best failing early on gcc-stage1 build. At worst
crossdev installed libraries into a wrong $(get_libdir), installed
symlinks from wrong host and other disasters.
Previous crossdev commits make crossdev crash earlier instead of
generating wrong environment. This commit allows dropping EAI=0
support for eclasses eventually.
Reported-by: Marco Scardovi (scardracs)
Bug: https://bugs.gentoo.org/797367
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sourcing fails
Before the change toolchain-funcs.eclass import failure did not fail hard
and generated suboptimal default ARCH. It's not as bad as crossdev's
equivalent 'multilib.eclass' source failure, but still not perfect.
The change exposes die() calls to be visible in crossdev run:
```
$ rm -rf '@GENTOO_PORTAGE_EPREFIX@/usr/foo/etc'; ./emerge-wrapper --target foo --init
emerge-wrapper: ERROR: toolchain-funcs.eclass: EAPI 0 not supported
emerge-wrapper: ERROR: Failed calling 'tc-arch' from toolchain-funcs.eclass.
```
Reported-by: Marco Scardovi (scardracs)
Bug: https://bugs.gentoo.org/797367
Signed-off-by: Sergei Trofimovich <slyfox@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>
|
|
|
|
|
|
|
|
|
|
| |
'profile/package.provided' is created empty for quite a while
because wrapper init is called before any cross-* package gets merged.
Let's drop that completely and focus on always installing
headers and libc into target.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On non-prefixed systems, cross-emerge installs to /usr/${CHOST} by
default. On prefixed systems, this default effectively becomes
${BROOT}/usr/${CHOST}/${BROOT}, which is unexpected and makes little
sense. The first BROOT originates from the ROOT setting in the cross
make.conf. The second BROOT is the prefix that Portage is configured
to use by default.
We therefore need to avoid the second BROOT by overriding Portage with
a blank EPREFIX value. Note that a bug in Portage itself means that
this is ineffective on versions before 2.3.69 but it's no worse than
it was before either.
For users who do want to set their own EPREFIX, the PORTAGE_CONFIGROOT
default has been updated to ${SYSROOT}${EPREFIX} as the prefixed
location is required for this variable. This is despite man emerge
suggesting otherwise!
Closes: https://bugs.gentoo.org/642604
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
commit 393e1cd0c6d3ac81fa166bafe6065d42849f622c
("wrappers: create profile/ and override ARCH, LIBC and KERNEL there")
broke config paths reporting as it upgraded 'conf' singleton
to 'confs' array but did not update warning message accordingly.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
|
|
|
|
|
|
| |
Reported-by: Fabio Rossi
Bug: https://bugs.gentoo.org/594576
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now crossdev imports cache variables from
/etc/crossdev/include/site
The file format is the same as
/usr/share/crossdev/include/site
it is useful to drop local overrides.
Reported-by: Alon Bar-Lev
Bug: https://bugs.gentoo.org/264074
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
PREFIX assumes leading '/'. Thus the idiom is
$(DESTDIR)$(PREFIX)/foo
and not
$(DESTDIR)/$(PREFIX)/foo
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
| |
Leave __<var>__ substitutions for runtime substitution
and keep @<var>@ for 'make install' substitution.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
libtool.m4 uses lt_cv_to_host_file_cmd to store the name of a function
used to convert between unix and win32 path styles; when doing a linux to
mingw cross-compilation it ends up with func_convert_file_nix_to_w32
which uses the winepath utility to do the job. However, using that tool
will create a wineprefix in ${CATEGORY}/${P}/homedir and potentially
cause access violations in sandbox.
Bug: https://bugs.gentoo.org/631492
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
Flags should be one per line, not multiple:
--- Invalid USE flag in 'use.force': '-kernel_linux kernel_linux'
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Need for make.defaults:
portage does not allow ARCH override in make.conf anymore
Need for use.force:
embedded profile enforces linux target on us. It's ok as a default
but would be nice to be able to override it with nothing (bare-metal)
or other OS without existing profile.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 21a0f5a3d83084436e6f6b66114cc5c593528866
("cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100")
introduced a bug:
$ foo-emerge
foo-emerge: line 13: [: =: unary operator expected
Tweak it by quoting 'test' argument.
Reported-by: Marty E. Plummer
Bug: https://bugs.gentoo.org/650100
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Reported and fixed by Scall.
Reported-by: Scall
Fixed-by: Scall
Closes: https://bugs.gentoo.org/650100
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
glibc, musl, uclibc and uclibc-ng all define needed signals
and syscalls needed for job control.
Reported-by: Felix Janda
Bug: https://bugs.gentoo.org/553988
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
| |
re_compile_pattern is present in glibc, uclibc, uclibc-ng, but not musl
Reported-by: Felix Janda
Bug: https://bugs.gentoo.org/553988
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
| |
Reported-by: Marty E. Plummer
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|