diff options
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 56 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-canadian.inc | 24 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-canadian_2.18.bb | 3 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-canadian_2.19.bb | 3 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-canadian.inc | 4 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-canadian_4.3.3.bb | 23 |
6 files changed, 113 insertions, 0 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass new file mode 100644 index 000000000..334f12cda --- /dev/null +++ b/meta/classes/cross-canadian.bbclass @@ -0,0 +1,56 @@ +# SDK packages are built either explicitly by the user, +# or indirectly via dependency. No need to be in 'world'. +EXCLUDE_FROM_WORLD = "1" + +# Save MULTIMACH_ARCH +OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" +# Save PACKAGE_ARCH +OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} +PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" +# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it +OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" +BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" + +INHIBIT_DEFAULT_DEPS = "1" + +STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" +STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}" + +PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}" +PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_HOST_SYS}" + +HOST_ARCH = "${SDK_ARCH}" +HOST_VENDOR = "${SDK_VENDOR}" +HOST_OS = "${SDK_OS}" +HOST_PREFIX = "${SDK_PREFIX}" +HOST_CC_ARCH = "${SDK_CC_ARCH}" + +CPPFLAGS = "${BUILDSDK_CPPFLAGS}" +CFLAGS = "${BUILDSDK_CFLAGS}" +CXXFLAGS = "${BUILDSDK_CFLAGS}" +LDFLAGS = "${BUILDSDK_LDFLAGS}" + +# Change to place files in SDKPATH +prefix = "${SDKPATH}" +exec_prefix = "${SDKPATH}" +base_prefix = "${SDKPATH}" + +FILES_${PN} = "${prefix}" +FILES_${PN}-dbg += "${prefix}/.debug \ + ${prefix}/bin/.debug \ + " + +export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" +export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" + +python () { + barch = bb.data.getVar('HOST_ARCH', d, True) + archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() + sdkarchs = [] + for arch in archs: + sdkarchs.append(barch + '-' + arch + '-nativesdk') + bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) +} + + + diff --git a/meta/packages/binutils/binutils-cross-canadian.inc b/meta/packages/binutils/binutils-cross-canadian.inc new file mode 100644 index 000000000..8d21db70e --- /dev/null +++ b/meta/packages/binutils/binutils-cross-canadian.inc @@ -0,0 +1,24 @@ +inherit cross-canadian +DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk" +EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \ + --program-prefix=${TARGET_PREFIX}" + +do_stage() { + : +} + +do_install () { + autotools_do_install + + # Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks + 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},,'`" + done + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} +} diff --git a/meta/packages/binutils/binutils-cross-canadian_2.18.bb b/meta/packages/binutils/binutils-cross-canadian_2.18.bb new file mode 100644 index 000000000..13fc22aa6 --- /dev/null +++ b/meta/packages/binutils/binutils-cross-canadian_2.18.bb @@ -0,0 +1,3 @@ +require binutils_${PV}.bb +require binutils-cross-canadian.inc +PR = "r3" diff --git a/meta/packages/binutils/binutils-cross-canadian_2.19.bb b/meta/packages/binutils/binutils-cross-canadian_2.19.bb new file mode 100644 index 000000000..7dad2a620 --- /dev/null +++ b/meta/packages/binutils/binutils-cross-canadian_2.19.bb @@ -0,0 +1,3 @@ +require binutils_${PV}.bb +require binutils-cross-canadian.inc +PR = "r0" diff --git a/meta/packages/gcc/gcc-cross-canadian.inc b/meta/packages/gcc/gcc-cross-canadian.inc new file mode 100644 index 000000000..1f2b5e833 --- /dev/null +++ b/meta/packages/gcc/gcc-cross-canadian.inc @@ -0,0 +1,4 @@ +inherit cross-canadian + +DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc" + diff --git a/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb new file mode 100644 index 000000000..f6e60ebf2 --- /dev/null +++ b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb @@ -0,0 +1,23 @@ +inherit cross-canadian + +require gcc-${PV}.inc +require gcc-cross-canadian.inc +require gcc-configure-sdk.inc +require gcc-package-sdk.inc + +PR = "r7" + +DEPENDS += "gmp-nativesdk mpfr-nativesdk" +RDEPENDS_${PN} += "mpfr-nativesdk" + +SYSTEMHEADERS = "/usr/include" +SYSTEMLIBS1 = "/usr/lib/" + +EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ + --disable-libgomp --disable-libmudflap \ + --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix}" + +# to find libmpfr +# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}" + +PARALLEL_MAKE = "" |