Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS
@ 2013-09-25 15:00 Markos Chandras
  2013-09-30  8:33 ` Markos Chandras
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Markos Chandras @ 2013-09-25 15:00 UTC (permalink / raw)
  To: buildroot

According to glibc-2.18/ports/sysdeps/mips/preconfigure,
if no -mabi was passed to CFLAGS, then it defaults to -mabi=n32.
This breaks o32 and n64 builds for MIPS64. Therefore, it is
necessary to append -mabi to CFLAGS.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
 package/glibc/glibc.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
index 4dd2e63..68c4636 100644
--- a/package/glibc/glibc.mk
+++ b/package/glibc/glibc.mk
@@ -43,6 +43,16 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
 GLIBC_EXTRA_CFLAGS += -marm
 endif
 
+# MIPS64 defaults to n32 so pass the correct -mabi if
+# we are using a different ABI. OABI32 is also used
+# in MIPS so we pass -mabi=32 in this case as well
+# even though it's not strictly necessary.
+ifeq ($(BR2_MIPS_NABI64),y)
+GLIBC_EXTRA_CFLAGS += -mabi=64
+else ifeq ($(BR2_MIPS_OABI32),y)
+GLIBC_EXTRA_CFLAGS += -mabi=32
+endif
+
 # Even though we use the autotools-package infrastructure, we have to
 # override the default configure commands for several reasons:
 #
-- 
1.8.3.2

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

* [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS
  2013-09-25 15:00 [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS Markos Chandras
@ 2013-09-30  8:33 ` Markos Chandras
  2013-10-01 21:33 ` Thomas Petazzoni
  2013-10-01 21:59 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Markos Chandras @ 2013-09-30  8:33 UTC (permalink / raw)
  To: buildroot

On 09/25/13 16:00, Markos Chandras wrote:
> According to glibc-2.18/ports/sysdeps/mips/preconfigure,
> if no -mabi was passed to CFLAGS, then it defaults to -mabi=n32.
> This breaks o32 and n64 builds for MIPS64. Therefore, it is
> necessary to append -mabi to CFLAGS.
>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
>   package/glibc/glibc.mk | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk
> index 4dd2e63..68c4636 100644
> --- a/package/glibc/glibc.mk
> +++ b/package/glibc/glibc.mk
> @@ -43,6 +43,16 @@ ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
>   GLIBC_EXTRA_CFLAGS += -marm
>   endif
>
> +# MIPS64 defaults to n32 so pass the correct -mabi if
> +# we are using a different ABI. OABI32 is also used
> +# in MIPS so we pass -mabi=32 in this case as well
> +# even though it's not strictly necessary.
> +ifeq ($(BR2_MIPS_NABI64),y)
> +GLIBC_EXTRA_CFLAGS += -mabi=64
> +else ifeq ($(BR2_MIPS_OABI32),y)
> +GLIBC_EXTRA_CFLAGS += -mabi=32
> +endif
> +
>   # Even though we use the autotools-package infrastructure, we have to
>   # override the default configure commands for several reasons:
>   #
>
Ping? :)

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

* [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS
  2013-09-25 15:00 [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS Markos Chandras
  2013-09-30  8:33 ` Markos Chandras
@ 2013-10-01 21:33 ` Thomas Petazzoni
  2013-10-01 21:59 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-10-01 21:33 UTC (permalink / raw)
  To: buildroot

Dear Markos Chandras,

On Wed, 25 Sep 2013 16:00:57 +0100, Markos Chandras wrote:
> According to glibc-2.18/ports/sysdeps/mips/preconfigure,
> if no -mabi was passed to CFLAGS, then it defaults to -mabi=n32.
> This breaks o32 and n64 builds for MIPS64. Therefore, it is
> necessary to append -mabi to CFLAGS.
> 
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS
  2013-09-25 15:00 [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS Markos Chandras
  2013-09-30  8:33 ` Markos Chandras
  2013-10-01 21:33 ` Thomas Petazzoni
@ 2013-10-01 21:59 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2013-10-01 21:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Markos" == Markos Chandras <markos.chandras@imgtec.com> writes:

 Markos> According to glibc-2.18/ports/sysdeps/mips/preconfigure,
 Markos> if no -mabi was passed to CFLAGS, then it defaults to -mabi=n32.
 Markos> This breaks o32 and n64 builds for MIPS64. Therefore, it is
 Markos> necessary to append -mabi to CFLAGS.

 Markos> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2013-10-01 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 15:00 [Buildroot] [PATCH] glibc: Pass correct -mabi for MIPS Markos Chandras
2013-09-30  8:33 ` Markos Chandras
2013-10-01 21:33 ` Thomas Petazzoni
2013-10-01 21:59 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox