| Michael Stahl | 11e7760 | 2012-11-27 16:23:57 +0100 | [diff] [blame] | 1 | fix clang build problem: |
| 2 | |
| 3 | python3/Modules/_ctypes/libffi/src/x86/sysv.S:389:17: error: invalid variant ´rel´ |
| 4 | Patch by: Rafael Avila de Espindola <respindola at mozilla dot com> |
| 5 | https://417179.bugs.gentoo.org/attachment.cgi?id=313299 |
| 6 | |
| 7 | diff -ru python3.old/Modules/_ctypes/libffi/configure.ac python3/Modules/_ctypes/libffi/configure.ac |
| 8 | --- python3.old/Modules/_ctypes/libffi/configure.ac 2012-09-29 10:00:42.000000000 +0200 |
| 9 | +++ python3/Modules/_ctypes/libffi/configure.ac 2012-11-27 16:12:44.421564130 +0100 |
| 10 | @@ -303,10 +303,10 @@ |
| 11 | if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64; then |
| 12 | AC_CACHE_CHECK([assembler supports pc related relocs], |
| 13 | libffi_cv_as_x86_pcrel, [ |
| 14 | - libffi_cv_as_x86_pcrel=yes |
| 15 | + libffi_cv_as_x86_pcrel=no |
| 16 | echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s |
| 17 | - if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then |
| 18 | - libffi_cv_as_x86_pcrel=no |
| 19 | + if $CC $CFLAGS -c conftest.s > /dev/null; then |
| 20 | + libffi_cv_as_x86_pcrel=yes |
| 21 | fi |
| 22 | ]) |
| 23 | if test "x$libffi_cv_as_x86_pcrel" = xyes; then |
| 24 | diff -ru python3.old/Modules/_ctypes/libffi/configure python3/Modules/_ctypes/libffi/configure |
| 25 | --- python3.old/Modules/_ctypes/libffi/configure 2012-09-29 10:00:42.000000000 +0200 |
| 26 | +++ python3/Modules/_ctypes/libffi/configure 2012-11-27 16:12:44.420564130 +0100 |
| 27 | @@ -14322,10 +14322,10 @@ |
| 28 | $as_echo_n "(cached) " >&6 |
| 29 | else |
| 30 | |
| 31 | - libffi_cv_as_x86_pcrel=yes |
| 32 | + libffi_cv_as_x86_pcrel=no |
| 33 | echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s |
| 34 | - if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then |
| 35 | - libffi_cv_as_x86_pcrel=no |
| 36 | + if $CC $CFLAGS -c conftest.s > /dev/null; then |
| 37 | + libffi_cv_as_x86_pcrel=yes |
| 38 | fi |
| 39 | |
| 40 | fi |