[oe-commits] Khem Raj : klibc_1.5.18: Fix the build for x86 on newer kernels.

git version control git at git.openembedded.org
Thu Jul 1 22:53:27 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: d3c1b02dd6e4d5a128477ea594eb2d0c03d66b08
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=d3c1b02dd6e4d5a128477ea594eb2d0c03d66b08

Author: Khem Raj <raj.khem at gmail.com>
Date:   Thu Jul  1 15:48:31 2010 -0700

klibc_1.5.18: Fix the build for x86 on newer kernels.

* We were setting KLIBCARCH to match kernel arch
  while this let klibc build, it did not configure
  in right syscalls because klibc still use 'i386'
  the patch tells klibc to look for right places in
  kernel tree based on arch and we can stop synthesizing
  KLIBCARCH to be same as kernel arch.

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../klibc/{klibc_1.5.18.inc => klibc-1.5.18.inc}   |   12 +----------
 .../klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch |   21 ++++++++++++++++++++
 recipes/klibc/{klibc_1.5.inc => klibc-1.5.inc}     |    0 
 recipes/klibc/klibc-utils-static_1.5.18.bb         |    4 +-
 recipes/klibc/klibc-utils-static_1.5.bb            |    2 +-
 recipes/klibc/klibc_1.5.18.bb                      |    4 +-
 recipes/klibc/klibc_1.5.bb                         |    2 +-
 7 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/recipes/klibc/klibc_1.5.18.inc b/recipes/klibc/klibc-1.5.18.inc
similarity index 81%
rename from recipes/klibc/klibc_1.5.18.inc
rename to recipes/klibc/klibc-1.5.18.inc
index 2175643..5084683 100644
--- a/recipes/klibc/klibc_1.5.18.inc
+++ b/recipes/klibc/klibc-1.5.18.inc
@@ -10,16 +10,11 @@ SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch \
             file://arm-signal-cleanup.patch \
             file://socket.h.patch \
             file://isystem.patch \
+            file://klibc-x86-KLIBCARCHINCFLAGS.patch \
             "
 
 KLIBC_FETCHDIR = "1.5"
 
-KLIBC_ARCH_x86 = 'x86'
-KLIBC_ARCH_i486 = 'x86'
-KLIBC_ARCH_i586 = 'x86'
-KLIBC_ARCH_i686 = 'x86'
-KLIBC_ARCH_pentium = 'x86'
-
 EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
                 'CROSS_COMPILE=${TARGET_PREFIX}' \
                 'KLIBCKERNELSRC=${STAGING_KERNEL_DIR}' \
@@ -27,11 +22,6 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
 
 do_configure () {
         ln -sf ${STAGING_KERNEL_DIR} linux
-        cd ${S}/usr/klibc/arch/
-        ln -s i386 x86
-        cd ${S}/usr/include/arch/
-        ln -s i386 x86
-        cd ${S}
 }
 
 SRC_URI[md5sum] = "5c8b6577b9acb3809cace6e118cdd55b"
diff --git a/recipes/klibc/klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch b/recipes/klibc/klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch
new file mode 100644
index 0000000..65de61f
--- /dev/null
+++ b/recipes/klibc/klibc-1.5.18/klibc-x86-KLIBCARCHINCFLAGS.patch
@@ -0,0 +1,21 @@
+On newer kernels the arch dirs for x86 and x86_64 are merged into x86
+but klibc does not know that. This patch teaches it where to look at
+for the include files when KLIBCARCH=i386. Its already fixed when
+KLIBCARCH=x86_64
+
+-Khem
+
+Index: klibc-1.5.18/usr/klibc/arch/i386/MCONFIG
+===================================================================
+--- klibc-1.5.18.orig/usr/klibc/arch/i386/MCONFIG	2010-07-01 15:36:11.175170001 -0700
++++ klibc-1.5.18/usr/klibc/arch/i386/MCONFIG	2010-07-01 15:36:57.875169996 -0700
+@@ -26,6 +26,9 @@ KLIBCARCHREQFLAGS += $(gcc_m32_option)
+ 
+ KLIBCBITSIZE  = 32
+ 
++# Asm includes for i3?6  are in the merged x86 tree
++KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/x86/include
++
+ # Extra linkflags when building the shared version of the library
+ # This address needs to be reachable using normal inter-module
+ # calls, and work on the memory models for this architecture
diff --git a/recipes/klibc/klibc_1.5.inc b/recipes/klibc/klibc-1.5.inc
similarity index 100%
rename from recipes/klibc/klibc_1.5.inc
rename to recipes/klibc/klibc-1.5.inc
diff --git a/recipes/klibc/klibc-utils-static_1.5.18.bb b/recipes/klibc/klibc-utils-static_1.5.18.bb
index b359916..a244b75 100644
--- a/recipes/klibc/klibc-utils-static_1.5.18.bb
+++ b/recipes/klibc/klibc-utils-static_1.5.18.bb
@@ -1,3 +1,3 @@
 require klibc-utils-static.inc
-require klibc_${PV}.inc
-PR = "${INC_PR}.0"
+require klibc-${PV}.inc
+PR = "${INC_PR}.1"
diff --git a/recipes/klibc/klibc-utils-static_1.5.bb b/recipes/klibc/klibc-utils-static_1.5.bb
index b359916..4d1dd41 100644
--- a/recipes/klibc/klibc-utils-static_1.5.bb
+++ b/recipes/klibc/klibc-utils-static_1.5.bb
@@ -1,3 +1,3 @@
 require klibc-utils-static.inc
-require klibc_${PV}.inc
+require klibc-${PV}.inc
 PR = "${INC_PR}.0"
diff --git a/recipes/klibc/klibc_1.5.18.bb b/recipes/klibc/klibc_1.5.18.bb
index 694bf58..cf69b43 100644
--- a/recipes/klibc/klibc_1.5.18.bb
+++ b/recipes/klibc/klibc_1.5.18.bb
@@ -1,3 +1,3 @@
 require klibc.inc
-require klibc_${PV}.inc
-PR = "${INC_PR}.1"
+require klibc-${PV}.inc
+PR = "${INC_PR}.2"
diff --git a/recipes/klibc/klibc_1.5.bb b/recipes/klibc/klibc_1.5.bb
index 4b299f2..71718cf 100644
--- a/recipes/klibc/klibc_1.5.bb
+++ b/recipes/klibc/klibc_1.5.bb
@@ -1,3 +1,3 @@
 require klibc.inc
-require klibc_${PV}.inc
+require klibc-${PV}.inc
 PR = "${INC_PR}.0"





More information about the Openembedded-commits mailing list