Pull in ld_vers / ld_date methods from gcc-current. (avoid GNU sed'isms).
This allows configure to correctly determine that gas supports .hidden.
This commit is contained in:
parent
576576bafb
commit
9fbbfac1b2
10
gnu/dist/gcc/gcc/configure
vendored
10
gnu/dist/gcc/gcc/configure
vendored
@ -7132,8 +7132,14 @@ elif test x$gcc_cv_as != x; then
|
||||
# the date string after the version number.
|
||||
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
|
||||
if echo "$ld_ver" | grep GNU > /dev/null; then
|
||||
ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
|
||||
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'`
|
||||
ld_vers=`echo $ld_ver | sed -n \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
|
||||
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'`
|
||||
if test 0"$ld_date" -lt 20020404; then
|
||||
if test -n "$ld_date"; then
|
||||
# If there was date string, but was earlier than 2002-04-04, fail
|
||||
|
10
gnu/dist/gcc/gcc/configure.in
vendored
10
gnu/dist/gcc/gcc/configure.in
vendored
@ -1616,8 +1616,14 @@ elif test x$gcc_cv_as != x; then
|
||||
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
|
||||
if echo "$ld_ver" | grep GNU > /dev/null; then
|
||||
changequote(,)dnl
|
||||
ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([ ].*\|\)$,\1,p'`
|
||||
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'`
|
||||
ld_vers=`echo $ld_ver | sed -n \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p' \
|
||||
-e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ].*$,\1,p'`
|
||||
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'`
|
||||
if test 0"$ld_date" -lt 20020404; then
|
||||
if test -n "$ld_date"; then
|
||||
# If there was date string, but was earlier than 2002-04-04, fail
|
||||
|
Loading…
Reference in New Issue
Block a user