summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/cross-canadian.bbclass56
-rw-r--r--meta/packages/binutils/binutils-cross-canadian.inc24
-rw-r--r--meta/packages/binutils/binutils-cross-canadian_2.18.bb3
-rw-r--r--meta/packages/binutils/binutils-cross-canadian_2.19.bb3
-rw-r--r--meta/packages/gcc/gcc-cross-canadian.inc4
-rw-r--r--meta/packages/gcc/gcc-cross-canadian_4.3.3.bb23
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 0000000000..334f12cdae
--- /dev/null
+++ b/meta/classes/cross-canadian.bbclass
@@ -0,0 +1,56 @@
1# SDK packages are built either explicitly by the user,
2# or indirectly via dependency. No need to be in 'world'.
3EXCLUDE_FROM_WORLD = "1"
4
5# Save MULTIMACH_ARCH
6OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}"
7# Save PACKAGE_ARCH
8OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
9PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk"
10# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
11OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
12BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
13
14INHIBIT_DEFAULT_DEPS = "1"
15
16STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
17STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}"
18
19PATH_append = ":${TMPDIR}/cross/${HOST_ARCH}/${bindir_cross}"
20PKGDATA_DIR = "${TMPDIR}/pkgdata/${MULTIMACH_HOST_SYS}"
21
22HOST_ARCH = "${SDK_ARCH}"
23HOST_VENDOR = "${SDK_VENDOR}"
24HOST_OS = "${SDK_OS}"
25HOST_PREFIX = "${SDK_PREFIX}"
26HOST_CC_ARCH = "${SDK_CC_ARCH}"
27
28CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
29CFLAGS = "${BUILDSDK_CFLAGS}"
30CXXFLAGS = "${BUILDSDK_CFLAGS}"
31LDFLAGS = "${BUILDSDK_LDFLAGS}"
32
33# Change to place files in SDKPATH
34prefix = "${SDKPATH}"
35exec_prefix = "${SDKPATH}"
36base_prefix = "${SDKPATH}"
37
38FILES_${PN} = "${prefix}"
39FILES_${PN}-dbg += "${prefix}/.debug \
40 ${prefix}/bin/.debug \
41 "
42
43export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
44export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
45
46python () {
47 barch = bb.data.getVar('HOST_ARCH', d, True)
48 archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
49 sdkarchs = []
50 for arch in archs:
51 sdkarchs.append(barch + '-' + arch + '-nativesdk')
52 bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
53}
54
55
56
diff --git a/meta/packages/binutils/binutils-cross-canadian.inc b/meta/packages/binutils/binutils-cross-canadian.inc
new file mode 100644
index 0000000000..8d21db70ee
--- /dev/null
+++ b/meta/packages/binutils/binutils-cross-canadian.inc
@@ -0,0 +1,24 @@
1inherit cross-canadian
2DEPENDS = "flex-native bison-native virtual/${HOST_PREFIX}gcc-crosssdk virtual/libc-nativesdk zlib-nativesdk"
3EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \
4 --program-prefix=${TARGET_PREFIX}"
5
6do_stage() {
7 :
8}
9
10do_install () {
11 autotools_do_install
12
13 # Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks
14 rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
15 rm ${D}${prefix}/${TARGET_SYS}/bin/*
16 for l in ${D}${bindir}/*; do
17 ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
18 done
19
20 # Install the libiberty header
21 install -d ${D}${includedir}
22 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
23 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
24}
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 0000000000..13fc22aa64
--- /dev/null
+++ b/meta/packages/binutils/binutils-cross-canadian_2.18.bb
@@ -0,0 +1,3 @@
1require binutils_${PV}.bb
2require binutils-cross-canadian.inc
3PR = "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 0000000000..7dad2a620b
--- /dev/null
+++ b/meta/packages/binutils/binutils-cross-canadian_2.19.bb
@@ -0,0 +1,3 @@
1require binutils_${PV}.bb
2require binutils-cross-canadian.inc
3PR = "r0"
diff --git a/meta/packages/gcc/gcc-cross-canadian.inc b/meta/packages/gcc/gcc-cross-canadian.inc
new file mode 100644
index 0000000000..1f2b5e833a
--- /dev/null
+++ b/meta/packages/gcc/gcc-cross-canadian.inc
@@ -0,0 +1,4 @@
1inherit cross-canadian
2
3DEPENDS = "virtual/${HOST_PREFIX}binutils-crosssdk virtual/${TARGET_PREFIX}libc-for-gcc"
4
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 0000000000..f6e60ebf2d
--- /dev/null
+++ b/meta/packages/gcc/gcc-cross-canadian_4.3.3.bb
@@ -0,0 +1,23 @@
1inherit cross-canadian
2
3require gcc-${PV}.inc
4require gcc-cross-canadian.inc
5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc
7
8PR = "r7"
9
10DEPENDS += "gmp-nativesdk mpfr-nativesdk"
11RDEPENDS_${PN} += "mpfr-nativesdk"
12
13SYSTEMHEADERS = "/usr/include"
14SYSTEMLIBS1 = "/usr/lib/"
15
16EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
17 --disable-libgomp --disable-libmudflap \
18 --with-mpfr=${STAGING_DIR_HOST}${layout_exec_prefix}"
19
20# to find libmpfr
21# export LD_LIBRARY_PATH = "{STAGING_DIR_HOST}${layout_exec_prefix}"
22
23PARALLEL_MAKE = ""