aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "crossdev: clean world file on uninstall"HEADmasterMike Gilbert2022-11-181-3/+0
| | | | | | | This hack is unnecessary if we use emerge for uninstalls instead. Reverts: bec5fd6a5597f736a868e79017f99b5bc79a9dbf Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* Call emerge instead of qmerge to unmerge packagesMike Gilbert2022-09-231-1/+1
| | | | | | | qmerge does not remove packages from the world file. Also, this allows us to drop the dependency on portage-utils. Signed-off-by: Mike Gilbert <floppym@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>
* crossdev: Fix matching of stable keywords20220709Krzesimir Nowak2022-07-091-1/+1
| | | | | | | | | Not sure how this worked before - in our case emerge couldn't find a matching ebuild any more when requesting stable versions. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/crossdev/pull/3 Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: Take gdb variables into accountKrzesimir Nowak2022-07-091-2/+2
| | | | | | | When restoring user settings and when figuring out the list of repos. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: Fall back to default version for gdb tooKrzesimir Nowak2022-07-091-0/+1
| | | | | | | | Passing `--stable` didn't affect the version of built GDB, thus we needed to pass `--gdb '[stable]'` on our own. Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> 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>
* crossdev: force off USE=hardened where no SSPSam James2022-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes e.g. hppa2.0-unknown-linux-gnu where the stack grows up and hence we lack SSP, but also -fstack-clash-protection which is forced on by USE=hardened. glibc failed to build before this with: ``` checking for broken __attribute__((alias()))... yes configure: error: working alias attribute support required * ERROR: cross-hppa2.0-unknown-linux-gnu/glibc-2.35-r4::crossdev failed (configure phase): ``` config.log: ``` configure:4199: checking if compiler warns about alias for function with incompatible types cc1: error: '-fstack-clash-protection' is not supported on targets where the stack grows from lower to higher addresses [-Werror] conftest.c:9:34: error: 'foo_alias' alias between functions of incompatible types 'int(const void *, int)' and 'int (*(void))(const void *, int)' [-Werror=attribute-alias=] 9 | extern __typeof (__redirect_foo) foo_alias __attribute__ ((alias ("foo"))); | ^~~~~~~~~ conftest.c:4:28: note: aliased declaration here 4 | __typeof (__redirect_foo) *foo_impl (void) | ^~~~~~~~ cc1: all warnings being treated as errors ``` Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: Add support for LoongArch (ARCH=loong)20220424WANG Xuerui2022-04-242-1/+11
| | | | | | | Closes: https://bugs.gentoo.org/840431 Closes: https://github.com/gentoo/crossdev/pull/2 Signed-off-by: WANG Xuerui <xen0n@gentoo.org> Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: add quotes to set_keywords variableMikk Margus Möll2022-04-191-1/+1
| | | | | | Signed-off-by: Mikk Margus Möll <mikk.margus.moll@eesti.ee> Closes: https://github.com/gentoo/crossdev/pull/1 Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: update copyright lineSam James2022-03-171-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: fix typo in commentSam James2022-03-061-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: use package.use.{mask,force} for pie/sspOskari Pirhonen2022-02-201-16/+29
| | | | | | | | | | A hardened host profile forces the pie and ssp USE flags which is overriding GUSE="-pie -ssp". Use package.use.mask and package.use.force to control the flags. Closes: https://bugs.gentoo.org/831165 Signed-off-by: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
* Add some special riscv sauce. Ugly.20220205Andreas K. Hüttel2022-02-051-0/+32
| | | | | | | | | | | | | | This is necessary since * for glibc, the "fallback" libdir for 64bit is lib64 * for gcc, the "fallback" libdir for 64bit is lib By providing the full multilib libdirs and a compatibility symlink as in baselayout, the pieces fit together again. riscv32 is kinda not affected since both gcc and glibc use lib (NOT lib32, as in the multilib libdirs). Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* crossdev: don't pick ebuild version from overlay if unmatching KEYWORDSSam James2022-01-311-3/+20
| | | | | | | | We don't want to e.g. pick a GCC from an overlay if it doesn't have KEYWORDS for our target, which then leads to an early crossdev failure as it obviously can't then emerge GCC. Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: handle rtems targets via newlibMike Frysinger2022-01-281-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@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>
* Revert "crossdev: disable default ssp support on x86 and ppc on musl"Sam James2021-11-211-3/+0
| | | | | | | | | | | This should be working now -- we've imported fixed GCC to ::gentoo from the musl overlay and we've unmasked + re-enabled SSP everywhere other than crossdev anyway. Bug: https://bugs.gentoo.org/706210 This reverts commit 3756849289a449ff09e329aaa7e26fbd5739805e. Signed-off-by: Sam James <sam@gentoo.org>
* crossdev: fix broken bannerMike Frysinger2021-10-271-2/+2
| | | | | | | | The "prefixify build system and scripts" commit changed the banner code for some reason, and the logic change was completely wrong. So revert that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* crossdev: clean world file on uninstallMike Frysinger2021-10-271-0/+3
| | | | | Closes: https://bugs.gentoo.org/676490 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* crossdev: add command-line options to override toolchain packagesDan Callaghan2021-10-271-0/+13
| | | | | | | | | | For some unusual targets, it may be desirable to use a different package name than the default. For example, a target might use picolibc instead of newlib for its libc package, or it might use a different copy of the gcc package than the usual sys-devel/gcc. Closes: https://bugs.gentoo.org/820176 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>
* Revert "crossdev: follow ARCH=sh removal from ::gentoo"Mike Frysinger2021-10-271-0/+1
| | | | | | | | This reverts commit d4773156d1fb82e26aceefec99355b2546febe23. We maintain a complete list here at all times to keep it simple. 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: disable USE=sanitize for gcc-stage2 as wellSergei Trofimovich2021-07-181-1/+4
| | | | | | Reported-by: tt_1 Bug: https://bugs.gentoo.org/799707 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev, emerge-wrapper: request EAPI=7 on eclass importsDavid Seifert2021-06-212-2/+2
| | | | | | | | | | | | | | | | | | | 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>
* crossdev: fail eval when multilib.eclass sourcing failsSergei Trofimovich2021-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Before the change failure to source 'multilib.eclass' resuled in a fallback mode to be used instead of hard failure. It was caused by two expansion layers of 'eval $(...)'. After the change falure to source 'mmultilib.eclass' hard fails early: ``` $ PORTAGE_CONFIGROOT=$(pwd)/foo EPREFIX=$(pwd)/foo PORT_LOGDIR=$(pwd)/foo ./crossdev -t mmix -P -p * error: : EAPI 0 not supported * * If you file a bug, please attach the following logfiles: * /home/slyfox/dev/git/crossdev/foo/cross--info.log * * error: could not load multilib settings for 'HCHOST' * * If you file a bug, please attach the following logfiles: * /home/slyfox/dev/git/crossdev/foo/cross-mmix-info.log ``` Reported-by: Marco Scardovi (scardracs) Bug: https://bugs.gentoo.org/797367 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: use die() in eval() context to avoid error message swallowingSergei Trofimovich2021-06-211-4/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* README: override PORT_LOGDIR to dry-run testsSergei Trofimovich2021-06-211-1/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: fix "for for" typoSergei Trofimovich2021-06-211-1/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: mark ia64* targets as targets that always require libc headersSergei Trofimovich2021-06-081-0/+6
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: make 'crossdev -t help' a single column outputSergei Trofimovich2021-06-071-9/+16
| | | | 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>
* README: add more tuple examples that happen to work todaySergei Trofimovich2021-01-051-0/+6
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* README: drop toolchain version from examplesSergei Trofimovich2021-01-051-31/+31
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: add or1k exampleSergei Trofimovich2021-01-051-0/+1
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: stop maintaining /etc/portage/categoriesSven Wegener2020-12-311-8/+8
| | | | | | | | | portage uses profiles/categories from all overlays and we don't need to define them in /etc/portage/categories Closes: https://bugs.gentoo.org/762772 Signed-off-by: Sven Wegener <swegener@gentoo.org> Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: explicitly avoid USE=hardened for gcc on mingw targetsSergei Trofimovich2020-11-291-0/+1
| | | | | | | | | | | | Gentoo's USE=hardened unconditionally enables stack check code generation not compatible with external libssp. This leads to gcc ICEs like: libssp/ssp.c:186:1: internal compiler error: in seh_emit_stackalloc Disable USE=hardened until it works on gcc side. Reported-by: redsh Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: default to latest newlib even for stable toolchains.Sergei Trofimovich2020-11-221-2/+5
| | | | | | | | ::gentoo does not have stable keywords for newlib for a while. Let's default to 'latest' to make standard use case to just work. Reported-by: Thymo van Beers Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: disable USE=libraries for stage1 installSergei Trofimovich2020-11-081-3/+6
| | | | | | Reported-by: Paul Bordukov Bug: https://bugs.gentoo.org/751295 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: drop debug outputSergei Trofimovich2020-11-081-2/+0
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: default to latest mingw64-runtime even for stable toolchains.Sergei Trofimovich2020-08-011-0/+8
| | | | | | | | | ::gentoo does not have stable keywords for mingw64-runtime for a while. Let's default to 'latest' to make standard use case to just work.. Reported-by: i.Dark_Templar Bug: https://bugs.gentoo.org/733346 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* crossdev: follow ARCH=sh removal from ::gentooSergei Trofimovich2020-03-261-1/+0
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>