diff mbox

external-toolchain: Allow MIPS64 for Codesourcery MIPS toolchains

Message ID 1368627740-4094-1-git-send-email-markos.chandras@gmail.com
State Rejected
Headers show

Commit Message

Markos Chandras May 15, 2013, 2:22 p.m. UTC
From: Markos Chandras <markos.chandras@imgtec.com>

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.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 toolchain/toolchain-external/Config.in |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

Comments

Thomas Petazzoni May 26, 2013, 1:29 p.m. UTC | #1
Dear Markos Chandras,

On Wed, 15 May 2013 15:22:20 +0100, Markos Chandras wrote:
> From: Markos Chandras <markos.chandras@imgtec.com>
> 
> 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.
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
>  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
Markos Chandras May 27, 2013, 9:05 a.m. UTC | #2
On 26 May 2013 14:29, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Wed, 15 May 2013 15:22:20 +0100, Markos Chandras wrote:
>> From: Markos Chandras <markos.chandras@imgtec.com>
>>
>> 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.
>>
>> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
>> ---
>>  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
> --
> 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
Thomas Petazzoni May 27, 2013, 9:18 a.m. UTC | #3
Dear Markos Chandras,

On Mon, 27 May 2013 10:05:10 +0100, Markos Chandras wrote:

> 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
Markos Chandras May 27, 2013, 3:11 p.m. UTC | #4
On 27 May 2013 10:18, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Markos Chandras,
>
> On Mon, 27 May 2013 10:05:10 +0100, Markos Chandras wrote:
>
>> 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.

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
Markos Chandras June 7, 2013, 8:53 a.m. UTC | #5
On 27 May 2013 16:11, Markos Chandras <markos.chandras@gmail.com> wrote:
> On 27 May 2013 10:18, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Markos Chandras,
>>
>> On Mon, 27 May 2013 10:05:10 +0100, Markos Chandras wrote:
>>
>>> 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.
>
> 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
diff mbox

Patch

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index a93ada3..a13ee31 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -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