]> granicus.if.org Git - python/commitdiff
Issue #11729: Backport commit bff052d9 from libffi upstream in order to fix
authorStefan Krah <skrah@bytereef.org>
Sun, 27 Jan 2013 17:00:24 +0000 (18:00 +0100)
committerStefan Krah <skrah@bytereef.org>
Sun, 27 Jan 2013 17:00:24 +0000 (18:00 +0100)
a ctypes build failure with clang.

Modules/_ctypes/libffi/configure
Modules/_ctypes/libffi/configure.ac

index c5c70b19a60fd2c9edf15ed9b2d05dd680985741..e5ba047ec8345dd7d5054d787fffcbdfef5c66e1 100755 (executable)
@@ -12262,10 +12262,10 @@ if test "${libffi_cv_as_x86_pcrel+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
 
-       libffi_cv_as_x86_pcrel=yes
+       libffi_cv_as_x86_pcrel=no
        echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
-       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
-           libffi_cv_as_x86_pcrel=no
+       if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
+           libffi_cv_as_x86_pcrel=yes
        fi
 
 fi
index 87c63e12bf4abb3f42fd41e5b358a560312585d0..d21f5e7c73ce679eac7fc6e2b7bebf4df51ac2ca 100644 (file)
@@ -274,10 +274,10 @@ fi
 if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64; then
     AC_CACHE_CHECK([assembler supports pc related relocs],
        libffi_cv_as_x86_pcrel, [
-       libffi_cv_as_x86_pcrel=yes
+       libffi_cv_as_x86_pcrel=no
        echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
-       if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
-           libffi_cv_as_x86_pcrel=no
+       if $CC $CFLAGS -c conftest.s > /dev/null 2>&1; then
+           libffi_cv_as_x86_pcrel=yes
        fi
        ])
     if test "x$libffi_cv_as_x86_pcrel" = xyes; then