* [PATCH 1/3] uclibc_git.bb: Fix compilation on arm when using thumb instruction set
2011-05-27 5:48 [PATCH 0/3] Fix uclibc build in thumb mode Khem Raj
@ 2011-05-27 5:49 ` Khem Raj
2011-05-27 5:49 ` [PATCH 2/3] uclibc.inc: Set COMPILE_IN_THUMB_MODE in .config if ARM_INSTRUCTION_SET != arm Khem Raj
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-27 5:49 UTC (permalink / raw)
To: OE core
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
| 33 ++++++++++++++++++++
.../uclibc-git/compile-arm-fork-with-O2.patch | 21 ++++++++++++
meta/recipes-core/uclibc/uclibc_git.bb | 4 ++-
3 files changed, 57 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-core/uclibc/uclibc-git/append_UCLIBC_EXTRA_CFLAGS.patch
create mode 100644 meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
--git a/meta/recipes-core/uclibc/uclibc-git/append_UCLIBC_EXTRA_CFLAGS.patch b/meta/recipes-core/uclibc/uclibc-git/append_UCLIBC_EXTRA_CFLAGS.patch
new file mode 100644
index 0000000..edcb4e3
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/append_UCLIBC_EXTRA_CFLAGS.patch
@@ -0,0 +1,33 @@
+UCLIBC_EXTRA_CFLAGS is currently added before the OPTIMIZATION flags
+and OPTIMIZATION is chosen to be Os by default. But in OE we pass the optimisation
+flags through UCLIBC_EXTRA_CFLAGS but they are not effective since -Os is
+specified at last. So we need to change the order of these option flags
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+diff --git a/Rules.mak b/Rules.mak
+index 65fe47c..eca7f40 100644
+--- a/Rules.mak
++++ b/Rules.mak
+@@ -585,9 +574,6 @@ CFLAGS := -include $(top_srcdir)include/libc-symbols.h \
+ -nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \
+ -I$(top_srcdir)libc/sysdeps/linux \
+ -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)
+-ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
+-CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
+-endif
+
+ # We need this to be checked within libc-symbols.h
+ ifneq ($(HAVE_SHARED),y)
+@@ -633,6 +619,9 @@ LDFLAGS += -Wl,-s
+ else
+ STRIPTOOL := true -Stripping_disabled
+ endif
++ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"")
++CFLAGS += $(call qstrip,$(UCLIBC_EXTRA_CFLAGS))
++endif
+
+ ifeq ($(DOMULTI),y)
+ # we try to compile all sources at once into an object (IMA), but
diff --git a/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
new file mode 100644
index 0000000..429f27d
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
@@ -0,0 +1,21 @@
+When compiling in thumb mode for arm with -Os gcc gives up since it can not find registers
+to spill. So we use -O2 option for compiling fork.c It may be addressable is gcc.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+index 329d8a9..41e3646 100644
+--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
++++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+@@ -30,3 +30,9 @@ CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
+ # This macro should be alternatively implemented in THUMB
+ # assembly.
+ ASFLAGS-vfork.S = -marm
++
++# For arm fork.c does not compile with -Os when in compiling
++# in thumb1 mode
++ifeq ($(COMPILE_IN_THUMB_MODE),y)
++CFLAGS-fork.c = -O2
++endif
diff --git a/meta/recipes-core/uclibc/uclibc_git.bb b/meta/recipes-core/uclibc/uclibc_git.bb
index 18619cd..3d5f7a7 100644
--- a/meta/recipes-core/uclibc/uclibc_git.bb
+++ b/meta/recipes-core/uclibc/uclibc_git.bb
@@ -2,7 +2,7 @@ SRCREV="71d63ed75648da9b0b71afabb9c60aaad792c55c"
require uclibc.inc
PV = "0.9.31+0.9.32rc3"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
#recent versions uclibc require real kernel headers
@@ -27,5 +27,7 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
file://argp-support.patch \
file://argp-headers.patch \
file://remove_attribute_optimize_Os.patch \
+ file://uclibc-git/append_UCLIBC_EXTRA_CFLAGS.patch \
+ file://compile-arm-fork-with-O2.patch \
"
S = "${WORKDIR}/git"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] uclibc.inc: Set COMPILE_IN_THUMB_MODE in .config if ARM_INSTRUCTION_SET != arm
2011-05-27 5:48 [PATCH 0/3] Fix uclibc build in thumb mode Khem Raj
2011-05-27 5:49 ` [PATCH 1/3] uclibc_git.bb: Fix compilation on arm when using thumb instruction set Khem Raj
@ 2011-05-27 5:49 ` Khem Raj
2011-05-27 5:49 ` [PATCH 3/3] shared-mime-info_0.90.bb: Fix more parallel build issues Khem Raj
2011-05-27 15:55 ` [PATCH 0/3] Fix uclibc build in thumb mode Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-27 5:49 UTC (permalink / raw)
To: OE core
This will configure uclibc to be compiled in thumb/thumb2 mode
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-core/uclibc/uclibc.inc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-core/uclibc/uclibc.inc b/meta/recipes-core/uclibc/uclibc.inc
index e7d8846..c1bc422 100644
--- a/meta/recipes-core/uclibc/uclibc.inc
+++ b/meta/recipes-core/uclibc/uclibc.inc
@@ -135,6 +135,7 @@ configmangle = '/^KERNEL_HEADERS/d; \
/^SHARED_LIB_LOADER_PREFIX/d; \
/^UCLIBC_EXTRA_CFLAGS/d; \
s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
+ ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][bb.data.getVar("ARM_INSTRUCTION_SET", d, 1) != "arm"]} \
${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][bb.data.getVar("USE_NLS", d, 1) == "yes"]} \
${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][bb.data.getVar("TARGET_ARCH", d, 1) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
/^CROSS/d; \
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] shared-mime-info_0.90.bb: Fix more parallel build issues
2011-05-27 5:48 [PATCH 0/3] Fix uclibc build in thumb mode Khem Raj
2011-05-27 5:49 ` [PATCH 1/3] uclibc_git.bb: Fix compilation on arm when using thumb instruction set Khem Raj
2011-05-27 5:49 ` [PATCH 2/3] uclibc.inc: Set COMPILE_IN_THUMB_MODE in .config if ARM_INSTRUCTION_SET != arm Khem Raj
@ 2011-05-27 5:49 ` Khem Raj
2011-05-27 15:55 ` [PATCH 0/3] Fix uclibc build in thumb mode Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2011-05-27 5:49 UTC (permalink / raw)
To: OE core; +Cc: Khem Raj
From: Khem Raj <kraj@juniper.net>
While building for beagleboard with -j4 I ended up failures in
generating and checking xml files. This is a backport from upstream that
fixes the issue.
Signed-off-by: Khem Raj <kraj@juniper.net>
---
.../files/fix-parallel-build-backport.patch | 26 ++++++++++++++++++++
.../shared-mime-info/shared-mime-info_0.90.bb | 5 ++-
2 files changed, 29 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-support/shared-mime-info/files/fix-parallel-build-backport.patch
diff --git a/meta/recipes-support/shared-mime-info/files/fix-parallel-build-backport.patch b/meta/recipes-support/shared-mime-info/files/fix-parallel-build-backport.patch
new file mode 100644
index 0000000..a78e6a8
--- /dev/null
+++ b/meta/recipes-support/shared-mime-info/files/fix-parallel-build-backport.patch
@@ -0,0 +1,26 @@
+Backport fix for https://bugs.freedesktop.org/show_bug.cgi?id=32127
+
+Upstream-Status: Inappropriate [Backport]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+From 68e31f61f5e50e5222bc05437d1123e932922796 Mon Sep 17 00:00:00 2001
+From: Samuli Suominen <ssuominen@gentoo.org>
+Date: Mon, 06 Dec 2010 19:46:57 +0000
+Subject: Fix parallel build
+
+https://bugs.freedesktop.org/show_bug.cgi?id=32127
+---
+Index: shared-mime-info-0.90/Makefile.am
+===================================================================
+--- shared-mime-info-0.90.orig/Makefile.am 2011-05-25 15:50:18.000000000 -0700
++++ shared-mime-info-0.90/Makefile.am 2011-05-25 15:50:45.153489305 -0700
+@@ -72,7 +72,7 @@
+ create-pot:
+ $(MAKE) -C po shared-mime-info.pot
+
+-check: freedesktop.org.xml check-translations
++check: create-pot freedesktop.org.xml check-translations
+ if test -n $(XMLLINT) ; then \
+ if test -e $(top_builddir)/freedesktop.org.xml; then \
+ xmllint --noout --valid $(top_builddir)/freedesktop.org.xml; \
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb
index a806b36..cbbd0fe 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.90.bb
@@ -1,7 +1,8 @@
require shared-mime-info.inc
PR = "r0"
-SRC_URI += "file://fix-parallel-build.patch"
-
+SRC_URI += "file://fix-parallel-build.patch \
+ file://fix-parallel-build-backport.patch \
+ "
SRC_URI[md5sum] = "967d68d3890ba3994cfce3adf5b8f15b"
SRC_URI[sha256sum] = "52c9f84a8c72de631a0458542980b1728560f59845eb5e93e1dbe825f4b72304"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Fix uclibc build in thumb mode
2011-05-27 5:48 [PATCH 0/3] Fix uclibc build in thumb mode Khem Raj
` (2 preceding siblings ...)
2011-05-27 5:49 ` [PATCH 3/3] shared-mime-info_0.90.bb: Fix more parallel build issues Khem Raj
@ 2011-05-27 15:55 ` Richard Purdie
3 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2011-05-27 15:55 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Khem Raj
On Thu, 2011-05-26 at 22:48 -0700, Khem Raj wrote:
> slugos uses uclibc in thumb mode. These patches fix the build of uclibc in thumb mode
> and additionally fixes shared-mime-info which failed to build with -j4
>
> The following changes since commit 31b3d1f9aa6fa1640874f7da9cce37f4aa13eab1:
>
> uclibc_git.bb: Fix compilation on arm when using thumb instruction set (2011-05-26 22:44:50 -0700)
>
> are available in the git repository at:
> git://git.openembedded.org/openembedded-core-contrib kraj/uclibc-thumb
> http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/uclibc-thumb
>
> Khem Raj (3):
> uclibc_git.bb: Fix compilation on arm when using thumb instruction
> set
> uclibc.inc: Set COMPILE_IN_THUMB_MODE in .config if
> ARM_INSTRUCTION_SET != arm
> shared-mime-info_0.90.bb: Fix more parallel build issues
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread