bfd: Stop using -Wstack-usage=262144 when built with Clang
authorTsukasa OI <research_trasio@irq.a4lg.com>
Sat, 10 Sep 2022 17:08:13 +0000 (17:08 +0000)
committerTsukasa OI <research_trasio@irq.a4lg.com>
Wed, 14 Sep 2022 05:42:17 +0000 (05:42 +0000)
commit491cf3178f718e48d71a54e50475e37dd831a51d
tree9329c5cbf3004f8c126c6a10e79c400a84e907fb
parentfdbca3611592ecfe6c421923562ed307ef75c8e0
bfd: Stop using -Wstack-usage=262144 when built with Clang

Some components of GNU Binutils will pass "-Wstack-usage=262144" when
"GCC >= 5.0" is detected.  However, Clang does not support "-Wstack-usage",
despite that related configuration part in bfd/warning.m4 handles the latest
Clang (15.0.0 as of this writing) as "GCC >= 5.0".

The option "-Wstack-usage" was ignored when the first version of Clang is
released but even this "ignoring" behavior is removed before Clang 4.0.0.
So, if we give Clang "-Wstack-usage=262144", it generates a warning, making
the build failure.

This commit checks "__clang__" macro to prevent adding the option if the
compiler is identified as Clang.

bfd/ChangeLog:

* warning.m4: Stop appending "-Wstack-usage=262144" option when
compiled with Clang.
* configure: Regenerate.

binutils/ChangeLog:

* configure: Regenerate.

gas/ChangeLog:

* configure: Regenerate.

gold/ChangeLog:

* configure: Regenerate.

gprof/ChangeLog:

* configure: Regenerate.

ld/ChangeLog:

* configure: Regenerate.

opcodes/ChangeLog:

* configure: Regenerate.
bfd/configure
bfd/warning.m4
binutils/configure
gas/configure
gold/configure
gprof/configure
ld/configure
opcodes/configure