| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
There is some more output from the compiler here.
We must use a regular expression to avoid a false positive from mold.
Acked-by: Sam James <sam@gentoo.org>
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is kind of related to what Ionen mentioned at https://github.com/gentoo/gentoo/pull/28355#discussion_r1033001927
but a bit different.
Makefile rules are inconsistent, as are users, and -fuse-ld= might appear
in C{,XX}FLAGS, not just LDFLAGS.
Append -fuse-ld=bfd there too if asked to force bfd. This might
cause problems with Clang because the argument is unused. See the
mess in ddba1d149e82dba88b72f992729ad4158f640e32.
Not having flag-o-matic here makes things a bit awkward. Let's try
the naive approach first because it seemed OK for me with Clang
with a quick test.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
At https://github.com/gentoo/gentoo/pull/28355#discussion_r1089883885, juippis
points out that for mold, the test might be confused. Let's consistently
use 'linker' instead.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't think this function makes sense in a world with lld and mold.
If there's a bug causing someone to reach for tc-ld-disable-gold,
it falls into one of the following:
1. there's bfdisms (like wine where there's no hope)
=> tc-ld-force-bfd is the correct solution
2. it's a generic problem like underlinking
=> patch the package please, but in extremis or as a temporary workaround,
tc-ld-force-bfd could be used (but discouraged in this situation)
3. it's a gold bug (i.e. the package is definitely only broken with gold)
=> report the issue upstream or force bfd if the package is truly
doing something a bit unusual ("the wine case"), but really, given
gold seems to be rotting away, it doesn't appear likely any bugs
would get fixed & users shouldn't be enabling it.
I also think tc-ld-disable-gold has been used hastily in the past
for cases like 2, so let's discourage that in deprecating this as well.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
For say, mold, until now tc-ld-force-bfd actually didn't work, because
it bailed early if not lld and not gold (assuming the linker was therefore bfd).
Closes: https://bugs.gentoo.org/877539
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
For completeness.
Bug: https://bugs.gentoo.org/877539
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
This matches tc-ld-is-gold and tc-ld-is-lld.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
- support Darwin
- support arm64 (Apple Silicon) Darwin
- skip gen_usr_ldscript on Prefix targets
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a helper function to check whether time_t is 64-bit. This could
be used e.g. to deselect tests that rely on timestamps exceeding Y2k38.
It is meant to be more future-proof than hardcoding a list of 32-bit
architectures, given the necessity of switching to 64-bit time_t
in the future.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix tc-is-lto function to remove the temporary file after testing.
Besides being cleaner, this fixes a permission problem when using
Paludis and tc-is-lto is used both in pkg_setup() (which creates
the temporary file owned by root) and src_*() phase (which attempts
to rewrite it as a regular user).
Thanks to negril for the report!
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to check whether the C compiler is using LTO.
To determine this, we compile a dummy source unit. In the GCC case,
we check whether the resulting object file contains ".gnu.lto*"
sections. In the clang case, we check whether a valid LLVM bytecode
file was output rather than a regular object.
The goal of this change is to reduce the amount of USE=lto abuse,
and have a consistent cross-package way of enabling LTO via setting
appropriate CFLAGS and CXXFLAGS.
Closes: https://github.com/gentoo/gentoo/pull/34470
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
tc-get-ptr-size for CHOST and tc-get-build-ptr-size for CBUILD.
Closes: https://bugs.gentoo.org/328401
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous logic would fail with common values of LD set by the user:
LD="ld.lld" -> LD="ld.lld.bfd"
LD="ld.gold" -> LD="ld.gold.bfd"
LD="mold" -> LD="mold.bfd"
It makes more sense to ignore the user's LD setting and use the default
value given by tc-getLD.
If the user doesn't have binutils installed, the "type -P" check will still
fail and LD will be unaltered.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
ARC is bi-endian. Assumes ARCH=arc. No plans to add profiles or
keywords to official tree.
Signed-off-by: Matoro Mahri <matoro_gentoo@matoro.tk>
Closes: https://github.com/gentoo/gentoo/pull/33554
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
tc-has-openmp function was deprecated in commit 9bc832c6d39b
("toolchain-funcs.eclass: deprecate tc-has-openmp") and later removed in
commit eb970274d283 ("toolchain-funcs.eclass: remove tc-has-openmp").
Due to this, the reference to it in the tc-check-openmp function has
become redundant and is therefore removed.
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/32903
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Newer libcxx uses _LIBCPP_ENABLE_HARDENED_MODE instead of _LIBCPP_ENABLE_ASSERTIONS
which is now deprecated.
Bug: https://bugs.gentoo.org/912223
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
I didn't want to drop this entirely in c26413ae8029f1557aae95b6f8744fc16671fa3b
as I wanted to keep it to just fixing the error I'd made, but I don't see the
point in keeping this now anyway - non-gcc/clang isn't a thing and if it is
I'd hope they'd support -fuse-ld=bfd anyway.
Plus it's an obvious approach if we need it for something else like forcing
an alt linker that isn't bfd anyway, no need for having cruft remaining.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It makes a bit more sense (although still a bit suspicious, wonder if should
strip . as well, see c26413ae8029f1557aae95b6f8744fc16671fa3b and bug #911503
where we had 'ld.lld.bd') now with the comment in the right place.
It was added originally for bug #545218 (b959fb6c158d4727e85472b3a50af5af3f719972).
Bug: https://bugs.gentoo.org/545218
Bug: https://bugs.gentoo.org/911503
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Before c4e911da66c918bd0944d1457776b82260657cd6, fallback would be false
for newer GCC and Clang, not true.
Thanks to parona for giving the nudge.
Closes: https://bugs.gentoo.org/911503
Fixes: c4e911da66c918bd0944d1457776b82260657cd6
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Lost in rebase as kept changing between splitting/unsplitting sparc64*.
Thanks to dilfridge & ionen for spotting.
Fixes: d1c60c8515d1487149bda90575609a757b8246ef
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
| |
This is generally what we do in patches and such.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
SSP and PIE are relevant to C++ too.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/884417
Bug: https://bugs.gentoo.org/876895
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
As Zero_Chaos reported on IRC, the check we had wasn't good enough in systemd*
(before we were able to remove it), as it wouldn't fire for e.g. -Os. While we
could've changed it to fail safe (always unset, then set a lower F_S if possible),
let's add a proper helper instead to the eclass.
Bug: https://bugs.gentoo.org/841770
Bug: https://bugs.gentoo.org/847148
Bug: https://bugs.gentoo.org/876893
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
| |
It's generally useful and already directly used by three packages. I
need to use it to fix cross-compiling of LLVM.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were setting CBUILD within econf_build but not CHOST. crossdev's
/usr/share/config.site relies on both of these to decide whether to load
configure overrides needed when cross-compiling. Using the wrong
overrides leads to packages such as Python failing.
Doing this also avoids the need to duplicate the --build and --host
configure arguments.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
| |
It's non-portable and we're looking to remove it from @system.
Bug: https://bugs.gentoo.org/487696
Bug: https://bugs.gentoo.org/646588
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add a new tc-get-c-rtlib() that attempts to get the runtime used
by the current C compiler. Currently it supports compiler-rt
and libgcc.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add a new tc-get-cxx-stdlib() that attempts to get the C++ stdlib
variant used by the current C++ compiler. Currently it supports libc++
and libstdc++ (GCC's stdlib).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
| |
Failed to generate otherwise. But it's nearly gone!
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
tc-ld-is-gold and tc-ld-is-lld check the output of ld --version.
This output may vary depending on the language selected by the user.
Set LC_ALL=C to force English output.
Bug: https://bugs.gentoo.org/854147
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|