Skip to contentSkip to conversation

package/glibc: disable Werror for gcc 10 build

PATCH New Romain Naour 3 participants 4 messages Jun 28, 2020 – Jun 29, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/glibc: disable Werror for gcc 10 build

Currently glibc 2.30 is build by default with Werror enabled but it has only been tested with compiler version available at the time of the release [1] (gcc 6.2 up to gcc 9.2.1). It's recommended to use those version with glibc 2.30.

For the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here with gcc 10, as reported by Yegor Yefremov [2].

Fixing compiler warnings would require backporting many patches [3] not even backported by Glibc maintainers to the 2.30 stable branch. Instead, disable Werror by using --disable-werror. Most (if not all) gcc 10 warnings will be fixed with Glibc 2.31.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=INSTALL;h=62e78725f57080a1cb638cccd28ca3c2ffc5a22c#l466
[2] http://lists.busybox.net/pipermail/buildroot/2020-June/285715.html
[3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b

    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=de18a7061c9bdff73d66502c55d6a3ea671fc6d9
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=49348beafe9ba150c9bd48595b3f372299bddbb0
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=70c6e15654928c603c6d24bd01cf62e7a8e2ce9b
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=c7bf5ceab6ec776ac7350d3b0190776bf532ac54
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=e1d559f337de2c8ab68a6749dfe873477c883807
Cc Yegor Yefremov <[email protected]>
---
 package/glibc/glibc.mk | 1 +
 1 file changed, 1 insertion(+)
package/glibc/glibc.mk +1 -0
index 76fae1f9f7..1881cf0cdc 100644
@@ -131,6 +131,7 @@ define GLIBC_CONFIGURE_CMDS
 		$(if $(BR2_x86_64),--enable-lock-elision) \
 		--with-pkgversion="Buildroot" \
 		--disable-profile \
+		--disable-werror \
 		--without-gd \
 		--enable-obsolete-rpc \
 		--enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
Signature · 1 line
2.25.4
#1 lore raw

PATCH 1/1 package/glibc: disable Werror for gcc 10 build

Quoted 20 lines · Romain Naour

Currently glibc 2.30 is build by default with Werror enabled but it has only been tested with compiler version available at the time of the release [1] (gcc 6.2 up to gcc 9.2.1). It's recommended to use those version with glibc 2.30.

For the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here with gcc 10, as reported by Yegor Yefremov [2].

Fixing compiler warnings would require backporting many patches [3] not even backported by Glibc maintainers to the 2.30 stable branch. Instead, disable Werror by using --disable-werror. Most (if not all) gcc 10 warnings will be fixed with Glibc 2.31.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=INSTALL;h=62e78725f57080a1cb638cccd28ca3c2ffc5a22c#l466
[2] http://lists.busybox.net/pipermail/buildroot/2020-June/285715.html
[3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b

Quoted 8 lines
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=de18a7061c9bdff73d66502c55d6a3ea671fc6d9
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=49348beafe9ba150c9bd48595b3f372299bddbb0
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=70c6e15654928c603c6d24bd01cf62e7a8e2ce9b
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=c7bf5ceab6ec776ac7350d3b0190776bf532ac54
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=e1d559f337de2c8ab68a6749dfe873477c883807
Cc Yegor Yefremov <[email protected]>
Quoted 19 lines
---
 package/glibc/glibc.mk | 1 +
 1 file changed, 1 insertion(+)
package/glibc/glibc.mk +1 -1
index 76fae1f9f7..1881cf0cdc 100644
@@ -131,6 +131,7 @@ define GLIBC_CONFIGURE_CMDS
                $(if $(BR2_x86_64),--enable-lock-elision) \
                --with-pkgversion="Buildroot" \
                --disable-profile \
+               --disable-werror \
                --without-gd \
                --enable-obsolete-rpc \
                --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
--

2.25.4

#2 lore raw

PATCH 1/1 package/glibc: disable Werror for gcc 10 build

Romain, All,

On 2020-06-29 14:26 +0200, Yegor Yefremov spake thusly:

Quoted 13 lines · Romain Naour
Quoted 12 lines

Currently glibc 2.30 is build by default with Werror enabled but it has only been tested with compiler version available at the time of the release [1] (gcc 6.2 up to gcc 9.2.1). It's recommended to use those version with glibc 2.30.

For the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here with gcc 10, as reported by Yegor Yefremov [2].

Quoted 6 lines
Quoted 6 lines

Fixing compiler warnings would require backporting many patches [3] not even backported by Glibc maintainers to the 2.30 stable branch. Instead, disable Werror by using --disable-werror. Most (if not all) gcc 10 warnings will be fixed with Glibc 2.31.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=INSTALL;h=62e78725f57080a1cb638cccd28ca3c2ffc5a22c#l466

OK, but then we have another exception: glibc on ppc64le, gcc 7.4 or above is required, with the execption of gcc 7.5.

However, when BR2_GCC_VERSION_7_X=y, we do build gcc 7.5.

So, glibc should probably have: depends on !BR2_GCC_VERSION_7_X

Thoughts?

Also, in that same file. line 544:

* Python 3.4 or later
Python is required to build the GNU C Library. [...]

Wut?!?

Regards,
Yann E. MORIN.

Quoted 36 lines
Quoted 10 lines

[2] http://lists.busybox.net/pipermail/buildroot/2020-June/285715.html
[3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b

    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=de18a7061c9bdff73d66502c55d6a3ea671fc6d9
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=49348beafe9ba150c9bd48595b3f372299bddbb0
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=70c6e15654928c603c6d24bd01cf62e7a8e2ce9b
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=c7bf5ceab6ec776ac7350d3b0190776bf532ac54
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=e1d559f337de2c8ab68a6749dfe873477c883807
Cc Yegor Yefremov <[email protected]>
Quoted 17 lines
---
 package/glibc/glibc.mk | 1 +
 1 file changed, 1 insertion(+)
package/glibc/glibc.mk +1 -1
index 76fae1f9f7..1881cf0cdc 100644
@@ -131,6 +131,7 @@ define GLIBC_CONFIGURE_CMDS
                $(if $(BR2_x86_64),--enable-lock-elision) \
                --with-pkgversion="Buildroot" \
                --disable-profile \
+               --disable-werror \
                --without-gd \
                --enable-obsolete-rpc \
                --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
--
Quoted 2 lines

2.25.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 package/glibc: disable Werror for gcc 10 build

In reply to Romain Naour

Romain, All,

On 2020-06-28 22:16 +0200, Romain Naour spake thusly:

Quoted 19 lines

Currently glibc 2.30 is build by default with Werror enabled but it has only been tested with compiler version available at the time of the release [1] (gcc 6.2 up to gcc 9.2.1). It's recommended to use those version with glibc 2.30.

For the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here with gcc 10, as reported by Yegor Yefremov [2].

Fixing compiler warnings would require backporting many patches [3] not even backported by Glibc maintainers to the 2.30 stable branch. Instead, disable Werror by using --disable-werror. Most (if not all) gcc 10 warnings will be fixed with Glibc 2.31.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=INSTALL;h=62e78725f57080a1cb638cccd28ca3c2ffc5a22c#l466
[2] http://lists.busybox.net/pipermail/buildroot/2020-June/285715.html
[3] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b

Quoted 8 lines
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=de18a7061c9bdff73d66502c55d6a3ea671fc6d9
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=49348beafe9ba150c9bd48595b3f372299bddbb0
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=70c6e15654928c603c6d24bd01cf62e7a8e2ce9b
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=c7bf5ceab6ec776ac7350d3b0190776bf532ac54
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=e1d559f337de2c8ab68a6749dfe873477c883807
Cc Yegor Yefremov <[email protected]>

Applied to master, thanks.

Please also see my reply to Yegor, later in the thread...

Regards,
Yann E. MORIN.

Quoted 23 lines
---
 package/glibc/glibc.mk | 1 +
 1 file changed, 1 insertion(+)
package/glibc/glibc.mk +1 -0
index 76fae1f9f7..1881cf0cdc 100644
@@ -131,6 +131,7 @@ define GLIBC_CONFIGURE_CMDS
 		$(if $(BR2_x86_64),--enable-lock-elision) \
 		--with-pkgversion="Buildroot" \
 		--disable-profile \
+		--disable-werror \
 		--without-gd \
 		--enable-obsolete-rpc \
 		--enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \
Signature · 6 lines
2.25.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'