diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-15 23:50:26 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-15 23:50:26 +0000 |
commit | 79f90e2bc13c4dfe5609a48e30b27eb26064ad6f (patch) | |
tree | ac4b87cfedeee7a5a423ccc6c144c8184c92684a /gcc/configure.ac | |
parent | ff2505d6c90b8d2660ae26ebb47dd35d510c7e44 (diff) | |
download | gcc-79f90e2bc13c4dfe5609a48e30b27eb26064ad6f.tar.gz |
2004-12-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/18153
* configure.ac: Define HAVE_LD_STATIC_DYNAMIC if linker supports
-Bstatic/-Bdynamic option.
* config.in: Regenerated.
* configure: Likewise.
* gcc.c (init_spec): Pass -Bstatic/-Bdynamic to ld for static
-lunwind if possible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92229 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 3936aa4e34b..e1d5a23dc5c 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2518,6 +2518,25 @@ fi # Target-specific assembler checks. +AC_MSG_CHECKING(linker -Bstatic/-Bdynamic option) +gcc_cv_ld_static_dynamic=no +if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then + gcc_cv_ld_static_dynamic=yes + fi +elif test x$gcc_cv_ld != x; then + # Check if linker supports -Bstatic/-Bdynamic option + if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \ + && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then + gcc_cv_ld_static_dynamic=yes + fi +fi +if test x"$gcc_cv_ld_static_dynamic" = xyes; then + AC_DEFINE(HAVE_LD_STATIC_DYNAMIC, 1, +[Define if your linker supports -Bstatic/-Bdynamic option.]) +fi +AC_MSG_RESULT($gcc_cv_ld_static_dynamic) + if test x"$demangler_in_ld" = xyes; then AC_MSG_CHECKING(linker --demangle support) gcc_cv_ld_demangle=no |