diff mbox series

[3/6] package/gcc: add support for gcc 11

Message ID 20210612094015.6792-3-romain.naour@gmail.com
State Accepted
Headers show
Series [1/6] board/qemu/sparc64-sun4u: avoid gcc-11 warning to build the kernel | expand

Commit Message

Romain Naour June 12, 2021, 9:40 a.m. UTC
Disable sparc architecture for gcc 11 due to an recent gcc change
that broke uClibc-ng. The change was reverted by the patch
0005-Revert-re-PR-target-92095-internal-error-with-O1-mcp.patch
for gcc 8.4, 9.3 and 10.1 but stop maintaining it for newer gcc
releases.

Rutime tested:
https://gitlab.com/kubu93/buildroot/-/pipelines/318043235

https://gcc.gnu.org/gcc-11/changes.html
https://gcc.gnu.org/gcc-11/porting_to.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/gcc/Config.in.host | 16 ++++++++++++++++
 package/gcc/gcc.hash       |  2 ++
 2 files changed, 18 insertions(+)

Comments

Arnout Vandecappelle June 20, 2021, 5:08 p.m. UTC | #1
On 12/06/2021 11:40, Romain Naour wrote:
> Disable sparc architecture for gcc 11 due to an recent gcc change
> that broke uClibc-ng. The change was reverted by the patch
> 0005-Revert-re-PR-target-92095-internal-error-with-O1-mcp.patch
> for gcc 8.4, 9.3 and 10.1 but stop maintaining it for newer gcc
> releases.

 So, that means we will be forced to drop sparc support in a few years when we
stop maintaining GCC 10, right?

 I'm not crying over it, that's for sure :-)

 Regards,
 Arnout

> 
> Rutime tested:
> https://gitlab.com/kubu93/buildroot/-/pipelines/318043235
> 
> https://gcc.gnu.org/gcc-11/changes.html
> https://gcc.gnu.org/gcc-11/porting_to.html
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/gcc/Config.in.host | 16 ++++++++++++++++
>  package/gcc/gcc.hash       |  2 ++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 5b056a934a..a89d92bf61 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -50,6 +50,21 @@ config BR2_GCC_VERSION_10_X
>  	depends on !BR2_csky
>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_10
>  
> +config BR2_GCC_VERSION_11_X
> +	bool "gcc 11.x"
> +	# powerpc spe support has been deprecated since gcc 8.x.
> +	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
> +	depends on !BR2_powerpc_SPE
> +	# C-SKY sk610 needs abiv1, which is not supported in
> +	# upstream gcc. C-SKY gcc upstream support not tested
> +	# with upstream binutils and glibc.
> +	depends on !BR2_csky
> +	# uClibc-ng broken on sparc due to recent gcc changes
> +	# that need to be reverted since gcc 8.4, 9.3 and 10.1.
> +	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98784
> +	depends on !BR2_sparc
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
> +
>  endchoice
>  
>  # libcilkrts was introduced in gcc 4.9 and removed in gcc 8.x
> @@ -75,6 +90,7 @@ config BR2_GCC_VERSION
>  	default "8.4.0"     if BR2_GCC_VERSION_8_X
>  	default "9.3.0"     if BR2_GCC_VERSION_9_X
>  	default "10.3.0"    if BR2_GCC_VERSION_10_X
> +	default "11.1.0"    if BR2_GCC_VERSION_11_X
>  	default "arc-2020.09-release" if BR2_GCC_VERSION_ARC
>  	default "48152afb96c59733d5bc79e3399bb7b3d4b44266" if BR2_GCC_VERSION_CSKY
>  
> diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
> index 566ae09fc2..8a8a7b4581 100644
> --- a/package/gcc/gcc.hash
> +++ b/package/gcc/gcc.hash
> @@ -4,6 +4,8 @@ sha512  6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b
>  sha512  4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de  gcc-9.3.0.tar.xz
>  # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-10.3.0/sha512.sum
>  sha512  2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86  gcc-10.3.0.tar.xz
> +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/sha512.sum
> +sha512  fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8  gcc-11.1.0.tar.xz
>  
>  # Locally calculated (fetched from Github)
>  sha512  b0853e2b1c5998044392023fa653e399e74118c46e616504ac59e1a2cf27620f94434767ce06b6cf4ca3dfb57f81d6eda92752befaf095ea5e564a9181b4659c  gcc-arc-2020.09-release.tar.gz
>
Romain Naour June 20, 2021, 5:40 p.m. UTC | #2
Hi Arnout,

Le 20/06/2021 à 19:08, Arnout Vandecappelle a écrit :
> 
> 
> On 12/06/2021 11:40, Romain Naour wrote:
>> Disable sparc architecture for gcc 11 due to an recent gcc change
>> that broke uClibc-ng. The change was reverted by the patch
>> 0005-Revert-re-PR-target-92095-internal-error-with-O1-mcp.patch
>> for gcc 8.4, 9.3 and 10.1 but stop maintaining it for newer gcc
>> releases.
> 
>  So, that means we will be forced to drop sparc support in a few years when we
> stop maintaining GCC 10, right?

Indeed but uclibc-ng is the only remaining libc we have for sparc32 (sparcV8).
The patch I reverted for gcc 8,9,10 broke the uClibc-ng port for sparc that was
not modified since more than a decade.

The problem is not easy to investigate since the system crash right after the
end of a forked process. For example, when you start 'ls' command, you'll see
the directory content just before the crash. For some reason uClibc-ng fail to
resume the initial process.

> 
>  I'm not crying over it, that's for sure :-)

Well, even if it will not be a lost, the sparc defconfig was up-to-date and
running until now.

Best regards,
Romain

> 
>  Regards,
>  Arnout
> 
>>
>> Rutime tested:
>> https://gitlab.com/kubu93/buildroot/-/pipelines/318043235
>>
>> https://gcc.gnu.org/gcc-11/changes.html
>> https://gcc.gnu.org/gcc-11/porting_to.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> ---
>>  package/gcc/Config.in.host | 16 ++++++++++++++++
>>  package/gcc/gcc.hash       |  2 ++
>>  2 files changed, 18 insertions(+)
>>
>> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
>> index 5b056a934a..a89d92bf61 100644
>> --- a/package/gcc/Config.in.host
>> +++ b/package/gcc/Config.in.host
>> @@ -50,6 +50,21 @@ config BR2_GCC_VERSION_10_X
>>  	depends on !BR2_csky
>>  	select BR2_TOOLCHAIN_GCC_AT_LEAST_10
>>  
>> +config BR2_GCC_VERSION_11_X
>> +	bool "gcc 11.x"
>> +	# powerpc spe support has been deprecated since gcc 8.x.
>> +	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
>> +	depends on !BR2_powerpc_SPE
>> +	# C-SKY sk610 needs abiv1, which is not supported in
>> +	# upstream gcc. C-SKY gcc upstream support not tested
>> +	# with upstream binutils and glibc.
>> +	depends on !BR2_csky
>> +	# uClibc-ng broken on sparc due to recent gcc changes
>> +	# that need to be reverted since gcc 8.4, 9.3 and 10.1.
>> +	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98784
>> +	depends on !BR2_sparc
>> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
>> +
>>  endchoice
>>  
>>  # libcilkrts was introduced in gcc 4.9 and removed in gcc 8.x
>> @@ -75,6 +90,7 @@ config BR2_GCC_VERSION
>>  	default "8.4.0"     if BR2_GCC_VERSION_8_X
>>  	default "9.3.0"     if BR2_GCC_VERSION_9_X
>>  	default "10.3.0"    if BR2_GCC_VERSION_10_X
>> +	default "11.1.0"    if BR2_GCC_VERSION_11_X
>>  	default "arc-2020.09-release" if BR2_GCC_VERSION_ARC
>>  	default "48152afb96c59733d5bc79e3399bb7b3d4b44266" if BR2_GCC_VERSION_CSKY
>>  
>> diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
>> index 566ae09fc2..8a8a7b4581 100644
>> --- a/package/gcc/gcc.hash
>> +++ b/package/gcc/gcc.hash
>> @@ -4,6 +4,8 @@ sha512  6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b
>>  sha512  4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de  gcc-9.3.0.tar.xz
>>  # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-10.3.0/sha512.sum
>>  sha512  2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86  gcc-10.3.0.tar.xz
>> +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/sha512.sum
>> +sha512  fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8  gcc-11.1.0.tar.xz
>>  
>>  # Locally calculated (fetched from Github)
>>  sha512  b0853e2b1c5998044392023fa653e399e74118c46e616504ac59e1a2cf27620f94434767ce06b6cf4ca3dfb57f81d6eda92752befaf095ea5e564a9181b4659c  gcc-arc-2020.09-release.tar.gz
>>
diff mbox series

Patch

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 5b056a934a..a89d92bf61 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -50,6 +50,21 @@  config BR2_GCC_VERSION_10_X
 	depends on !BR2_csky
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_10
 
+config BR2_GCC_VERSION_11_X
+	bool "gcc 11.x"
+	# powerpc spe support has been deprecated since gcc 8.x.
+	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
+	depends on !BR2_powerpc_SPE
+	# C-SKY sk610 needs abiv1, which is not supported in
+	# upstream gcc. C-SKY gcc upstream support not tested
+	# with upstream binutils and glibc.
+	depends on !BR2_csky
+	# uClibc-ng broken on sparc due to recent gcc changes
+	# that need to be reverted since gcc 8.4, 9.3 and 10.1.
+	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98784
+	depends on !BR2_sparc
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
+
 endchoice
 
 # libcilkrts was introduced in gcc 4.9 and removed in gcc 8.x
@@ -75,6 +90,7 @@  config BR2_GCC_VERSION
 	default "8.4.0"     if BR2_GCC_VERSION_8_X
 	default "9.3.0"     if BR2_GCC_VERSION_9_X
 	default "10.3.0"    if BR2_GCC_VERSION_10_X
+	default "11.1.0"    if BR2_GCC_VERSION_11_X
 	default "arc-2020.09-release" if BR2_GCC_VERSION_ARC
 	default "48152afb96c59733d5bc79e3399bb7b3d4b44266" if BR2_GCC_VERSION_CSKY
 
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 566ae09fc2..8a8a7b4581 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -4,6 +4,8 @@  sha512  6de904f552a02de33b11ef52312bb664396efd7e1ce3bbe37bfad5ef617f133095b3767b
 sha512  4b9e3639eef6e623747a22c37a904b4750c93b6da77cf3958d5047e9b5ebddb7eebe091cc16ca0a227c0ecbd2bf3b984b221130f269a97ee4cc18f9cf6c444de  gcc-9.3.0.tar.xz
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-10.3.0/sha512.sum
 sha512  2b2dd7453d48a398c29eaebd1422b70341001b8c90a62aee51e83344e7fdd8a8e45f82a4a9165bd7edc76dada912c932f4b6632c5636760fec4c5d7e402b3f86  gcc-10.3.0.tar.xz
+# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-11.1.0/sha512.sum
+sha512  fd6bba0f67ff48069d03073d1a9b5e896383b1cfc9dde008e868e60a9ec5014a837d56af0ecbf467b3fb9b37ec74a676e819a18b44393a0a3c4280175b5d7ad8  gcc-11.1.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  b0853e2b1c5998044392023fa653e399e74118c46e616504ac59e1a2cf27620f94434767ce06b6cf4ca3dfb57f81d6eda92752befaf095ea5e564a9181b4659c  gcc-arc-2020.09-release.tar.gz