diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-21 11:57:35 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-21 11:57:35 +0000 |
commit | 75d28287306a93bc310f3cfabf9ed8a3dff3e24d (patch) | |
tree | 9be6d4aa2a0cb4293f5051bcf62c9edbd152923f /gcc/configure.ac | |
parent | 2428e53ac6e00bb8830e3e66323063d380ee2e98 (diff) | |
download | gcc-75d28287306a93bc310f3cfabf9ed8a3dff3e24d.tar.gz |
Default to DWARF 4 on Solaris if linker supports CIEv3
* configure.ac (gcc_cv_ld_eh_frame_ciev3): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/sol2.c (solaris_override_options): Only enforce DWARF 2
if !HAVE_LD_EH_FRAME_CIEV3.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196866 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 53cea1d5f9e..40a1af7a4a4 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4349,6 +4349,42 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then fi AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr) +AC_MSG_CHECKING(linker CIEv3 in .eh_frame support) +gcc_cv_ld_eh_frame_ciev3=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ + && test $in_tree_ld_is_elf = yes; then + gcc_cv_ld_eh_frame_ciev3=yes + fi +elif test x$gcc_cv_ld != x; then + if echo "$ld_ver" | grep GNU > /dev/null; then + gcc_cv_ld_eh_frame_ciev3=yes + if test 0"$ld_date" -lt 20040513; then + if test -n "$ld_date"; then + # If there was date string, but was earlier than 2004-05-13, fail + gcc_cv_ld_eh_frame_ciev3=no + elif test "$ld_vers_major" -lt 2; then + gcc_cv_ld_eh_frame_ciev3=no + elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 16; then + gcc_cv_ld_eh_frame_ciev3=no + fi + fi + else + case "$target" in + *-*-solaris2*) + # Sun ld added support for CIE v3 in .eh_frame in Solaris 11.1. + if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2324; then + gcc_cv_ld_eh_frame_ciev3=yes + fi + ;; + esac + fi +fi +AC_DEFINE_UNQUOTED(HAVE_LD_EH_FRAME_CIEV3, + [`if test x"$gcc_cv_ld_eh_frame_ciev3" = xyes; then echo 1; else echo 0; fi`], + [Define 0/1 if your linker supports CIE v3 in .eh_frame.]) +AC_MSG_RESULT($gcc_cv_ld_eh_frame_ciev3) + AC_MSG_CHECKING(linker position independent executable support) gcc_cv_ld_pie=no if test $in_tree_ld = yes ; then |