summaryrefslogtreecommitdiffstats
path: root/libffi/configure.in
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-28 19:57:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-28 19:57:42 +0000
commitb40c762bb40e5b879b5a20b4a7d2c736d4a56598 (patch)
tree8f8fb5903fbe17a1cd591f2bd8975d96fdb09d5f /libffi/configure.in
parentdb6798b562b51d84d776d8e6506cd43e7fc889f8 (diff)
downloadppe42-gcc-b40c762bb40e5b879b5a20b4a7d2c736d4a56598.tar.gz
ppe42-gcc-b40c762bb40e5b879b5a20b4a7d2c736d4a56598.zip
* configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working
%r_disp32(). * src/sparc/v8.S: Use it. * src/sparc/v9.S: Likewise. * fficonfig.h.in: Rebuilt. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/configure.in')
-rw-r--r--libffi/configure.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/libffi/configure.in b/libffi/configure.in
index 9dfa33dfebb..9e9ab1c1425 100644
--- a/libffi/configure.in
+++ b/libffi/configure.in
@@ -96,6 +96,24 @@ AC_COMPILE_CHECK_SIZEOF(long double)
AC_COMPILE_CHECK_SIZEOF(void *)
AC_C_BIGENDIAN_CROSS
+if test x$TARGET == xSPARC; then
+ AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
+ libffi_cv_as_sparc_ua_pcrel, [
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS -fpic"
+ LDFLAGS="$LDFLAGS -shared"
+ AC_TRY_LINK([asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");],,
+ [libffi_cv_as_sparc_ua_pcrel=yes],
+ [libffi_cv_as_sparc_ua_pcrel=no])
+ CFLAGS="$save_CFLAGS"
+ LDFLAGS="$save_LDFLAGS"])
+ if test "x$libffi_cv_as_sparc_ua_pcrel" = xyes; then
+ AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
+ [Define if your assembler and linker support unaligned PC relative relocs.])
+ fi
+fi
+
AC_SUBST(TARGET)
AC_SUBST(TARGETDIR)
OpenPOWER on IntegriCloud