diff options
author | hjl-tools <hjl.tools@gmail.com> | 2020-12-02 12:52:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 15:52:12 -0500 |
commit | cb8474368cdef3207638d047bd6c707ad8fcb339 (patch) | |
tree | 6d5144a9401338461b884b9d0368e4101c2bfc84 /configure.host | |
parent | e70bf987daa7b7b5df2de7579d5c51a888e8bf7d (diff) | |
download | libffi-cb8474368cdef3207638d047bd6c707ad8fcb339.tar.gz |
libffi/x86: Always check __x86_64__ for x32 hosts (#601) (#602)
Since for x86_64-*x32 and x86_64-x32-* hosts, -m32 generates ia32 codes.
We should always check __x86_64__ for x32 hosts.
Diffstat (limited to 'configure.host')
-rw-r--r-- | configure.host | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/configure.host b/configure.host index d9623e9..257b784 100644 --- a/configure.host +++ b/configure.host @@ -115,22 +115,14 @@ case "${host}" in i?86-*-* | x86_64-*-* | amd64-*) TARGETDIR=x86 if test $ac_cv_sizeof_size_t = 4; then - case "$host" in - x86_64-*x32|x86_64-x32-*) - TARGET_X32=yes - TARGET=X86_64 - ;; - *) - echo 'int foo (void) { return __x86_64__; }' > conftest.c - if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then - TARGET_X32=yes - TARGET=X86_64 - else - TARGET=X86; - fi - rm -f conftest.* - ;; - esac + echo 'int foo (void) { return __x86_64__; }' > conftest.c + if $CC $CFLAGS -Werror -S conftest.c -o conftest.s > /dev/null 2>&1; then + TARGET_X32=yes + TARGET=X86_64 + else + TARGET=X86; + fi + rm -f conftest.* else TARGET=X86_64; fi |