commit:     d9d631a188bd27b62082fd93a7f434b00e458b1b
Author:     Nicholas Vinson <nvinson234 <AT> gmail <DOT> com>
AuthorDate: Wed Feb 22 00:57:55 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 19:29:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9d631a1

dev-libs/openssl: gentoo.config-1.0.4 clang fix

Update gentoo.config-1.0.4 to better support clang compiler toolchains

Closes: https://bugs.gentoo.org/885901
Signed-off-by: Nicholas Vinson <nvinson234 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29711
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 dev-libs/openssl/files/gentoo.config-1.0.4 | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-libs/openssl/files/gentoo.config-1.0.4 
b/dev-libs/openssl/files/gentoo.config-1.0.4
index 573a97de3543..79f6331f090c 100644
--- a/dev-libs/openssl/files/gentoo.config-1.0.4
+++ b/dev-libs/openssl/files/gentoo.config-1.0.4
@@ -77,7 +77,9 @@ fi
 
 # Detect target arch
 machine=""
+submachine=""
 chost_machine=${CHOST%%-*}
+[[ ${CC} == *clang* ]] && submachine="-clang"
 case ${system} in
 linux)
        case ${chost_machine}:${ABI} in
@@ -95,7 +97,7 @@ linux)
        #       hppa64*)      machine=parisc64;;
                hppa*)        machine="generic32 -DB_ENDIAN";;
                i[0-9]86*|\
-               x86_64*:x86)  machine=x86;;
+               x86_64*:x86)  machine=x86${submachine};;
                ia64*)        machine=ia64;;
                loongarch64*) machine="loongarch64 -DL_ENDIAN" system=linux64;;
                m68*)         machine="latomic -DB_ENDIAN";;
@@ -125,7 +127,7 @@ linux)
                s390x*)       machine=s390x system=linux64;;
                s390*)        machine="generic32 -DB_ENDIAN";;
                x86_64*:x32)  machine=x32;;
-               x86_64*)      machine=x86_64;;
+               x86_64*)      machine=x86_64${submachine};;
        esac
        ;;
 BSD)

Reply via email to