[Bug libffi/101336] New: Incorrect target on gnux32 hosts
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jul 5 21:19:18 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101336
Bug ID: 101336
Summary: Incorrect target on gnux32 hosts
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libffi
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
configure.host has
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
else
TARGET=X86_64;
fi
;;
But for gnux32 hosts, -m32 generates ia32 codes. We should always
check __x86_64__ for x86 hosts.
More information about the Gcc-bugs
mailing list