Skip to contentSkip to conversation

Fix relocation of our SDK toolchains

PATCH In review Tom Rini 6 participants 19 messages Apr 3, 2009 – Apr 6, 2009

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

Hey all. For some time, myself and others have wished that the toolchain we install with our SDK target (meta-toolchain*) could be relocatible. I've finally spent some time digging into this and I've come up with the following series of patches. We had two problems. The first is that things like 'as', 'ld', 'cpp', etc that the toolchain invokes were absolute links rather than relative links within the SDK. The second issue is that we were using --with-gxx-include-dir in configuring gcc when really we don't want that, we want to put the C++ includes where GCC is going to look for them already, not in an absolute path.

I've tested this series of patches with gcc-4.1.2 / 4.2.4 and 4.3.3 cross-sdk targets on Linux and 4.2.4 on Windows. For Linux I've compiled qtopia-core-4.3.5 as a stand-in for a large complex app.

At this point the only thing left is to make the environment-setup setup based on where it's invoked from.

Signature · 1 line
Tom Rini
author
#1 lore raw

PATCH 1/1 binutils-cross-sdk: Make relative, not absolute symlinks for 'as', etc, bump PR

binutils-cross-sdk: Make relative, not absolute symlinks for 'as', etc, bump PR
While I'm in here, make the cvs recipe use FILESPATHPKG not mung FILESDIR.

---
 recipes/binutils/binutils-cross-sdk.inc            |    2 +-
 recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb |    2 +-
 recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb |    2 +-
 .../binutils/binutils-cross-sdk_2.17.50.0.12.bb    |    2 +-
 recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb |    2 +-
 recipes/binutils/binutils-cross-sdk_2.18.bb        |    2 +-
 recipes/binutils/binutils-cross-sdk_2.19.1.bb      |    2 +-
 recipes/binutils/binutils-cross-sdk_2.19.bb        |    2 +-
 recipes/binutils/binutils-cross-sdk_cvs.bb         |    4 ++--
 12 files changed, 13 insertions(+), 10 deletions(-)
recipes/binutils/binutils-cross-sdk.inc +1 -1
index 5da1d4f..6e9cda0 100644
@@ -17,7 +17,7 @@ do_install () {
 	rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
 	rm ${D}${prefix}/${TARGET_SYS}/bin/*
 	for l in ${D}${bindir}/*; do
-		ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
+		ln -sf "../../${layout_base_bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
 	done
 
         # Install the libiberty header
recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb +1 -1
index f84a61d..40e9889 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r1"
+PR = "r2"
recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.18.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.19.1.bb +1 -1
index 76dff54..f84a61d 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r0"
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.19.bb +1 -1
index 76dff54..f84a61d 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r0"
+PR = "r1"
recipes/binutils/binutils-cross-sdk_cvs.bb +2 -2
index 6886255..94d2704 100644
@@ -1,4 +1,4 @@
 require binutils_cvs.bb
 require binutils-cross-sdk.inc
-PR = "r4"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
+PR = "r5"
+FILESPATHPKG .= ":binutils-cvs"
Signature · 4 lines
1.6.0.4

-- 
Tom Rini
author
#2 lore raw

PATCH 1/1 gcc-cross-sdk: Fix relocation of the toolchain and bump PR.

gcc-cross-sdk: Fix relocation of the toolchain and bump PR.
There's two parts to this. The first is to make relative, not absolute symlinks for 'cpp', etc. The second is that we need to configure without --with-gxx-include-dir and instead install the base C++ headers into the expected location. The path passed to --with-gxx-include-dir will not be relocated and is an absolute.

---
 recipes/gcc/gcc-configure-sdk.inc           |    3 +--
 recipes/gcc/gcc-cross-sdk_3.3.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_3.4.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_3.4.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.0.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.1.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.1.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_csl-arm-2007q3.bb |    2 +-
 recipes/gcc/gcc-package-sdk.inc             |    3 ++-
 15 files changed, 16 insertions(+), 16 deletions(-)
recipes/gcc/gcc-configure-sdk.inc +1 -2
index 7508030..d04f608 100644
@@ -4,8 +4,7 @@ require gcc-configure-common.inc
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
 
-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${prefix}/${TARGET_SYS}/${layout_includedir}/c++ \
-                      --with-sysroot=${prefix}/${TARGET_SYS} \
+EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
                       --with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
recipes/gcc/gcc-cross-sdk_3.3.4.bb +1 -1
index f53c5d3..ed9c18c 100644
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_3.4.3.bb +1 -1
index 48a7ecd..0b1f661 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_3.4.4.bb +1 -1
index f6dd053..e334659 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.0.bb +1 -1
index 5caec0b..6b6097f 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.1.bb +1 -1
index 461008d..a6418f6 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.2.bb +1 -1
index 55c9cee..7bc2480 100644
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.2.2.bb +1 -1
index 297bd8e..a326263 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.2.3.bb +1 -1
index ee4ce85..297bd8e 100644
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.2.4.bb +1 -1
index 3b66660..0a3af9e 100644
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.1.bb +1 -1
index 13d3958..876c65c 100644
@@ -1,4 +1,4 @@
-PR = "r13"
+PR = "r14"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.2.bb +1 -1
index 8057608..ee4ce85 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.3.bb +1 -1
index 29ee187..7f3e146 100644
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_csl-arm-2007q3.bb +1 -1
index 361b0c1..3352e41 100644
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 
 inherit sdk
 
recipes/gcc/gcc-package-sdk.inc +2 -1
index 0dc19c7..3d9cc0c 100644
@@ -48,7 +48,8 @@ do_install () {
 	# Create the ${prefix}/${TARGET_SYS}/bin/* symlinks
 	install -d ${D}${prefix}/${TARGET_SYS}/bin/
 	for l in ${D}${bindir}/*; do
-		ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
+		echo $l
+		ln -sf "../../${layout_base_bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
 	done
 	ln -sf "${bindir}/${TARGET_PREFIX}gcc${EXEEXT}" "${D}${prefix}/${TARGET_SYS}/bin/cc${EXEEXT}"
 
Signature · 4 lines
1.6.0.4

-- 
Tom Rini
author
#3 lore raw

PATCH 1/1 meta-toolchain, canadian-sdk: Move C++ headers into the correct location, bump PR

meta-toolchain, canadian-sdk: Move C++ headers into the correct location, bump PR
A gcc that has sysroot support expects that the default C++ headers (iostream, etc) are in <toolchain prefix>/include/c++ while regular C headers are still in <toolchain prefix>/usr/include.

---
 recipes/meta/canadian-sdk.bb            |    8 +++++++-
 recipes/meta/meta-toolchain-fso.bb      |    2 +-
 recipes/meta/meta-toolchain-gpe-sbox.bb |    3 ++-
 recipes/meta/meta-toolchain-gpe.bb      |    3 ++-
 recipes/meta/meta-toolchain-neuros.bb   |    2 +-
 recipes/meta/meta-toolchain-openmoko.bb |    2 +-
 recipes/meta/meta-toolchain-opie.bb     |    1 +
 recipes/meta/meta-toolchain-sbox.bb     |    1 +
 recipes/meta/meta-toolchain.bb          |    6 ++++++
 9 files changed, 22 insertions(+), 6 deletions(-)
recipes/meta/canadian-sdk.bb +7 -1
index 150c752..9126c7e 100644
@@ -1,7 +1,7 @@
 DESCRIPTION = "Meta package for building a installable toolchain"
 LICENSE = "MIT"
 DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native zip-native"
-PR = "r2"
+PR = "r3"
 
 inherit canadian-sdk meta
 
@@ -100,6 +100,12 @@ do_populate_sdk() {
 	# gcc-cross-sdk get built :( (30/11/07)
 	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
 
+	# With sysroot support, gcc expects the default C++ headers to be
+	# in a specific place.
+	install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+
 	# Fix or remove broken .la files
 	for i in `find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} -name \*.la`; do
 		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${layout_base_libdir},\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \
recipes/meta/meta-toolchain-fso.bb +1 -1
index fbfbb0a..4873c42 100644
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 TOOLCHAIN_TARGET_TASK = "task-fso-toolchain-target"
 TOOLCHAIN_HOST_TASK = "task-fso-toolchain-host"
recipes/meta/meta-toolchain-gpe-sbox.bb +2 -1
index 74ba038..29e39c5 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-sbox \
@@ -9,4 +10,4 @@ TOOLCHAIN_TARGET_TASK = "\
 
 require meta-toolchain.bb
 
-SDK_SUFFIX = "toolchain-gpe-sbox"
\ No newline at end of file
+SDK_SUFFIX = "toolchain-gpe-sbox"
recipes/meta/meta-toolchain-gpe.bb +2 -1
index bcfb1e1..7b962bf 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-x11 \
@@ -6,4 +7,4 @@ TOOLCHAIN_TARGET_TASK = "\
 
 require meta-toolchain.bb
 
-SDK_SUFFIX = "toolchain-gpe"
\ No newline at end of file
+SDK_SUFFIX = "toolchain-gpe"
recipes/meta/meta-toolchain-neuros.bb +1 -1
index 087ddcb..445a187 100644
@@ -1,6 +1,6 @@
 # Toolchain for neuros-osd devices
 
-PR = "r4"
+PR = "r5"
 
 TOOLCHAIN_HOST_TASK = "task-sdk-host \
                        qmake2-sdk uicmoc4-sdk"
recipes/meta/meta-toolchain-openmoko.bb +1 -1
index b7e5626..b265615 100644
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 TOOLCHAIN_TARGET_TASK = "task-openmoko-toolchain-target"
 TOOLCHAIN_HOST_TASK = "task-openmoko-toolchain-host"
recipes/meta/meta-toolchain-opie.bb +1 -0
index c72208c..9f4b9ac 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-opie"
recipes/meta/meta-toolchain-sbox.bb +1 -0
index 1283c59..0138329 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-bare \
     task-sdk-sbox"
recipes/meta/meta-toolchain.bb +6 -0
index f892d22..b641be1 100644
@@ -117,6 +117,12 @@ do_populate_sdk() {
 	# gcc-cross-sdk get built :( (30/11/07)
 	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
 
+	# With sysroot support, gcc expects the default C++ headers to be
+	# in a specific place.
+	install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+
 	# Fix or remove broken .la files
 	for i in `find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} -name \*.la`; do
 		sed -i 	-e "/^dependency_libs=/s,\([[:space:]']\)${layout_base_libdir},\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \
Signature · 4 lines
1.6.0.4

-- 
Tom Rini
author
#4 lore raw

PATCH 1/1 task-slugos-toolchain-target: Add libstdc++-dev for C++ heades, bump PR

After checking with mwester, this is the correct thing to do.
---

task-slugos-toolchain-target: Add libstdc++-dev for C++ heades, bump PR

---
 recipes/tasks/task-slugos-toolchain-target.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
recipes/tasks/task-slugos-toolchain-target.bb +2 -1
index 489a412..4f9df9b 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Packages for a standalone SDK or external toolchain"
 LICENSE = "MIT"
 ALLOW_EMPTY = "1"
 
-PR = "r1"
+PR = "r2"
 
 PACKAGES = "${PN}"
 
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "\
     libcrypto \
     openssl-dev \
     libstdc++ \
+    libstdc++-dev \
     "
 
 # Not sure if we need these or not...
Signature · 5 lines
1.5.6.3


-- 
Tom Rini
author
#5 lore raw

PATCH 1/1 meta-toolchain-gpe-sbox: Drop task-sdk-gpephone (to match m-t-gpe), bump PR

After a quick check with Florian Boor, this is also correct.

---
meta-toolchain-gpe-sbox: Drop task-sdk-gpephone (to match m-t-gpe), bump PR

---
 recipes/meta/meta-toolchain-gpe-sbox.bb |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
recipes/meta/meta-toolchain-gpe-sbox.bb +2 -3
index 29e39c5..679e50c 100644
@@ -1,12 +1,11 @@
-PR = "r1"
+PR = "r2"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-sbox \
     task-sdk-sbox-gpe \
     task-sdk-x11 \
     task-sdk-x11-ext \
-    task-sdk-gpe \
-    task-sdk-gpephone"
+    task-sdk-gpe"
 
 require meta-toolchain.bb
 
Signature · 4 lines
1.5.6.3

-- 
Tom Rini
#6 lore raw

[PATCH] Re: task-slugos-toolchain-target: Add libstdc++-dev for C++ headers, bump PR

In reply to Tom Rini
Quoted 23 lines · Tom Rini

After checking with mwester, this is the correct thing to do.
---

task-slugos-toolchain-target: Add libstdc++-dev for C++ heades, bump PR

---
 recipes/tasks/task-slugos-toolchain-target.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
recipes/tasks/task-slugos-toolchain-target.bb +1 -1
index 489a412..4f9df9b 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Packages for a standalone SDK or external toolchain"
 LICENSE = "MIT"
 ALLOW_EMPTY = "1"
 
-PR = "r1"
+PR = "r2"
 
 PACKAGES = "${PN}"
 

recipes/tasks/task-slugos-toolchain-target.bb RDEPENDS_${PN} = "\ · line 24

Quoted 7 lines
recipes/tasks/task-slugos-toolchain-target.bb +1 -0
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "\
     libcrypto \
     openssl-dev \
     libstdc++ \
+    libstdc++-dev \
     "
 
 # Not sure if we need these or not...

Thanks!

Per our discussion on IRC, I propose the following patch for this, which pulls in task-sdk-bare to address the problem you discovered above, as well as the other things you pointed out.

Do you want to commit the change, or should I?

-Mike (mwester)

recipes/tasks/task-slugos-toolchain-target.bb +5 -15
index 489a412..fb0418f 100644
@@ -2,31 +2,21 @@ DESCRIPTION = "Packages for a standalone SDK or external toolchain"
 LICENSE = "MIT"
 ALLOW_EMPTY = "1"
 
-PR = "r1"
+PR = "r2"
 
 PACKAGES = "${PN}"
 
-# Stuff contained in this SDK is largely taken from task-sdk-base.bb.
+DEPENDS = "task-sdk-bare"
+
 # This is a starting point, and nothing more at present -- please fill
 # this out with a reasonable set of development tools for a SlugOS image.
 # Also feel free to remove stuff that's silly.
 
 RDEPENDS_${PN} = "\
-    libgcc \
+    task-sdk-bare \
     linux-libc-headers-dev \
     libssl \
     libcrypto \
     openssl-dev \
-    libstdc++ \
-    "
-
-# Not sure if we need these or not...
-NOT_SURE_ABOUT = "\
-    libsegfault \
-    "
-
-# This one needs further investigation; seems to be some sort
-# of naming problem that breaks the SDK when it is added directly.
-ODDLY_BROKEN_PACKAGES ="\
-    libz-dev \
+    zlib-dev \
     "
author
#7 lore raw

Re: [PATCH] Re: task-slugos-toolchain-target: Add libstdc++-dev for C++ headers, bump PR

On Sun, Apr 05, 2009 at 11:03:04PM -0500, Mike (mwester) wrote:
[snip]

Quoted 7 lines

Thanks!

Per our discussion on IRC, I propose the following patch for this, which pulls in task-sdk-bare to address the problem you discovered above, as well as the other things you pointed out.

Do you want to commit the change, or should I?

Since this is independant of the main changes I posted (hit this do compile tests for all SDKs), please go ahead and push your fix. Thanks!

Signature · 1 line
Tom Rini
#8 lore raw

Re: [PATCH] task-slugos-toolchain-target: Add libstdc++-dev for C++ heades, bump PR

In reply to Tom Rini

yes indeed. looks ok

Quoted 44 lines · Tom Rini

After checking with mwester, this is the correct thing to do.
---

task-slugos-toolchain-target: Add libstdc++-dev for C++ heades, bump PR

---
 recipes/tasks/task-slugos-toolchain-target.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
recipes/tasks/task-slugos-toolchain-target.bb +0 -0
index 489a412..4f9df9b 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Packages for a standalone SDK or external

toolchain"
LICENSE = "MIT"
ALLOW_EMPTY = "1"

recipes/tasks/task-slugos-toolchain-target.bb +2 -2
-PR = "r1"
+PR = "r2"
 
 PACKAGES = "${PN}"
@@ -18,6 +18,7 @@ RDEPENDS_${PN} = "\
     libcrypto \
     openssl-dev \
     libstdc++ \
+    libstdc++-dev \
     "
 
 # Not sure if we need these or not...
--

1.5.6.3

--
Tom Rini

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#9 lore raw

Re: [PATCH] meta-toolchain, canadian-sdk: Move C++ headers into the correct location, bump PR

In reply to Tom Rini

ok with this change, you can apply the previous patch fully.

Quoted 166 lines · Tom Rini

meta-toolchain, canadian-sdk: Move C++ headers into the correct location, bump PR
A gcc that has sysroot support expects that the default C++ headers (iostream, etc) are in <toolchain prefix>/include/c++ while regular C headers are still in <toolchain prefix>/usr/include.

---
 recipes/meta/canadian-sdk.bb            |    8 +++++++-
 recipes/meta/meta-toolchain-fso.bb      |    2 +-
 recipes/meta/meta-toolchain-gpe-sbox.bb |    3 ++-
 recipes/meta/meta-toolchain-gpe.bb      |    3 ++-
 recipes/meta/meta-toolchain-neuros.bb   |    2 +-
 recipes/meta/meta-toolchain-openmoko.bb |    2 +-
 recipes/meta/meta-toolchain-opie.bb     |    1 +
 recipes/meta/meta-toolchain-sbox.bb     |    1 +
 recipes/meta/meta-toolchain.bb          |    6 ++++++
 9 files changed, 22 insertions(+), 6 deletions(-)
recipes/meta/canadian-sdk.bb +0 -0
index 150c752..9126c7e 100644
@@ -1,7 +1,7 @@
 DESCRIPTION = "Meta package for building a installable toolchain"
 LICENSE = "MIT"
 DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native

zip-native"

recipes/meta/canadian-sdk.bb +7 -1
-PR = "r2"
+PR = "r3"
 
 inherit canadian-sdk meta
@@ -100,6 +100,12 @@ do_populate_sdk() {
 	# gcc-cross-sdk get built :( (30/11/07)
 	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
 
+	# With sysroot support, gcc expects the default C++ headers to be
+	# in a specific place.
+	install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+
 	# Fix or remove broken .la files
 	for i in `find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} -name \*.la`; do
 		sed -i 	-e

"/^dependency_libs=/s,\([[:space:]']\)${layout_base_libdir},\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \

recipes/meta/meta-toolchain-fso.bb +1 -1
index fbfbb0a..4873c42 100644
@@ -1,4 +1,4 @@
-PR = "r0"
+PR = "r1"
 
 TOOLCHAIN_TARGET_TASK = "task-fso-toolchain-target"
 TOOLCHAIN_HOST_TASK = "task-fso-toolchain-host"
recipes/meta/meta-toolchain-gpe-sbox.bb +2 -1
index 74ba038..29e39c5 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-sbox \
@@ -9,4 +10,4 @@ TOOLCHAIN_TARGET_TASK = "\
 
 require meta-toolchain.bb
 
-SDK_SUFFIX = "toolchain-gpe-sbox"
\ No newline at end of file
+SDK_SUFFIX = "toolchain-gpe-sbox"
recipes/meta/meta-toolchain-gpe.bb +2 -1
index bcfb1e1..7b962bf 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-x11 \
@@ -6,4 +7,4 @@ TOOLCHAIN_TARGET_TASK = "\
 
 require meta-toolchain.bb
 
-SDK_SUFFIX = "toolchain-gpe"
\ No newline at end of file
+SDK_SUFFIX = "toolchain-gpe"
recipes/meta/meta-toolchain-neuros.bb +1 -1
index 087ddcb..445a187 100644
@@ -1,6 +1,6 @@
 # Toolchain for neuros-osd devices
 
-PR = "r4"
+PR = "r5"
 
 TOOLCHAIN_HOST_TASK = "task-sdk-host \
                        qmake2-sdk uicmoc4-sdk"
recipes/meta/meta-toolchain-openmoko.bb +1 -1
index b7e5626..b265615 100644
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 TOOLCHAIN_TARGET_TASK = "task-openmoko-toolchain-target"
 TOOLCHAIN_HOST_TASK = "task-openmoko-toolchain-host"
recipes/meta/meta-toolchain-opie.bb +1 -0
index c72208c..9f4b9ac 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-base \
     task-sdk-opie"
recipes/meta/meta-toolchain-sbox.bb +1 -0
index 1283c59..0138329 100644
@@ -1,3 +1,4 @@
+PR = "r1"
 TOOLCHAIN_TARGET_TASK = "\
     task-sdk-bare \
     task-sdk-sbox"
recipes/meta/meta-toolchain.bb +6 -0
index f892d22..b641be1 100644
@@ -117,6 +117,12 @@ do_populate_sdk() {
 	# gcc-cross-sdk get built :( (30/11/07)
 	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
 
+	# With sysroot support, gcc expects the default C++ headers to be
+	# in a specific place.
+	install -d ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
+	mv ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/usr/include/c++ \
+		${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
+
 	# Fix or remove broken .la files
 	for i in `find ${SDK_OUTPUT}/${prefix}/${TARGET_SYS} -name \*.la`; do
 		sed -i 	-e

"/^dependency_libs=/s,\([[:space:]']\)${layout_base_libdir},\1${prefix}/${TARGET_SYS}${layout_base_libdir},g" \
--
1.6.0.4

--
Tom Rini

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#10 lore raw

Re: [PATCH] gcc-cross-sdk: Fix relocation of the toolchain and bump PR.

In reply to Tom Rini
Quoted 38 lines · Tom Rini

gcc-cross-sdk: Fix relocation of the toolchain and bump PR.
There's two parts to this. The first is to make relative, not absolute symlinks for 'cpp', etc. The second is that we need to configure without --with-gxx-include-dir and instead install the base C++ headers into the expected location. The path passed to --with-gxx-include-dir will not be relocated and is an absolute.

---
 recipes/gcc/gcc-configure-sdk.inc           |    3 +--
 recipes/gcc/gcc-cross-sdk_3.3.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_3.4.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_3.4.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.0.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.1.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.1.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.2.4.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.1.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.2.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_4.3.3.bb          |    2 +-
 recipes/gcc/gcc-cross-sdk_csl-arm-2007q3.bb |    2 +-
 recipes/gcc/gcc-package-sdk.inc             |    3 ++-
 15 files changed, 16 insertions(+), 16 deletions(-)
recipes/gcc/gcc-configure-sdk.inc +0 -0
index 7508030..d04f608 100644
@@ -4,8 +4,7 @@ require gcc-configure-common.inc
 USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d

)}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no",
"", d )}'

-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${prefix}/${TARGET_SYS}/${layout_includedir}/c++ \

recipes/gcc/gcc-configure-sdk.inc require gcc-configure-common.inc

Quoted 5 lines
recipes/gcc/gcc-configure-sdk.inc +1 -2
-                      --with-sysroot=${prefix}/${TARGET_SYS} \
+EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
 
--with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"

You should wait on the above change. Rest of patch looks good to go.

Quoted 175 lines
recipes/gcc/gcc-cross-sdk_3.3.4.bb +1 -1
index f53c5d3..ed9c18c 100644
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_3.4.3.bb +1 -1
index 48a7ecd..0b1f661 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_3.4.4.bb +1 -1
index f6dd053..e334659 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.0.bb +1 -1
index 5caec0b..6b6097f 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.1.bb +1 -1
index 461008d..a6418f6 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.1.2.bb +1 -1
index 55c9cee..7bc2480 100644
@@ -1,4 +1,4 @@
-PR = "r9"
+PR = "r10"
 
 require gcc-${PV}.inc
 require gcc-cross-sdk.inc
recipes/gcc/gcc-cross-sdk_4.2.2.bb +1 -1
index 297bd8e..a326263 100644
@@ -1,4 +1,4 @@
-PR = "r7"
+PR = "r8"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.2.3.bb +1 -1
index ee4ce85..297bd8e 100644
@@ -1,4 +1,4 @@
-PR = "r6"
+PR = "r7"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.2.4.bb +1 -1
index 3b66660..0a3af9e 100644
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.1.bb +1 -1
index 13d3958..876c65c 100644
@@ -1,4 +1,4 @@
-PR = "r13"
+PR = "r14"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.2.bb +1 -1
index 8057608..ee4ce85 100644
@@ -1,4 +1,4 @@
-PR = "r5"
+PR = "r6"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_4.3.3.bb +1 -1
index 29ee187..7f3e146 100644
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
 
 inherit sdk
 
recipes/gcc/gcc-cross-sdk_csl-arm-2007q3.bb +1 -1
index 361b0c1..3352e41 100644
@@ -1,4 +1,4 @@
-PR = "r2"
+PR = "r3"
 
 inherit sdk
 
recipes/gcc/gcc-package-sdk.inc +0 -1
index 0dc19c7..3d9cc0c 100644
@@ -48,7 +48,8 @@ do_install () {
 	# Create the ${prefix}/${TARGET_SYS}/bin/* symlinks
 	install -d ${D}${prefix}/${TARGET_SYS}/bin/
 	for l in ${D}${bindir}/*; do
-		ln -sf "${bindir}/`basename $l`"

"${D}${prefix}/${TARGET_SYS}/bin/basename $l | sed -e 's,${TARGET_PREFIX},,'"

recipes/gcc/gcc-package-sdk.inc +2 -0
+		echo $l
+		ln -sf "../../${layout_base_bindir}/`basename $l`"

"${D}${prefix}/${TARGET_SYS}/bin/basename $l | sed -e 's,${TARGET_PREFIX},,'"

recipes/gcc/gcc-package-sdk.inc +0 -0
 	done
 	ln -sf "${bindir}/${TARGET_PREFIX}gcc${EXEEXT}"

"${D}${prefix}/${TARGET_SYS}/bin/cc${EXEEXT}"

--
1.6.0.4

--
Tom Rini

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

author
#11 lore raw

Re: [PATCH] gcc-cross-sdk: Fix relocation of the toolchain and bump PR.

Quoted 7 lines · Khem Raj
Quoted 6 lines · Tom Rini

gcc-cross-sdk: Fix relocation of the toolchain and bump PR.
There's two parts to this. The first is to make relative, not absolute symlinks for 'cpp', etc. The second is that we need to configure without --with-gxx-include-dir and instead install the base C++ headers into the expected location. The path passed to --with-gxx-include-dir will not be relocated and is an absolute.

[snip]

Quoted 10 lines

recipes/gcc/gcc-configure-sdk.inc require gcc-configure-common.inc

Quoted 7 lines

-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${prefix}/${TARGET_SYS}/${layout_includedir}/c++ \

recipes/gcc/gcc-configure-sdk.inc +1 -2
-                      --with-sysroot=${prefix}/${TARGET_SYS} \
+EXTRA_OECONF_PATHS = "--with-sysroot=${prefix}/${TARGET_SYS} \
 
--with-build-time-tools=${CROSS_DIR}/${TARGET_SYS}/bin \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"

You should wait on the above change. Rest of patch looks good to go.

It's a fun little circle here. We can't move them until gcc will look in the right place them and we can't make gcc only look in the right place until they're moved. And I didn't want to change gcc-cross-sdk and meta-toolchains all in one commit. Since I'll push them all at once and all the PRs invovled get bumped, the end result is fine (everything will get rebuilt and know the right stuff)

Signature · 1 line
Tom Rini
#12 lore raw

Re: [PATCH] binutils-cross-sdk: Make relative, not absolute symlinks for 'as', etc, bump PR

In reply to Tom Rini

looks good.

Quoted 157 lines · Tom Rini

binutils-cross-sdk: Make relative, not absolute symlinks for 'as', etc, bump PR
While I'm in here, make the cvs recipe use FILESPATHPKG not mung FILESDIR.

---
 recipes/binutils/binutils-cross-sdk.inc            |    2 +-
 recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb |    2 +-
 recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb |    1 +
 recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb |    2 +-
 .../binutils/binutils-cross-sdk_2.17.50.0.12.bb    |    2 +-
 recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb |    2 +-
 recipes/binutils/binutils-cross-sdk_2.18.bb        |    2 +-
 recipes/binutils/binutils-cross-sdk_2.19.1.bb      |    2 +-
 recipes/binutils/binutils-cross-sdk_2.19.bb        |    2 +-
 recipes/binutils/binutils-cross-sdk_cvs.bb         |    4 ++--
 12 files changed, 13 insertions(+), 10 deletions(-)
recipes/binutils/binutils-cross-sdk.inc +0 -1
index 5da1d4f..6e9cda0 100644
@@ -17,7 +17,7 @@ do_install () {
 	rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
 	rm ${D}${prefix}/${TARGET_SYS}/bin/*
 	for l in ${D}${bindir}/*; do
-		ln -sf "${bindir}/`basename $l`"

"${D}${prefix}/${TARGET_SYS}/bin/basename $l | sed -e 's,${TARGET_PREFIX},,'"

recipes/binutils/binutils-cross-sdk.inc +1 -0
+		ln -sf "../../${layout_base_bindir}/`basename $l`"

"${D}${prefix}/${TARGET_SYS}/bin/basename $l | sed -e 's,${TARGET_PREFIX},,'"

recipes/binutils/binutils-cross-sdk.inc +0 -0
 	done
 
         # Install the libiberty header
recipes/binutils/binutils-cross-sdk_2.14.90.0.6.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.14.90.0.7.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.15.94.0.1.bb +1 -1
index f84a61d..40e9889 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r1"
+PR = "r2"
recipes/binutils/binutils-cross-sdk_2.16.91.0.6.bb +1 -0
index f509566..f84a61d 100644
@@ -1,2 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.16.91.0.7.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.17.50.0.12.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.18.50.0.7.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.18.bb +1 -1
index 574265c..cde4e42 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r4"
+PR = "r5"
recipes/binutils/binutils-cross-sdk_2.19.1.bb +1 -1
index 76dff54..f84a61d 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r0"
+PR = "r1"
recipes/binutils/binutils-cross-sdk_2.19.bb +1 -1
index 76dff54..f84a61d 100644
@@ -1,3 +1,3 @@
 require binutils_${PV}.bb
 require binutils-cross-sdk.inc
-PR = "r0"
+PR = "r1"
recipes/binutils/binutils-cross-sdk_cvs.bb +2 -3
index 6886255..94d2704 100644
@@ -1,4 +1,4 @@
 require binutils_cvs.bb
 require binutils-cross-sdk.inc
-PR = "r4"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
+PR = "r5"
+FILESPATHPKG .= ":binutils-cvs"
--

1.6.0.4

--
Tom Rini

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#14 lore raw
Quoted 4 lines · Tom Rini

This is also at
http://patchwork.openembedded.org/bundle/trini/trini-relocatible-sdk/
now and I plan on pushing this stuff in Tuesday AM (same time as the wireless-tools change).

Core changes are not allowed to go in using the "silent approval" method.

Have you also looked at Chris' stuff at http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&h=kergoth/autotools&id=3631765365fb9db48df5a2c936c8d46f79b5c283 ?

regards,

Koen

author
#15 lore raw
Quoted 7 lines · Koen Kooi
Quoted 4 lines · Tom Rini

This is also at
http://patchwork.openembedded.org/bundle/trini/trini-relocatible-sdk/
now and I plan on pushing this stuff in Tuesday AM (same time as the wireless-tools change).

Core changes are not allowed to go in using the "silent approval" method.

That reminds me I guess, I should probably sign up to own the SDK stuff.

Quoted 2 lines

Have you also looked at Chris' stuff at
http://cgit.openembedded.net/cgit.cgi?url=openembedded/commit/&h=kergoth/autotools&id=3631765365fb9db48df5a2c936c8d46f79b5c283

Looks interesting. Denys reminded me that there's a few other things (libtool doesn't appear to have any sysroot support) needed before everything in the SDK can just be moved around at will.

Signature · 1 line
Tom Rini
#16 lore raw
In reply to Tom Rini
Quoted 11 lines · Tom Rini

Hey all. For some time, myself and others have wished that the toolchain we install with our SDK target (meta-toolchain*) could be relocatible. I've finally spent some time digging into this and I've come up with the following series of patches. We had two problems. The first is that things like 'as', 'ld', 'cpp', etc that the toolchain invokes were absolute links rather than relative links within the SDK. The second issue is that we were using --with-gxx-include-dir in configuring gcc when really we don't want that, we want to put the C++ includes where GCC is going to look for them already, not in an absolute path.

Quoted 6 lines

I've tested this series of patches with gcc-4.1.2 / 4.2.4 and 4.3.3 cross-sdk targets on Linux and 4.2.4 on Windows. For Linux I've compiled qtopia-core-4.3.5 as a stand-in for a large complex app.

At this point the only thing left is to make the environment-setup setup based on where it's invoked from.

Thanks! Will you be looking into libtool(-ize)/.la files and pkg-config .pc files?

Signature · 1 line
Denys
author
#17 lore raw
Quoted 16 lines · Denys Dmytriyenko
Quoted 15 lines · Tom Rini

Hey all. For some time, myself and others have wished that the toolchain we install with our SDK target (meta-toolchain*) could be relocatible. I've finally spent some time digging into this and I've come up with the following series of patches. We had two problems. The first is that things like 'as', 'ld', 'cpp', etc that the toolchain invokes were absolute links rather than relative links within the SDK. The second issue is that we were using --with-gxx-include-dir in configuring gcc when really we don't want that, we want to put the C++ includes where GCC is going to look for them already, not in an absolute path.

I've tested this series of patches with gcc-4.1.2 / 4.2.4 and 4.3.3 cross-sdk targets on Linux and 4.2.4 on Windows. For Linux I've compiled qtopia-core-4.3.5 as a stand-in for a large complex app.

Quoted 5 lines
Quoted 2 lines

At this point the only thing left is to make the environment-setup setup based on where it's invoked from.

Thanks! Will you be looking into libtool(-ize)/.la files and pkg-config .pc files?

pkg-config is done already, via env variables that we setup in environment-setup[1]. I'm not 100% sure on what might or might not need doing to the .la files, however.

[1]: When I tried a while ago, it would get a tiny bit confused if you have both host stuff (opkg-sdk) and target stuff (libpng-sdk) and give you both. So it could be possible to have some host stuff try and be used if you don't have a target one as the case where you had both host and target, the target was used. Or I could be mis-remembering.

Signature · 1 line
Tom Rini
#18 lore raw
In reply to Tom Rini

Hi,

Quoted 3 lines · Tom Rini

Hey all. For some time, myself and others have wished that the toolchain we install with our SDK target (meta-toolchain*) could be relocatible. I've finally spent some time digging into this and I've

that's great - I guess you'll make quite some users happy.

Quoted 11 lines

come up with the following series of patches. We had two problems. The first is that things like 'as', 'ld', 'cpp', etc that the toolchain invokes were absolute links rather than relative links within the SDK. The second issue is that we were using --with-gxx-include-dir in configuring gcc when really we don't want that, we want to put the C++ includes where GCC is going to look for them already, not in an absolute path.

I've tested this series of patches with gcc-4.1.2 / 4.2.4 and 4.3.3 cross-sdk targets on Linux and 4.2.4 on Windows. For Linux I've compiled qtopia-core-4.3.5 as a stand-in for a large complex app.

I didn't find any obvious problems with the patches and since the changes are tested I vote for pushing them!

Greetings

Florian

Signature · 5 lines
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        [email protected]
                                        http://www.kernelconcepts.de/en