diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-03-24 19:00:40 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-03-24 19:00:40 +0000 |
commit | a7689c2abcff4374b84d95fb2df980ec9a566965 (patch) | |
tree | c3a326274492772c07c074a813f1047d5d7f3d62 /eclass/toolchain.eclass | |
parent | b1193c219a8c8da6e1e76cb5d394da129abbca41 (diff) |
gentoo auto-resync : 24:03:2024 - 19:00:40
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 03e6a5d987d1..6a515f9b5c69 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1616,12 +1616,19 @@ gcc_do_filter_flags() { [[ -z ${x} || ${x} -gt 64 ]] && break l1_cache_size=$(taskset --cpu-list ${x} $(tc-getCC) -Q --help=params -O2 -march=native \ | awk '{ if ($1 ~ /^.*param.*l1-cache-size/) print $2; }' || die) - [[ -n ${l1_cache_size} && ${l1_cache_size} =~ "^[0-9]+$" ]] || break + [[ -n ${l1_cache_size} && ${l1_cache_size} =~ ^[0-9]+$ ]] || break l1_cache_sizes[${l1_cache_size}]=1 done - # If any of them are different, just pick the first one. - if [[ ${#l1_cache_sizes} -gt 1 ]] ; then - append-flags --param=l1-cache-size=${l1_cache_size} + # If any of them are different, abort. We can't just pass one value of + # l1-cache-size because it doesn't cancel out the -march=native one. + if [[ ${#l1_cache_sizes[@]} -gt 1 ]] ; then + eerror "Different values of l1-cache-size detected!" + eerror "GCC will fail to bootstrap when comparing files with these flags." + eerror "This CPU is likely big.little/hybrid hardware with power/efficiency cores." + eerror "Please install app-misc/resolve-march-native and run 'resolve-march-native'" + eerror "to find a safe value of CFLAGS for this CPU. Note that this may vary" + eerror "depending on the core it ran on. taskset can be used to fix the cores used." + die "Varying l1-cache-size found, aborting (bug #915389, gcc PR#111768)" fi fi |