Adjust bfd/warning.m4 egrep patterns

Adjust the `bfd/warning.m4` `egrep` patterns to handle preprocessors
that do not define `__GNUC__`, leaving the string in the output.

bfd/
	* warning.m4: Adjust egrep pattern for non-GNU compilers.
	* configure: Regenerate.
binutils/
	* configure: Regenerate.
gas/
	* configure: Regenerate.
gold/
	* configure: Regenerate.
gprof/
	* configure: Regenerate.
ld/
	* configure: Regenerate.
opcodes/
	* configure: Regenerate.
This commit is contained in:
Andrew Paprocki 2019-01-09 13:51:08 +10:30 committed by Alan Modra
parent 923c6a7564
commit 3107326d3d
15 changed files with 69 additions and 40 deletions

View File

@ -1,3 +1,8 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* warning.m4: Adjust egrep pattern for non-GNU compilers.
* configure: Regenerate.
2019-01-08 Alan Modra <amodra@gmail.com>
PR 23699

10
bfd/configure vendored
View File

@ -12583,7 +12583,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -12597,7 +12597,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -12612,7 +12612,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -12628,7 +12628,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -12642,7 +12642,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -47,22 +47,22 @@ GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
AC_EGREP_CPP([(^[0-3]$|^__GNUC__$)],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow")
# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
AC_EGREP_CPP([(^[0-4]$|^__GNUC__$)],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
# Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
WARN_WRITE_STRINGS=""
AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
AC_EGREP_CPP([(^[0-3]$|^__GNUC__$)],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings")
# Verify CC_FOR_BUILD to be compatible with warning flags
# Add -Wshadow if the compiler is a sufficiently recent version of GCC.
AC_EGREP_CPP_FOR_BUILD([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow")
AC_EGREP_CPP_FOR_BUILD([(^[0-3]$|^__GNUC__$)],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow")
# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC.
AC_EGREP_CPP_FOR_BUILD([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
AC_EGREP_CPP_FOR_BUILD([(^[0-4]$|^__GNUC__$)],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
AC_ARG_ENABLE(werror,
[ --enable-werror treat compile warnings as errors],

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-09 Alan Modra <amodra@gmail.com>
* testsuite/binutils-all/cxxfilt.exp: Pass --no-strip-underscores

10
binutils/configure vendored
View File

@ -12258,7 +12258,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -12272,7 +12272,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -12287,7 +12287,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -12303,7 +12303,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -12317,7 +12317,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/tc-aarch64.c (aarch64_cpus): Add ares.

10
gas/configure vendored
View File

@ -12145,7 +12145,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -12159,7 +12159,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -12174,7 +12174,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -12190,7 +12190,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -12204,7 +12204,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.

10
gold/configure vendored
View File

@ -7795,7 +7795,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -7809,7 +7809,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -7824,7 +7824,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -7840,7 +7840,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -7854,7 +7854,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-01 Alan Modra <amodra@gmail.com>
Update year range in copyright notice of all files.

10
gprof/configure vendored
View File

@ -12405,7 +12405,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -12419,7 +12419,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -12434,7 +12434,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -12450,7 +12450,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -12464,7 +12464,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-08 Alan Modra <amodra@gmail.com>
* testsuite/ld-elf/sec64k.exp: Use . rather than $objdir in

10
ld/configure vendored
View File

@ -15926,7 +15926,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -15940,7 +15940,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -15955,7 +15955,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -15971,7 +15971,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -15985,7 +15985,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"

View File

@ -1,3 +1,7 @@
2019-01-09 Andrew Paprocki <andrew@ishiboo.com>
* configure: Regenerate.
2019-01-07 Alan Modra <amodra@gmail.com>
* configure: Regenerate.

10
opcodes/configure vendored
View File

@ -11810,7 +11810,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow"
@ -11824,7 +11824,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
@ -11839,7 +11839,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
WARN_WRITE_STRINGS="-Wwrite-strings"
@ -11855,7 +11855,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-3]$" >/dev/null 2>&1; then :
$EGREP "(^[0-3]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow"
@ -11869,7 +11869,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
__GNUC__
_ACEOF
if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
$EGREP "^[0-4]$" >/dev/null 2>&1; then :
$EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
else
GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"