diff options
-rw-r--r-- | meta/classes/cross-canadian.bbclass | 31 | ||||
-rw-r--r-- | meta/recipes-devtools/binutils/binutils-cross-canadian.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 5 | ||||
-rw-r--r-- | meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 1 |
4 files changed, 38 insertions, 1 deletions
diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass index 7181c60d5f..c9742128e5 100644 --- a/meta/classes/cross-canadian.bbclass +++ b/meta/classes/cross-canadian.bbclass | |||
@@ -15,12 +15,30 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S | |||
15 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS | 15 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS |
16 | # | 16 | # |
17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" | 17 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
18 | CANADIANEXTRAOS = "" | ||
18 | python () { | 19 | python () { |
19 | archs = d.getVar('PACKAGE_ARCHS', True).split() | 20 | archs = d.getVar('PACKAGE_ARCHS', True).split() |
20 | sdkarchs = [] | 21 | sdkarchs = [] |
21 | for arch in archs: | 22 | for arch in archs: |
22 | sdkarchs.append(arch + '-${SDKPKGSUFFIX}') | 23 | sdkarchs.append(arch + '-${SDKPKGSUFFIX}') |
23 | d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) | 24 | d.setVar('PACKAGE_ARCHS', " ".join(sdkarchs)) |
25 | |||
26 | # PowerPC can build "linux" and "linux-gnuspe" | ||
27 | tarch = d.getVar("TARGET_ARCH", True) | ||
28 | if tarch == "powerpc": | ||
29 | tos = d.getVar("TARGET_OS", True) | ||
30 | if (tos != "linux" and tos != "linux-gnuspe"): | ||
31 | bb.fatal("Building cross-candian powerpc for an unknown TARGET_SYS (%s), please update cross-canadian.bbclass" % d.getVar("TARGET_SYS", True)) | ||
32 | # Have to expand DEPENDS before we change the extensions | ||
33 | d.setVar("DEPENDS", d.getVar("DEPENDS", True)) | ||
34 | d.setVar("STAGING_BINDIR_TOOLCHAIN", d.getVar("STAGING_BINDIR_TOOLCHAIN", True)) | ||
35 | for prefix in ["AR", "AS", "DLLTOOL", "CC", "CXX", "GCC", "LD", "LIPO", "NM", "OBJDUMP", "RANLIB", "STRIP", "WINDRES"]: | ||
36 | n = prefix + "_FOR_TARGET" | ||
37 | d.setVar(n, d.getVar(n, True)) | ||
38 | |||
39 | d.setVar("LIBCEXTENSION", "") | ||
40 | d.setVar("ABIEXTENSION", "") | ||
41 | d.setVar("CANADIANEXTRAOS", "linux-gnuspe") | ||
24 | } | 42 | } |
25 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" | 43 | MULTIMACH_TARGET_SYS = "${PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" |
26 | 44 | ||
@@ -100,3 +118,16 @@ TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" | |||
100 | # points to the wrong place so force it | 118 | # points to the wrong place so force it |
101 | SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs" | 119 | SHLIBSDIRS = "${PKGDATA_DIR}/nativesdk-shlibs" |
102 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs" | 120 | SHLIBSWORKDIR = "${PKGDATA_DIR}/nativesdk-shlibs" |
121 | |||
122 | cross_canadian_bindirlinks () { | ||
123 | for i in ${CANADIANEXTRAOS} | ||
124 | do | ||
125 | d=${D}${bindir}/../${TARGET_ARCH}${TARGET_VENDOR}-$i | ||
126 | install -d $d | ||
127 | for j in `ls ${D}${bindir}` | ||
128 | do | ||
129 | p=${TARGET_ARCH}${TARGET_VENDOR}-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` | ||
130 | ln -s ../${TARGET_SYS}/$j $d/$p | ||
131 | done | ||
132 | done | ||
133 | } | ||
diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc index 2da9017661..81349c083c 100644 --- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc +++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc | |||
@@ -22,6 +22,8 @@ do_install () { | |||
22 | rm -f ${D}${libdir}/libiberty* | 22 | rm -f ${D}${libdir}/libiberty* |
23 | rm -f ${D}${libdir}/libopcodes* | 23 | rm -f ${D}${libdir}/libopcodes* |
24 | rm -f ${D}${includedir}/*.h | 24 | rm -f ${D}${includedir}/*.h |
25 | |||
26 | cross_canadian_bindirlinks | ||
25 | } | 27 | } |
26 | 28 | ||
27 | BBCLASSEXTEND = "" | 29 | BBCLASSEXTEND = "" |
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index 64bb6ba722..900f1e594f 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -29,6 +29,7 @@ export AS_FOR_TARGET = "${TARGET_PREFIX}as" | |||
29 | export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool" | 29 | export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool" |
30 | export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" | 30 | export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" |
31 | export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" | 31 | export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" |
32 | export GCC_FOR_TARGET = "${TARGET_PREFIX}gcc" | ||
32 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" | 33 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" |
33 | export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo" | 34 | export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo" |
34 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" | 35 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" |
@@ -69,7 +70,7 @@ EXCLUDE_FROM_SHLIBS = "1" | |||
69 | PACKAGES = "${PN} ${PN}-doc" | 70 | PACKAGES = "${PN} ${PN}-doc" |
70 | 71 | ||
71 | FILES_${PN} = "\ | 72 | FILES_${PN} = "\ |
72 | ${bindir}/* \ | 73 | ${exec_prefix}/bin/* \ |
73 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \ | 74 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \ |
74 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | 75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ |
75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | 76 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ |
@@ -137,6 +138,8 @@ do_install () { | |||
137 | done | 138 | done |
138 | 139 | ||
139 | chown -R root:root ${D} | 140 | chown -R root:root ${D} |
141 | |||
142 | cross_canadian_bindirlinks | ||
140 | } | 143 | } |
141 | 144 | ||
142 | ELFUTILS = "nativesdk-elfutils" | 145 | ELFUTILS = "nativesdk-elfutils" |
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc index 3cb347b4c5..653f52baaf 100644 --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc | |||
@@ -31,5 +31,6 @@ EOF | |||
31 | # right bits installed by binutils. | 31 | # right bits installed by binutils. |
32 | do_install_append() { | 32 | do_install_append() { |
33 | rm -rf ${D}${exec_prefix}/lib | 33 | rm -rf ${D}${exec_prefix}/lib |
34 | cross_canadian_bindirlinks | ||
34 | } | 35 | } |
35 | 36 | ||