sys-libs/glibc: Drop SPARC CHOST mangling
authorMatt Turner <mattst88@gentoo.org>
Wed, 25 Mar 2020 21:34:07 +0000 (14:34 -0700)
committerMatt Turner <mattst88@gentoo.org>
Thu, 26 Mar 2020 04:37:30 +0000 (21:37 -0700)
Before "multiarch" support in glibc, picking a different CHOST would
select which optimized paths were built. Multiarch support was added in
glibc commit 3afd5a3b5556 (sparc: Add multiarch support for
memset/bzero/memcpy.) in 2010 before glibc-2.12.

Before glibc-2.30 glibc dropped support for SPARC v7 in commit
5d9b7b9fa734 (Remove 32 bit sparc v7 support) and in the process cleaned
up some configuration logic that accepted a wide variety of (now unused
CHOST values), thus causing the build to fail for us when we select a
now unknown CHOST.

Simply drop this logic, since it shouldn't be needed for any glibc since
2.11.

Signed-off-by: Matt Turner <mattst88@gentoo.org>
sys-libs/glibc/glibc-2.30-r6.ebuild
sys-libs/glibc/glibc-2.31-r2.ebuild
sys-libs/glibc/glibc-9999.ebuild

index 5b0ea0c9dc196b58b6769104849957a2bf6aea18..a2c6434e55991896980d363bfbea04bd43e0b009 100644 (file)
@@ -301,77 +301,27 @@ setup_target_flags() {
                        filter-flags "-fcall-used-g7"
                        append-flags "-fcall-used-g6"
 
-                       # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
-                       # try to pick a better one so glibc can use cpu-specific .S files.
-                       # We key off the CFLAGS to get a good value.  Also need to handle
-                       # version skew.
-                       # We can't force users to set their CHOST to their exact machine
-                       # as many of these are not recognized by config.sub/gcc and such :(.
-                       # Note: If the mcpu values don't scale, we might try probing CPP defines.
-                       # Note: Should we factor in -Wa,-AvXXX flags too ?  Or -mvis/etc... ?
-
                        local cpu
                        case ${CTARGET} in
                        sparc64-*)
+                               cpu="sparc64"
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparc64v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparc64b"
-                                       ;;
-                               *)
+                               v9)
                                        # We need to force at least v9a because the base build doesn't
                                        # work with just v9.
                                        # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
-                                       [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
+                                       append-flags "-Wa,-xarch=v9a"
                                        ;;
                                esac
                                ;;
                        sparc-*)
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparcv9v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparcv9b"
-                                       ;;
-                               v9|ultrasparc)
-                                       cpu="sparcv9"
-                                       ;;
                                v8|supersparc|hypersparc|leon|leon3)
                                        cpu="sparcv8"
                                        ;;
+                               *)
+                                       cpu="sparcv9"
+                                       ;;
                                esac
                        ;;
                        esac
index 15ee5c7051cb4bd11057dd1022b05730fe61850e..e180533f0fc2aedfd9be7d0ad5138e1c8515eaf8 100644 (file)
@@ -292,77 +292,27 @@ setup_target_flags() {
                        filter-flags "-fcall-used-g7"
                        append-flags "-fcall-used-g6"
 
-                       # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
-                       # try to pick a better one so glibc can use cpu-specific .S files.
-                       # We key off the CFLAGS to get a good value.  Also need to handle
-                       # version skew.
-                       # We can't force users to set their CHOST to their exact machine
-                       # as many of these are not recognized by config.sub/gcc and such :(.
-                       # Note: If the mcpu values don't scale, we might try probing CPP defines.
-                       # Note: Should we factor in -Wa,-AvXXX flags too ?  Or -mvis/etc... ?
-
                        local cpu
                        case ${CTARGET} in
                        sparc64-*)
+                               cpu="sparc64"
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparc64v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparc64b"
-                                       ;;
-                               *)
+                               v9)
                                        # We need to force at least v9a because the base build doesn't
                                        # work with just v9.
                                        # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
-                                       [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
+                                       append-flags "-Wa,-xarch=v9a"
                                        ;;
                                esac
                                ;;
                        sparc-*)
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparcv9v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparcv9b"
-                                       ;;
-                               v9|ultrasparc)
-                                       cpu="sparcv9"
-                                       ;;
                                v8|supersparc|hypersparc|leon|leon3)
                                        cpu="sparcv8"
                                        ;;
+                               *)
+                                       cpu="sparcv9"
+                                       ;;
                                esac
                        ;;
                        esac
index a8207576779e478f59d57605c5e4bc00f257f8a2..1bc1d7e7ec82d6ad124a5a6307eec32a5f79b54a 100644 (file)
@@ -291,77 +291,27 @@ setup_target_flags() {
                        filter-flags "-fcall-used-g7"
                        append-flags "-fcall-used-g6"
 
-                       # If the CHOST is the basic one (e.g. not sparcv9-xxx already),
-                       # try to pick a better one so glibc can use cpu-specific .S files.
-                       # We key off the CFLAGS to get a good value.  Also need to handle
-                       # version skew.
-                       # We can't force users to set their CHOST to their exact machine
-                       # as many of these are not recognized by config.sub/gcc and such :(.
-                       # Note: If the mcpu values don't scale, we might try probing CPP defines.
-                       # Note: Should we factor in -Wa,-AvXXX flags too ?  Or -mvis/etc... ?
-
                        local cpu
                        case ${CTARGET} in
                        sparc64-*)
+                               cpu="sparc64"
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparc64v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparc64v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparc64b"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparc64b"
-                                       ;;
-                               *)
+                               v9)
                                        # We need to force at least v9a because the base build doesn't
                                        # work with just v9.
                                        # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
-                                       [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a"
+                                       append-flags "-Wa,-xarch=v9a"
                                        ;;
                                esac
                                ;;
                        sparc-*)
                                case $(get-flag mcpu) in
-                               niagara[234])
-                                       if ver_test -ge 2.8 ; then
-                                               cpu="sparcv9v2"
-                                       elif ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               niagara)
-                                       if ver_test -ge 2.4 ; then
-                                               cpu="sparcv9v"
-                                       elif ver_test -ge 2.2.3 ; then
-                                               cpu="sparcv9b"
-                                       else
-                                               cpu="sparcv9"
-                                       fi
-                                       ;;
-                               ultrasparc3)
-                                       cpu="sparcv9b"
-                                       ;;
-                               v9|ultrasparc)
-                                       cpu="sparcv9"
-                                       ;;
                                v8|supersparc|hypersparc|leon|leon3)
                                        cpu="sparcv8"
                                        ;;
+                               *)
+                                       cpu="sparcv9"
+                                       ;;
                                esac
                        ;;
                        esac