[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: Add x32 support to config.guess
From: |
H.J. Lu |
Subject: |
PATCH: Add x32 support to config.guess |
Date: |
Thu, 16 Aug 2012 10:26:48 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi,
GCC on Linux/x86-64 may be configured for x32:
https://sites.google.com/site/x32abi/
by default and the Linux/x32 target should be x86_64-VENDOR-linux-gnux32.
This patch adds x32 support to config.guess. OK to install?
Thanks.
H.J.
---
2012-08-16 H.J. Lu <address@hidden>
* config.guess (x86_64:Linux:*:*): Append x32 if compiler is
configured for 32-bit objects.
diff --git a/config.guess b/config.guess
index b02565c..4b0f7c2 100755
--- a/config.guess
+++ b/config.guess
@@ -984,7 +984,18 @@ EOF
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ eval $set_cc_for_build
+ X86_64_ABI=
+ # If there is a compiler, see if it is configured for 32-bit objects.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ X86_64_ABI=x32
+ fi
+ fi
+ echo x86_64-unknown-linux-gnu${X86_64_ABI}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- PATCH: Add x32 support to config.guess,
H.J. Lu <=