Friday, September 12, 2008

Add CodeSourcery as OE SDK toolchain

In the previous post I mentioned about some issues I faced while working on the SDK feature of OpenEmbedded. One of them was the absence of the CodeSourcery toolchain from the SDK targets - all of them were upstream GCC-based, which for the most part is fine. But I have a specific requirement for my work to use CodeSourcery 2007q3 (as the most stable at this point) toolchain, and even more, the binary version of it...

While making it possible to build a minimal OpenEmbedded/Angstrom system using a binary CodeSourcery toolchain, I had to produce a CodeSourcery-based SDK with the OpenEmbedded, which required a new recipe to be added:
PR = "r0"

inherit sdk

require gcc-csl-arm-2007q3.inc
require gcc-cross-sdk.inc
require gcc-configure-sdk.inc
require gcc-package-sdk.inc

EXTRA_OECONF += " \
--disable-multilib \
--disable-libssp \
--disable-libgomp \
--disable-libunwind-exceptions \
--disable-libmudflap \
--with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix} \
"

#We don't want i686 linux ending up in the CFLAGS_FOR_TARGET like this: -isystem/OE/angstrom-tmp/staging/i686-linux/usr/include
CFLAGS = ""
CXXFLAGS = ""
LDFLAGS = ""

# Hack till we fix *libc properly
do_install_append() {
cp -a ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed/* ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include/
}
After testing and making sure it works, I opened up a Bugzilla ticket and started persuading OE developers to accept it in the development branch.

And eventually, after talking to Philip Balister on IRC, the patch was committed to the upstream.

No comments: