move the code that sets ld_vers and other variables so that it is always executed, regardless of cached values. this lets the comdat version test for gas work properly.diff -r1.9 -r1.10 src/gnu/dist/gcc4/gcc/configure
(mrg)
--- src/gnu/dist/gcc4/gcc/Attic/configure 2008/08/31 08:17:21 1.9
+++ src/gnu/dist/gcc4/gcc/Attic/configure 2008/10/06 00:07:08 1.10
@@ -14893,51 +14893,54 @@ foobar:' > conftest.s | @@ -14893,51 +14893,54 @@ foobar:' > conftest.s | |||
14893 | then | 14893 | then | |
14894 | gcc_cv_as_hidden=yes | 14894 | gcc_cv_as_hidden=yes | |
14895 | else | 14895 | else | |
14896 | echo "configure: failed program was" >&5 | 14896 | echo "configure: failed program was" >&5 | |
14897 | cat conftest.s >&5 | 14897 | cat conftest.s >&5 | |
14898 | fi | 14898 | fi | |
14899 | rm -f conftest.o conftest.s | 14899 | rm -f conftest.o conftest.s | |
14900 | fi | 14900 | fi | |
14901 | fi | 14901 | fi | |
14902 | { $as_echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 | 14902 | { $as_echo "$as_me:$LINENO: result: $gcc_cv_as_hidden" >&5 | |
14903 | $as_echo "$gcc_cv_as_hidden" >&6; } | 14903 | $as_echo "$gcc_cv_as_hidden" >&6; } | |
14904 | 14904 | |||
14905 | 14905 | |||
14906 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | |||
14907 | if echo "$ld_ver" | grep GNU > /dev/null; then | |||
14908 | ld_vers=`echo $ld_ver | sed -n \ | |||
14909 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \ | |||
14910 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14911 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14912 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14913 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` | |||
14914 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |||
14915 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |||
14916 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |||
14917 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |||
14918 | fi | |||
14919 | ||||
14906 | { $as_echo "$as_me:$LINENO: checking linker for .hidden support" >&5 | 14920 | { $as_echo "$as_me:$LINENO: checking linker for .hidden support" >&5 | |
14907 | $as_echo_n "checking linker for .hidden support... " >&6; } | 14921 | $as_echo_n "checking linker for .hidden support... " >&6; } | |
14908 | if test "${gcc_cv_ld_hidden+set}" = set; then | 14922 | if test "${gcc_cv_ld_hidden+set}" = set; then | |
14909 | $as_echo_n "(cached) " >&6 | 14923 | $as_echo_n "(cached) " >&6 | |
14910 | else | 14924 | else | |
14911 | if test $in_tree_ld = yes ; then | 14925 | if test $in_tree_ld = yes ; then | |
14912 | gcc_cv_ld_hidden=no | 14926 | gcc_cv_ld_hidden=no | |
14913 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | 14927 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |
14914 | && test $in_tree_ld_is_elf = yes; then | 14928 | && test $in_tree_ld_is_elf = yes; then | |
14915 | gcc_cv_ld_hidden=yes | 14929 | gcc_cv_ld_hidden=yes | |
14916 | fi | 14930 | fi | |
14917 | else | 14931 | else | |
14918 | gcc_cv_ld_hidden=yes | 14932 | gcc_cv_ld_hidden=yes | |
14919 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | |||
14920 | if echo "$ld_ver" | grep GNU > /dev/null; then | 14933 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
14921 | ld_vers=`echo $ld_ver | sed -n \ | |||
14922 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \ | |||
14923 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14924 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14925 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |||
14926 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` | |||
14927 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |||
14928 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |||
14929 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |||
14930 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |||
14931 | if test 0"$ld_date" -lt 20020404; then | 14934 | if test 0"$ld_date" -lt 20020404; then | |
14932 | if test -n "$ld_date"; then | 14935 | if test -n "$ld_date"; then | |
14933 | # If there was date string, but was earlier than 2002-04-04, fail | 14936 | # If there was date string, but was earlier than 2002-04-04, fail | |
14934 | gcc_cv_ld_hidden=no | 14937 | gcc_cv_ld_hidden=no | |
14935 | elif test -z "$ld_vers"; then | 14938 | elif test -z "$ld_vers"; then | |
14936 | # If there was no date string nor ld version number, something is wrong | 14939 | # If there was no date string nor ld version number, something is wrong | |
14937 | gcc_cv_ld_hidden=no | 14940 | gcc_cv_ld_hidden=no | |
14938 | else | 14941 | else | |
14939 | test -z "$ld_vers_patch" && ld_vers_patch=0 | 14942 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
14940 | if test "$ld_vers_major" -lt 2; then | 14943 | if test "$ld_vers_major" -lt 2; then | |
14941 | gcc_cv_ld_hidden=no | 14944 | gcc_cv_ld_hidden=no | |
14942 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | 14945 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
14943 | gcc_cv_ld_hidden="no" | 14946 | gcc_cv_ld_hidden="no" |
--- src/gnu/dist/gcc4/gcc/Attic/configure.ac 2008/08/31 08:16:45 1.9
+++ src/gnu/dist/gcc4/gcc/Attic/configure.ac 2008/10/06 00:07:08 1.10
@@ -1971,48 +1971,53 @@ gcc_GAS_CHECK_FEATURE([.nsubspa comdat], | @@ -1971,48 +1971,53 @@ gcc_GAS_CHECK_FEATURE([.nsubspa comdat], | |||
1971 | 1971 | |||
1972 | # .hidden needs to be supported in both the assembler and the linker, | 1972 | # .hidden needs to be supported in both the assembler and the linker, | |
1973 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | 1973 | # because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN. | |
1974 | # This is irritatingly difficult to feature test for; we have to check the | 1974 | # This is irritatingly difficult to feature test for; we have to check the | |
1975 | # date string after the version number. If we've got an in-tree | 1975 | # date string after the version number. If we've got an in-tree | |
1976 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | 1976 | # ld, we don't know its patchlevel version, so we set the baseline at 2.13 | |
1977 | # to be safe. | 1977 | # to be safe. | |
1978 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | 1978 | # The gcc_GAS_CHECK_FEATURE call just sets a cache variable. | |
1979 | gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden, | 1979 | gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden, | |
1980 | [elf,2,13,0],, | 1980 | [elf,2,13,0],, | |
1981 | [ .hidden foobar | 1981 | [ .hidden foobar | |
1982 | foobar:]) | 1982 | foobar:]) | |
1983 | 1983 | |||
1984 | AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden, | |||
1985 | [if test $in_tree_ld = yes ; then | |||
1986 | gcc_cv_ld_hidden=no | |||
1987 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |||
1988 | && test $in_tree_ld_is_elf = yes; then | |||
1989 | gcc_cv_ld_hidden=yes | |||
1990 | fi | |||
1991 | else | |||
1992 | gcc_cv_ld_hidden=yes | |||
1993 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | 1984 | ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q` | |
1994 | if echo "$ld_ver" | grep GNU > /dev/null; then | 1985 | if echo "$ld_ver" | grep GNU > /dev/null; then | |
1995 | changequote(,)dnl | 1986 | changequote(,)dnl | |
1996 | ld_vers=`echo $ld_ver | sed -n \ | 1987 | ld_vers=`echo $ld_ver | sed -n \ | |
1997 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \ | 1988 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p' \ | |
1998 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | 1989 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
1999 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | 1990 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
2000 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | 1991 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \ | |
2001 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` | 1992 | -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ -].*$,\1,p'` | |
2002 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | 1993 | ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` | |
2003 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | 1994 | ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` | |
2004 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | 1995 | ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` | |
2005 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | 1996 | ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` | |
1997 | changequote([,])dnl | |||
1998 | fi | |||
1999 | ||||
2000 | AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden, | |||
2001 | [if test $in_tree_ld = yes ; then | |||
2002 | gcc_cv_ld_hidden=no | |||
2003 | if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 \ | |||
2004 | && test $in_tree_ld_is_elf = yes; then | |||
2005 | gcc_cv_ld_hidden=yes | |||
2006 | fi | |||
2007 | else | |||
2008 | gcc_cv_ld_hidden=yes | |||
2009 | changequote(,)dnl | |||
2010 | if echo "$ld_ver" | grep GNU > /dev/null; then | |||
2006 | if test 0"$ld_date" -lt 20020404; then | 2011 | if test 0"$ld_date" -lt 20020404; then | |
2007 | if test -n "$ld_date"; then | 2012 | if test -n "$ld_date"; then | |
2008 | # If there was date string, but was earlier than 2002-04-04, fail | 2013 | # If there was date string, but was earlier than 2002-04-04, fail | |
2009 | gcc_cv_ld_hidden=no | 2014 | gcc_cv_ld_hidden=no | |
2010 | elif test -z "$ld_vers"; then | 2015 | elif test -z "$ld_vers"; then | |
2011 | # If there was no date string nor ld version number, something is wrong | 2016 | # If there was no date string nor ld version number, something is wrong | |
2012 | gcc_cv_ld_hidden=no | 2017 | gcc_cv_ld_hidden=no | |
2013 | else | 2018 | else | |
2014 | test -z "$ld_vers_patch" && ld_vers_patch=0 | 2019 | test -z "$ld_vers_patch" && ld_vers_patch=0 | |
2015 | if test "$ld_vers_major" -lt 2; then | 2020 | if test "$ld_vers_major" -lt 2; then | |
2016 | gcc_cv_ld_hidden=no | 2021 | gcc_cv_ld_hidden=no | |
2017 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | 2022 | elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then | |
2018 | gcc_cv_ld_hidden="no" | 2023 | gcc_cv_ld_hidden="no" |