From 95ff4d7de8badd910fbb3342f2287cda0e4696a9 Mon Sep 17 00:00:00 2001 From: ro Date: Fri, 19 Dec 2008 14:59:42 +0000 Subject: 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 --- libffi/configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libffi/configure.ac') 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 -- cgit v1.2.1