diff options
author | Chris Packham <judge.packham@gmail.com> | 2022-05-25 21:44:16 +1200 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-05-31 20:00:38 +1200 |
commit | a321a0b892e3bc48d0f2ae559c2e763c55486e3e (patch) | |
tree | 6c4152a646c9233605cf08c76a68965557604078 | |
parent | dec3d3a42110d11750464284820d86fc1673f655 (diff) | |
download | crosstool-ng-a321a0b892e3bc48d0f2ae559c2e763c55486e3e.tar.gz crosstool-ng-a321a0b892e3bc48d0f2ae559c2e763c55486e3e.tar.bz2 crosstool-ng-a321a0b892e3bc48d0f2ae559c2e763c55486e3e.zip |
glibc: rework GLIBC_ENABLE_WERROR
Use `depends on` conditions to enable/disable building glibc with
-Werror. Using `depends on` instead of `default if` means that when the
GCC/GLIBC selection changes GLIBC_ENABLE_WERROR will automatically
become n.
Fixes #1729, fixes #1712
Signed-off-by: Chris Packham <judge.packham@gmail.com>
-rw-r--r-- | config/libc/glibc.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 0658a154..498450cb 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -401,11 +401,12 @@ config GLIBC_SSP # GCC11-related fixes were available in glibc 2.34 config GLIBC_ENABLE_WERROR bool "Enable -Werror during the build" - default y if GCC_7_or_older - default y if GCC_8_or_later && !GCC_9_or_later && GLIBC_2_27_or_later - default y if GCC_9_or_later && !GCC_10_or_later && GLIBC_2_29_or_later - default y if GCC_10_or_later && !GCC_11_or_later && GLIBC_2_31_or_later - default y if GCC_11_or_later && GLIBC_2_34_or_later + depends on GCC_7_or_older || \ + (GCC_8_or_later && !GCC_9_or_later && GLIBC_2_27_or_later) || \ + (GCC_9_or_later && !GCC_10_or_later && GLIBC_2_29_or_later) || \ + (GCC_10_or_later && !GCC_11_or_later && GLIBC_2_31_or_later) || \ + (GCC_11_or_later && GLIBC_2_34_or_later) + default y help By default, glibc enables strict warning checks during the build. However, older version of glibc may not build with newer versions |