summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-31 05:47:39 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-31 05:47:39 +0000
commit630d47b9fe9db6b61d4f372fc305a4569da984d3 (patch)
treeca6e2960bcc231a9c0e87ab14828e7e1ee7968e2 /gcc/configure.ac
parentfc41dd820f53334fd95a07641cbbd733b7b9259b (diff)
downloadgcc-630d47b9fe9db6b61d4f372fc305a4569da984d3.tar.gz
2011-05-31 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 174464 using svnmerge git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174466 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac59
1 files changed, 49 insertions, 10 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 9ace66db9cb..5e414794a08 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3249,14 +3249,40 @@ fi
AC_MSG_CHECKING(linker plugin support)
gcc_cv_lto_plugin=0
if test -f liblto_plugin.la; then
- if test $in_tree_ld = yes -a x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" = x"$gcc_cv_ld"; 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_lto_plugin=2
- elif test "$ld_is_gold" = yes -a "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -eq 20; then
- gcc_cv_lto_plugin=1
+ save_ld_ver="$ld_ver"
+ save_ld_vers_major="$ld_vers_major"
+ save_ld_vers_minor="$ld_vers_minor"
+ save_ld_is_gold="$ld_is_gold"
+
+ ld_is_gold=no
+ if test $in_tree_ld = yes -a x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" = x"$gcc_cv_ld"; then
+ ld_ver="GNU ld"
+ # FIXME: ld_is_gold?
+ ld_vers_major="$gcc_cv_gld_major_version"
+ ld_vers_minor="$gcc_cv_gld_minor_version"
+ else
+ # Determine plugin linker version.
+ # FIXME: Partial duplicate from above, generalize.
+changequote(,)dnl
+ ld_ver=`$ORIGINAL_PLUGIN_LD_FOR_TARGET --version 2>/dev/null | sed 1q`
+ if echo "$ld_ver" | grep GNU > /dev/null; then
+ if echo "$ld_ver" | grep "GNU gold" > /dev/null; then
+ ld_is_gold=yes
+ ld_vers=`echo $ld_ver | sed -n \
+ -e 's,^[^)]*[ ]\([0-9][0-9]*\.[0-9][0-9]*[^)]*\)) .*$,\1,p'`
+ else
+ ld_vers=`echo $ld_ver | sed -n \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
+ fi
+ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
fi
- elif test x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" = x"$gcc_cv_ld" && echo "$ld_ver" | grep GNU > /dev/null; then
+changequote([,])dnl
+ fi
+
+ # Determine plugin support.
+ if echo "$ld_ver" | grep GNU > /dev/null; then
# Require GNU ld or gold 2.21+ for plugin support by default.
if test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -ge 21; then
gcc_cv_lto_plugin=2
@@ -3264,11 +3290,12 @@ if test -f liblto_plugin.la; then
elif test "$ld_is_gold" = yes -a "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 20; then
gcc_cv_lto_plugin=1
fi
- elif test x"$ORIGINAL_PLUGIN_LD_FOR_TARGET" != x"$gcc_cv_ld"; then
- # Allow -fuse-linker-plugin if plugin linker differs from
- # default/specified linker.
- gcc_cv_lto_plugin=1
fi
+
+ ld_ver="$save_ld_ver"
+ ld_vers_major="$save_ld_vers_major"
+ ld_vers_minor="$save_ld_vers_minor"
+ ld_is_gold="$save_ld_is_gold"
fi
AC_DEFINE_UNQUOTED(HAVE_LTO_PLUGIN, $gcc_cv_lto_plugin,
[Define to the level of your linker's plugin support.])
@@ -3550,6 +3577,18 @@ foo: nop
[AC_DEFINE(HAVE_AS_IX86_REP_LOCK_PREFIX, 1,
[Define if the assembler supports 'rep <insn>, lock <insn>'.])])
+ gcc_GAS_CHECK_FEATURE([R_386_TLS_GD_PLT reloc],
+ gcc_cv_as_ix86_tlsgdplt,,,
+ [call tls_gd@tlsgdplt],,
+ [AC_DEFINE(HAVE_AS_IX86_TLSGDPLT, 1,
+ [Define if your assembler supports @tlsgdplt.])])
+
+ gcc_GAS_CHECK_FEATURE([R_386_TLS_LDM_PLT reloc],
+ gcc_cv_as_ix86_tlsldmplt,,,
+ [call tls_ld@tlsldmplt],,
+ [AC_DEFINE(HAVE_AS_IX86_TLSLDMPLT, 1,
+ [Define if your assembler supports @tlsldmplt.])])
+
;;
ia64*-*-*)