aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2009-09-20 10:36:05 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2009-09-20 10:36:05 +0000
commit49576e25cbab7891bc3296e2bcd84d0c284560a6 (patch)
treea84e1e4e16568ba17408fdb8f2fe99d6a35e7ea4 /gcc/configure
parent63c6c7e070b9c79d0a797ed50fa90c8f1d35480d (diff)
downloadgcc-49576e25cbab7891bc3296e2bcd84d0c284560a6.zip
gcc-49576e25cbab7891bc3296e2bcd84d0c284560a6.tar.gz
gcc-49576e25cbab7891bc3296e2bcd84d0c284560a6.tar.bz2
configure.ac (gcc_cv_ld_mips_personality_relaxation): New feature check.
gcc/ * configure.ac (gcc_cv_ld_mips_personality_relaxation): New feature check. (HAVE_LD_PERSONALITY_RELAXATION): New macro definition. * configure, config.in: Regenerate. * dwarf2asm.c (eh_data_format_name): Handle DW_EH_PE_indirect | DW_EH_PE_absptr. * config/mips/mips.h (TARGET_WRITABLE_EH_FRAME): New macro. (ASM_PREFERRED_EH_DATA_FORMAT): Define. Use MIPS_EH_INDIRECT for global data if the output could be used in a shared library. * config/mips/mips.c (mips_override_options): Set flag_dwarf2_cfi_asm to 0 if TARGET_WRITABLE_EH_FRAME. From-SVN: r151896
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure51
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/configure b/gcc/configure
index 2369ba7..ced17cd 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -23725,6 +23725,57 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
$as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker for .eh_frame personality relaxation" >&5
+$as_echo_n "checking linker for .eh_frame personality relaxation... " >&6; }
+if test "${gcc_cv_ld_mips_personality_relaxation+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gcc_cv_ld_mips_personality_relaxation=no
+ if test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 \
+ -a "$gcc_cv_gld_minor_version" -ge 21 \
+ -o "$gcc_cv_gld_major_version" -gt 2; then
+ gcc_cv_ld_mips_personality_relaxation=yes
+ fi
+ elif test x$gcc_cv_as != x \
+ -a x$gcc_cv_ld != x \
+ -a x$gcc_cv_readelf != x ; then
+ cat > conftest.s <<EOF
+ .cfi_startproc
+ .cfi_personality 0x80,indirect_ptr
+ .ent test
+test:
+ nop
+ .end test
+ .cfi_endproc
+
+ .section .data,"aw",@progbits
+indirect_ptr:
+ .dc.a personality
+EOF
+ if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
+ if $gcc_cv_readelf -d conftest 2>&1 \
+ | grep TEXTREL > /dev/null 2>&1; then
+ :
+ elif $gcc_cv_readelf --relocs conftest 2>&1 \
+ | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_ld_mips_personality_relaxation=yes
+ fi
+ fi
+ fi
+ rm -f conftest.s conftest.o conftest
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_ld_mips_personality_relaxation" >&5
+$as_echo "$gcc_cv_ld_mips_personality_relaxation" >&6; }
+ if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
+
+$as_echo "#define HAVE_LD_PERSONALITY_RELAXATION 1" >>confdefs.h
+
+ fi
;;
esac