Skip to contentSkip to conversation

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

PATCH Superseded Yann E. MORIN 2 participants 10 messages Jul 14, 2019 – Jul 15, 2019 C-sky architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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.

Regards,
Yann E. MORIN.

The following changes since commit d5225c5f6d1345bd08d968bf704e01c272537c48

package/{mesa3d, mesa3d-headers}: bump version to 19.0.8 (2019-07-14 00:36:51 +0200)

are available in the git repository at:

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

for you to fetch changes up to 52aa7c5a90e87a0e8a0e794487b61d3d4759d301

package/gcc: drop negative conditions on C-SKY for older versions (2019-07-14 11:50:43 +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 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.

[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]>
---
 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..9d1a06872d 100644
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
 	bool "csky"
 	select BR2_ARCH_HAS_MMU_MANDATORY
+	# Most variants are support 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..2cf31c88c6 100644
@@ -5,6 +5,8 @@ choice
 	  Specific CPU variant to use
 
 config BR2_ck610
+	# Not supported by upstream gc <= 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
#6 lore raw

PATCH 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]>
---
 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
maintainer
#7 lore raw

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

Acked, Thx.

Quoted 59 lines · 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]>
---
 package/gcc/Config.in.host | 5 -----
 1 file changed, 5 deletions(-)
package/gcc/Config.in.host +0 -6
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
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#2 lore raw

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

In reply to Yann E. MORIN
Quoted 26 lines · Yann E. MORIN

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.

[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]>
---
 arch/Config.in             | 3 +++
 arch/Config.in.csky        | 2 ++
 package/gcc/Config.in.host | 3 +++
 3 files changed, 8 insertions(+)
arch/Config.in +0 -0
index d8d841b1a2..9d1a06872d 100644

arch/Config.in config BR2_aarch64_be · line 83

Quoted 6 lines
arch/Config.in +3 -0
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
        bool "csky"
        select BR2_ARCH_HAS_MMU_MANDATORY
+       # Most variants are support 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

We recommand using BR2_GCC_VERSION_CSKY not BR2_GCC_VERSION_9_X. I don't want GCC_9 as default for buildroot user and they could select it by themself.

arch/Config.in.csky choice · line 9

Quoted 13 lines
arch/Config.in +0 -0
        help
          csky is processor IP from china.
          http://www.c-sky.com/
arch/Config.in.csky +2 -0
index 4bdfbfae4b..2cf31c88c6 100644
@@ -5,6 +5,8 @@ choice
          Specific CPU variant to use
 
 config BR2_ck610
+       # Not supported by upstream gc <= 9, and handled as a special
+       # exception in package/gcc/Config.in.host

Acked.

Quoted 8 lines
arch/Config.in.csky +0 -0
        bool "ck610"
 
 config BR2_ck807
package/gcc/Config.in.host +0 -0
index 8b563c8f27..adc12e95ea 100644

package/gcc/Config.in.host config BR2_GCC_VERSION_9_X · line 94

Quoted 6 lines
package/gcc/Config.in.host +3 -0
@@ -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

Acked.

Quoted 6 lines
package/gcc/Config.in.host +0 -1
        select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 endchoice
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
#3 lore raw

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

Guo, All,

On 2019-07-16 00:02 +0800, Guo Ren spake thusly:

Quoted 22 lines · Yann E. MORIN
Quoted 21 lines

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.

[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]>
---
 arch/Config.in             | 3 +++
 arch/Config.in.csky        | 2 ++
 package/gcc/Config.in.host | 3 +++
 3 files changed, 8 insertions(+)
Quoted 14 lines

arch/Config.in config BR2_aarch64_be · line 83

Quoted 11 lines
arch/Config.in +3 -0
index d8d841b1a2..9d1a06872d 100644
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
        bool "csky"
        select BR2_ARCH_HAS_MMU_MANDATORY
+       # Most variants are support 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

We recommand using BR2_GCC_VERSION_CSKY not BR2_GCC_VERSION_9_X. I don't want GCC_9 as default for buildroot user and they could select it by themself.

This new 'select' does not change the pereferred gcc version. It just limits which ones are available.

By selecting BR2_ARCH_NEEDS_GCC_AT_LEAST_9, we ensure that any version of gcc below 9.x are not visible.

But the C-SKY specific gcc version, BR2_GCC_VERSION_CSKY, is not impacted by this restriction.

So, with this patch, when BR2_csky=y:

- with ck610, only BR2_GCC_VERSION_CSKY is available, labelled "gcc

    csky" in the gcc version selection, in menuconfig;

- with any other variant, BR2_GCC_VERSION_CSKY and BR2_GCC_VERSION_9_X are both available, and BR2_GCC_VERSION_CSKY is the dfault.

Does that explanations address your concerns? If so, I can respin the series with an expanded commit log.

Thanks for the review! :-)

Regards,
Yann E. MORIN.

Quoted 44 lines

arch/Config.in.csky choice · line 9

Quoted 13 lines
arch/Config.in +0 -0
        help
          csky is processor IP from china.
          http://www.c-sky.com/
arch/Config.in.csky +2 -0
index 4bdfbfae4b..2cf31c88c6 100644
@@ -5,6 +5,8 @@ choice
          Specific CPU variant to use
 
 config BR2_ck610
+       # Not supported by upstream gc <= 9, and handled as a special
+       # exception in package/gcc/Config.in.host

Acked.

Quoted 8 lines
arch/Config.in.csky +0 -0
        bool "ck610"
 
 config BR2_ck807
package/gcc/Config.in.host +0 -0
index 8b563c8f27..adc12e95ea 100644

package/gcc/Config.in.host config BR2_GCC_VERSION_9_X · line 94

Quoted 6 lines
package/gcc/Config.in.host +3 -0
@@ -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

Acked.

Quoted 6 lines
package/gcc/Config.in.host +0 -1
        select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 endchoice
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
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.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

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

In reply to Guo Ren

Guo, All,

On 2019-07-15 23:52 +0800, Guo Ren spake thusly:

Quoted 1 line

Acked, Thx.

Thanks for the review. :-)

Next time, can you please send a proper "Acked-by:" tag, so that patchwwork can pick it up, and thus it ends up in the commit when the patch is eventually applied? Thanks!

Regards,
Yann E. MORIN.

Quoted 67 lines · Yann E. MORIN
Quoted 59 lines

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]>
---
 package/gcc/Config.in.host | 5 -----
 1 file changed, 5 deletions(-)
package/gcc/Config.in.host +0 -6
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
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
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.  |
'------------------------------^-------^------------------^--------------------'
maintainer
#4 lore raw

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

In reply to Yann E. MORIN

Acked, thx

Quoted 50 lines · Yann E. MORIN

Guo, All,

On 2019-07-16 00:02 +0800, Guo Ren spake thusly:

Quoted 22 lines · Yann E. MORIN
Quoted 21 lines

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.

[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]>
---
 arch/Config.in             | 3 +++
 arch/Config.in.csky        | 2 ++
 package/gcc/Config.in.host | 3 +++
 3 files changed, 8 insertions(+)
Quoted 14 lines

arch/Config.in config BR2_aarch64_be · line 83

Quoted 11 lines
arch/Config.in +3 -0
index d8d841b1a2..9d1a06872d 100644
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
        bool "csky"
        select BR2_ARCH_HAS_MMU_MANDATORY
+       # Most variants are support 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

We recommand using BR2_GCC_VERSION_CSKY not BR2_GCC_VERSION_9_X. I don't want GCC_9 as default for buildroot user and they could select it by themself.

This new 'select' does not change the pereferred gcc version. It just limits which ones are available.

By selecting BR2_ARCH_NEEDS_GCC_AT_LEAST_9, we ensure that any version of gcc below 9.x are not visible.

But the C-SKY specific gcc version, BR2_GCC_VERSION_CSKY, is not impacted by this restriction.

Quoted 7 lines

So, with this patch, when BR2_csky=y:

- with ck610, only BR2_GCC_VERSION_CSKY is available, labelled "gcc

    csky" in the gcc version selection, in menuconfig;

- with any other variant, BR2_GCC_VERSION_CSKY and BR2_GCC_VERSION_9_X are both available, and BR2_GCC_VERSION_CSKY is the dfault.

Great, thx for these patches and we'll improve GCC_9 continuously in future.

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#9 lore raw

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

In reply to Yann E. MORIN
Quoted 59 lines · 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]>
---
 package/gcc/Config.in.host | 5 -----
 1 file changed, 5 deletions(-)
package/gcc/Config.in.host +0 -6
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
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/
maintainer
#5 lore raw

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

In reply to Yann E. MORIN
Quoted 65 lines · Yann E. MORIN

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.

[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]>
---
 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..9d1a06872d 100644
@@ -78,6 +78,9 @@ config BR2_aarch64_be
 config BR2_csky
        bool "csky"
        select BR2_ARCH_HAS_MMU_MANDATORY
+       # Most variants are support 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..2cf31c88c6 100644
@@ -5,6 +5,8 @@ choice
          Specific CPU variant to use
 
 config BR2_ck610
+       # Not supported by upstream gc <= 9, and handled as a special
+       # exception in package/gcc/Config.in.host
        bool "ck610"
 
 config BR2_ck807
package/gcc/Config.in.host +3 -1
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
--

2.20.1

Signature · 4 lines
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/