Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] uClibc: Resolve conflicting options when building for mips32
@ 2012-10-20  2:57 Aristov Maxim
  2012-10-23 18:44 ` Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: Aristov Maxim @ 2012-10-20  2:57 UTC (permalink / raw)
  To: openembedded-core; +Cc: Aristov Maxim

Signed-off-by: Aristov Maxim <m@ximilian.ru>
---
 .../uclibc/uclibc-0.9.33/mips/uClibc.machine           |   16 ----------------
 .../recipes-core/uclibc/uclibc-git/mips/uClibc.machine |   16 ----------------
 meta/recipes-core/uclibc/uclibc.inc                    |   10 ++++++++++
 3 files changed, 10 insertions(+), 32 deletions(-)
 delete mode 100644 meta/recipes-core/uclibc/uclibc-0.9.33/mips/uClibc.machine
 delete mode 100644 meta/recipes-core/uclibc/uclibc-git/mips/uClibc.machine

diff --git a/meta/recipes-core/uclibc/uclibc-0.9.33/mips/uClibc.machine b/meta/recipes-core/uclibc/uclibc-0.9.33/mips/uClibc.machine
deleted file mode 100644
index 7d7ab3f..0000000
--- a/meta/recipes-core/uclibc/uclibc-0.9.33/mips/uClibc.machine
+++ /dev/null
@@ -1,16 +0,0 @@
-# in OE we use TARGET_CC_ARCH="-march=mips32" but by
-# default uclibc uses mips1 ISA for o32 ABI which ends
-# up with conflicting march options to gcc. Here we
-# ask for MIPS32 ISA to match the OE defaults
-
-CONFIG_MIPS_ISA_MIPS32=y
-
-# Below options are exact copy of general
-# uClibc.machine file
-#
-FORCE_OPTIONS_FOR_ARCH=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-KERNEL_HEADERS="/usr/include"
-HAVE_DOT_CONFIG=y
-
diff --git a/meta/recipes-core/uclibc/uclibc-git/mips/uClibc.machine b/meta/recipes-core/uclibc/uclibc-git/mips/uClibc.machine
deleted file mode 100644
index 7d7ab3f..0000000
--- a/meta/recipes-core/uclibc/uclibc-git/mips/uClibc.machine
+++ /dev/null
@@ -1,16 +0,0 @@
-# in OE we use TARGET_CC_ARCH="-march=mips32" but by
-# default uclibc uses mips1 ISA for o32 ABI which ends
-# up with conflicting march options to gcc. Here we
-# ask for MIPS32 ISA to match the OE defaults
-
-CONFIG_MIPS_ISA_MIPS32=y
-
-# Below options are exact copy of general
-# uClibc.machine file
-#
-FORCE_OPTIONS_FOR_ARCH=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-KERNEL_HEADERS="/usr/include"
-HAVE_DOT_CONFIG=y
-
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index 6c98090..707b14e 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -85,6 +85,15 @@ OE_DEL      := "${@features_to_uclibc_del(d)}"
 python () {
     if "${OE_DEL}":
         d.setVar('configmangle_append', "${OE_DEL}" + "\n")
+
+    # by default uclibc uses mips1 ISA for o32 ABI
+    # if we use TARGET_CC_ARCH="-march=mips32" we end up 
+    # with conflicting march options to gcc. Here we
+    # ask for MIPS32 ISA to match the chosen arch
+
+    if "mips32" in d.getVar("TUNE_FEATURES",True):
+        d.setVar('configmangle_append',
+                 "/^### MIPS32_CHECK$/a\\\nCONFIG_MIPS_ISA_MIPS32=y\n\n")
     if "${OE_FEATURES}":
         d.setVar('configmangle_append',
                    "/^### DISTRO FEATURES$/a\\\n%s\n\n" %
@@ -133,6 +142,7 @@ do_configure() {
         echo "### FPU" >>${S}/merged.config
         echo "### ABI" >>${S}/merged.config
         echo "### DISTRO FEATURES" >>${S}/merged.config
+        echo "### MIPS32_CHECK" >>${S}/merged.config
 
         # Mangle the resulting .config depending on OE variables
         sed -i -e '${configmangle}' ${S}/merged.config
-- 
1.7.10.4




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

end of thread, other threads:[~2012-10-23 18:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-20  2:57 [PATCH] uClibc: Resolve conflicting options when building for mips32 Aristov Maxim
2012-10-23 18:44 ` Saul Wold

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