Skip to contentSkip to conversation

external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

PATCH New Markos Chandras 2 participants 6 messages May 15, 2013 – Jun 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

From: Markos Chandras <[email protected]>

The n64 ABI which is supported by the Codesourcery MIPS toolchains, is only available with MIPS64 so allow these cores to be selected and used with these toolchains.

---
 toolchain/toolchain-external/Config.in |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
toolchain/toolchain-external/Config.in +10 -10
index a93ada3..a13ee31 100644
@@ -114,7 +114,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	bool "Sourcery CodeBench MIPS 2012.09"
-	depends on BR2_mips || BR2_mipsel
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
@@ -129,7 +129,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	      Select a MIPS generic core
 	      Disable BR2_SOFT_FLOAT
 	    - MIPS64 big endian glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Disable BR2_SOFT_FLOAT
 	    - MIPS32 O32 little endian glibc
@@ -137,7 +137,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	      Disable BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
 	    - MIPS64 little endian glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Disable BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
@@ -145,7 +145,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	      Select a MIPS generic core
 	      Select BR2_SOFT_FLOAT
 	    - MIPS64 big endian soft float glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Select BR2_SOFT_FLOAT
 	    - MIPS32 little endian soft float glibc
@@ -153,7 +153,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 	      Select BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
 	    - MIPS64 little endian soft float glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Select BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
@@ -184,7 +184,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201209
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	bool "Sourcery CodeBench MIPS 2012.03"
-	depends on BR2_mips || BR2_mipsel
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
@@ -199,7 +199,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	      Select a MIPS generic core
 	      Disable BR2_SOFT_FLOAT
 	    - MIPS64 big endian glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Disable BR2_SOFT_FLOAT
 	    - MIPS32 O32 little endian glibc
@@ -207,7 +207,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	      Disable BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
 	    - MIPS64 little endian glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Disable BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
@@ -215,7 +215,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	      Select a MIPS generic core
 	      Select BR2_SOFT_FLOAT
 	    - MIPS64 big endian soft float glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Select BR2_SOFT_FLOAT
 	    - MIPS32 little endian soft float glibc
@@ -223,7 +223,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203
 	      Select BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
 	    - MIPS64 little endian soft float glibc
-	      Select a MIPS generic core
+	      Select a MIPS64 generic core
 	      Select the n64 ABI
 	      Select BR2_SOFT_FLOAT
 	      Set BR2_TARGET_OPTIMIZATION to -EL
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Dear Markos Chandras,

Quoted 10 lines · Markos Chandras

From: Markos Chandras <[email protected]>

The n64 ABI which is supported by the Codesourcery MIPS toolchains, is only available with MIPS64 so allow these cores to be selected and used with these toolchains.

---
 toolchain/toolchain-external/Config.in |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

I've just tested this one, and with the following defconfig:

BR2_mips64el=y
BR2_MIPS_NABI64=y
BR2_TOOLCHAIN_EXTERNAL=y

the Busybox compilation fails with:

In file included from libbb/pw_encrypt.c:89:0:
libbb/pw_encrypt_des.c: In function 'pw_encrypt':
libbb/pw_encrypt_des.c:289:27: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:769 Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions. make[2]: *** [libbb/pw_encrypt.o] Erreur 1

It does not appear with the same toolchain in MIPS32 mode. I agree it's a toolchain bug, but I'm just wondering in which conditions you tested your patch and/or if something can be done to avoid the toolchain breakage.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Quoted 35 lines · Thomas Petazzoni

Dear Markos Chandras,

Quoted 10 lines · Markos Chandras

From: Markos Chandras <[email protected]>

The n64 ABI which is supported by the Codesourcery MIPS toolchains, is only available with MIPS64 so allow these cores to be selected and used with these toolchains.

---
 toolchain/toolchain-external/Config.in |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

I've just tested this one, and with the following defconfig:

BR2_mips64el=y
BR2_MIPS_NABI64=y
BR2_TOOLCHAIN_EXTERNAL=y

the Busybox compilation fails with:

In file included from libbb/pw_encrypt.c:89:0:
libbb/pw_encrypt_des.c: In function 'pw_encrypt':
libbb/pw_encrypt_des.c:289:27: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:769 Please submit a full bug report,
with preprocessed source if appropriate.
See <https://support.codesourcery.com/GNUToolchain/> for instructions. make[2]: *** [libbb/pw_encrypt.o] Erreur 1

It does not appear with the same toolchain in MIPS32 mode. I agree it's a toolchain bug, but I'm just wondering in which conditions you tested your patch and/or if something can be done to avoid the toolchain breakage.

Quoted 8 lines

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

Hi Thomas,

I did limited testing and I haven't seen this problem but I haven't build busybox to be honest.
However, on the release notes they say they support MIPS64/n64
https://sourcery.mentor.com/GNUToolchain/release2358?@template=datasheet

so I just allowed buildroot to select this combination as well.

My understanding is that the compilation problem is orthogonal to mip64/n64 patch in the sense
that forbidding the combination just hides the problem for now :)

--
Regards,
Markos Chandras

#3 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Dear Markos Chandras,

Quoted 10 lines · Markos Chandras

I did limited testing and I haven't seen this problem but I haven't build busybox to be honest.
However, on the release notes they say they support MIPS64/n64
https://sourcery.mentor.com/GNUToolchain/release2358?@template=datasheet

so I just allowed buildroot to select this combination as well.

My understanding is that the compilation problem is orthogonal to mip64/n64 patch in the sense
that forbidding the combination just hides the problem for now :)

I agree that the problem is orthogonal, but having an external toolchain that isn't even capable of building Busybox worries me a little bit. This means that an user selecting mips64 and external toolchain, and keep all the other options as default, will see a failing build. Not really nice.

We have various issues with the toolchain from Mentor Graphics. It would be nice if we could have some contact to help solve those issues.

Best regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#4 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Quoted 15 lines · Thomas Petazzoni

Dear Markos Chandras,

Quoted 10 lines · Markos Chandras

I did limited testing and I haven't seen this problem but I haven't build busybox to be honest.
However, on the release notes they say they support MIPS64/n64
https://sourcery.mentor.com/GNUToolchain/release2358?@template=datasheet

so I just allowed buildroot to select this combination as well.

My understanding is that the compilation problem is orthogonal to mip64/n64 patch in the sense
that forbidding the combination just hides the problem for now :)

Quoted 5 lines

I agree that the problem is orthogonal, but having an external toolchain that isn't even capable of building Busybox worries me a little bit. This means that an user selecting mips64 and external toolchain, and keep all the other options as default, will see a failing build. Not really nice.

Ok I agree. I will try an out-of-buildroot build for busybox using this toolchain just to rule out specific buildroot problems. If that fails too then I will see if there is a way to report this problem.

--
Regards,
Markos Chandras

#5 lore raw

PATCH 1/1 external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Quoted 23 lines · Markos Chandras
Quoted 15 lines · Thomas Petazzoni

Dear Markos Chandras,

Quoted 10 lines · Markos Chandras

I did limited testing and I haven't seen this problem but I haven't build busybox to be honest.
However, on the release notes they say they support MIPS64/n64
https://sourcery.mentor.com/GNUToolchain/release2358?@template=datasheet

so I just allowed buildroot to select this combination as well.

My understanding is that the compilation problem is orthogonal to mip64/n64 patch in the sense
that forbidding the combination just hides the problem for now :)

Quoted 5 lines

I agree that the problem is orthogonal, but having an external toolchain that isn't even capable of building Busybox worries me a little bit. This means that an user selecting mips64 and external toolchain, and keep all the other options as default, will see a failing build. Not really nice.

Quoted 7 lines

Ok I agree. I will try an out-of-buildroot build for busybox using this toolchain just to rule out specific buildroot problems. If that fails too then I will see if there is a way to report this problem.

--
Regards,
Markos Chandras

Thomas,

busybox now builds on the 2013.05 toolchain. I will send a patch for the version bump and add MIPS64 support as well.

--
Regards,
Markos Chandras