summaryrefslogtreecommitdiff
path: root/libffi/configure
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-16 22:09:22 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-16 22:09:22 +0000
commit1da888ec71546d0aa101f154847eac8baadfa6f9 (patch)
tree0263f96916c31cb329b80472caf4f2a3a0ffa797 /libffi/configure
parent9e46e77e7dafd4a35f9f6139693f80e26515258c (diff)
downloadgcc-1da888ec71546d0aa101f154847eac8baadfa6f9.tar.gz
* configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section
should be read-only. * configure: Rebuilt. * fficonfig.h.in: Rebuilt. * include/ffi.h.in (EH_FRAME_FLAGS): Define. * src/alpha/osf.S: Use EH_FRAME_FLAGS. * src/powerpc/linux64.S: Likewise. * src/powerpc/linux64_closure.S: Likewise. Include ffi.h. * src/powerpc/sysv.S: Use EH_FRAME_FLAGS. Use pcrel encoding if -fpic/-fPIC/-mrelocatable. * src/powerpc/powerpc_closure.S: Likewise. * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include #write in .eh_frame flags. * src/sparc/v9.S: Likewise. * src/x86/unix64.S: Use EH_FRAME_FLAGS. * src/x86/sysv.S: Likewise. Use pcrel encoding if -fpic/-fPIC. * src/s390/sysv.S: Use EH_FRAME_FLAGS. Include ffi.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66887 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/configure')
-rwxr-xr-xlibffi/configure28
1 files changed, 28 insertions, 0 deletions
diff --git a/libffi/configure b/libffi/configure
index 5cbef7ab2fa..9c2550d0ada 100755
--- a/libffi/configure
+++ b/libffi/configure
@@ -3638,6 +3638,34 @@ EOF
fi
fi
+echo $ac_n "checking whether .eh_frame section should be read-only""... $ac_c" 1>&6
+echo "configure:3495: checking whether .eh_frame section should be read-only" >&5
+if eval "test \"`echo '$''{'libffi_cv_ro_eh_frame'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ libffi_cv_ro_eh_frame=no
+ echo 'extern void foo (void); void bar (void) { foo (); foo (); }' > conftest.c
+ if $CC $CFLAGS -S -fpic -fexceptions -o conftest.s conftest.c > /dev/null 2>&1; then
+ if grep '.section.*eh_frame.*"a"' conftest.s > /dev/null; then
+ libffi_cv_ro_eh_frame=yes
+ elif grep '.section.*eh_frame.*#alloc' conftest.c \
+ | grep -v '#write' > /dev/null; then
+ libffi_cv_ro_eh_frame=yes
+ fi
+ fi
+ rm -f conftest.*
+
+fi
+
+echo "$ac_t""$libffi_cv_ro_eh_frame" 1>&6
+if test "x$libffi_cv_ro_eh_frame" = xyes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_RO_EH_FRAME 1
+EOF
+
+fi
+