diff -rupN libffi-3.0.11.orig/configure libffi-3.0.11/configure --- libffi-3.0.11.orig/configure 2012-04-12 13:13:17.000000000 +1000 +++ libffi-3.0.11/configure 2012-12-03 00:21:59.307350787 +1100 @@ -14252,10 +14252,10 @@ if ${libffi_cv_as_x86_pcrel+:} false; th $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 | $EGREP -i 'illegal|warning' > /dev/null; then - libffi_cv_as_x86_pcrel=no + if $CC $CFLAGS -c conftest.s > /dev/null; then + libffi_cv_as_x86_pcrel=yes fi fi diff -rupN libffi-3.0.11.orig/configure.ac libffi-3.0.11/configure.ac --- libffi-3.0.11.orig/configure.ac 2012-04-12 13:10:51.000000000 +1000 +++ libffi-3.0.11/configure.ac 2012-12-03 00:22:01.467491113 +1100 @@ -297,10 +297,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 | $EGREP -i 'illegal|warning' > /dev/null; then - libffi_cv_as_x86_pcrel=no + if $CC $CFLAGS -c conftest.s > /dev/null; then + libffi_cv_as_x86_pcrel=yes fi ]) if test "x$libffi_cv_as_x86_pcrel" = xyes; then