Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] gcc: Tweak arm multilib endian patch for baremetal
Date: Thu, 26 Mar 2015 23:55:12 +0000	[thread overview]
Message-ID: <1427414112.14020.170.camel@linuxfoundation.org> (raw)

In a baremetal build, TARGET_ENDIAN_OPTION isn't set leading to build
failures. Add in ifdefs to avoid this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
index ba0a227..37c46fc 100644
--- a/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
+++ b/meta/recipes-devtools/gcc/gcc-4.9/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
@@ -11,26 +11,34 @@ Upstream-Status: Pending
  gcc/config/arm/linux-elf.h |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-Index: gcc-4.9-20140316/gcc/config/arm/coff.h
+Index: gcc-4.9.2/gcc/config/arm/coff.h
 ===================================================================
---- gcc-4.9-20140316.orig/gcc/config/arm/coff.h
-+++ gcc-4.9-20140316/gcc/config/arm/coff.h
-@@ -33,7 +33,7 @@
+--- gcc-4.9.2.orig/gcc/config/arm/coff.h
++++ gcc-4.9.2/gcc/config/arm/coff.h
+@@ -32,8 +32,11 @@
+ #define TARGET_DEFAULT (MASK_APCS_FRAME)
  
  #ifndef MULTILIB_DEFAULTS
++#ifndef TARGET_ENDIAN_OPTION
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#endif
  #define MULTILIB_DEFAULTS \
 -  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork" }
 +  { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork" }
  #endif
  \f
  /* This is COFF, but prefer stabs.  */
-Index: gcc-4.9-20140316/gcc/config/arm/elf.h
+Index: gcc-4.9.2/gcc/config/arm/elf.h
 ===================================================================
---- gcc-4.9-20140316.orig/gcc/config/arm/elf.h
-+++ gcc-4.9-20140316/gcc/config/arm/elf.h
-@@ -112,7 +112,7 @@
+--- gcc-4.9.2.orig/gcc/config/arm/elf.h
++++ gcc-4.9.2/gcc/config/arm/elf.h
+@@ -116,8 +116,11 @@
+ #endif
  
  #ifndef MULTILIB_DEFAULTS
++#ifndef TARGET_ENDIAN_OPTION
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#endif
  #define MULTILIB_DEFAULTS \
 -  { "marm", "mlittle-endian", "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }
 +  { "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=soft", "mno-thumb-interwork", "fno-leading-underscore" }




             reply	other threads:[~2015-03-26 23:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 23:55 Richard Purdie [this message]
2015-04-03  4:55 ` [PATCH] gcc: Tweak arm multilib endian patch for baremetal Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427414112.14020.170.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox