public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2231] libffi/x86: Always check __x86_64__ for x86 hosts
@ 2021-07-09 22:31 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2021-07-09 22:31 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:506f337ad2d75c0feceaaf28fd4997c157979956
commit r12-2231-g506f337ad2d75c0feceaaf28fd4997c157979956
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Jul 5 14:15:04 2021 -0700
libffi/x86: Always check __x86_64__ for x86 hosts
The upstream libffi has
commit cb8474368cdef3207638d047bd6c707ad8fcb339
Author: hjl-tools <hjl.tools@gmail.com>
Date: Wed Dec 2 12:52:12 2020 -0800
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.
Since for gnux32 hosts, -m32 generates i386 codes, always check __x86_64__
for x86 hosts.
PR libffi/101336
* configure.host: Always check __x86_64__ for x86 hosts.
Diff:
---
libffi/configure.host | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/libffi/configure.host b/libffi/configure.host
index 786b32c5bb0..7248acb7458 100644
--- a/libffi/configure.host
+++ b/libffi/configure.host
@@ -95,20 +95,13 @@ case "${host}" in
i?86-*-* | x86_64-*-* | amd64-*)
TARGETDIR=x86
if test $ac_cv_sizeof_size_t = 4; then
- case "$host" in
- *-gnux32)
- 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=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=X86_64;
+ else
+ TARGET=X86;
+ fi
+ rm -f conftest.*
else
TARGET=X86_64;
fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-09 22:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 22:31 [gcc r12-2231] libffi/x86: Always check __x86_64__ for x86 hosts H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).