toolchain-external: CodeSourcery PowerPC: Revert the removal of CS PowerPC 2011.03
PATCH 1/1 toolchain-external: CodeSourcery PowerPC: Revert the removal of CS PowerPC 2011.03
As reported by Yann E. MORIN [1], the latest CS PowerPC toolchain (2012.03) requires a PPC CPU with SPE, which is basically two variants, 8540 (e500v1) and 8548 (e500v2) in Buildroot. All other PPC CPU can't use that toolchain.
In order to keep at least one CS toolchain for all other PPC CPU, revert the removal of CS PowerPC 2011.03 and add a dependency on !BR2_POWERPC_CPU_HAS_SPE.
In the same time add a dependency on BR2_POWERPC_CPU_HAS_SPE for the CS PowerPC 2012.03.
Thereby, we can use the same trick as for the Linaro toolchain and keep only one Kconfig symbol.
Also re-add the old CS toolchain handling for pixman and liquid-dsp.
[1] http://lists.busybox.net/pipermail/buildroot/2015-December/148308.html
---
Gustavo, in the previous patch I removed your fix [1] for the CS PowerPC 2011.03 and 2010.09 toolchains.
Since BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC can be ether CS PowerPC 2011.03 or CS PowerPC 2012.03, I reverted this change.
Do you know if the Altivec detection is still not realiable with 2012.03 ?
[1] https://git.busybox.net/buildroot/commit/?id=50b02a639558b5319e88d2c3ce66e3950352d694
--- package/liquid-dsp/Config.in | 3 ++ package/pixman/pixman.mk | 5 +++ toolchain/toolchain-external/Config.in | 42 +++++++++++++++++++++- .../toolchain-external/toolchain-external.hash | 1 + toolchain/toolchain-external/toolchain-external.mk | 5 +++ 5 files changed, 55 insertions(+), 1 deletion(-)
package/liquid-dsp/Config.in +3 -0
@@ -1,10 +1,13 @@ comment "liquid-dsp requires a (e)glibc/musl toolchain w/ dynamic library" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || BR2_STATIC_LIBS config BR2_PACKAGE_LIQUID_DSP bool "liquid-dsp" depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL depends on !BR2_STATIC_LIBS + # These result in internal compiler error + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC help Liquid-DSP is a free and open-source signal processing library for software-defined radios written in C. Its
package/pixman/pixman.mk +5 -0
@@ -32,5 +32,10 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y) PIXMAN_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DPIXMAN_NO_TLS" endif +# Altivec detection isn't reliable for CS toolchains +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC),y) +PIXMAN_CONF_OPTS += --disable-vmx +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))
toolchain/toolchain-external/Config.in +41 -1
66 lines not on this page · raw message
toolchain/toolchain-external/toolchain-external.hash +1 -0
@@ -15,6 +15,7 @@ sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e arm-201 # NiosII sha256 cc47745dc1264fcb8fb98fb1315ab772ab98691396021c455229b58abaf887f5 sourceryg++-2015.11-27-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 # PowerPC +sha256 525e1f53abbf65c2974ae9af762c45bb38520fe5fc50e968a23fe6a18e9eec04 freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 sha256 d6c94587d546197836e7e1a6909f6aabfa5879e91f501ab03088a6887cc242fc mentor-2012.03-71-powerpc-mentor-linux-gnu-i686-pc-linux-gnu.tar.bz2 # SuperH sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802 renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
toolchain/toolchain-external/toolchain-external.mk +5 -0
@@ -318,8 +318,13 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2015.11-27-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC),y) +ifeq ($(BR2_POWERPC_CPU_HAS_SPE),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-mentor-linux-gnu TOOLCHAIN_EXTERNAL_SOURCE = mentor-2012.03-71-powerpc-mentor-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2 +endif else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y) TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
2.4.3
PATCH 1/1 toolchain-external: CodeSourcery PowerPC: Revert the removal of CS PowerPC 2011.03
Romain,
Quoted 1 line · Romain Naour
Also re-add the old CS toolchain handling for pixman and liquid-dsp.
This part is not good. With your change, the "fixes" on pixman and liquid-dsp are now also applied when using the SPE-capable 2012.03 toolchain, while in the past they were only used for the non-SPE capable 2010.xx and 2011.xx toolchains:
-# Altivec detection isn't reliable for CS toolchains
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103)$(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y) -PIXMAN_CONF_OPTS += --disable-vmx
-endif
config BR2_PACKAGE_LIQUID_DSP
bool "liquid-dsp"
depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL depends on !BR2_STATIC_LIBS
- # These result in internal compiler error - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
help
Liquid-DSP is a free and open-source signal processing library for software-defined radios written in C. Its
So either we need to have two Config.in symbols:BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC and BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_SPE, or you need to adjust the fixes to test that SPE is not set, like:
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC):$(BR2_POWERPC_CPU_HAS_SPE),y:) -PIXMAN_CONF_OPTS += --disable-vmx
-endif
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 toolchain-external: CodeSourcery PowerPC: Revert the removal of CS PowerPC 2011.03
Hi Thomas,
Le 26/12/2015 16:42, Thomas Petazzoni a ?crit :
Quoted 11 lines
Romain,
Quoted 1 line · Romain Naour
Also re-add the old CS toolchain handling for pixman and liquid-dsp.
This part is not good. With your change, the "fixes" on pixman and liquid-dsp are now also applied when using the SPE-capable 2012.03 toolchain, while in the past they were only used for the non-SPE capable 2010.xx and 2011.xx toolchains:
Review
Quoted 4 lines
(quoted diff) +0
-4-# Altivec detection isn't reliable for CS toolchains -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103)$(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y) -PIXMAN_CONF_OPTS += --disable-vmx -endif
Indeed, I was unsure how to handle this...
Quoted 17 lines
config
BR2_PACKAGE_LIQUID_DSP
bool "liquid-dsp"
depends onBR2_TOOLCHAIN_USES_GLIBC||BR2_TOOLCHAIN_USES_MUSLdepends on !BR2_STATIC_LIBSpackage/liquid-dsp/Config.in +0
-3- # These result in internal compiler error - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 - depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 help Liquid-DSP is a free and open-source signal processing library for software-defined radios written in C. ItsSo either we need to have two Config.in symbols:
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPCandBR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_SPE, or you need to adjust the fixes to test that SPE is not set, like:
Review
Quoted 3 lines
(quoted diff) +0
-3-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC):$(BR2_POWERPC_CPU_HAS_SPE),y:) -PIXMAN_CONF_OPTS += --disable-vmx -endif
Well, I think it would be better to handle the CS PowerPC 2012.03 case like for Arago toolchains, i.e fix the CPU type dependency.
I noticed that this toolchain depends on BR2_powerpc_SPE which allow to select BR2_powerpc_8548 (e500v2) but also BR2_powerpc_8540 (e500v1).
Are you sure the system build for a PowerPC 8540 can work with this toolchain ? Do you think we can use BR2_powerpc_8548 instead of BR2_powerpc_SPE ?
I would do something like:
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2
bool "Sourcery CodeBench PowerPC 2012.03 (e500v2 only)" depends on BR2_powerpc depends on BR2_powerpc_8548 depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" depends on !BR2_STATIC_LIBS select BR2_TOOLCHAIN_EXTERNAL_GLIBC select BR2_TOOLCHAIN_HAS_NATIVE_RPC select BR2_INSTALL_LIBSTDCPP select BR2_HOSTARCH_NEEDS_IA32_LIBS select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 help Sourcery CodeBench toolchain for the PowerPC architecture, from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53, glibc 2.15, gdb 7.2.50 and kernel headers 3.2.10. It has support for the following variants: - e500v2 glibc, SPE, 32 bits
For the 2011.03 toolchain we keep Kconfig as it was previously:
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC
bool "Sourcery CodeBench PowerPC 2011.03"
depends on BR2_powerpc
depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" depends on !BR2_STATIC_LIBS
select BR2_TOOLCHAIN_EXTERNAL_GLIBC
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
select BR2_INSTALL_LIBSTDCPP
select BR2_HOSTARCH_NEEDS_IA32_LIBS
# kernel headers: 2.6.38
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
help
Sourcery CodeBench toolchain for the PowerPC architecture, from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has support for the following variants:
- 603 glibc, 32 bits
Select a generic PowerPC core
Disable BR2_SOFT_FLOAT
- 603 soft float glibc, 32 bits
Select a generic PowerPC core
Enable BR2_SOFT_FLOAT
- e600 altivec glibc, 32 bits
Set BR2_TARGET_OPTIMIZATION to -te600
- e500v1 glibc, 32 bits
Set BR2_TARGET_OPTIMIZATION to -te500v1
- e500v2 glibc, 32 bits
Set BR2_TARGET_OPTIMIZATION to -te500v2
- e500mc glibc, 32 bits
Set BR2_TARGET_OPTIMIZATION to -te500mc
- 970 glibc hard-float, 64 bits
Set BR2_TARGET_OPTIMIZATION to -m64
We can let the user decide to select one of the two toolchains above if BR2_powerpc_8548 is selected.
Thoughts ?
Best regards,
Romain
Quoted 5 lines
Best regards,
Thomas