public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] bfd: Stop using -Wstack-usage=262144 when built with Clang
@ 2022-09-13 12:59 Tsukasa OI
  2022-09-13 12:59 ` [PATCH 1/1] " Tsukasa OI
  0 siblings, 1 reply; 5+ messages in thread
From: Tsukasa OI @ 2022-09-13 12:59 UTC (permalink / raw)
  To: Tsukasa OI, Nick Clifton, Jan Beulich; +Cc: binutils

Hello,

[Common Background: Building GNU Binutils / GDB with Clang 15.0.0]

I'm now testing to build GNU Binutils / GDB with latest Clang (15.0.0) and
found some errors by default (when Binutils / GDB is not configured with
"--disable-werror").

While the best compiler to build GNU Binutils / GDB is GNU GCC, testing
other compilers are helpful to discover underlying problems and modernize
Binutils / GDB, even if building entire Binutils / GDB with the latest Clang
is unrealistic.  To be sure, I'm not going to finish "porting for Clang".
I will take low-hanging fruits and...

1.  make building with Clang easier and/or
2.  fix code issues (or non-issues) discovered as Clang warnings.

I made four patchsets in which, applying them all makes it possible to
build GNU Binutils / GDB with Clang (without help of --disable-werrors) for
many (but not all) targets including i386 and RISC-V with Ubuntu 22.04 LTS
(x86_64) host.  At least, I think they fix all (at minimum, most of) arch-
independent parts which prevents building with the latest version of Clang.

This is the one of them.


[About this Patchset]

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 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.

With this patchset, GNU Binutils no longer appends "-Wstack-usage=262144"
if the compiler is identified as Clang (when __clang__ is defined).

I also regenerated related "configure" scripts with maintainer mode.


Thanks,
Tsukasa




Tsukasa OI (1):
  bfd: Stop using -Wstack-usage=262144 when built with Clang

 bfd/configure      | 18 ++++++++++++++++++
 bfd/warning.m4     |  6 ++++--
 binutils/configure | 18 ++++++++++++++++++
 gas/configure      | 18 ++++++++++++++++++
 gold/configure     | 18 ++++++++++++++++++
 gprof/configure    | 18 ++++++++++++++++++
 ld/configure       | 18 ++++++++++++++++++
 opcodes/configure  | 18 ++++++++++++++++++
 8 files changed, 130 insertions(+), 2 deletions(-)


base-commit: 8fa9bc6a030c9a41eb8cf6f0f66043e02005b291
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] bfd: Stop using -Wstack-usage=262144 when built with Clang
  2022-09-13 12:59 [PATCH 0/1] bfd: Stop using -Wstack-usage=262144 when built with Clang Tsukasa OI
@ 2022-09-13 12:59 ` Tsukasa OI
  2022-09-13 13:44   ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Tsukasa OI @ 2022-09-13 12:59 UTC (permalink / raw)
  To: Tsukasa OI, Nick Clifton, Jan Beulich; +Cc: binutils

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      | 18 ++++++++++++++++++
 bfd/warning.m4     |  6 ++++--
 binutils/configure | 18 ++++++++++++++++++
 gas/configure      | 18 ++++++++++++++++++
 gold/configure     | 18 ++++++++++++++++++
 gprof/configure    | 18 ++++++++++++++++++
 ld/configure       | 18 ++++++++++++++++++
 opcodes/configure  | 18 ++++++++++++++++++
 8 files changed, 130 insertions(+), 2 deletions(-)

diff --git a/bfd/configure b/bfd/configure
index 6afdce94fe8..075d2ee0a1b 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -12093,10 +12093,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -12138,10 +12147,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/bfd/warning.m4 b/bfd/warning.m4
index 6f3e190b81c..0435c664472 100644
--- a/bfd/warning.m4
+++ b/bfd/warning.m4
@@ -50,7 +50,8 @@ GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
 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__$)],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144")
+AC_EGREP_CPP([(^[0-4]$|^__GNUC__$)],[__GNUC__],,dnl
+[AC_EGREP_CPP([^__clang__$],[__clang__],[GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"],)])
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -62,7 +63,8 @@ AC_EGREP_CPP([(^[0-3]$|^__GNUC__$)],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-stri
 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__$)],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144")
+AC_EGREP_CPP_FOR_BUILD([(^[0-4]$|^__GNUC__$)],[__GNUC__],,dnl
+[AC_EGREP_CPP_FOR_BUILD([^__clang__$],[__clang__],[GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"],)])
 
 AC_ARG_ENABLE(werror,
   [  --enable-werror         treat compile warnings as errors],
diff --git a/binutils/configure b/binutils/configure
index 542c832be18..1c518227f57 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -11932,10 +11932,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -11977,10 +11986,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/gas/configure b/gas/configure
index 97bcf62ec3d..d0449a1d7ab 100755
--- a/gas/configure
+++ b/gas/configure
@@ -11588,10 +11588,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -11633,10 +11642,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/gold/configure b/gold/configure
index 84c413fecd2..85f62a92fcd 100755
--- a/gold/configure
+++ b/gold/configure
@@ -7938,10 +7938,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -7983,10 +7992,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/gprof/configure b/gprof/configure
index b4001641d2d..cb150353050 100755
--- a/gprof/configure
+++ b/gprof/configure
@@ -11890,10 +11890,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -11935,10 +11944,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/ld/configure b/ld/configure
index 1c2b64870b1..a1a07005400 100755
--- a/ld/configure
+++ b/ld/configure
@@ -15855,10 +15855,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -15900,10 +15909,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
diff --git a/opcodes/configure b/opcodes/configure
index a5951b9b362..08c57a33855 100755
--- a/opcodes/configure
+++ b/opcodes/configure
@@ -11445,10 +11445,19 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Set WARN_WRITE_STRINGS if the compiler supports -Wwrite-strings.
 WARN_WRITE_STRINGS=""
@@ -11490,10 +11499,19 @@ if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
   $EGREP "(^[0-4]$|^__GNUC__$)" >/dev/null 2>&1; then :
 
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+__clang__
+_ACEOF
+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 |
+  $EGREP "^__clang__$" >/dev/null 2>&1; then :
   GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144"
 fi
 rm -f conftest*
 
+fi
+rm -f conftest*
+
 
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bfd: Stop using -Wstack-usage=262144 when built with Clang
  2022-09-13 12:59 ` [PATCH 1/1] " Tsukasa OI
@ 2022-09-13 13:44   ` Jan Beulich
  2022-09-13 15:29     ` Tsukasa OI
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2022-09-13 13:44 UTC (permalink / raw)
  To: Tsukasa OI; +Cc: binutils, Nick Clifton

On 13.09.2022 14:59, Tsukasa OI wrote:
> 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.

While not exactly the same, how about passing -Wframe-larger-than= when
it's (new enough) Clang, instead of not passing any such option?

Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bfd: Stop using -Wstack-usage=262144 when built with Clang
  2022-09-13 13:44   ` Jan Beulich
@ 2022-09-13 15:29     ` Tsukasa OI
  2022-09-14  5:17       ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Tsukasa OI @ 2022-09-13 15:29 UTC (permalink / raw)
  To: Jan Beulich; +Cc: binutils, Nick Clifton

On 2022/09/13 22:44, Jan Beulich wrote:
> On 13.09.2022 14:59, Tsukasa OI wrote:
>> 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.
> 
> While not exactly the same, how about passing -Wframe-larger-than= when
> it's (new enough) Clang, instead of not passing any such option?

That's a good idea.  But if I do that, that would make another patchset
on top of this (not PATCH v2 of this).
We need to know a good value of -Wframe-larger-than= for Clang and
meanwhile, just removing the -Wstack-usage looks acceptable for me.  For
now, that would be nice to have an approval to apply this patch as is.

> 
> Jan
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] bfd: Stop using -Wstack-usage=262144 when built with Clang
  2022-09-13 15:29     ` Tsukasa OI
@ 2022-09-14  5:17       ` Alan Modra
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Modra @ 2022-09-14  5:17 UTC (permalink / raw)
  To: Tsukasa OI; +Cc: Jan Beulich, binutils

On Wed, Sep 14, 2022 at 12:29:20AM +0900, Tsukasa OI via Binutils wrote:
> On 2022/09/13 22:44, Jan Beulich wrote:
> > On 13.09.2022 14:59, Tsukasa OI wrote:
> >> 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.
> > 
> > While not exactly the same, how about passing -Wframe-larger-than= when
> > it's (new enough) Clang, instead of not passing any such option?
> 
> That's a good idea.  But if I do that, that would make another patchset
> on top of this (not PATCH v2 of this).

That's fair enough.  The patch is OK, thanks.

> We need to know a good value of -Wframe-larger-than= for Clang and
> meanwhile, just removing the -Wstack-usage looks acceptable for me.  For
> now, that would be nice to have an approval to apply this patch as is.
> 
> > 
> > Jan
> > 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-14  5:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 12:59 [PATCH 0/1] bfd: Stop using -Wstack-usage=262144 when built with Clang Tsukasa OI
2022-09-13 12:59 ` [PATCH 1/1] " Tsukasa OI
2022-09-13 13:44   ` Jan Beulich
2022-09-13 15:29     ` Tsukasa OI
2022-09-14  5:17       ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).