aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* wrappers/README: update config.site path20240504Sam James2024-05-041-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* wrappers: mipsel-linux-gnu: fix ac_cv_type_uid_t cache value20240209Sam James2024-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cross-{ebuild,emerge}: improve error message for missing SYSROOTSam James2024-01-082-2/+12
| | | | | | This can happen if you rm -rf the SYSROOT (rather than crossdev -C). Signed-off-by: Sam James <sam@gentoo.org>
* wrapper/etc/portage/make.conf: Remove -pamIan Jordan2023-12-121-1/+1
| | | | | | | | 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>
* cross-pkg-config: Set PKG_CONFIG_FDO_SYSROOT_RULES=1Matt Turner2023-10-151-0/+3
| | | | | | | | | | | 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>
* cross-pkg-config: Properly set PKG_CONFIG_SYSTEM_*_PATH variables20230923James Le Cuirot2023-09-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* Support standalone LLVM/Clang as crosscompilerAlfred Persson Forsberg2023-08-222-0/+21
| | | | | | | | | | | | | | | | | | | | | | 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>
* Avoid calling portageq from Makefile20230616Mike Gilbert2023-06-162-4/+3
| | | | | | | 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>
* wrappers: fix mipsel-linux-gnu cache vars for *sys_siglist20230209Sam James2023-02-091-3/+3
| | | | | | | | | | | | | 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>
* config.site: Fix tzset in Python with autoconf override20221227James Le Cuirot2022-12-271-0/+3
| | | | | | | | | 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>
* cross-pkg-config: Rework to properly support prefixJames Le Cuirot2022-12-271-36/+51
| | | | | | | | 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>
* wrappers: Actually set PKGDIR to /var/cache/binpkgs20220909Jakov Smolić2022-09-091-1/+1
| | | | | | | | | 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>
* wrappers/Makefile: fix weird double spaces20220818Alfred Persson Forsberg2022-08-181-1/+1
| | | | | | 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>
* wrappers/cross-ebuild: new fileAlfred Persson Forsberg2022-08-182-1/+42
| | | | | | | | 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>
* site: add linux-musl20220617Sam James2022-06-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* wrappers: use /var/cache/binpkgs as PKGDIRSam James2022-05-031-1/+1
| | | | | | Modern location. Signed-off-by: Sam James <sam@gentoo.org>
* wrappers: use /var/db/repos/local in commented out example PORTDIR_OVERLAYSam James2022-05-031-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* cross-pkg-config: allow basic options for $1Mike Frysinger2022-01-131-0/+11
| | | | | | | | | | | 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>
* cross-pkg-config: drop old version checkMike Frysinger2022-01-131-4/+0
| | | | | | | 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>
* wrappers: fix typo in ebuild wrapperMike Frysinger2021-11-261-1/+1
| | | | | Closes: https://bugs.gentoo.org/519636 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* wrappers: drop HOSTCC settingMike Frysinger2021-10-271-2/+0
| | | | | | | | | 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>
* wrappers: add an ebuild helper tooMike Frysinger2021-10-271-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* crossdev, emerge-wrapper: request EAPI=7 on eclass importsDavid Seifert2021-06-211-1/+1
| | | | | | | | | | | | | | | | | | | 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>
* wrappers/emerge-wrapper: fail crossdev setup when toolchain-funcs.eclass ↵Sergei Trofimovich2021-06-211-1/+3
| | | | | | | | | | | | | | | | | | | 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>
* cross-pkg-config: Respect PKG_CONFIG_SYSROOT_DIR if its already setJames Le Cuirot2021-01-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* wrappers/emerge-wrapper: drop population of profile/package.providedSergei Trofimovich2019-08-301-10/+0
| | | | | | | | | | '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>
* cross-emerge: Default to using no prefixJames Le Cuirot2019-07-211-7/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* wrappers: tweak rarning message to contain config file pathsSergei Trofimovich2019-07-121-1/+1
| | | | | | | | | 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>
* emerge-wrapper: pin bare-metal targets to LIBC=newlibPalmer Dabbelt2019-03-181-0/+1
| | | | Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
* emerge-wrapper: declare KERNEL=Winnt for *mingw* targets, bug #594576Sergei Trofimovich2019-03-111-0/+1
| | | | | | Reported-by: Fabio Rossi Bug: https://bugs.gentoo.org/594576 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Switch from sys-libs/uclibc to sys-libs/uclibc-ng package.Sergei Trofimovich2018-12-021-1/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* config.site add support for /etc/ overridesSergei Trofimovich2018-10-203-1/+12
| | | | | | | | | | | | | | 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>
* wrappers/Makefile: rename TOPDIR to SITEDIRSergei Trofimovich2018-10-202-6/+6
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Makefile: avoid '//' when PREFIX is not setSergei Trofimovich2018-10-201-11/+11
| | | | | | | | | PREFIX assumes leading '/'. Thus the idiom is $(DESTDIR)$(PREFIX)/foo and not $(DESTDIR)/$(PREFIX)/foo Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* wrappers: use @TOPDIR@ and @PREFIX@ instead of __TOPDIR__ and __PREFIX__Sergei Trofimovich2018-10-203-5/+5
| | | | | | | Leave __<var>__ substitutions for runtime substitution and keep @<var>@ for 'make install' substitution. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* makefile: use ':' separator in set expressions consistentlySergei Trofimovich2018-10-201-3/+3
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Makefile: mangle files with sed at install phaseSergei Trofimovich2018-10-201-3/+3
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* wrappers/Makefile: drop unused TOPDIR variableSergei Trofimovich2018-10-201-1/+0
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* wrappers: prevent use of wine to convert between path typesMarty E. Plummer2018-07-312-0/+3
| | | | | | | | | | | | 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>
* wrappers: fix use.force flag overridesSergei Trofimovich2018-04-051-1/+2
| | | | | | 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>
* wrappers: create profile/ and override ARCH, LIBC and KERNEL thereSergei Trofimovich2018-04-054-7/+29
| | | | | | | | | | | | 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>
* emerge-wrapper: add a note that 'package.provided' are normally incompleteSergei Trofimovich2018-04-051-0/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* cross-emerge: fix empty EPREFIX handling, bug #650100Sergei Trofimovich2018-03-241-1/+1
| | | | | | | | | | | | | | 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>
* cross-emerge: tweak EPREFIX handling to be POSIX sh, bug #650100Sergei Trofimovich2018-03-101-1/+1
| | | | | | | | | 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>
* site/linux: move bash_cv_job_control_missing=present from linux-gnuSergei Trofimovich2017-12-312-1/+3
| | | | | | | | | 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>
* sire/linux: remove gl_cv_func_re_compile_pattern_working=yes from muslSergei Trofimovich2017-12-313-1/+10
| | | | | | | | 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>
* wrappers/emerge-wrapper: add ELIBC=Cygwin autodetectionSergei Trofimovich2017-12-301-0/+1
| | | | | Reported-by: Marty E. Plummer Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* wrappers/emerge-wrapper: add ELIBC=musl autodetectionSergei Trofimovich2017-12-301-0/+1
| | | | | Reported-by: Marty E. Plummer Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* prefixify build system and scripts.XU Benda2016-06-254-3/+11
|
* config.site: add musl libc supportAndrew Wilcox2016-06-021-0/+1
| | | | | | | This way you can support glibc and musl targets on the same system and not have to worry about switching out site scripts. URL: https://bugs.gentoo.org/554032