diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2010-12-23 12:08:21 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2010-12-23 12:08:21 +0000 |
commit | 6961669f48aa18168b2d7daa7e2235fbec7cb636 (patch) | |
tree | 5a2534c26dcca183ded5325723da202b9e3ced1c /gcc/configure | |
parent | 1d439e6cd27735a9049ff124eb03c065b5992ff3 (diff) | |
download | gcc-6961669f48aa18168b2d7daa7e2235fbec7cb636.tar.gz |
configure.ac (gcc_cv_ld_eh_frame_hdr): Only check GNU ld for --eh-frame-hdr.
* configure.ac (gcc_cv_ld_eh_frame_hdr): Only check GNU ld for
--eh-frame-hdr.
Check for working Sun ld version.
(HAVE_LD_EH_FRAME_HDR): Adapt comment.
(glibc_header_dir): Set only once.
Rename to ...
(target_header_dir): ... this.
Adapt users.
(gcc_cv_target_dl_iterate_frame_hdr): Check on *-*-solaris2*.
(TARGET_DL_ITERATE_PHDR): Define if present.
* configure: Regenerate.
* config.in: Likewise.
* config/t-sol2 (LIB2ADDEH, LIB2ADDEHDEP): Define.
* crtstuff.c (USE_PT_GNU_EH_FRAME): Define for recent Solaris 11
with linker support and dl_iterate_phdr.
* unwind-dw2-fde-glibc.c (USE_PT_GNU_EH_FRAME): Likewise.
(_Unwind_IteratePhdrCallback) [PT_SUNW_UNWIND]: Also accept
PT_SUNW_UNWIND .eh_frame_hdr sections.
[CRT_GET_RFIB_DATA && __i386__ && __sun__ && __svr4__]: Add
load_base to data->dbase.
[CRT_GET_RFIB_DATA && __x86_64__ && __sun__ && __svr4__]: Handle
64-bit Solaris 10+/x86.
* config/sol2-gld.h [TARGET_DL_ITERATE_PHDR && HAVE_LD_EH_FRAME_HDR]
(LINK_EH_SPEC): Define.
From-SVN: r168204
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 105 |
1 files changed, 64 insertions, 41 deletions
diff --git a/gcc/configure b/gcc/configure index 9d76b4197f7..1c95830d58c 100755 --- a/gcc/configure +++ b/gcc/configure @@ -25271,10 +25271,21 @@ if test $in_tree_ld = yes ; then gcc_cv_ld_eh_frame_hdr=yes fi elif test x$gcc_cv_ld != x; then - # Check if linker supports --eh-frame-hdr option - if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then - gcc_cv_ld_eh_frame_hdr=yes - fi + if echo "$ld_ver" | grep GNU > /dev/null; then + # Check if linker supports --eh-frame-hdr option + if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then + gcc_cv_ld_eh_frame_hdr=yes + fi + else + case "$target" in + *-*-solaris2*) + # Sun ld has various bugs in .eh_frame_hdr support before version 1.2249. + if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2249; then + gcc_cv_ld_eh_frame_hdr=yes + fi + ;; + esac + fi fi if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then @@ -25616,6 +25627,22 @@ _ACEOF fi +if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then + if test "x$with_headers" != x; then + target_header_dir=$with_headers + elif test "x$with_sysroot" = x; then + target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" + elif test "x$with_build_sysroot" != "x"; then + target_header_dir="${with_build_sysroot}/usr/include" + elif test "x$with_sysroot" = xyes; then + target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" + else + target_header_dir="${with_sysroot}/usr/include" + fi +else + target_header_dir=/usr/include +fi + # Test for stack protector support in target C library. { $as_echo "$as_me:${as_lineno-$LINENO}: checking __stack_chk_fail in target C library" >&5 $as_echo_n "checking __stack_chk_fail in target C library... " >&6; } @@ -25625,39 +25652,24 @@ else gcc_cv_libc_provides_ssp=no case "$target" in *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu) - if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then - if test "x$with_headers" != x; then - glibc_header_dir=$with_headers - elif test "x$with_sysroot" = x; then - glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - glibc_header_dir="${with_build_sysroot}/usr/include" - elif test "x$with_sysroot" = xyes; then - glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" - else - glibc_header_dir="${with_sysroot}/usr/include" - fi - else - glibc_header_dir=/usr/include - fi # glibc 2.4 and later provides __stack_chk_fail and # either __stack_chk_guard, or TLS access to stack guard canary. - if test -f $glibc_header_dir/features.h \ + if test -f $target_header_dir/features.h \ && $EGREP '^[ ]*#[ ]*define[ ]+__GNU_LIBRARY__[ ]+([1-9][0-9]|[6-9])' \ - $glibc_header_dir/features.h > /dev/null; then + $target_header_dir/features.h > /dev/null; then if $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+([1-9][0-9]|[3-9])' \ - $glibc_header_dir/features.h > /dev/null; then + $target_header_dir/features.h > /dev/null; then gcc_cv_libc_provides_ssp=yes elif $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC__[ ]+2' \ - $glibc_header_dir/features.h > /dev/null \ + $target_header_dir/features.h > /dev/null \ && $EGREP '^[ ]*#[ ]*define[ ]+__GLIBC_MINOR__[ ]+([1-9][0-9]|[4-9])' \ - $glibc_header_dir/features.h > /dev/null; then + $target_header_dir/features.h > /dev/null; then gcc_cv_libc_provides_ssp=yes elif $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC__[ ]+1' \ - $glibc_header_dir/features.h > /dev/null && \ - test -f $glibc_header_dir/bits/uClibc_config.h && \ + $target_header_dir/features.h > /dev/null && \ + test -f $target_header_dir/bits/uClibc_config.h && \ $EGREP '^[ ]*#[ ]*define[ ]+__UCLIBC_HAS_SSP__[ ]+1' \ - $glibc_header_dir/bits/uClibc_config.h > /dev/null; then + $target_header_dir/bits/uClibc_config.h > /dev/null; then gcc_cv_libc_provides_ssp=yes fi fi @@ -25704,21 +25716,8 @@ if test "${with_long_double_128+set}" = set; then : withval=$with_long_double_128; gcc_cv_target_ldbl128="$with_long_double_128" else gcc_cv_target_ldbl128=no - if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then - if test "x$with_sysroot" = x; then - glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" - elif test "x$with_build_sysroot" != "x"; then - glibc_header_dir="${with_build_sysroot}/usr/include" - elif test "x$with_sysroot" = xyes; then - glibc_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" - else - glibc_header_dir="${with_sysroot}/usr/include" - fi - else - glibc_header_dir=/usr/include - fi grep '^[ ]*#[ ]*define[ ][ ]*__LONG_DOUBLE_MATH_OPTIONAL' \ - $glibc_header_dir/bits/wordsize.h > /dev/null 2>&1 \ + $target_header_dir/bits/wordsize.h > /dev/null 2>&1 \ && gcc_cv_target_ldbl128=yes fi @@ -25731,6 +25730,30 @@ $as_echo "#define TARGET_DEFAULT_LONG_DOUBLE_128 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dl_iterate_phdr in target C library" >&5 +$as_echo_n "checking dl_iterate_phdr in target C library... " >&6; } +gcc_cv_target_dl_iterate_phdr=unknown +case "$target" in + *-*-solaris2*) + # <link.h> needs both a dl_iterate_phdr declaration and support for + # compilation with largefile support. + if grep dl_iterate_phdr $target_header_dir/link.h > /dev/null 2>&1 \ + && grep 'large file capable' $target_header_dir/link.h > /dev/null 2>&1; then + gcc_cv_target_dl_iterate_phdr=yes + else + gcc_cv_target_dl_iterate_phdr=no + fi + ;; +esac + +if test x$gcc_cv_target_dl_iterate_phdr = xyes; then + +$as_echo "#define TARGET_DL_ITERATE_PHDR 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_target_dl_iterate_phdr" >&5 +$as_echo "$gcc_cv_target_dl_iterate_phdr" >&6; } + # Find out what GC implementation we want, or may, use. # Check whether --with-gc was given. |