All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32
@ 2012-07-14 12:28 Gustavo Zacarias
  2012-07-14 12:28 ` [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple Gustavo Zacarias
  2012-07-14 13:03 ` [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2012-07-14 12:28 UTC (permalink / raw)
  To: buildroot

MIPS EABI is a bare-metal ABI so remove it.
Also fix uClibc to really work with N32 ABI, which used the EABI knob
previously.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 target/Config.in.arch      |    3 ---
 toolchain/uClibc/uclibc.mk |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index c9bbc12..bad0f4c 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -280,9 +280,6 @@ config BR2_MIPS_OABI32
 config BR2_MIPS_ABI32
 	bool "n32"
 	depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16
-config BR2_MIPS_EABI
-	bool "eabi"
-	depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16
 config BR2_MIPS_ABI64
 	bool "n64"
 	depends on BR2_mips_3 || BR2_mips_4 || BR2_mips_64 || BR2_mips_64r2 || BR2_mips_16
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index f40fe36..9d0b6db 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -158,7 +158,7 @@ ifeq ($(UCLIBC_TARGET_ARCH),mips)
 ifeq ($(BR2_MIPS_OABI),y)
 	$(SED) 's/.*\(CONFIG_MIPS_O32_ABI\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig
 endif
-ifeq ($(BR2_MIPS_EABI),y)
+ifeq ($(BR2_MIPS_ABI32),y)
 	$(SED) 's/.*\(CONFIG_MIPS_N32_ABI\).*/\1=y/' $(UCLIBC_DIR)/.oldconfig
 endif
 ifeq ($(BR2_MIPS_ABI64),y)
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple
  2012-07-14 12:28 [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Gustavo Zacarias
@ 2012-07-14 12:28 ` Gustavo Zacarias
  2012-07-14 23:02   ` Thomas Petazzoni
  2012-07-14 13:03 ` [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Gustavo Zacarias @ 2012-07-14 12:28 UTC (permalink / raw)
  To: buildroot

We need to use mips64 in the tuple for 64-bit variants (N32, N64 and O64
ABIs), otherwise we get assembly failures.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 target/Config.in.arch |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index bad0f4c..ae90a1d 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -600,6 +600,8 @@ config BR2_ARCH
 	default "i686"		if BR2_x86_athlon_4
 	default "m68k"		if BR2_m68k
 	default "microblaze"	if BR2_microblaze
+	default "mips64"	if (BR2_MIPS_ABI64 || BR2_MIPS_OABI64 || BR2_MIPS_ABI32) && BR2_mips
+	default "mips64el"	if (BR2_MIPS_ABI64 || BR2_MIPS_OABI64 || BR2_MIPS_ABI32) && BR2_mipsel
 	default "mips"		if BR2_mips
 	default "mipsel"	if BR2_mipsel
 	default "powerpc"	if BR2_powerpc
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32
  2012-07-14 12:28 [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Gustavo Zacarias
  2012-07-14 12:28 ` [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple Gustavo Zacarias
@ 2012-07-14 13:03 ` Thomas Petazzoni
  2012-07-14 19:44   ` Gustavo Zacarias
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-07-14 13:03 UTC (permalink / raw)
  To: buildroot

Le Sat, 14 Jul 2012 09:28:37 -0300,
Gustavo Zacarias <gustavo@zacarias.com.ar> a ?crit :

> MIPS EABI is a bare-metal ABI so remove it.
> Also fix uClibc to really work with N32 ABI, which used the EABI knob
> previously.

There is no support in uClibc for o64. Is this ABI really used? I see
that gcc has support for it
(http://gcc.gnu.org/projects/mipso64-abi.html), but is it used in
practice?

Also, is the BR2_MIPS_ABI_none knob actually useful?

Thanks,

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32
  2012-07-14 13:03 ` [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Thomas Petazzoni
@ 2012-07-14 19:44   ` Gustavo Zacarias
  0 siblings, 0 replies; 5+ messages in thread
From: Gustavo Zacarias @ 2012-07-14 19:44 UTC (permalink / raw)
  To: buildroot

On 07/14/12 10:03, Thomas Petazzoni wrote:

> Le Sat, 14 Jul 2012 09:28:37 -0300,
> Gustavo Zacarias <gustavo@zacarias.com.ar> a ?crit :
> 
>> MIPS EABI is a bare-metal ABI so remove it.
>> Also fix uClibc to really work with N32 ABI, which used the EABI knob
>> previously.
> 
> There is no support in uClibc for o64. Is this ABI really used? I see
> that gcc has support for it
> (http://gcc.gnu.org/projects/mipso64-abi.html), but is it used in
> practice?
> 
> Also, is the BR2_MIPS_ABI_none knob actually useful?
> 
> Thanks,
> 
> Thomas

The patchset isn't complete, it's just a start to fix the obvious so any
comments/suggestions are welcome.
Other points to fix include:

* External MIPS toolchains (non ct-ng) - neither of them seems to
support 64 bit anything yet it's an option, we should probably filter
them out.

* uClibc 64 bit toolchains seem broken for shared objects in general.
I've been able to get a qemu test running only with static linking.
Aboriginal linux does static too for mips64 as supporting evidence.

The set is just to get thing to build, maybe not properly but not
because of buildroot.
BR2_MIPS_ABI_none is actually useless, so yes it can be removed.
o64 ABI is probably an SGI thing for IRIX, hence the reason gcc supports
it, probably can be removed too.
Regards.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple
  2012-07-14 12:28 ` [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple Gustavo Zacarias
@ 2012-07-14 23:02   ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2012-07-14 23:02 UTC (permalink / raw)
  To: buildroot

Le Sat, 14 Jul 2012 09:28:38 -0300,
Gustavo Zacarias <gustavo@zacarias.com.ar> a ?crit :

> We need to use mips64 in the tuple for 64-bit variants (N32, N64 and O64
> ABIs), otherwise we get assembly failures.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  target/Config.in.arch |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/target/Config.in.arch b/target/Config.in.arch
> index bad0f4c..ae90a1d 100644
> --- a/target/Config.in.arch
> +++ b/target/Config.in.arch
> @@ -600,6 +600,8 @@ config BR2_ARCH
>  	default "i686"		if BR2_x86_athlon_4
>  	default "m68k"		if BR2_m68k
>  	default "microblaze"	if BR2_microblaze
> +	default "mips64"	if (BR2_MIPS_ABI64 || BR2_MIPS_OABI64 || BR2_MIPS_ABI32) && BR2_mips
> +	default "mips64el"	if (BR2_MIPS_ABI64 || BR2_MIPS_OABI64 || BR2_MIPS_ABI32) && BR2_mipsel
>  	default "mips"		if BR2_mips
>  	default "mipsel"	if BR2_mipsel
>  	default "powerpc"	if BR2_powerpc

So basically all ABIs except o32 are mips64 ABIs ?

I think it would be good to add a help text below each ABI to explain
its use case, the bitness of the kernel, etc.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-14 23:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-14 12:28 [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Gustavo Zacarias
2012-07-14 12:28 ` [Buildroot] [PATCH 2/2] toolchain/mips: add the mips64 tuple Gustavo Zacarias
2012-07-14 23:02   ` Thomas Petazzoni
2012-07-14 13:03 ` [Buildroot] [PATCH 1/2] toolchain/mips: kill EABI and fix N32 Thomas Petazzoni
2012-07-14 19:44   ` Gustavo Zacarias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.