Set TARGET to X86_64 if __x86_64__ is defined
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 13 Jan 2015 15:57:27 +0000 (15:57 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 13 Jan 2015 15:57:27 +0000 (07:57 -0800)
PR bootstrap/64575
* configure.host (TARGET): Set to X86_64 if __x86_64__ is defined.

From-SVN: r219539

libffi/ChangeLog
libffi/configure.host

index cbdb173ca6053989371c07703710851d184a2326..15661204a09f55acde4bb95d3d90e5f37739ec18 100644 (file)
@@ -1,3 +1,8 @@
+2015-01-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR bootstrap/64575
+       * configure.host (TARGET): Set to X86_64 if __x86_64__ is defined.
+
 2015-01-12  Richard Henderson  <rth@redhat.com>
 
        PR libffi/64572
index 90de638b30cbb6352cb181af3a6e0df8d673ec9e..e310191e018b54e2bcec745754a0dfb58bd97de9 100644 (file)
@@ -100,7 +100,13 @@ case "${host}" in
              TARGET=X86_64
              ;;
            *)
-             TARGET=X86
+             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