Skip to contentSkip to conversation

arch/csky: clean up conditions on gcc verssion (branch yem/arch-csky)

PATCH New Yann E. MORIN 2 participants 5 messages Jul 18, 2019 – Aug 1, 2019 C-sky architecture

lore
Share & tools
lore
#0 lore raw

v2 cover arch/csky: clean up conditions on gcc verssion (branch yem/arch-csky)

Hello All!

This little series makes use of the GCC_AT_LEAST_X symbols to restrict the gcc versions usable for each C-SKY variants.

---
Changes v1 -> v2:
- expand first commit log (Guo)
- add Guo's acked-by
- fix typoes

Regards,
Yann E. MORIN.

The following changes since commit c568b4f37fa6d7f51e6d14d33d7eb75dfe26d7bf

arch/arc: always needs -matomic with atomic extensions (2019-07-18 22:54:36 +0200)

are available in the git repository at:

git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to f55f05c0066b6dabbcd21f68883319ff1050f478

package/gcc: drop negative conditions on C-SKY for older versions (2019-07-18 23:02:47 +0200)

----------------------------------------------------------------
Yann E. MORIN (2):
arch/csky: restrict ck610 to the C-SKY gcc port package/gcc: drop negative conditions on C-SKY for older versions

 arch/Config.in             | 3 +++
 arch/Config.in.csky        | 2 ++
 package/gcc/Config.in.host | 8 +++-----
 3 files changed, 8 insertions(+), 5 deletions(-)
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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/2 arch/csky: restrict ck610 to the C-SKY gcc port

As Guo explained, upstream gcc does not support abi-v1 (only abi-v2), but ck610 needs abi-v1 [0] [1]

To simplify things, we make the whole C-SKY architecture require gcc-9 or later, and add a single exception in gcc to force the ck610 to use the C-SKY port.

Note that this does not change the default gcc version to be used for
C-SKY: the C-SKY port is still always the default one; the gcc-9 version is only proposed as an alternative (except for ck610, of course).

[0] http://lists.busybox.net/pipermail/buildroot/2019-July/254386.html
[1] package/Makefile.in#73

Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- expand commit log to state that the default does not change (Guo)
- fix typoes in comments
- add Guo's acked-by

---
 arch/Config.in             | 3 +++
 arch/Config.in.csky        | 2 ++
 package/gcc/Config.in.host | 3 +++
 3 files changed, 8 insertions(+)
arch/Config.in +3 -0
index d8d841b1a2..94bd2150ca 100644
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
 	bool "csky"
 	select BR2_ARCH_HAS_MMU_MANDATORY
+	# Most variants are supported by gcc-9+, except one that is
+	# handled as a special exception in package/gcc/Config.in.host
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 	help
 	  csky is processor IP from china.
 	  http://www.c-sky.com/
arch/Config.in.csky +2 -0
index 4bdfbfae4b..7e2029f759 100644
@@ -5,6 +5,8 @@ choice
 	  Specific CPU variant to use
 
 config BR2_ck610
+	# Not supported by upstream gcc <= 9, and handled as a special
+	# exception in package/gcc/Config.in.host
 	bool "ck610"
 
 config BR2_ck807
package/gcc/Config.in.host +3 -0
index 8b563c8f27..adc12e95ea 100644
@@ -89,6 +89,9 @@ config BR2_GCC_VERSION_9_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
+	depends on !BR2_ck610
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 endchoice
Signature · 1 line
2.20.1
#2 lore raw

PATCH v2 1/2 arch/csky: restrict ck610 to the C-SKY gcc port

Quoted 22 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

As Guo explained, upstream gcc does not support abi-v1 (only abi-v2), but ck610 needs abi-v1 [0] [1]

To simplify things, we make the whole C-SKY architecture require gcc-9 or later, and add a single exception in gcc to force the ck610 to use the C-SKY port.

Note that this does not change the default gcc version to be used for
C-SKY: the C-SKY port is still always the default one; the gcc-9 version is only proposed as an alternative (except for ck610, of course).

[0] http://lists.busybox.net/pipermail/buildroot/2019-July/254386.html
[1] package/Makefile.in#73

Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Romain Naour <[email protected]>
Quoted 5 lines

---
Changes v1 -> v2:
- expand commit log to state that the default does not change (Guo)
- fix typoes in comments
- add Guo's acked-by

Committed, thanks.

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

PATCH v2 2/2 package/gcc: drop negative conditions on C-SKY for older versions

In reply to Yann E. MORIN

Now that the C-SKY architecture requires gcc-9, we can drop the special conditions on the individual older versions.

Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Romain Naour <[email protected]>

---
Changes v1 -> v2:
- add Guo's acked-by

---
 package/gcc/Config.in.host | 5 -----
 1 file changed, 5 deletions(-)
package/gcc/Config.in.host +0 -5
index adc12e95ea..a3ba7cf90d 100644
@@ -32,7 +32,6 @@ config BR2_GCC_VERSION_4_9_X
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 	# Broken or unsupported architectures
 	depends on !BR2_arc
-	depends on !BR2_csky
 	depends on !BR2_or1k
 	# musl on microblaze, ppc64 and mips64 unsupported
 	depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_microblazeel || BR2_microblazebe))
@@ -47,7 +46,6 @@ config BR2_GCC_VERSION_5_X
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 	# Broken or unsupported architectures
 	depends on !BR2_arc
-	depends on !BR2_csky
 	depends on !BR2_or1k
 	# musl on ppc64 and mips64 unsupported
 	depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
@@ -61,7 +59,6 @@ config BR2_GCC_VERSION_6_X
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 	# Broken or unsupported architectures
 	depends on !BR2_arc
-	depends on !BR2_csky
 	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
 
@@ -69,7 +66,6 @@ config BR2_GCC_VERSION_7_X
 	bool "gcc 7.x"
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 	# Broken or unsupported architectures
-	depends on !BR2_csky
 	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
@@ -77,7 +73,6 @@ config BR2_GCC_VERSION_8_X
 	bool "gcc 8.x"
 	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 	# Broken or unsupported architectures
-	depends on !BR2_csky
 	depends on !BR2_or1k
 	# powerpc spe support has been deprecated since gcc 8.x.
 	# https://gcc.gnu.org/ml/gcc/2018-04/msg00102.html
Signature · 1 line
2.20.1
#4 lore raw

PATCH v2 2/2 package/gcc: drop negative conditions on C-SKY for older versions

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> writes:

Now that the C-SKY architecture requires gcc-9, we can drop the special conditions on the individual older versions.

Cc Guo Ren <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Romain Naour <[email protected]>
Quoted 3 lines

---
Changes v1 -> v2:
- add Guo's acked-by

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard