All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] AMD64 and multilib support
@ 2009-04-15 12:33 Roman I Khimov
  2009-04-15 12:35 ` [PATCH 01/11] Add x86_64-generic machine Roman I Khimov
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:33 UTC (permalink / raw)
  To: openembedded-devel

Hello all.

This patch series (will follow in replies) tries to bring in AMD64/x86_64 
support into OE. This required some intrusive toolchain fixes that I want to 
post here for review and feedback as I think (or rather know ;)) I might have 
broken something along the way.

I've tried to generalize my approach so that later we could add some more 
64-bit goodies. So I've added 'multilib' OVERRIDE that I think we can set in 
future in bitbake.conf by intersection of MACHINE_FEATURES and 
DISTRO_FEATURES (now you can just add it to OVERRIDES in distro or 
local.conf). Well, from what I see this FEATURES/OVERRIDES games can be 
controversial but then please tell me how to do it better for toolchain.

What I've also tried to achieve is ability to build non-multilib toolchain, 
although from what I see that will require passing "--disable-multilib" by 
default for gcc-cross and that is a bit scary for now.

Then there is some directory naming things like 'lib' vs 'lib64' Given that we 
have some places assuming 'lib' to be 'lib' that is solved in Debian style 
(actually, stolen patches from Debian) where there is 'lib' for 64-bit arch 
and 'lib32' for 32-bit arch.

Next thing is 'libexec' dir. I propose to set it to point to libdir and be 
done with that (again, Debian does exactly this). For now, I've done that 
just for glibc-multilib.

Well, that's it in general, please see patches for details and feel free to 
bash it.



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

* [PATCH 01/11] Add x86_64-generic machine
  2009-04-15 12:33 [RFC] AMD64 and multilib support Roman I Khimov
@ 2009-04-15 12:35 ` Roman I Khimov
  2009-04-15 12:35   ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Roman I Khimov
  2009-04-15 13:01 ` [RFC] AMD64 and multilib support Stanislav Brabec
  2009-04-16 22:11 ` Tom Rini
  2 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 conf/machine/include/tune-x86_64.conf |    7 +++++++
 conf/machine/x86_64-generic.conf      |   14 ++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 conf/machine/include/tune-x86_64.conf
 create mode 100644 conf/machine/x86_64-generic.conf

diff --git a/conf/machine/include/tune-x86_64.conf b/conf/machine/include/tune-x86_64.conf
new file mode 100644
index 0000000..528d1b1
--- /dev/null
+++ b/conf/machine/include/tune-x86_64.conf
@@ -0,0 +1,7 @@
+ARCH_MULTILIB = "i686"
+LIB_MULTILIB = "lib32"
+CFLAGS_MULTILIB = "-march=i686 -m32"
+TARGET_SYS_MULTILIB = "${ARCH_MULTILIB}${TARGET_VENDOR}-${TARGET_OS}"
+
+base_multilibdir = "${layout_base_prefix}/${LIB_MULTILIB}"
+multilibdir = "${layout_exec_prefix}/${LIB_MULTILIB}"
diff --git a/conf/machine/x86_64-generic.conf b/conf/machine/x86_64-generic.conf
new file mode 100644
index 0000000..2e2bbf5
--- /dev/null
+++ b/conf/machine/x86_64-generic.conf
@@ -0,0 +1,14 @@
+#@TYPE: Machine
+#@NAME: x86_64-generic
+#@DESCRIPTION: Machine configuration for a Linux running on x86_64 compatible machines
+
+TARGET_ARCH = "x86_64"
+# reuse .bb for "normal" x86
+PREFERRED_PROVIDER_virtual/kernel = "linux-x86"
+
+udevdir = "/dev"
+OLDEST_KERNEL = "2.6.17"
+GLIBC_ADDONS = "nptl"
+GLIBC_EXTRA_OECONF = "--with-tls"
+MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost acpi ext2 multilib"
+require conf/machine/include/tune-x86_64.conf
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
  2009-04-15 12:35 ` [PATCH 01/11] Add x86_64-generic machine Roman I Khimov
@ 2009-04-15 12:35   ` Roman I Khimov
  2009-04-15 12:35     ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Roman I Khimov
  2009-04-15 19:25     ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Khem Raj
  0 siblings, 2 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 .../binutils-x86_64_i386_biarch.patch              |   25 ++++++++++++++++++++
 recipes/binutils/binutils_2.18.bb                  |    2 +-
 2 files changed, 26 insertions(+), 1 deletions(-)
 create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch

diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 9367196..562c8ba 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -12,8 +12,8 @@ SRC_URI = "\
      file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
-
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers
  2009-04-15 12:35   ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Roman I Khimov
@ 2009-04-15 12:35     ` Roman I Khimov
  2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
  2009-04-15 19:09       ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Khem Raj
  2009-04-15 19:25     ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Khem Raj
  1 sibling, 2 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

Taken from http://bugs.openembedded.net/show_bug.cgi?id=1728
---
 .../linux-libc-headers_2.6.23.bb                   |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
index 13579f9..db13a45 100644
--- a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
+++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
@@ -63,4 +63,16 @@ do_stage () {
 	cp -pfLR ${STAGE_TEMP}${includedir}/linux ${STAGING_INCDIR}/
 	cp -pfLR ${STAGE_TEMP}${includedir}/asm ${STAGING_INCDIR}/
 	cp -pfLR ${STAGE_TEMP}${includedir}/asm-generic ${STAGING_INCDIR}/
+        if [ "${ARCH}" == "x86_64" ]; then
+		cp -pfLR ${STAGE_TEMP}${includedir}/asm-x86_64 ${STAGING_INCDIR}/
+		cp -pfLR ${STAGE_TEMP}${includedir}/asm-i386 ${STAGING_INCDIR}/
+	fi
+}
+
+do_stage_append_multilib () {
+	mkdir ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}
+	ln -s ../linux ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/linux
+	ln -s ../asm ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm
+	ln -s ../asm-generic ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm-generic
+	ln -s ../asm-i386 ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm-i386
 }
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-15 12:35     ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Roman I Khimov
@ 2009-04-15 12:35       ` Roman I Khimov
  2009-04-15 12:35         ` [PATCH 05/11] gcc-cross-initial: add multilib overrides Roman I Khimov
                           ` (2 more replies)
  2009-04-15 19:09       ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Khem Raj
  1 sibling, 3 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/gcc/files/gcc-multilib64dir.patch |   43 +++++++++++++++++++++++++++++
 recipes/gcc/gcc-4.2.4.inc                 |    1 +
 2 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 recipes/gcc/files/gcc-multilib64dir.patch

diff --git a/recipes/gcc/files/gcc-multilib64dir.patch b/recipes/gcc/files/gcc-multilib64dir.patch
new file mode 100644
index 0000000..301e596
--- /dev/null
+++ b/recipes/gcc/files/gcc-multilib64dir.patch
@@ -0,0 +1,43 @@
+#! /bin/sh -e
+
+# DP: Use lib instead of lib64 as multilibdir on amd64 and ppc64.
+#
+# Taken from Debian, fixed to apply with quilt
+
+Index: gcc/config/i386/t-linux64
+===================================================================
+--- gcc/config/i386/t-linux64	(revision 130706)
++++ gcc/config/i386/t-linux64	(working copy)
+@@ -13,7 +13,7 @@
+ 
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32 
+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+ 
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+Index: gcc/config/rs6000/t-linux64
+===================================================================
+--- gcc/config/rs6000/t-linux64	(revision 130706)
++++ gcc/config/rs6000/t-linux64	(working copy)
+@@ -14,13 +14,13 @@
+ # it doesn't tell anything about the 32bit libraries on those systems.  Set
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+ 
+-MULTILIB_OPTIONS        = m64/m32 msoft-float
+-MULTILIB_DIRNAMES       = 64 32 nof
++MULTILIB_OPTIONS        = m64/m32
++MULTILIB_DIRNAMES       = 64 32
+ MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+-MULTILIB_EXCEPTIONS     = m64/msoft-float
+-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES	= ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
+-MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
++MULTILIB_EXCEPTIONS     =
++MULTILIB_EXCLUSIONS     =
++MULTILIB_OSDIRNAMES	= ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
++MULTILIB_MATCHES        =
+ 
+ softfp_wrap_start := '\#ifndef __powerpc64__'
+ softfp_wrap_end := '\#endif'
diff --git a/recipes/gcc/gcc-4.2.4.inc b/recipes/gcc/gcc-4.2.4.inc
index 085f241..20bdfef 100644
--- a/recipes/gcc/gcc-4.2.4.inc
+++ b/recipes/gcc/gcc-4.2.4.inc
@@ -37,6 +37,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	file://gcc-4.0.2-e300c2c3.patch;patch=1 \
 	file://fortran-static-linking.patch;patch=1 \
 	file://intermask-bigendian.patch;patch=1 \
+	file://gcc-multilib64dir.patch;patch=1;pnum=0 \
 "
 
 SRC_URI_append_ep93xx = " \
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 05/11] gcc-cross-initial: add multilib overrides
  2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
@ 2009-04-15 12:35         ` Roman I Khimov
  2009-04-15 12:35           ` [PATCH 06/11] gcc-cross-intermediate: " Roman I Khimov
  2009-04-15 19:23         ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Khem Raj
  2009-04-16 22:10         ` Tom Rini
  2 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/gcc/gcc-cross-initial.inc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/recipes/gcc/gcc-cross-initial.inc b/recipes/gcc/gcc-cross-initial.inc
index 15e5fa6..ffe55c3 100644
--- a/recipes/gcc/gcc-cross-initial.inc
+++ b/recipes/gcc/gcc-cross-initial.inc
@@ -1,5 +1,7 @@
 DEPENDS = "virtual/${TARGET_PREFIX}binutils"
+DEPENDS_multilib = "virtual/${TARGET_PREFIX}binutils"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
+PROVIDES_multilib = "virtual/${TARGET_PREFIX}gcc-initial virtual/${TARGET_SYS_MULTILIB}-gcc-initial"
 PACKAGES = ""
 
 # This is intended to be a -very- basic config
@@ -18,6 +20,12 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
 		--with-build-sysroot=${STAGING_DIR_TARGET} \
 		${@get_gcc_fpu_setting(bb, d)}"
 
+EXTRA_OECONF_append_multilib = " --enable-multilib"
+
 do_install () {
 	:
 }
+
+do_install_multilib () {
+	:
+}
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 06/11] gcc-cross-intermediate: add multilib overrides
  2009-04-15 12:35         ` [PATCH 05/11] gcc-cross-initial: add multilib overrides Roman I Khimov
@ 2009-04-15 12:35           ` Roman I Khimov
  2009-04-15 12:35             ` [PATCH 07/11] gcc-cross: " Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/gcc/gcc-cross-intermediate.inc |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/recipes/gcc/gcc-cross-intermediate.inc b/recipes/gcc/gcc-cross-intermediate.inc
index 4746140..5d8ac98 100644
--- a/recipes/gcc/gcc-cross-intermediate.inc
+++ b/recipes/gcc/gcc-cross-intermediate.inc
@@ -1,6 +1,8 @@
 DEPENDS = "virtual/${TARGET_PREFIX}binutils"
 DEPENDS += "virtual/${TARGET_PREFIX}libc-initial"
+DEPENDS_multilib = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-initial virtual/${TARGET_SYS_MULTILIB}-libc-initial"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc-intermediate"
+PROVIDES_multilib = "virtual/${TARGET_PREFIX}gcc-intermediate virtual/${TARGET_SYS_MULTILIB}-gcc-intermediate"
 PACKAGES = ""
 
 # This is intended to be a -very- basic config
@@ -16,6 +18,8 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
 		--with-build-sysroot=${STAGING_DIR_TARGET} \
 		${@get_gcc_fpu_setting(bb, d)}"
 
+EXTRA_OECONF_append_multilib = " --enable-multilib"
+
 do_stage_append () {
 	# get rid of dummy libc.so
 	if [ -z "`file ${STAGING_DIR_TARGET}${layout_libdir}/libc.so | grep "ASCII C program text"`" ]; then
@@ -26,3 +30,7 @@ do_stage_append () {
 do_install () {
 	:
 }
+
+do_install_multilib () {
+	:
+}
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 07/11] gcc-cross: add multilib overrides
  2009-04-15 12:35           ` [PATCH 06/11] gcc-cross-intermediate: " Roman I Khimov
@ 2009-04-15 12:35             ` Roman I Khimov
  2009-04-15 12:35               ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/gcc/gcc-cross.inc         |    2 ++
 recipes/gcc/gcc-package-cross.inc |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/recipes/gcc/gcc-cross.inc b/recipes/gcc/gcc-cross.inc
index 3fa6f61..3c8438b 100644
--- a/recipes/gcc/gcc-cross.inc
+++ b/recipes/gcc/gcc-cross.inc
@@ -9,4 +9,6 @@ target_base_libdir := "${base_libdir}"
 inherit cross
 
 DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+DEPENDS_multilib = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc virtual/${TARGET_SYS_MULTILIB}-libc-for-gcc"
 PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+PROVIDES_multilib = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${TARGET_SYS_MULTILIB}gcc virtual/${TARGET_SYS_MULTILIB}g++"
diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc
index 77da3fe..5ae1894 100644
--- a/recipes/gcc/gcc-package-cross.inc
+++ b/recipes/gcc/gcc-package-cross.inc
@@ -15,6 +15,13 @@ FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1"
 
 FILES_libstdc++ = "${target_libdir}/libstdc++.so.*"
 
+PACKAGES_append_multilib = " libgcc-${ARCH_MULTILIB} libssp-${ARCH_MULTILIB} libstdc++-${ARCH_MULTILIB} libg2c-${ARCH_MULTILIB} libgfortran-${ARCH_MULTILIB}"
+FILES_libgcc-${ARCH_MULTILIB} = "${layout_base_prefix}/${LIB_MULTILIB}/libgcc_s.so.1"
+FILES_libssp-${ARCH_MULTILIB} = "${layout_exec_prefix}/${LIB_MULTILIB}/libssp.so.*"
+FILES_libstdc++-${ARCH_MULTILIB} = "${layout_exec_prefix}/${LIB_MULTILIB}/libstdc++.so.*"
+FILES_libg2c-${ARCH_MULTILIB} = "${layout_exec_prefix}/${LIB_MULTILIB}/libg2c.so.*"
+FILES_libgfortran-${ARCH_MULTILIB} = "${layout_exec_prefix}/${LIB_MULTILIB}/libgfortran.so.*"
+
 do_install () {
 	oe_runmake 'DESTDIR=${D}' install
 
@@ -73,3 +80,31 @@ do_install () {
               cd $currdir
        fi
 }
+
+do_install_append_multilib () {
+	mkdir -p ${D}${base_multilibdir}
+        if [ -f ${D}${base_multilibdir}/libgcc_s.so.? ]; then
+                # Already in the right location
+                :
+        elif [ -f ${D}${prefix}/${LIB_MULTILIB}/libgcc_s.so.? ]; then
+                mv -f ${D}${prefix}/${LIB_MULTILIB}/libgcc_s.so* ${D}${base_multilibdir} || true
+        else
+                mv -f ${D}${prefix}/*/${LIB_MULTILIB}/libgcc_s.so* ${D}${base_multilibdir} || true 
+        fi
+
+        mkdir -p ${D}${multilibdir}
+
+        mv -f ${D}${prefix}/*/${LIB_MULTILIB}/libstdc++.so* ${D}${multilibdir} || true
+        mv -f ${D}${prefix}/*/${LIB_MULTILIB}/libg2c.so* ${D}${multilibdir} || true
+        mv -f ${D}${prefix}/*/${LIB_MULTILIB}/libgfortran*.so* ${D}${multilibdir} || true
+        mv -f ${D}${prefix}/*/${LIB_MULTILIB}/libssp*.so* ${D}${multilibdir} || true
+
+        # Manually run the target stripper since we won't get it run by
+        # the packaging.
+        if [ "x${OLD_INHIBIT_PACKAGE_STRIP}" != "x1" ]; then
+                ${TARGET_PREFIX}strip ${D}${multilibdir}/libstdc++.so.*
+                ${TARGET_PREFIX}strip ${D}${multilibdir}/libg2c.so.* || true
+                ${TARGET_PREFIX}strip ${D}${base_multilibdir}/libgcc_s.so.* || true
+                ${TARGET_PREFIX}strip ${D}${multilibdir}/libgfortran*.so* || true
+	fi
+}
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc
  2009-04-15 12:35             ` [PATCH 07/11] gcc-cross: " Roman I Khimov
@ 2009-04-15 12:35               ` Roman I Khimov
  2009-04-15 12:35                 ` [PATCH 09/11] glibc: add initial-multilib Roman I Khimov
  2009-04-15 19:28                 ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Khem Raj
  0 siblings, 2 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/glibc/glibc-package.bbclass |    5 -----
 recipes/glibc/glibc.inc             |    5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/recipes/glibc/glibc-package.bbclass b/recipes/glibc/glibc-package.bbclass
index 89fbd1c..1690a30 100644
--- a/recipes/glibc/glibc-package.bbclass
+++ b/recipes/glibc/glibc-package.bbclass
@@ -58,11 +58,6 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies"
 DESCRIPTION_localedef = "glibc: compile locale definition files"
 DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
 
-def get_glibc_fpu_setting(bb, d):
-    if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
-        return "--without-fp"
-    return ""
-
 EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
 
 OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
diff --git a/recipes/glibc/glibc.inc b/recipes/glibc/glibc.inc
index c2ee531..1bdd62b 100644
--- a/recipes/glibc/glibc.inc
+++ b/recipes/glibc/glibc.inc
@@ -17,6 +17,11 @@ LEAD_SONAME = "libc.so"
 GLIBC_EXTRA_OECONF ?= ""
 INHIBIT_DEFAULT_DEPS = "1"
 
+def get_glibc_fpu_setting(bb, d):
+	if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+		return "--without-fp"
+	return ""
+
 ARM_INSTRUCTION_SET = "arm"
 
 PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 09/11] glibc: add initial-multilib
  2009-04-15 12:35               ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Roman I Khimov
@ 2009-04-15 12:35                 ` Roman I Khimov
  2009-04-15 12:35                   ` [PATCH 10/11] glibc: add multilib glibc Roman I Khimov
  2009-04-15 19:28                 ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Khem Raj
  1 sibling, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/glibc/glibc-initial-multilib_2.6.1.bb |    7 +++++++
 recipes/glibc/glibc-initial.inc               |    6 ++++--
 recipes/glibc/glibc-multilib.inc              |    9 +++++++++
 3 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 recipes/glibc/glibc-initial-multilib_2.6.1.bb
 create mode 100644 recipes/glibc/glibc-multilib.inc

diff --git a/recipes/glibc/glibc-initial-multilib_2.6.1.bb b/recipes/glibc/glibc-initial-multilib_2.6.1.bb
new file mode 100644
index 0000000..bd09fdb
--- /dev/null
+++ b/recipes/glibc/glibc-initial-multilib_2.6.1.bb
@@ -0,0 +1,7 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+require glibc-multilib.inc
+
+do_configure_prepend () {
+	unset CFLAGS
+}
diff --git a/recipes/glibc/glibc-initial.inc b/recipes/glibc/glibc-initial.inc
index 5528cf8..306e0a0 100644
--- a/recipes/glibc/glibc-initial.inc
+++ b/recipes/glibc/glibc-initial.inc
@@ -1,6 +1,7 @@
 SECTION = "libs"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers"
-PROVIDES = "virtual/${TARGET_PREFIX}libc-initial"
+GLIBC_PREFIX ?= "${TARGET_PREFIX}"
+DEPENDS = "virtual/${GLIBC_PREFIX}gcc-initial linux-libc-headers"
+PROVIDES = "virtual/${GLIBC_PREFIX}libc-initial"
 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.4', '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
 
 PACKAGES = ""
@@ -33,6 +34,7 @@ do_compile () {
 do_stage () {
 	oe_runmake cross-compiling=yes install_root=${STAGING_DIR_HOST} \
 	includedir='${layout_includedir}' prefix='${layout_prefix}' \
+	libdir='${layout_libdir}' slibdir='${layout_base_libdir}' \
 	install-bootstrap-headers=yes install-headers
 
 	oe_runmake csu/subdir_lib
diff --git a/recipes/glibc/glibc-multilib.inc b/recipes/glibc/glibc-multilib.inc
new file mode 100644
index 0000000..910e9ee
--- /dev/null
+++ b/recipes/glibc/glibc-multilib.inc
@@ -0,0 +1,9 @@
+CC += "${CFLAGS_MULTILIB}"
+TARGET_SYS = "${TARGET_SYS_MULTILIB}"
+HOST_SYS = "${TARGET_SYS_MULTILIB}"
+TARGET_PREFIX = "${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}-"
+GLIBC_PREFIX = "${TARGET_SYS_MULTILIB}-"
+layout_libdir="${layout_exec_prefix}/${LIB_MULTILIB}"
+layout_includedir="${layout_exec_prefix}/include/${TARGET_SYS_MULTILIB}"
+layout_base_libdir="${layout_base_prefix}/${LIB_MULTILIB}"
+layout_libexecdir="${layout_libdir}"
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 10/11] glibc: add multilib glibc
  2009-04-15 12:35                 ` [PATCH 09/11] glibc: add initial-multilib Roman I Khimov
@ 2009-04-15 12:35                   ` Roman I Khimov
  2009-04-15 12:36                     ` [PATCH 11/11] package.bbclass: add multilib libdir to search path Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:35 UTC (permalink / raw)
  To: openembedded-devel

---
 recipes/glibc/glibc-multilib_2.6.1.bb        |  165 ++++++++++++++++++++++++++
 recipes/glibc/glibc-package-multilib.bbclass |   79 ++++++++++++
 recipes/glibc/glibc.inc                      |    5 +-
 recipes/glibc/glibc_2.6.1.bb                 |    2 +
 4 files changed, 249 insertions(+), 2 deletions(-)
 create mode 100644 recipes/glibc/glibc-multilib_2.6.1.bb
 create mode 100644 recipes/glibc/glibc-package-multilib.bbclass

diff --git a/recipes/glibc/glibc-multilib_2.6.1.bb b/recipes/glibc/glibc-multilib_2.6.1.bb
new file mode 100644
index 0000000..0f36339
--- /dev/null
+++ b/recipes/glibc/glibc-multilib_2.6.1.bb
@@ -0,0 +1,165 @@
+require glibc.inc
+require glibc-multilib.inc
+
+PROVIDES = "virtual/${GLIBC_PREFIX}libc-for-gcc"
+PACKAGES_DYNAMIC = "libc6-${ARCH_MULTILIB}*"
+RPROVIDES_${PN}-dev = "libc6-${ARCH_MULTILIB}-dev virtual-libc-${ARCH_MULTILIB}-dev"
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${layout_includedir}"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4"
+
+GLIBC_ADDONS ?= "ports,nptl,libidn"
+
+GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN"
+
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+python __anonymous () {
+    import bb, re
+    uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None)
+    if uc_os:
+	raise bb.parse.SkipPackage("incompatible with target %s" %
+				   bb.data.getVar('TARGET_OS', d, 1))
+}
+
+RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
+
+SRC_URI = "\
+  ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
+  ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-${PV}.tar.bz2 \
+  ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
+  file://arm-memcpy.patch;patch=1 \
+  file://arm-longlong.patch;patch=1 \
+  file://fhs-linux-paths.patch;patch=1 \
+  file://dl-cache-libcmp.patch;patch=1 \
+  file://ldsocache-varrun.patch;patch=1 \
+  file://nptl-crosscompile.patch;patch=1 \
+  file://glibc-2.5-local-dynamic-resolvconf.patch;patch=1;pnum=0 \
+  file://glibc-check_pf.patch;patch=1;pnum=0 \
+  file://zecke-sane-readelf.patch;patch=1 \
+  file://ldd-unbash.patch;patch=1 \
+  file://generic-bits_select.h \
+  file://generic-bits_types.h \
+  file://generic-bits_typesizes.h \
+  file://generic-bits_time.h \
+  file://etc/ld.so.conf \
+  file://generate-supported.mk \
+  file://glibc-2.6.1-RTLD_SINGLE_THREAD_P-1.patch;patch=1 \
+  file://glibc-2.6.1-use-short-for-fnstsw.patch;patch=1 \
+  file://glibc-use-isystem-include-fixed.patch;patch=1 \
+  file://glibc-arm-no-asm-page.patch;patch=1 \
+  file://armv4t-interworking.patch;patch=1 \
+  file://march-i686.patch;patch=1;pnum=0 \
+"
+
+# Build fails on sh3 and sh4 without additional patches
+SRC_URI_append_sh3 = " file://no-z-defs.patch;patch=1"
+SRC_URI_append_sh4 = " file://no-z-defs.patch;patch=1"
+
+# PowerPC Patches to add support for soft-float
+SRC_URI_append_powerpc = "\
+  file://powerpc-sqrt-hack.diff;patch=1 \
+  file://glibc-2.6.1-powerpc-nofpu.patch;patch=1 \
+"
+
+S = "${WORKDIR}/glibc-${PV}"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+EXTRA_OECONF = "\
+  --enable-kernel=${OLDEST_KERNEL} \
+  --without-cvs --disable-profile --disable-debug --without-gd \
+  --enable-clocale=gnu \
+  --enable-add-ons=${GLIBC_ADDONS} \
+  --with-headers=${STAGING_INCDIR} \
+  --without-selinux \
+  ${GLIBC_EXTRA_OECONF} \
+"
+
+EXTRA_OEMAKE += "asm-CPPFLAGS="${CFLAGS_MULTILIB}""
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+do_munge() {
+	# Integrate ports and libidn into tree
+	mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports
+	mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn
+
+	# Ports isn't really working... Fix it
+	# Some of this is rather dirty, but it seems to be the only
+	# quick way to get this cruft to compile
+	rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+	ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads
+	cp ${S}/nptl/sysdeps/pthread/bits/sigthread.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+	cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+	cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+	cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h
+	cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h
+	cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h
+	cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h
+	# Copy in generic stuff for not yet implemented headers
+	for i in ${S}/bits/*.h; do
+		F=`basename $i`
+		[ "$F" = "local_lim.h" ] && continue
+		[ "$F" = "errno.h" ] && continue
+		test -e ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/$F || test -e ${S}/ports/sysdeps/arm/bits/$F || test -e ${S}/sysdeps/unix/sysv/linux/bits/$F || test -e ${S}/sysdeps/ieee754/bits/$F || cp $i ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/
+	done
+	# This is harmful; we need to get the one from nptl/sysdeps/pthreads
+	rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h
+	# Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h
+	rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h
+	# Obsoleted by sysdeps/gnu/bits/utmp.h
+	rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h
+}
+
+addtask munge before do_patch after do_unpack
+
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+	if [ -z "`which rpcgen`" ]; then
+		echo "rpcgen not found.  Install glibc-devel."
+		exit 1
+	fi
+	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+	export libc_cv_slibdir=${layout_base_libdir}
+	export libc_cv_forced_unwind=yes
+	export libc_cv_c_cleanup=yes
+	export libc_cv_gnu99_inline=yes
+	CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+	unset LDFLAGS
+	export libc_cv_slibdir=${layout_base_libdir}
+	export libc_cv_forced_unwind=yes
+	export libc_cv_c_cleanup=yes
+	export libc_cv_gnu99_inline=yes
+	base_do_compile
+	(
+		cd ${S}/sunrpc/rpcsvc
+		for r in ${rpcsvc}; do
+			h=`echo $r|sed -e's,\.x$,.h,'`
+			rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+		done
+	)
+}
+
+require glibc-stage.inc
+require glibc-package-multilib.bbclass
diff --git a/recipes/glibc/glibc-package-multilib.bbclass b/recipes/glibc/glibc-package-multilib.bbclass
new file mode 100644
index 0000000..bf25b92
--- /dev/null
+++ b/recipes/glibc/glibc-package-multilib.bbclass
@@ -0,0 +1,79 @@
+#
+# For now, we will skip building of a gcc package if it is a uclibc one
+# and our build is not a uclibc one, and we skip a glibc one if our build
+# is a uclibc build.
+#
+# See the note in gcc/gcc_3.4.0.oe
+#
+
+PACKAGES = " \
+	glibc-${ARCH_MULTILIB}-dbg glibc-${ARCH_MULTILIB} glibc-${ARCH_MULTILIB}-dev \
+	libsegfault-${ARCH_MULTILIB} \
+	glibc-${ARCH_MULTILIB}-extra-nss glibc-${ARCH_MULTILIB}-thread-db \
+	glibc-${ARCH_MULTILIB}-pcprofile \
+	"
+PACKAGES_DYNAMIC = "glibc-${ARCH_MULTILIB}-gconv-*"
+
+libc_baselibs = "${layout_base_libdir}/libc* ${layout_base_libdir}/libm* ${layout_base_libdir}/ld* ${layout_base_libdir}/libpthread* ${layout_base_libdir}/libresolv* ${layout_base_libdir}/librt* ${layout_base_libdir}/libutil* ${layout_base_libdir}/libnsl* ${layout_base_libdir}/libnss_files* ${layout_base_libdir}/libnss_compat* ${layout_base_libdir}/libnss_dns* ${layout_base_libdir}/libdl* ${layout_base_libdir}/libanl* ${layout_base_libdir}/libBrokenLocale*"
+
+FILES_glibc-${ARCH_MULTILIB} = "${libc_baselibs} ${libdir}/pt_chown ${libdir}/getconf/* ${datadir}/zoneinfo"
+FILES_libsegfault-${ARCH_MULTILIB} = "${layout_base_libdir}/libSegFault*"
+FILES_glibc-${ARCH_MULTILIB}-extra-nss = "${layout_base_libdir}/libnss*"
+FILES_glibc-${ARCH_MULTILIB}-dev_append = " ${libdir}/*.o ${includedir} ${libdir}/*.so ${libdir}/*.a"
+FILES_glibc-${ARCH_MULTILIB}-pcprofile = "${layout_base_libdir}/libpcprofile.so"
+FILES_glibc-${ARCH_MULTILIB}-thread-db = "${layout_base_libdir}/libthread_db*"
+RPROVIDES_glibc-${ARCH_MULTILIB}-dev += "libc-${ARCH_MULTILIB}-dev"
+FILES_glibc-${ARCH_MULTILIB}-gconv = "${libdir}/gconv/*"
+FILES_glibc-${ARCH_MULTILIB}-dbg += " ${libdir}/*/.debug ${layout_base_libdir}/.debug"
+
+DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
+
+do_install() {
+	oe_runmake install_root=${D} install
+	for r in ${rpcsvc}; do
+		h=`echo $r|sed -e's,\.x$,.h,'`
+		install -m 0644 ${S}/sunrpc/rpcsvc/$h ${D}/${includedir}/rpcsvc/
+	done
+	rm -f ${D}/etc/rpc
+}
+
+python package_do_split_gconvs () {
+	import os, re
+	if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'):
+		bb.note("package requested not splitting gconvs")
+		return
+
+	if not bb.data.getVar('PACKAGES', d, 1):
+		return
+
+	libdir = bb.data.getVar('layout_libdir', d, 1)
+	if not libdir:
+		bb.error("libdir not defined")
+		return
+	arch = bb.data.getVar('ARCH_MULTILIB', d, 1)
+	if not arch:
+		bb.error("Multilib packaging requested, but no ARCH_MULTILIB defined")
+		return
+
+	gconv_libdir = base_path_join(libdir, "gconv")
+
+	do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-'+arch+'-gconv-%s', description='gconv module for character set %s', extra_depends='glibc-gconv')
+}
+
+# We want to do this indirection so that we can safely 'return'
+# from the called function even though we're prepending
+python populate_packages_prepend () {
+	if bb.data.getVar('DEBIAN_NAMES', d, 1):
+		arch = bb.data.getVar('ARCH_MULTILIB', d, 1)
+		if not arch:
+			bb.error("Multilib packaging requested, but no ARCH_MULTILIB defined")
+			return
+		bb.data.setVar('PKG_glibc-'+arch, 'libc6-'+arch, d)
+		bb.data.setVar('PKG_glibc-'+arch+'-dev', 'libc6-'+arch+'-dev', d)
+	bb.build.exec_func('package_do_split_gconvs', d)
+	bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-${ARCH_MULTILIB}-gconv', d)
+}
diff --git a/recipes/glibc/glibc.inc b/recipes/glibc/glibc.inc
index 1bdd62b..ab19f0a 100644
--- a/recipes/glibc/glibc.inc
+++ b/recipes/glibc/glibc.inc
@@ -3,11 +3,12 @@ HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
 SECTION = "libs"
 PRIORITY = "required"
 LICENSE = "LGPL"
+GLIBC_PREFIX ?= "${TARGET_PREFIX}"
 # nptl needs unwind support in gcc, which can't be built without glibc.
-DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers"
+DEPENDS = "virtual/${GLIBC_PREFIX}gcc-intermediate linux-libc-headers"
 #this leads to circular deps, so lets not add it yet
 #RDEPENDS_ldd += " bash"
-PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/libc virtual/${GLIBC_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 
 inherit autotools
diff --git a/recipes/glibc/glibc_2.6.1.bb b/recipes/glibc/glibc_2.6.1.bb
index c1a9598..9a13e84 100644
--- a/recipes/glibc/glibc_2.6.1.bb
+++ b/recipes/glibc/glibc_2.6.1.bb
@@ -132,6 +132,7 @@ do_configure () {
 		exit 1
 	fi
 	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+	export libc_cv_slibdir=${layout_base_libdir}
 	CPPFLAGS="" oe_runconf
 }
 
@@ -142,6 +143,7 @@ rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
 do_compile () {
 	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
 	unset LDFLAGS
+	export libc_cv_slibdir=${layout_base_libdir}
 	base_do_compile
 	(
 		cd ${S}/sunrpc/rpcsvc
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* [PATCH 11/11] package.bbclass: add multilib libdir to search path
  2009-04-15 12:35                   ` [PATCH 10/11] glibc: add multilib glibc Roman I Khimov
@ 2009-04-15 12:36                     ` Roman I Khimov
  0 siblings, 0 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 12:36 UTC (permalink / raw)
  To: openembedded-devel

---
 classes/package.bbclass |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/classes/package.bbclass b/classes/package.bbclass
index 7a61c5a..e251e73 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -564,7 +564,11 @@ python package_do_shlibs() {
 		return
 		
 	lib_re = re.compile("^lib.*\.so")
-	libdir_re = re.compile(".*/lib$")
+	multilibdir = bb.data.getVar('LIB_MULTILIB', d, 1)
+	if not multilibdir:
+		libdir_re = re.compile(".*/lib$")
+	else:
+		libdir_re = re.compile(".*/(lib|%s)$" % (multilibdir))
 
 	packages = bb.data.getVar('PACKAGES', d, 1)
 
-- 
1.6.2.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 12:33 [RFC] AMD64 and multilib support Roman I Khimov
  2009-04-15 12:35 ` [PATCH 01/11] Add x86_64-generic machine Roman I Khimov
@ 2009-04-15 13:01 ` Stanislav Brabec
  2009-04-15 13:32   ` Stanislav Brabec
  2009-04-16 22:11 ` Tom Rini
  2 siblings, 1 reply; 42+ messages in thread
From: Stanislav Brabec @ 2009-04-15 13:01 UTC (permalink / raw)
  To: openembedded-devel

Roman I Khimov wrote:
> Hello all.
> 
> This patch series (will follow in replies) tries to bring in AMD64/x86_64 
> support into OE. This required some intrusive toolchain fixes that I want to 
> post here for review and feedback as I think (or rather know ;)) I might have 
> broken something along the way.

Maybe building multilib distro in two separate build trees would be much
easier. Only very few packages (e. g. nspluginwrapper) are much harder
to be built in such environment.

I already tried this:

I used this one in my distro.conf:
layout_libdir = "${layout_exec_prefix}/lib64"

It was surprisingly painless. I hade to fix only few errors in
particular packages (fixes are already in oe.dev).

>Next thing is 'libexec' dir. I propose to set it to point to libdir and be 
>done with that (again, Debian does exactly this). For now, I've done that 
>just for glibc-multilib.

It's not so easy. Some packages install to libexecdir directly (which
causes ugly pollution of libdir), others use subdirectory.

Something like RECOMMENDED_LIBEXEC_PREFIX in particular packages would
fix this situation. Distros than could choose to keep things as they are
(/usr/libexec), use strictly prefixed /usr/libexec
($prefix/libexec/+$RECOMMENDED_LIBEXEC_PREFIX) use strictly prefixed
libdir, or anything else they want.

I used this one in my distro.conf:
layout_libexecdir = "${layout_exec_prefix}/lib"

But I would really prefer:
layout_libexecdir = "${layout_exec_prefix}/lib/${RECOMMENDED_LIBEXEC_PREFIX}"

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@suse.cz
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 13:01 ` [RFC] AMD64 and multilib support Stanislav Brabec
@ 2009-04-15 13:32   ` Stanislav Brabec
  2009-04-15 13:52     ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Stanislav Brabec @ 2009-04-15 13:32 UTC (permalink / raw)
  To: openembedded-devel

Stanislav Brabec wrote:

> >Next thing is 'libexec' dir. I propose to set it to point to libdir and be 
> >done with that

This is bad, because it forces duplicating of all libexec binaries in
the system.

Imagine that you have a library libfoo for both archs:
/usr/lib/libfoo.so.0 (32 bit)
/usr/lib64/libfoo.so.0 (64 bit)

Now your library needs to call binary ${libexecdir}/libfoo-helper.

If you set libexec to libdir, then you are forced to package libfoo
helper twice. Both do _exactly_ the same:
/usr/lib/libfoo-helper (32 bit instance for 32 bit library)
/usr/lib64/libfoo-helper (64 bit instance for 64 bit library)

libexecdir pointing to prefix/lib is much better:
/usr/lib/libfoo-helper (64 bit instance for both libraries)

Both 32 bit and 64 bit libfoo will use this helper.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@suse.cz
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 13:32   ` Stanislav Brabec
@ 2009-04-15 13:52     ` Roman I Khimov
  2009-04-15 14:23       ` Stanislav Brabec
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 13:52 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 15 April 2009 17:32:56 Stanislav Brabec wrote:
> Stanislav Brabec wrote:
> > >Next thing is 'libexec' dir. I propose to set it to point to libdir and
> > > be done with that
>
> This is bad, because it forces duplicating of all libexec binaries in
> the system.
> .....
> libexecdir pointing to prefix/lib is much better:
> /usr/lib/libfoo-helper (64 bit instance for both libraries)
>
> Both 32 bit and 64 bit libfoo will use this helper.

Given the nature of libexec dir that might be nice to have, so we wouldn't 
override libexecdir but just not package it for 32-bit arch.

Just one thing - couldn't there be any situation where libexec program output 
would be different for primary and supplementary architectures? And, BTW, 
looking at glibc, it installs "getconf/POSIX_V6_LP64_OFF64" for 64-bit 
and "getconf/POSIX_V6_ILP32_OFF32" with "getconf/POSIX_V6_ILP32_OFFBIG" for 
32-bit.

Although looking at Debian it doesn't have any of this POSIX_* thing at all.



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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 13:52     ` Roman I Khimov
@ 2009-04-15 14:23       ` Stanislav Brabec
  2009-04-15 14:55         ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Stanislav Brabec @ 2009-04-15 14:23 UTC (permalink / raw)
  To: openembedded-devel

Roman I Khimov wrote:
> On Wednesday 15 April 2009 17:32:56 Stanislav Brabec wrote:

> > Both 32 bit and 64 bit libfoo will use this helper.
> 
> Given the nature of libexec dir that might be nice to have, so we wouldn't 
> override libexecdir but just not package it for 32-bit arch.

Exactly. Cross-arch exec() is possible.

Just for your info. openSUSE makes bi-arch in following way:

- Compile everything for i586 (in i586 build environment)

- Compile everything for x86_64 (in x86_64 build environment)

- Run baselibs utility, on i586 packages and extract libraries and
  possible extra stuff to -32bit packages. Baselibs utility can be
  configured per package.

- Make single repository from the stuff above.

The same works for ppc/ppc64 and s390/s390x.

> Just one thing - couldn't there be any situation where libexec program output 
> would be different for primary and supplementary architectures?

Yes, it can happen, but I am not aware of any real example.

But arch-dependent include files are not rare. Hopefully, most upstream
developers are aware of bi-arch problem and package platform specific
includes to libdir instead of includedir.

Example:
/usr/lib64/glib-2.0/include/glibconfig.h

You need extra rule for packaging of such stuff. Also glibc-dev would
need extra rules.

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@suse.cz
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 14:23       ` Stanislav Brabec
@ 2009-04-15 14:55         ` Roman I Khimov
  2009-04-15 16:03           ` Stanislav Brabec
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 14:55 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 15 April 2009 18:23:54 Stanislav Brabec wrote:
> Just for your info. openSUSE makes bi-arch in following way:
>
> - Compile everything for i586 (in i586 build environment)
>
> - Compile everything for x86_64 (in x86_64 build environment)

Well, that's nice when you have x86_64 and i586 environments. But here we're 
bootstraping toolchain from nothing, so it would involve

- compile everything for i586
- extract libraries from i586
- compile gcc-initial for x86_64
- throw in libs from i586
- proceed with bootstrapping the multilib toolchain

Which would require some management for multiple build trees and then some 
cross-build-trees dependency things. Certainly possible, but not sure any 
easier. Or am I missing something?



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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 14:55         ` Roman I Khimov
@ 2009-04-15 16:03           ` Stanislav Brabec
  0 siblings, 0 replies; 42+ messages in thread
From: Stanislav Brabec @ 2009-04-15 16:03 UTC (permalink / raw)
  To: openembedded-devel

Roman I Khimov wrote:

> Which would require some management for multiple build trees

It is not a problem, just build in another directory and your OE build
trees will be completely independent. You should be even share the same
tree environment with different config files. The only situation when OE
will fail would be (host_triplet == build_triplet), because staging and
build root will go into the same directory. It needs fix in OE.

> and then some 
> cross-build-trees dependency things.

Do you really need it? The whole openSUSE project is a bi-arch, but it
can live without cross-build trees. Baselibs utility operates on final
binary packages. Only compiler for build system compiler you may want to
provide 32-bit target support.

> Certainly possible, but not sure any 
> easier. Or am I missing something?

If you are trying to build x86_64 compiler for i586 target on an
arbitrary host, then you may recycle generic support for canadian
toolchain, that was added few months ago (well I did not tried it yet).

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                          e-mail: sbrabec@suse.cz
Lihovarská 1060/12           tel: +420 284 028 966, +49 911 740538747
190 00 Praha 9                                  fax: +420 284 028 951
Czech Republic                                    http://www.suse.cz/




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

* Re: [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers
  2009-04-15 12:35     ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Roman I Khimov
  2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
@ 2009-04-15 19:09       ` Khem Raj
  2009-04-15 19:25         ` Roman I Khimov
  1 sibling, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-15 19:09 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On (15/04/09 16:35), Roman I Khimov wrote:
> Taken from http://bugs.openembedded.net/show_bug.cgi?id=1728
> ---
>  .../linux-libc-headers_2.6.23.bb                   |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> index 13579f9..db13a45 100644
> --- a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> +++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> @@ -63,4 +63,16 @@ do_stage () {
>  	cp -pfLR ${STAGE_TEMP}${includedir}/linux ${STAGING_INCDIR}/
>  	cp -pfLR ${STAGE_TEMP}${includedir}/asm ${STAGING_INCDIR}/
>  	cp -pfLR ${STAGE_TEMP}${includedir}/asm-generic ${STAGING_INCDIR}/
> +        if [ "${ARCH}" == "x86_64" ]; then
> +		cp -pfLR ${STAGE_TEMP}${includedir}/asm-x86_64 ${STAGING_INCDIR}/
> +		cp -pfLR ${STAGE_TEMP}${includedir}/asm-i386 ${STAGING_INCDIR}/
> +	fi
> +}
> +
> +do_stage_append_multilib () {
> +	mkdir ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}
> +	ln -s ../linux ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/linux
> +	ln -s ../asm ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm
> +	ln -s ../asm-generic ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm-generic
> +	ln -s ../asm-i386 ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm-i386
>  }

is there any reason not to use sanitized header like we do in do_install
even for do_stage

> -- 
> 1.6.2.1
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
  2009-04-15 12:35         ` [PATCH 05/11] gcc-cross-initial: add multilib overrides Roman I Khimov
@ 2009-04-15 19:23         ` Khem Raj
  2009-04-15 19:31           ` Roman I Khimov
  2009-04-16 22:10         ` Tom Rini
  2 siblings, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-15 19:23 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On (15/04/09 16:35), Roman I Khimov wrote:
> ---
>  recipes/gcc/files/gcc-multilib64dir.patch |   43 +++++++++++++++++++++++++++++
>  recipes/gcc/gcc-4.2.4.inc                 |    1 +
>  2 files changed, 44 insertions(+), 0 deletions(-)
>  create mode 100644 recipes/gcc/files/gcc-multilib64dir.patch
> 
> diff --git a/recipes/gcc/files/gcc-multilib64dir.patch b/recipes/gcc/files/gcc-multilib64dir.patch
> new file mode 100644
> index 0000000..301e596
> --- /dev/null
> +++ b/recipes/gcc/files/gcc-multilib64dir.patch
> @@ -0,0 +1,43 @@
> +#! /bin/sh -e
> +
> +# DP: Use lib instead of lib64 as multilibdir on amd64 and ppc64.
> +#
> +# Taken from Debian, fixed to apply with quilt
> +
> +Index: gcc/config/i386/t-linux64
> +===================================================================
> +--- gcc/config/i386/t-linux64	(revision 130706)
> ++++ gcc/config/i386/t-linux64	(working copy)
> +@@ -13,7 +13,7 @@
> + 
> + MULTILIB_OPTIONS = m64/m32
> + MULTILIB_DIRNAMES = 64 32 
> +-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
> ++MULTILIB_OSDIRNAMES = ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
> + 
> + LIBGCC = stmp-multilib
> + INSTALL_LIBGCC = install-multilib
> +Index: gcc/config/rs6000/t-linux64
> +===================================================================
> +--- gcc/config/rs6000/t-linux64	(revision 130706)
> ++++ gcc/config/rs6000/t-linux64	(working copy)
> +@@ -14,13 +14,13 @@
> + # it doesn't tell anything about the 32bit libraries on those systems.  Set
> + # MULTILIB_OSDIRNAMES according to what is found on the target.
> + 
> +-MULTILIB_OPTIONS        = m64/m32 msoft-float
> +-MULTILIB_DIRNAMES       = 64 32 nof
> ++MULTILIB_OPTIONS        = m64/m32
> ++MULTILIB_DIRNAMES       = 64 32
> + MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
> +-MULTILIB_EXCEPTIONS     = m64/msoft-float
> +-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
> +-MULTILIB_OSDIRNAMES	= ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
> +-MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
> ++MULTILIB_EXCEPTIONS     =
> ++MULTILIB_EXCLUSIONS     =
> ++MULTILIB_OSDIRNAMES	= ../lib $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
> ++MULTILIB_MATCHES        =
> + 
> + softfp_wrap_start := '\#ifndef __powerpc64__'
> + softfp_wrap_end := '\#endif'
> diff --git a/recipes/gcc/gcc-4.2.4.inc b/recipes/gcc/gcc-4.2.4.inc
> index 085f241..20bdfef 100644
> --- a/recipes/gcc/gcc-4.2.4.inc
> +++ b/recipes/gcc/gcc-4.2.4.inc
> @@ -37,6 +37,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
>  	file://gcc-4.0.2-e300c2c3.patch;patch=1 \
>  	file://fortran-static-linking.patch;patch=1 \
>  	file://intermask-bigendian.patch;patch=1 \
> +	file://gcc-multilib64dir.patch;patch=1;pnum=0 \
>  "
>  
>  SRC_URI_append_ep93xx = " \


which multilib are you chosing as default? if it is 64 bit then the
patch is ok.

> -- 
> 1.6.2.1
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
  2009-04-15 12:35   ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Roman I Khimov
  2009-04-15 12:35     ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Roman I Khimov
@ 2009-04-15 19:25     ` Khem Raj
  2009-04-16  5:28       ` Roman I Khimov
  1 sibling, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-15 19:25 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On (15/04/09 16:35), Roman I Khimov wrote:
> ---
>  .../binutils-x86_64_i386_biarch.patch              |   25 ++++++++++++++++++++
>  recipes/binutils/binutils_2.18.bb                  |    2 +-
>  2 files changed, 26 insertions(+), 1 deletions(-)
>  create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> 
> diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> new file mode 100644
> index 0000000..b79a76a
> --- /dev/null
> +++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> @@ -0,0 +1,25 @@
> +#!/bin/sh -e
> +## 127_x86_64_i386_biarch.dpatch
> +##
> +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
> +## DP: Author: Aurelien Jarno <aurel32.debian.org>
> +## DP: Upstream status: Debian specific
> +#
> +# Hacked to apply with quilt
> +
> +--- binutils/ld/emulparams/elf_i386.sh
> ++++ binutils/ld/emulparams/elf_i386.sh
> +@@ -12,3 +12,13 @@
> + GENERATE_PIE_SCRIPT=yes
> + NO_SMALL_DATA=yes
> + SEPARATE_GOTPLT=12
> ++
> ++# Linux modify the default library search path to first include
> ++# a 32-bit specific directory.
> ++case "$target" in
> ++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
> ++    case "$EMULATION_NAME" in
> ++      *i386*) LIBPATH_SUFFIX=32 ;;
> ++    esac
> ++    ;;
> ++esac
> diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
> index 9367196..562c8ba 100644
> --- a/recipes/binutils/binutils_2.18.bb
> +++ b/recipes/binutils/binutils_2.18.bb
> @@ -12,8 +12,8 @@ SRC_URI = "\
>       file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
>       file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
> +     file://binutils-x86_64_i386_biarch.patch;patch=1 \
>       "
>  
>  # powerpc patches
>  SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
> -


Looks ok. Could you also make this on later versions of toolchains.
I am not worried about the older ones.

> -- 
> 1.6.2.1
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers
  2009-04-15 19:09       ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Khem Raj
@ 2009-04-15 19:25         ` Roman I Khimov
  2009-04-16  7:12           ` Khem Raj
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 19:25 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 15 April 2009 23:09:13 Khem Raj wrote:
> On (15/04/09 16:35), Roman I Khimov wrote:
> > --- a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > +++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > @@ -63,4 +63,16 @@ do_stage () {
>
> is there any reason not to use sanitized header like we do in do_install
> even for do_stage

I think this is the way to go for newer kernels and it can be generalized in 
some .inc for future. This approach is used now in 
linux-libc-headers_2.6.29.bb, but 2.6.23 historically uses this kind of 
do_stage and I don't think we should change that now.

BTW, we have locally a patch modifying kernel.bbclass to also use 
headers_install in kernel_do_stage for newer kernels. One of many things I 
still need to prepare and push.



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

* Re: [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc
  2009-04-15 12:35               ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Roman I Khimov
  2009-04-15 12:35                 ` [PATCH 09/11] glibc: add initial-multilib Roman I Khimov
@ 2009-04-15 19:28                 ` Khem Raj
  2009-04-15 19:37                   ` Roman I Khimov
  1 sibling, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-15 19:28 UTC (permalink / raw)
  To: openembedded-devel; +Cc: openembedded-devel

On (15/04/09 16:35), Roman I Khimov wrote:
> ---
>  recipes/glibc/glibc-package.bbclass |    5 -----
>  recipes/glibc/glibc.inc             |    5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/recipes/glibc/glibc-package.bbclass b/recipes/glibc/glibc-package.bbclass
> index 89fbd1c..1690a30 100644
> --- a/recipes/glibc/glibc-package.bbclass
> +++ b/recipes/glibc/glibc-package.bbclass
> @@ -58,11 +58,6 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies"
>  DESCRIPTION_localedef = "glibc: compile locale definition files"
>  DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
>  
> -def get_glibc_fpu_setting(bb, d):
> -    if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
> -        return "--without-fp"
> -    return ""
> -
>  EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
>  
>  OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
> diff --git a/recipes/glibc/glibc.inc b/recipes/glibc/glibc.inc
> index c2ee531..1bdd62b 100644
> --- a/recipes/glibc/glibc.inc
> +++ b/recipes/glibc/glibc.inc
> @@ -17,6 +17,11 @@ LEAD_SONAME = "libc.so"
>  GLIBC_EXTRA_OECONF ?= ""
>  INHIBIT_DEFAULT_DEPS = "1"
>  
> +def get_glibc_fpu_setting(bb, d):
> +	if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
> +		return "--without-fp"
> +	return ""
> +
>  ARM_INSTRUCTION_SET = "arm"
>  
>  PACKAGES = "glibc catchsegv sln nscd ldd localedef glibc-utils glibc-dev glibc-doc glibc-locale libsegfault glibc-extra-nss glibc-thread-db glibc-pcprofile"
> -- 

why is this patch required. Can you also do multilib stuff for eglibc
too
 

> 1.6.2.1
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-15 19:23         ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Khem Raj
@ 2009-04-15 19:31           ` Roman I Khimov
  0 siblings, 0 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 19:31 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 15 April 2009 23:23:10 Khem Raj wrote:
> which multilib are you chosing as default? if it is 64 bit then the
> patch is ok.

Default and 'primary' or 'native' is 64-bit, so it all goes into /lib 
and /usr/lib and 32-bit being 'supplementary' in /lib32 and /usr/lib32.



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

* Re: [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc
  2009-04-15 19:28                 ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Khem Raj
@ 2009-04-15 19:37                   ` Roman I Khimov
  0 siblings, 0 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-15 19:37 UTC (permalink / raw)
  To: openembedded-devel

On Wednesday 15 April 2009 23:28:45 Khem Raj wrote:
> On (15/04/09 16:35), Roman I Khimov wrote:
> > ---
> >  recipes/glibc/glibc-package.bbclass |    5 -----
> >  recipes/glibc/glibc.inc             |    5 +++++
> >  2 files changed, 5 insertions(+), 5 deletions(-)
>
> why is this patch required. 

It is required for glibc-multilib as glibc-multilib includes 
glibc-package-multilib and not glibc-package, it got a bit out of order, 
maybe need to squash it with glibc-multilib addition.

> Can you also do multilib stuff for eglibc too

Well, let's handle glibc first and settle on overall multilib approach. :) 
Then adding eglibc and uclibc will be routine.



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

* Re: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
  2009-04-15 19:25     ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Khem Raj
@ 2009-04-16  5:28       ` Roman I Khimov
  2009-04-16  7:14         ` Khem Raj
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-16  5:28 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Wednesday 15 April 2009 23:25:12 Khem Raj wrote:
> On (15/04/09 16:35), Roman I Khimov wrote:
> > ---
> >  .../binutils-x86_64_i386_biarch.patch              |   25
> > ++++++++++++++++++++ recipes/binutils/binutils_2.18.bb                  |
> >    2 +-
> >  2 files changed, 26 insertions(+), 1 deletions(-)
> >  create mode 100644
> > recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
>
> Looks ok. Could you also make this on later versions of toolchains.
> I am not worried about the older ones.

Works good with 2.19 and 2.19.1, but not 2.18.50.0.7. Not sure it makes sense 
to adapt it there and add more patch versions to tree. See attached.

[-- Attachment #2: 0002-binutils-add-binutils-x86_64_i386_biarch.patch.patch --]
[-- Type: text/x-diff, Size: 3345 bytes --]

From 9aec05acf54fede5890297665bf98995f04eba2d Mon Sep 17 00:00:00 2001
From: Roman I Khimov <khimov@altell.ru>
Date: Wed, 15 Apr 2009 15:48:22 +0400
Subject: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch

Adds 'lib32' directories to binutils search paths on x86_64.
---
 recipes/binutils/binutils_2.18.bb                  |    2 +-
 recipes/binutils/binutils_2.19.1.bb                |    1 +
 recipes/binutils/binutils_2.19.bb                  |    1 +
 .../files/binutils-x86_64_i386_biarch.patch        |   25 ++++++++++++++++++++
 4 files changed, 28 insertions(+), 1 deletions(-)
 create mode 100644 recipes/binutils/files/binutils-x86_64_i386_biarch.patch

diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 9367196..562c8ba 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -12,8 +12,8 @@ SRC_URI = "\
      file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
-
diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
index c399ab8..1802dfb 100644
--- a/recipes/binutils/binutils_2.19.1.bb
+++ b/recipes/binutils/binutils_2.19.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
index aee5840..782d5c7 100644
--- a/recipes/binutils/binutils_2.19.bb
+++ b/recipes/binutils/binutils_2.19.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/files/binutils-x86_64_i386_biarch.patch b/recipes/binutils/files/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/files/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
-- 
1.6.2.1


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

* Re: [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers
  2009-04-15 19:25         ` Roman I Khimov
@ 2009-04-16  7:12           ` Khem Raj
  2009-04-18 19:54             ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-16  7:12 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]

On Wednesday 15 April 2009 12:25:46 pm Roman I Khimov wrote:
> On Wednesday 15 April 2009 23:09:13 Khem Raj wrote:
> > On (15/04/09 16:35), Roman I Khimov wrote:
> > > --- a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > > +++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > > @@ -63,4 +63,16 @@ do_stage () {
> >
> > is there any reason not to use sanitized header like we do in do_install
> > even for do_stage
> 
> I think this is the way to go for newer kernels and it can be generalized in 
> some .inc for future. This approach is used now in 
> linux-libc-headers_2.6.29.bb, but 2.6.23 historically uses this kind of 
> do_stage and I don't think we should change that now.

OK. On that note can you test if your stuff works with 2.6.29 kernel headers ?
> 
> BTW, we have locally a patch modifying kernel.bbclass to also use 
> headers_install in kernel_do_stage for newer kernels. One of many things I 
> still need to prepare and push.

yeah I have always wanted something like that. However its required pretty early 
in the build phase thats why we have linux-libc-headers

> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
> 

-- 
Khem Raj

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 204 bytes --]

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

* Re: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
  2009-04-16  5:28       ` Roman I Khimov
@ 2009-04-16  7:14         ` Khem Raj
  2009-04-16  8:47           ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-16  7:14 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

On Wednesday 15 April 2009 10:28:57 pm Roman I Khimov wrote:
> On Wednesday 15 April 2009 23:25:12 Khem Raj wrote:
> > On (15/04/09 16:35), Roman I Khimov wrote:
> > > ---
> > >  .../binutils-x86_64_i386_biarch.patch              |   25
> > > ++++++++++++++++++++ recipes/binutils/binutils_2.18.bb                  |
> > >    2 +-
> > >  2 files changed, 26 insertions(+), 1 deletions(-)
> > >  create mode 100644
> > > recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> >
> > Looks ok. Could you also make this on later versions of toolchains.
> > I am not worried about the older ones.
> 
> Works good with 2.19 and 2.19.1, but not 2.18.50.0.7.

FWIW 2.18.50.0.7 is default binutils for some distros (angstrom)

> Not sure it makes sense 
> to adapt it there and add more patch versions to tree. See attached.
> 

-- 
Khem Raj

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 204 bytes --]

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

* Re: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
  2009-04-16  7:14         ` Khem Raj
@ 2009-04-16  8:47           ` Roman I Khimov
  2009-04-17 22:37             ` [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch Khem Raj
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-16  8:47 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

On Thursday 16 April 2009 11:14:29 Khem Raj wrote:
> On Wednesday 15 April 2009 10:28:57 pm Roman I Khimov wrote:
> > On Wednesday 15 April 2009 23:25:12 Khem Raj wrote:
> > > On (15/04/09 16:35), Roman I Khimov wrote:
> > > > ---
> > > >  .../binutils-x86_64_i386_biarch.patch              |   25
> > > > ++++++++++++++++++++ recipes/binutils/binutils_2.18.bb               
> > > >   | 2 +-
> > > >  2 files changed, 26 insertions(+), 1 deletions(-)
> > > >  create mode 100644
> > > > recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> > >
> > > Looks ok. Could you also make this on later versions of toolchains.
> > > I am not worried about the older ones.
> >
> > Works good with 2.19 and 2.19.1, but not 2.18.50.0.7.
>
> FWIW 2.18.50.0.7 is default binutils for some distros (angstrom)

True, didn't check initially its usage, so it's going to be something like 
attached.

Do I need to bump PR's for all binutils touched?

[-- Attachment #2: 0002-binutils-add-binutils-x86_64_i386_biarch.patch.patch --]
[-- Type: text/x-diff, Size: 7678 bytes --]

From 39ead7fd8b9d8b3687b8564828fad4e9d52b128a Mon Sep 17 00:00:00 2001
From: Roman I Khimov <khimov@altell.ru>
Date: Wed, 15 Apr 2009 15:48:22 +0400
Subject: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch

Adds 'lib32' directories to binutils search paths on x86_64.
---
 .../binutils-x86_64_i386_biarch.patch              |   26 ++++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 recipes/binutils/binutils_2.18.50.0.7.bb           |    1 +
 recipes/binutils/binutils_2.18.bb                  |    2 +-
 recipes/binutils/binutils_2.19.1.bb                |    1 +
 recipes/binutils/binutils_2.19.bb                  |    1 +
 8 files changed, 105 insertions(+), 1 deletions(-)
 create mode 100644 recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch

diff --git a/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..6054434
--- /dev/null
+++ b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils_2.18.50.0.7.bb b/recipes/binutils/binutils_2.18.50.0.7.bb
index a89431e..fbd9189 100644
--- a/recipes/binutils/binutils_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils_2.18.50.0.7.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 9367196..562c8ba 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -12,8 +12,8 @@ SRC_URI = "\
      file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
-
diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
index c399ab8..1802dfb 100644
--- a/recipes/binutils/binutils_2.19.1.bb
+++ b/recipes/binutils/binutils_2.19.1.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
index aee5840..782d5c7 100644
--- a/recipes/binutils/binutils_2.19.bb
+++ b/recipes/binutils/binutils_2.19.bb
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
-- 
1.6.2.1


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

* Re: [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
  2009-04-15 12:35         ` [PATCH 05/11] gcc-cross-initial: add multilib overrides Roman I Khimov
  2009-04-15 19:23         ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Khem Raj
@ 2009-04-16 22:10         ` Tom Rini
  2009-04-17  4:35           ` Roman I Khimov
  2 siblings, 1 reply; 42+ messages in thread
From: Tom Rini @ 2009-04-16 22:10 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Apr 15, 2009 at 04:35:53PM +0400, Roman I Khimov wrote:

> ---
>  recipes/gcc/files/gcc-multilib64dir.patch |   43 +++++++++++++++++++++++++++++
>  recipes/gcc/gcc-4.2.4.inc                 |    1 +
>  2 files changed, 44 insertions(+), 0 deletions(-)
>  create mode 100644 recipes/gcc/files/gcc-multilib64dir.patch

Does this apply as-is to 4.1 and 4.3 too?  If not, lets name it
gcc-4.2.x-multilib64dir.patch.

-- 
Tom Rini



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

* Re: [RFC] AMD64 and multilib support
  2009-04-15 12:33 [RFC] AMD64 and multilib support Roman I Khimov
  2009-04-15 12:35 ` [PATCH 01/11] Add x86_64-generic machine Roman I Khimov
  2009-04-15 13:01 ` [RFC] AMD64 and multilib support Stanislav Brabec
@ 2009-04-16 22:11 ` Tom Rini
  2009-04-17  5:05   ` Roman I Khimov
  2 siblings, 1 reply; 42+ messages in thread
From: Tom Rini @ 2009-04-16 22:11 UTC (permalink / raw)
  To: openembedded-devel

On Wed, Apr 15, 2009 at 04:33:48PM +0400, Roman I Khimov wrote:

> Hello all.
> 
> This patch series (will follow in replies) tries to bring in AMD64/x86_64 
> support into OE. This required some intrusive toolchain fixes that I want to 
> post here for review and feedback as I think (or rather know ;)) I might have 
> broken something along the way.

Have you done a build of meta-toolchain as well?

-- 
Tom Rini



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

* Re: [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-16 22:10         ` Tom Rini
@ 2009-04-17  4:35           ` Roman I Khimov
  2009-04-17 17:59             ` Tom Rini
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-17  4:35 UTC (permalink / raw)
  To: openembedded-devel

On Friday 17 April 2009 02:10:15 Tom Rini wrote:
> On Wed, Apr 15, 2009 at 04:35:53PM +0400, Roman I Khimov wrote:
> > ---
> >  recipes/gcc/files/gcc-multilib64dir.patch |   43
> > +++++++++++++++++++++++++++++ recipes/gcc/gcc-4.2.4.inc                 |
> >    1 +
> >  2 files changed, 44 insertions(+), 0 deletions(-)
> >  create mode 100644 recipes/gcc/files/gcc-multilib64dir.patch
>
> Does this apply as-is to 4.1 and 4.3 too?  If not, lets name it
> gcc-4.2.x-multilib64dir.patch.

Not tried yet. Again, this is primarily for review/feedback on overall 
approach. If everything is OK, then I can try add more gcc/glibc versions as 
already done with binutils.



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

* Re: [RFC] AMD64 and multilib support
  2009-04-16 22:11 ` Tom Rini
@ 2009-04-17  5:05   ` Roman I Khimov
  0 siblings, 0 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-17  5:05 UTC (permalink / raw)
  To: openembedded-devel

On Friday 17 April 2009 02:11:40 Tom Rini wrote:
> On Wed, Apr 15, 2009 at 04:33:48PM +0400, Roman I Khimov wrote:
> > Hello all.
> >
> > This patch series (will follow in replies) tries to bring in AMD64/x86_64
> > support into OE. This required some intrusive toolchain fixes that I want
> > to post here for review and feedback as I think (or rather know ;)) I
> > might have broken something along the way.
>
> Have you done a build of meta-toolchain as well?

Not yet. gcc-cross was the main target.

[adding to TODO]



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

* Re: [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch
  2009-04-17  4:35           ` Roman I Khimov
@ 2009-04-17 17:59             ` Tom Rini
  0 siblings, 0 replies; 42+ messages in thread
From: Tom Rini @ 2009-04-17 17:59 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Apr 17, 2009 at 08:35:01AM +0400, Roman I Khimov wrote:
> On Friday 17 April 2009 02:10:15 Tom Rini wrote:
> > On Wed, Apr 15, 2009 at 04:35:53PM +0400, Roman I Khimov wrote:
> > > ---
> > >  recipes/gcc/files/gcc-multilib64dir.patch |   43
> > > +++++++++++++++++++++++++++++ recipes/gcc/gcc-4.2.4.inc                 |
> > >    1 +
> > >  2 files changed, 44 insertions(+), 0 deletions(-)
> > >  create mode 100644 recipes/gcc/files/gcc-multilib64dir.patch
> >
> > Does this apply as-is to 4.1 and 4.3 too?  If not, lets name it
> > gcc-4.2.x-multilib64dir.patch.
> 
> Not tried yet. Again, this is primarily for review/feedback on overall 
> approach. If everything is OK, then I can try add more gcc/glibc versions as 
> already done with binutils.

I think we're all in agreement that the approach (do what Debian does)
is fine.  So lets move on to making sure most distro's can easily take
this in :)

-- 
Tom Rini



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

* Re: [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch
  2009-04-16  8:47           ` Roman I Khimov
@ 2009-04-17 22:37             ` Khem Raj
  2009-04-18 15:44               ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-17 22:37 UTC (permalink / raw)
  To: openembedded-devel

On (16/04/09 12:47), Roman I Khimov wrote:
> On Thursday 16 April 2009 11:14:29 Khem Raj wrote:
> > On Wednesday 15 April 2009 10:28:57 pm Roman I Khimov wrote:
> > > On Wednesday 15 April 2009 23:25:12 Khem Raj wrote:
> > > > On (15/04/09 16:35), Roman I Khimov wrote:
> > > > > ---
> > > > >  .../binutils-x86_64_i386_biarch.patch              |   25
> > > > > ++++++++++++++++++++ recipes/binutils/binutils_2.18.bb               
> > > > >   | 2 +-
> > > > >  2 files changed, 26 insertions(+), 1 deletions(-)
> > > > >  create mode 100644
> > > > > recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> > > >
> > > > Looks ok. Could you also make this on later versions of toolchains.
> > > > I am not worried about the older ones.
> > >
> > > Works good with 2.19 and 2.19.1, but not 2.18.50.0.7.
> >
> > FWIW 2.18.50.0.7 is default binutils for some distros (angstrom)
> 
> True, didn't check initially its usage, so it's going to be something like 
> attached.
> 
> Do I need to bump PR's for all binutils touched?

yes.


> From 39ead7fd8b9d8b3687b8564828fad4e9d52b128a Mon Sep 17 00:00:00 2001
> From: Roman I Khimov <khimov@altell.ru>
> Date: Wed, 15 Apr 2009 15:48:22 +0400
> Subject: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch
> 
> Adds 'lib32' directories to binutils search paths on x86_64.
> ---
>  .../binutils-x86_64_i386_biarch.patch              |   26 ++++++++++++++++++++
>  .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
>  .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
>  .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
>  recipes/binutils/binutils_2.18.50.0.7.bb           |    1 +
>  recipes/binutils/binutils_2.18.bb                  |    2 +-
>  recipes/binutils/binutils_2.19.1.bb                |    1 +
>  recipes/binutils/binutils_2.19.bb                  |    1 +
>  8 files changed, 105 insertions(+), 1 deletions(-)
>  create mode 100644 recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
>  create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
>  create mode 100644 recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
>  create mode 100644 recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
> 
> diff --git a/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
> new file mode 100644
> index 0000000..6054434
> --- /dev/null
> +++ b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
> @@ -0,0 +1,26 @@
> +#!/bin/sh -e
> +## 127_x86_64_i386_biarch.dpatch
> +##
> +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
> +## DP: Author: Aurelien Jarno <aurel32.debian.org>
> +## DP: Upstream status: Debian specific
> +#
> +# Hacked to apply with quilt
> +# Adapted to binutils 2.18.50.0.7
> +
> +--- binutils/ld/emulparams/elf_i386.sh
> ++++ binutils/ld/emulparams/elf_i386.sh
> +@@ -12,3 +12,13 @@
> + NO_SMALL_DATA=yes
> + SEPARATE_GOTPLT=12
> + SHARABLE_SECTIONS=yes
> ++
> ++# Linux modify the default library search path to first include
> ++# a 32-bit specific directory.
> ++case "$target" in
> ++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
> ++    case "$EMULATION_NAME" in
> ++      *i386*) LIBPATH_SUFFIX=32 ;;
> ++    esac
> ++    ;;
> ++esac
> diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> new file mode 100644
> index 0000000..b79a76a
> --- /dev/null
> +++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> @@ -0,0 +1,25 @@
> +#!/bin/sh -e
> +## 127_x86_64_i386_biarch.dpatch
> +##
> +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
> +## DP: Author: Aurelien Jarno <aurel32.debian.org>
> +## DP: Upstream status: Debian specific
> +#
> +# Hacked to apply with quilt
> +
> +--- binutils/ld/emulparams/elf_i386.sh
> ++++ binutils/ld/emulparams/elf_i386.sh
> +@@ -12,3 +12,13 @@
> + GENERATE_PIE_SCRIPT=yes
> + NO_SMALL_DATA=yes
> + SEPARATE_GOTPLT=12
> ++
> ++# Linux modify the default library search path to first include
> ++# a 32-bit specific directory.
> ++case "$target" in
> ++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
> ++    case "$EMULATION_NAME" in
> ++      *i386*) LIBPATH_SUFFIX=32 ;;
> ++    esac
> ++    ;;
> ++esac
> diff --git a/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
> new file mode 100644
> index 0000000..b79a76a
> --- /dev/null
> +++ b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
> @@ -0,0 +1,25 @@
> +#!/bin/sh -e
> +## 127_x86_64_i386_biarch.dpatch
> +##
> +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
> +## DP: Author: Aurelien Jarno <aurel32.debian.org>
> +## DP: Upstream status: Debian specific
> +#
> +# Hacked to apply with quilt
> +
> +--- binutils/ld/emulparams/elf_i386.sh
> ++++ binutils/ld/emulparams/elf_i386.sh
> +@@ -12,3 +12,13 @@
> + GENERATE_PIE_SCRIPT=yes
> + NO_SMALL_DATA=yes
> + SEPARATE_GOTPLT=12
> ++
> ++# Linux modify the default library search path to first include
> ++# a 32-bit specific directory.
> ++case "$target" in
> ++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
> ++    case "$EMULATION_NAME" in
> ++      *i386*) LIBPATH_SUFFIX=32 ;;
> ++    esac
> ++    ;;
> ++esac
> diff --git a/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
> new file mode 100644
> index 0000000..b79a76a
> --- /dev/null
> +++ b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
> @@ -0,0 +1,25 @@
> +#!/bin/sh -e
> +## 127_x86_64_i386_biarch.dpatch
> +##
> +## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
> +## DP: Author: Aurelien Jarno <aurel32.debian.org>
> +## DP: Upstream status: Debian specific
> +#
> +# Hacked to apply with quilt
> +
> +--- binutils/ld/emulparams/elf_i386.sh
> ++++ binutils/ld/emulparams/elf_i386.sh
> +@@ -12,3 +12,13 @@
> + GENERATE_PIE_SCRIPT=yes
> + NO_SMALL_DATA=yes
> + SEPARATE_GOTPLT=12
> ++
> ++# Linux modify the default library search path to first include
> ++# a 32-bit specific directory.
> ++case "$target" in
> ++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
> ++    case "$EMULATION_NAME" in
> ++      *i386*) LIBPATH_SUFFIX=32 ;;
> ++    esac
> ++    ;;
> ++esac
> diff --git a/recipes/binutils/binutils_2.18.50.0.7.bb b/recipes/binutils/binutils_2.18.50.0.7.bb
> index a89431e..fbd9189 100644
> --- a/recipes/binutils/binutils_2.18.50.0.7.bb
> +++ b/recipes/binutils/binutils_2.18.50.0.7.bb
> @@ -12,6 +12,7 @@ SRC_URI = "\
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
>       file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
>       file://binutils-arm-pr7093.patch;patch=1 \
> +     file://binutils-x86_64_i386_biarch.patch;patch=1 \
>       "
>  
>  # powerpc patches
> diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
> index 9367196..562c8ba 100644
> --- a/recipes/binutils/binutils_2.18.bb
> +++ b/recipes/binutils/binutils_2.18.bb
> @@ -12,8 +12,8 @@ SRC_URI = "\
>       file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
>       file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
> +     file://binutils-x86_64_i386_biarch.patch;patch=1 \
>       "
>  
>  # powerpc patches
>  SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
> -
> diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
> index c399ab8..1802dfb 100644
> --- a/recipes/binutils/binutils_2.19.1.bb
> +++ b/recipes/binutils/binutils_2.19.1.bb
> @@ -12,6 +12,7 @@ SRC_URI = "\
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
>       file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
>       file://binutils-arm-pr7093.patch;patch=1 \
> +     file://binutils-x86_64_i386_biarch.patch;patch=1 \
>       "
>  
>  # powerpc patches
> diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
> index aee5840..782d5c7 100644
> --- a/recipes/binutils/binutils_2.19.bb
> +++ b/recipes/binutils/binutils_2.19.bb
> @@ -12,6 +12,7 @@ SRC_URI = "\
>       file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
>       file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
>       file://binutils-arm-pr7093.patch;patch=1 \
> +     file://binutils-x86_64_i386_biarch.patch;patch=1 \
>       "
>  
>  # powerpc patches
> -- 
> 1.6.2.1
> 

> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel




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

* Re: [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch
  2009-04-17 22:37             ` [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch Khem Raj
@ 2009-04-18 15:44               ` Roman I Khimov
  2009-04-21 20:22                 ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-18 15:44 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

On Saturday 18 April 2009 02:37:35 Khem Raj wrote:
> On (16/04/09 12:47), Roman I Khimov wrote:
> > On Thursday 16 April 2009 11:14:29 Khem Raj wrote:
> > > On Wednesday 15 April 2009 10:28:57 pm Roman I Khimov wrote:
> > > > On Wednesday 15 April 2009 23:25:12 Khem Raj wrote:
> > > > > On (15/04/09 16:35), Roman I Khimov wrote:
> > > > > > ---
> > > > > >  .../binutils-x86_64_i386_biarch.patch              |   25
> > > > > > ++++++++++++++++++++ recipes/binutils/binutils_2.18.bb
> > > > > >
> > > > > >   | 2 +-
> > > > > >
> > > > > >  2 files changed, 26 insertions(+), 1 deletions(-)
> > > > > >  create mode 100644
> > > > > > recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
> > > > >
> > > > > Looks ok. Could you also make this on later versions of toolchains.
> > > > > I am not worried about the older ones.
> > > >
> > > > Works good with 2.19 and 2.19.1, but not 2.18.50.0.7.
> > >
> > > FWIW 2.18.50.0.7 is default binutils for some distros (angstrom)
> >
> > True, didn't check initially its usage, so it's going to be something
> > like attached.
> >
> > Do I need to bump PR's for all binutils touched?
>
> yes.

OK, attached.

[-- Attachment #2: 0002-binutils-add-binutils-x86_64_i386_biarch.patch.patch --]
[-- Type: text/x-diff, Size: 7961 bytes --]

From 660fc9691349ec5cbae42e06b6f9cc9d7b3c947a Mon Sep 17 00:00:00 2001
From: Roman I Khimov <khimov@altell.ru>
Date: Wed, 15 Apr 2009 15:48:22 +0400
Subject: [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch

Adds 'lib32' directories to binutils search paths on x86_64.
---
 .../binutils-x86_64_i386_biarch.patch              |   26 ++++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 recipes/binutils/binutils_2.18.50.0.7.bb           |    3 +-
 recipes/binutils/binutils_2.18.bb                  |    4 +-
 recipes/binutils/binutils_2.19.1.bb                |    3 +-
 recipes/binutils/binutils_2.19.bb                  |    3 +-
 8 files changed, 109 insertions(+), 5 deletions(-)
 create mode 100644 recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch

diff --git a/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..6054434
--- /dev/null
+++ b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils_2.18.50.0.7.bb b/recipes/binutils/binutils_2.18.50.0.7.bb
index a89431e..eb00a2d 100644
--- a/recipes/binutils/binutils_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils_2.18.50.0.7.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 9367196..8370538 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
 
 require binutils.inc
 
@@ -12,8 +12,8 @@ SRC_URI = "\
      file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
-
diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
index c399ab8..782d5c7 100644
--- a/recipes/binutils/binutils_2.19.1.bb
+++ b/recipes/binutils/binutils_2.19.1.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
index aee5840..072ac56 100644
--- a/recipes/binutils/binutils_2.19.bb
+++ b/recipes/binutils/binutils_2.19.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
-- 
1.6.2.1


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

* Re: [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers
  2009-04-16  7:12           ` Khem Raj
@ 2009-04-18 19:54             ` Roman I Khimov
  0 siblings, 0 replies; 42+ messages in thread
From: Roman I Khimov @ 2009-04-18 19:54 UTC (permalink / raw)
  To: openembedded-devel

On Thursday 16 April 2009 11:12:41 Khem Raj wrote:
> On Wednesday 15 April 2009 12:25:46 pm Roman I Khimov wrote:
> > On Wednesday 15 April 2009 23:09:13 Khem Raj wrote:
> > > On (15/04/09 16:35), Roman I Khimov wrote:
> > > > --- a/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > > > +++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.23.bb
> > > > @@ -63,4 +63,16 @@ do_stage () {
> > >
> > > is there any reason not to use sanitized header like we do in
> > > do_install even for do_stage
> >
> > I think this is the way to go for newer kernels and it can be generalized
> > in some .inc for future. This approach is used now in
> > linux-libc-headers_2.6.29.bb, but 2.6.23 historically uses this kind of
> > do_stage and I don't think we should change that now.
>
> OK. On that note can you test if your stuff works with 2.6.29 kernel
> headers ?

With minor correction of

--- a/recipes/linux-libc-headers/linux-libc-headers_2.6.29.bb
+++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.29.bb
@@ -47,3 +47,10 @@ do_stage () {
 	set_arch
 	oe_runmake headers_install INSTALL_HDR_PATH=${STAGING_DIR_HOST}${layout_prefix} ARCH=$ARCH
 }
+
+do_stage_append_multilib () {
+	install -d ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}
+	ln -s ../linux ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/linux
+	ln -s ../asm ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm
+	ln -s ../asm-generic ${STAGING_INCDIR}/${TARGET_SYS_MULTILIB}/asm-generic
+}

it works nice. As you can see, I'm using
${STAGING_INCDIR}/${TARGET_SYS_MULTILIB} for supplementary system headers.



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

* Re: [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch
  2009-04-18 15:44               ` Roman I Khimov
@ 2009-04-21 20:22                 ` Roman I Khimov
  2009-04-23  4:42                   ` [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch Khem Raj
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-21 20:22 UTC (permalink / raw)
  To: openembedded-devel

On Saturday 18 April 2009 19:44:13 Roman I Khimov wrote:
> OK, attached.

And, BTW, I think this one is ready to go too.



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

* Re: [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch
  2009-04-21 20:22                 ` Roman I Khimov
@ 2009-04-23  4:42                   ` Khem Raj
  2009-04-23  9:37                     ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Khem Raj @ 2009-04-23  4:42 UTC (permalink / raw)
  To: openembedded-devel

On (22/04/09 00:22), Roman I Khimov wrote:
> On Saturday 18 April 2009 19:44:13 Roman I Khimov wrote:
> > OK, attached.

ok

Acked-by: Khem Raj <raj.khem@gmail.com>
> 
> And, BTW, I think this one is ready to go too.
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

* Re: [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch
  2009-04-23  4:42                   ` [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch Khem Raj
@ 2009-04-23  9:37                     ` Roman I Khimov
  2009-04-27 10:28                       ` Roman I Khimov
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-23  9:37 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

On Thursday 23 April 2009 08:42:01 Khem Raj wrote:
> On (22/04/09 00:22), Roman I Khimov wrote:
> > On Saturday 18 April 2009 19:44:13 Roman I Khimov wrote:
> > > OK, attached.
>
> ok
>
> Acked-by: Khem Raj <raj.khem@gmail.com>

New binutils were introduced recently, so I've upgraded patch to handle those 
as well, please ACK new version and I'll commit it then.

[-- Attachment #2: 0002-binutils-add-binutils-x86_64_i386_biarch.patch.patch --]
[-- Type: text/x-patch, Size: 9904 bytes --]

From 97b047e692baba9896bd555a72654bd3e9ca6289 Mon Sep 17 00:00:00 2001
From: Roman I Khimov <khimov@altell.ru>
Date: Wed, 15 Apr 2009 15:48:22 +0400
Subject: [PATCH 02/13] binutils: add binutils-x86_64_i386_biarch.patch

Adds 'lib32' directories to binutils search paths on x86_64.
---
 .../binutils-x86_64_i386_biarch.patch              |   26 ++++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   26 ++++++++++++++++++++
 .../binutils-x86_64_i386_biarch.patch              |   25 +++++++++++++++++++
 recipes/binutils/binutils_2.18.50.0.7.bb           |    3 +-
 recipes/binutils/binutils_2.18.bb                  |    4 +-
 recipes/binutils/binutils_2.19.1.bb                |    3 +-
 recipes/binutils/binutils_2.19.51.0.3.bb           |    3 +-
 recipes/binutils/binutils_2.19.bb                  |    3 +-
 10 files changed, 137 insertions(+), 6 deletions(-)
 create mode 100644 recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19.51.0.3/binutils-x86_64_i386_biarch.patch
 create mode 100644 recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch

diff --git a/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..6054434
--- /dev/null
+++ b/recipes/binutils/binutils-2.18.50.0.7/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.1/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19.51.0.3/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19.51.0.3/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..6054434
--- /dev/null
+++ b/recipes/binutils/binutils-2.19.51.0.3/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+# Adapted to binutils 2.18.50.0.7
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
+ SHARABLE_SECTIONS=yes
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
new file mode 100644
index 0000000..b79a76a
--- /dev/null
+++ b/recipes/binutils/binutils-2.19/binutils-x86_64_i386_biarch.patch
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+## 127_x86_64_i386_biarch.dpatch
+##
+## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
+## DP: Author: Aurelien Jarno <aurel32.debian.org>
+## DP: Upstream status: Debian specific
+#
+# Hacked to apply with quilt
+
+--- binutils/ld/emulparams/elf_i386.sh
++++ binutils/ld/emulparams/elf_i386.sh
+@@ -12,3 +12,13 @@
+ GENERATE_PIE_SCRIPT=yes
+ NO_SMALL_DATA=yes
+ SEPARATE_GOTPLT=12
++
++# Linux modify the default library search path to first include
++# a 32-bit specific directory.
++case "$target" in
++  x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
++    case "$EMULATION_NAME" in
++      *i386*) LIBPATH_SUFFIX=32 ;;
++    esac
++    ;;
++esac
diff --git a/recipes/binutils/binutils_2.18.50.0.7.bb b/recipes/binutils/binutils_2.18.50.0.7.bb
index a89431e..eb00a2d 100644
--- a/recipes/binutils/binutils_2.18.50.0.7.bb
+++ b/recipes/binutils/binutils_2.18.50.0.7.bb
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index 9367196..8370538 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
 
 require binutils.inc
 
@@ -12,8 +12,8 @@ SRC_URI = "\
      file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
 SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
-
diff --git a/recipes/binutils/binutils_2.19.1.bb b/recipes/binutils/binutils_2.19.1.bb
index c399ab8..782d5c7 100644
--- a/recipes/binutils/binutils_2.19.1.bb
+++ b/recipes/binutils/binutils_2.19.1.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.19.51.0.3.bb b/recipes/binutils/binutils_2.19.51.0.3.bb
index 7808d3b..a4ed077 100644
--- a/recipes/binutils/binutils_2.19.51.0.3.bb
+++ b/recipes/binutils/binutils_2.19.51.0.3.bb
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
diff --git a/recipes/binutils/binutils_2.19.bb b/recipes/binutils/binutils_2.19.bb
index aee5840..072ac56 100644
--- a/recipes/binutils/binutils_2.19.bb
+++ b/recipes/binutils/binutils_2.19.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 require binutils.inc
 
@@ -12,6 +12,7 @@ SRC_URI = "\
      file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
      file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
      file://binutils-arm-pr7093.patch;patch=1 \
+     file://binutils-x86_64_i386_biarch.patch;patch=1 \
      "
 
 # powerpc patches
-- 
1.6.2.3


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

* Re: [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch
  2009-04-23  9:37                     ` Roman I Khimov
@ 2009-04-27 10:28                       ` Roman I Khimov
  2009-04-28 20:02                         ` [PATCH 02/11]?binutils:?add?binutils-x86_64_i386_biarch.patch Khem Raj
  0 siblings, 1 reply; 42+ messages in thread
From: Roman I Khimov @ 2009-04-27 10:28 UTC (permalink / raw)
  To: openembedded-devel

On Thursday 23 April 2009 13:37:06 Roman I Khimov wrote:
> New binutils were introduced recently, so I've upgraded patch to handle
> those as well, please ACK new version and I'll commit it then.

ping



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

* Re: [PATCH 02/11]?binutils:?add?binutils-x86_64_i386_biarch.patch
  2009-04-27 10:28                       ` Roman I Khimov
@ 2009-04-28 20:02                         ` Khem Raj
  0 siblings, 0 replies; 42+ messages in thread
From: Khem Raj @ 2009-04-28 20:02 UTC (permalink / raw)
  To: openembedded-devel

On (27/04/09 14:28), Roman I Khimov wrote:
> On Thursday 23 April 2009 13:37:06 Roman I Khimov wrote:
> > New binutils were introduced recently, so I've upgraded patch to handle
> > those as well, please ACK new version and I'll commit it then.
> 
> ping

Acked-By: Khem Raj <raj.khem@gmail.com>
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



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

end of thread, other threads:[~2009-04-28 20:07 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 12:33 [RFC] AMD64 and multilib support Roman I Khimov
2009-04-15 12:35 ` [PATCH 01/11] Add x86_64-generic machine Roman I Khimov
2009-04-15 12:35   ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Roman I Khimov
2009-04-15 12:35     ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Roman I Khimov
2009-04-15 12:35       ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Roman I Khimov
2009-04-15 12:35         ` [PATCH 05/11] gcc-cross-initial: add multilib overrides Roman I Khimov
2009-04-15 12:35           ` [PATCH 06/11] gcc-cross-intermediate: " Roman I Khimov
2009-04-15 12:35             ` [PATCH 07/11] gcc-cross: " Roman I Khimov
2009-04-15 12:35               ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Roman I Khimov
2009-04-15 12:35                 ` [PATCH 09/11] glibc: add initial-multilib Roman I Khimov
2009-04-15 12:35                   ` [PATCH 10/11] glibc: add multilib glibc Roman I Khimov
2009-04-15 12:36                     ` [PATCH 11/11] package.bbclass: add multilib libdir to search path Roman I Khimov
2009-04-15 19:28                 ` [PATCH 08/11] glibc: move get_glibc_fpu_setting to glibc.inc Khem Raj
2009-04-15 19:37                   ` Roman I Khimov
2009-04-15 19:23         ` [PATCH 04/11] gcc 4.2.4: add gcc-multilib64dir.patch Khem Raj
2009-04-15 19:31           ` Roman I Khimov
2009-04-16 22:10         ` Tom Rini
2009-04-17  4:35           ` Roman I Khimov
2009-04-17 17:59             ` Tom Rini
2009-04-15 19:09       ` [PATCH 03/11] linux-libc-headers 2.6.23: fix amd64 headers Khem Raj
2009-04-15 19:25         ` Roman I Khimov
2009-04-16  7:12           ` Khem Raj
2009-04-18 19:54             ` Roman I Khimov
2009-04-15 19:25     ` [PATCH 02/11] binutils: add binutils-x86_64_i386_biarch.patch Khem Raj
2009-04-16  5:28       ` Roman I Khimov
2009-04-16  7:14         ` Khem Raj
2009-04-16  8:47           ` Roman I Khimov
2009-04-17 22:37             ` [PATCH 02/11] binutils: add?binutils-x86_64_i386_biarch.patch Khem Raj
2009-04-18 15:44               ` Roman I Khimov
2009-04-21 20:22                 ` Roman I Khimov
2009-04-23  4:42                   ` [PATCH 02/11] binutils:?add?binutils-x86_64_i386_biarch.patch Khem Raj
2009-04-23  9:37                     ` Roman I Khimov
2009-04-27 10:28                       ` Roman I Khimov
2009-04-28 20:02                         ` [PATCH 02/11]?binutils:?add?binutils-x86_64_i386_biarch.patch Khem Raj
2009-04-15 13:01 ` [RFC] AMD64 and multilib support Stanislav Brabec
2009-04-15 13:32   ` Stanislav Brabec
2009-04-15 13:52     ` Roman I Khimov
2009-04-15 14:23       ` Stanislav Brabec
2009-04-15 14:55         ` Roman I Khimov
2009-04-15 16:03           ` Stanislav Brabec
2009-04-16 22:11 ` Tom Rini
2009-04-17  5:05   ` Roman I Khimov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.