Skip to contentSkip to conversation

package/gcc/9.x: fix download url when using upstream gcc for csky

PATCH New Romain Naour 3 participants 7 messages Mar 12, 2020 – Mar 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc/9.x: fix download url when using upstream gcc for csky

When the csky cpu support was added [1], the gcc download url was selected depending on the csky cpu architecture (BR2_csky) rather than the csky gcc fork version (BR2_GCC_VERSION_CSKY)[2].

When adding gcc 9.x version [3], we forgot to update the condition in order to use the url to the gcc csky fork only when BR2_GCC_VERSION_CSKY=y.

Due to this error, the toolchain build with the upstream gcc 9.x for csky cpu is broken due a download error.

Fix this by using BR2_GCC_VERSION_CSKY instead of BR2_csky.

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/470072924

[1] 7873a5bd5ebbeb1674293dae6b06b50f0a1f2184
[2] https://git.buildroot.net/buildroot/tree/package/gcc/gcc.mk?id=7873a5bd5ebbeb1674293dae6b06b50f0a1f2184#n19
[3] 089000eccf584d611ad1a8e5400436952450e883

Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/gcc.mk +1 -1
index 128293570d..524ca83db0 100644
@@ -13,7 +13,7 @@ GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION))
 ifeq ($(BR2_GCC_VERSION_ARC),y)
 GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
-else ifeq ($(BR2_csky),y)
+else ifeq ($(BR2_GCC_VERSION_CSKY),y)
 GCC_SITE = $(call github,c-sky,gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
Signature · 1 line
2.24.1
#1 lore raw

PATCH 1/1 package/gcc: disable gcc 9.x for csky

When building a toolchain with upstream gcc 9.x the build fail due to several issues.

Note: The upstream Binutils support csky target since release 2.32 but the support was never enabled in the Buildroot packaging. So the latest version (2.33.1) was tested here.

[upstream gcc 9.x w/ glibc csky fork with binutils csky for or binutils 2.33.1]
In file included from <command-line>:
./../include/libc-symbols.h:534:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
534 | extern __typeof (name) __EI_##name \

[upstream gcc 9.x w/ glibc 2.30 w/ binutils csky fork] /tmp/ccThLRhb.s: Assembler messages:
/tmp/ccThLRhb.s:10: Error: invalid or unsupported encoding in .cfi_personality /tmp/ccThLRhb.s:11: Error: invalid or unsupported encoding in .cfi_lsda

[upstream gcc 9.x w/ glibc 2.30 w/ binutils 2.33.1] build/elf/librtld.os: in function `__sync_fetch_and_add_2':
libgcc/config/csky/linux-atomic.c:116: undefined reference to `__kernel_cmpxchg'

Currenlty, only the toolchain using binutils, gcc, glibc fork produce a working toolchain. So disable gcc 9.x for csky.

Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/Config.in.host | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
package/gcc/Config.in.host +3 -2
index 203e98ad42..243310f61e 100644
@@ -58,8 +58,9 @@ config BR2_GCC_VERSION_9_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
-	depends on !BR2_ck610
+	# upstream gcc. C-SKY gcc upstream support not tested
+	# with upstream binutils and glibc.
+	depends on !BR2_csky
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 endchoice
Signature · 1 line
2.24.1
#2 lore raw

PATCH 1/1 package/gcc: disable gcc 9.x for csky

Hello,

Quoted 26 lines · On Fri, 13 Mar 2020 00:41:27 +0100 Romain Naour <[email protected]> wrote:

When building a toolchain with upstream gcc 9.x the build fail due to several issues.

Note: The upstream Binutils support csky target since release 2.32 but the support was never enabled in the Buildroot packaging. So the latest version (2.33.1) was tested here.

[upstream gcc 9.x w/ glibc csky fork with binutils csky for or binutils 2.33.1]
In file included from <command-line>:
./../include/libc-symbols.h:534:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
534 | extern __typeof (name) __EI_##name \

[upstream gcc 9.x w/ glibc 2.30 w/ binutils csky fork] /tmp/ccThLRhb.s: Assembler messages:
/tmp/ccThLRhb.s:10: Error: invalid or unsupported encoding in .cfi_personality /tmp/ccThLRhb.s:11: Error: invalid or unsupported encoding in .cfi_lsda

[upstream gcc 9.x w/ glibc 2.30 w/ binutils 2.33.1] build/elf/librtld.os: in function `__sync_fetch_and_add_2':
libgcc/config/csky/linux-atomic.c:116: undefined reference to `__kernel_cmpxchg'

Currenlty, only the toolchain using binutils, gcc, glibc fork produce a working toolchain. So disable gcc 9.x for csky.

Quoted 8 lines
Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/Config.in.host | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 package/gcc: disable gcc 9.x for csky

In reply to Romain Naour
Quoted 33 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

When building a toolchain with upstream gcc 9.x the build fail due to several issues.

Note: The upstream Binutils support csky target since release 2.32 but the support was never enabled in the Buildroot packaging. So the latest version (2.33.1) was tested here.

[upstream gcc 9.x w/ glibc csky fork with binutils csky for or binutils 2.33.1]
In file included from <command-line>:
./../include/libc-symbols.h:534:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
534 | extern __typeof (name) __EI_##name \

[upstream gcc 9.x w/ glibc 2.30 w/ binutils csky fork] /tmp/ccThLRhb.s: Assembler messages:
/tmp/ccThLRhb.s:10: Error: invalid or unsupported encoding in .cfi_personality /tmp/ccThLRhb.s:11: Error: invalid or unsupported encoding in .cfi_lsda

[upstream gcc 9.x w/ glibc 2.30 w/ binutils 2.33.1] build/elf/librtld.os: in function `__sync_fetch_and_add_2':
libgcc/config/csky/linux-atomic.c:116: undefined reference to `__kernel_cmpxchg'

Currenlty, only the toolchain using binutils, gcc, glibc fork produce a working toolchain. So disable gcc 9.x for csky.

Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
Signature · 1 line
Bye, Peter Korsgaard
#4 lore raw

PATCH 1/1 package/gcc: disable gcc 9.x for csky

In reply to Romain Naour
Quoted 28 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

When building a toolchain with upstream gcc 9.x the build fail due to several issues.

Note: The upstream Binutils support csky target since release 2.32 but the support was never enabled in the Buildroot packaging. So the latest version (2.33.1) was tested here.

[upstream gcc 9.x w/ glibc csky fork with binutils csky for or binutils 2.33.1]
In file included from <command-line>:
./../include/libc-symbols.h:534:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
534 | extern __typeof (name) __EI_##name \

[upstream gcc 9.x w/ glibc 2.30 w/ binutils csky fork] /tmp/ccThLRhb.s: Assembler messages:
/tmp/ccThLRhb.s:10: Error: invalid or unsupported encoding in .cfi_personality /tmp/ccThLRhb.s:11: Error: invalid or unsupported encoding in .cfi_lsda

[upstream gcc 9.x w/ glibc 2.30 w/ binutils 2.33.1] build/elf/librtld.os: in function `__sync_fetch_and_add_2':
libgcc/config/csky/linux-atomic.c:116: undefined reference to `__kernel_cmpxchg'

Currenlty, only the toolchain using binutils, gcc, glibc fork produce a working toolchain. So disable gcc 9.x for csky.

Quoted 5 lines
Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>

Committed to 2019.11.x and 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 package/gcc/9.x: fix download url when using upstream gcc for csky

In reply to Romain Naour
Quoted 19 lines · On Fri, 13 Mar 2020 00:41:26 +0100 Romain Naour <[email protected]> wrote:

When the csky cpu support was added [1], the gcc download url was selected depending on the csky cpu architecture (BR2_csky) rather than the csky gcc fork version (BR2_GCC_VERSION_CSKY)[2].

When adding gcc 9.x version [3], we forgot to update the condition in order to use the url to the gcc csky fork only when BR2_GCC_VERSION_CSKY=y.

Due to this error, the toolchain build with the upstream gcc 9.x for csky cpu is broken due a download error.

Fix this by using BR2_GCC_VERSION_CSKY instead of BR2_csky.

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/470072924

[1] 7873a5bd5ebbeb1674293dae6b06b50f0a1f2184
[2] https://git.buildroot.net/buildroot/tree/package/gcc/gcc.mk?id=7873a5bd5ebbeb1674293dae6b06b50f0a1f2184#n19
[3] 089000eccf584d611ad1a8e5400436952450e883

Quoted 8 lines
Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>
---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/1 package/gcc/9.x: fix download url when using upstream gcc for csky

In reply to Romain Naour
Quoted 22 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

When the csky cpu support was added [1], the gcc download url was selected depending on the csky cpu architecture (BR2_csky) rather than the csky gcc fork version (BR2_GCC_VERSION_CSKY)[2].

When adding gcc 9.x version [3], we forgot to update the condition in order to use the url to the gcc csky fork only when BR2_GCC_VERSION_CSKY=y.

Due to this error, the toolchain build with the upstream gcc 9.x for csky cpu is broken due a download error.

Fix this by using BR2_GCC_VERSION_CSKY instead of BR2_csky.

Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/470072924

[1] 7873a5bd5ebbeb1674293dae6b06b50f0a1f2184
[2]
https://git.buildroot.net/buildroot/tree/package/gcc/gcc.mk?id=7873a5bd5ebbeb1674293dae6b06b50f0a1f2184#n19
[3] 089000eccf584d611ad1a8e5400436952450e883

Quoted 5 lines
Cc Yann E. MORIN <[email protected]>
Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Peter Korsgaard <[email protected]>

Committed to 2019.11.x and 2020.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard