summaryrefslogtreecommitdiffstats
path: root/libffi/configure.ac
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-19 14:59:42 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-19 14:59:42 +0000
commit95ff4d7de8badd910fbb3342f2287cda0e4696a9 (patch)
tree0015f236039dc18cb0d69c465abfae9a5714bac7 /libffi/configure.ac
parent1c10b9d7f78f9b93f87081076d9f9526f90d5b29 (diff)
downloadppe42-gcc-95ff4d7de8badd910fbb3342f2287cda0e4696a9.tar.gz
ppe42-gcc-95ff4d7de8badd910fbb3342f2287cda0e4696a9.zip
PR libffi/26048
* configure.ac (HAVE_AS_X86_PCREL): New test. * configure: Regenerate. * fficonfig.h.in: Regenerate. * src/x86/sysv.S [!FFI_NO_RAW_API]: Precalculate RAW_CLOSURE_CIF_OFFSET, RAW_CLOSURE_FUN_OFFSET, RAW_CLOSURE_USER_DATA_OFFSET for the Solaris 10/x86 assembler. (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL. * src/x86/unix64.S (.Lstore_table): Move to .text section. (.Lload_table): Likewise. (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142835 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/configure.ac')
-rw-r--r--libffi/configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/libffi/configure.ac b/libffi/configure.ac
index b99ebd7db65..2dff35c060f 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -240,6 +240,21 @@ if test x$TARGET = xSPARC; then
fi
fi
+if test x$TARGET = xX86 || 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
+ 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
+ fi
+ ])
+ if test "x$libffi_cv_as_x86_pcrel" = xyes; then
+ AC_DEFINE(HAVE_AS_X86_PCREL, 1,
+ [Define if your assembler supports PC relative relocs.])
+ fi
+fi
+
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
libffi_cv_ro_eh_frame, [
libffi_cv_ro_eh_frame=no
OpenPOWER on IntegriCloud