diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-17 00:52:53 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-17 22:25:23 +0100 |
commit | ca667135a3b5358ebf51e3e2709ec6005f19f48b (patch) | |
tree | 0da98a2c571b6fae5ae0729b59da33e1e413ce53 /meta | |
parent | afa02c54709474cee4bb91368a823a8678f57998 (diff) | |
download | poky-ca667135a3b5358ebf51e3e2709ec6005f19f48b.tar.gz |
nativesdk: Convert to use crosssdk toolchain and remove binutils/gcc nativesdk recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/nativesdk.bbclass | 105 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-nativesdk.inc | 24 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-nativesdk_2.18.bb | 3 | ||||
-rw-r--r-- | meta/packages/binutils/binutils-cross-nativesdk_2.19.bb | 3 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb | 8 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb | 10 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb | 14 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb | 18 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb | 18 | ||||
-rw-r--r-- | meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb | 8 |
10 files changed, 38 insertions, 173 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass index 59d3320c3c..964d39955b 100644 --- a/meta/classes/nativesdk.bbclass +++ b/meta/classes/nativesdk.bbclass | |||
@@ -2,59 +2,51 @@ | |||
2 | # or indirectly via dependency. No need to be in 'world'. | 2 | # or indirectly via dependency. No need to be in 'world'. |
3 | EXCLUDE_FROM_WORLD = "1" | 3 | EXCLUDE_FROM_WORLD = "1" |
4 | 4 | ||
5 | # Save MULTIMACH_ARCH | 5 | # |
6 | OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" | 6 | # Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS |
7 | # Save PACKAGE_ARCH | 7 | # |
8 | OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} | 8 | OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH} |
9 | PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" | 9 | BASE_PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" |
10 | # Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it | 10 | python () { |
11 | OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" | 11 | barch = bb.data.getVar('HOST_ARCH', d, True) |
12 | BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" | 12 | archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() |
13 | sdkarchs = [] | ||
14 | for arch in archs: | ||
15 | sdkarchs.append(barch + '-' + arch + '-nativesdk') | ||
16 | bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) | ||
17 | } | ||
18 | |||
19 | #STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk" | ||
20 | #STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk" | ||
21 | |||
22 | CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}" | ||
13 | 23 | ||
14 | STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-sdk" | 24 | TARGET_LDFLAGS += "-Wl,-dynamic-linker=${SDKPATH}/lib/ld-linux.so.2" |
15 | STAGING_DIR_TARGET = "${STAGING_DIR}/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}" | ||
16 | 25 | ||
17 | HOST_ARCH = "${BUILD_ARCH}" | 26 | HOST_ARCH = "${SDK_ARCH}" |
18 | HOST_VENDOR = "${BUILD_VENDOR}" | 27 | HOST_VENDOR = "${SDK_VENDOR}" |
19 | HOST_OS = "${BUILD_OS}" | 28 | HOST_OS = "${SDK_OS}" |
20 | HOST_PREFIX = "${BUILD_PREFIX}" | 29 | HOST_PREFIX = "${SDK_PREFIX}" |
21 | HOST_CC_ARCH = "${BUILD_CC_ARCH}" | 30 | HOST_CC_ARCH = "${SDK_CC_ARCH}" |
22 | #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}" | 31 | #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}" |
23 | 32 | ||
33 | TARGET_ARCH = "${SDK_ARCH}" | ||
34 | TARGET_VENDOR = "${SDK_VENDOR}" | ||
35 | TARGET_OS = "${SDK_OS}" | ||
36 | TARGET_PREFIX = "${SDK_PREFIX}" | ||
37 | TARGET_CC_ARCH = "${SDK_CC_ARCH}" | ||
38 | |||
24 | CPPFLAGS = "${BUILDSDK_CPPFLAGS}" | 39 | CPPFLAGS = "${BUILDSDK_CPPFLAGS}" |
25 | CFLAGS = "${BUILDSDK_CFLAGS}" | 40 | CFLAGS = "${BUILDSDK_CFLAGS}" |
26 | CXXFLAGS = "${BUILDSDK_CFLAGS}" | 41 | CXXFLAGS = "${BUILDSDK_CFLAGS}" |
27 | LDFLAGS = "${BUILDSDK_LDFLAGS}" | 42 | LDFLAGS = "${BUILDSDK_LDFLAGS}" |
28 | 43 | ||
29 | # Path prefixes | 44 | # Change to place files in SDKPATH |
30 | prefix = "${SDKPATH}" | 45 | prefix = "${SDKPATH}" |
31 | exec_prefix = "${prefix}" | 46 | exec_prefix = "${SDKPATH}" |
32 | base_prefix = "${prefix}" | 47 | base_prefix = "${SDKPATH}" |
33 | |||
34 | # Base paths | ||
35 | export base_bindir = "${prefix}/bin" | ||
36 | export base_sbindir = "${prefix}/bin" | ||
37 | export base_libdir = "${prefix}/lib" | ||
38 | 48 | ||
39 | # Architecture independent paths | 49 | FILES_${PN} += "${prefix}" |
40 | export datadir = "${prefix}/share" | ||
41 | export sysconfdir = "${prefix}/etc" | ||
42 | export sharedstatedir = "${datadir}/com" | ||
43 | export localstatedir = "${prefix}/var" | ||
44 | export infodir = "${datadir}/info" | ||
45 | export mandir = "${datadir}/man" | ||
46 | export docdir = "${datadir}/doc" | ||
47 | export servicedir = "${prefix}/srv" | ||
48 | |||
49 | # Architecture dependent paths | ||
50 | export bindir = "${prefix}/bin" | ||
51 | export sbindir = "${prefix}/bin" | ||
52 | export libexecdir = "${prefix}/libexec" | ||
53 | export libdir = "${prefix}/lib" | ||
54 | export includedir = "${prefix}/include" | ||
55 | export oldincludedir = "${prefix}/include" | ||
56 | |||
57 | FILES_${PN} = "${prefix}" | ||
58 | FILES_${PN}-dbg += "${prefix}/.debug \ | 50 | FILES_${PN}-dbg += "${prefix}/.debug \ |
59 | ${prefix}/bin/.debug \ | 51 | ${prefix}/bin/.debug \ |
60 | " | 52 | " |
@@ -62,35 +54,18 @@ FILES_${PN}-dbg += "${prefix}/.debug \ | |||
62 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" | 54 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" |
63 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" | 55 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
64 | 56 | ||
65 | python () { | ||
66 | barch = bb.data.getVar('BUILD_ARCH', d, True) | ||
67 | archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split() | ||
68 | sdkarchs = [] | ||
69 | for arch in archs: | ||
70 | sdkarchs.append(barch + '-' + arch + '-sdk') | ||
71 | bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d) | ||
72 | } | ||
73 | |||
74 | python __anonymous () { | 57 | python __anonymous () { |
75 | pn = bb.data.getVar("PN", d, True) | 58 | pn = bb.data.getVar("PN", d, True) |
76 | depends = bb.data.getVar("DEPENDS", d, True) | 59 | depends = bb.data.getVar("DEPENDS", d, True) |
77 | deps = bb.utils.explode_deps(depends) | 60 | deps = bb.utils.explode_deps(depends) |
78 | newdeps = [] | 61 | newdeps = [] |
79 | if "nativesdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): | ||
80 | autoextend = True | ||
81 | else: | ||
82 | autoextend = False | ||
83 | for dep in deps: | 62 | for dep in deps: |
84 | if dep.endswith("-native") or dep.endswith("-cross"): | 63 | if dep.endswith("-native") or dep.endswith("-cross"): |
85 | newdeps.append(dep) | 64 | newdeps.append(dep) |
65 | elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc"): | ||
66 | newdeps.append(dep + "-crosssdk") | ||
86 | elif not dep.endswith("-nativesdk"): | 67 | elif not dep.endswith("-nativesdk"): |
87 | if autoextend: | 68 | newdeps.append(dep + "-nativesdk") |
88 | newdeps.append(dep + "-nativesdk") | ||
89 | elif pn == 'gcc-cross-nativesdk': | ||
90 | newdeps.append(dep) | ||
91 | else: | ||
92 | newdeps.append(dep) | ||
93 | bb.note("%s has depends %s which doesn't end in -nativesdk?" % (pn, dep)) | ||
94 | else: | 69 | else: |
95 | newdeps.append(dep) | 70 | newdeps.append(dep) |
96 | bb.data.setVar("DEPENDS", " ".join(newdeps), d) | 71 | bb.data.setVar("DEPENDS", " ".join(newdeps), d) |
@@ -99,12 +74,8 @@ python __anonymous () { | |||
99 | if prov.find(pn) != -1: | 74 | if prov.find(pn) != -1: |
100 | continue | 75 | continue |
101 | if not prov.endswith("-nativesdk"): | 76 | if not prov.endswith("-nativesdk"): |
102 | if autoextend: | 77 | provides = provides.replace(prov, prov + "-nativesdk") |
103 | provides = provides.replace(prov, prov + "-nativesdk") | ||
104 | #else: | ||
105 | # bb.note("%s has rouge PROVIDES of %s which doesn't end in -sdk?" % (pn, prov)) | ||
106 | bb.data.setVar("PROVIDES", provides, d) | 78 | bb.data.setVar("PROVIDES", provides, d) |
107 | |||
108 | } | 79 | } |
109 | 80 | ||
110 | 81 | ||
diff --git a/meta/packages/binutils/binutils-cross-nativesdk.inc b/meta/packages/binutils/binutils-cross-nativesdk.inc deleted file mode 100644 index 986ead43bb..0000000000 --- a/meta/packages/binutils/binutils-cross-nativesdk.inc +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | inherit nativesdk | ||
2 | DEPENDS += "flex-native bison-native" | ||
3 | EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \ | ||
4 | --program-prefix=${TARGET_PREFIX}" | ||
5 | |||
6 | do_stage() { | ||
7 | : | ||
8 | } | ||
9 | |||
10 | do_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-nativesdk_2.18.bb b/meta/packages/binutils/binutils-cross-nativesdk_2.18.bb deleted file mode 100644 index 7eb313f1f1..0000000000 --- a/meta/packages/binutils/binutils-cross-nativesdk_2.18.bb +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require binutils_${PV}.bb | ||
2 | require binutils-cross-nativesdk.inc | ||
3 | PR = "r3" | ||
diff --git a/meta/packages/binutils/binutils-cross-nativesdk_2.19.bb b/meta/packages/binutils/binutils-cross-nativesdk_2.19.bb deleted file mode 100644 index 3bb6e5e534..0000000000 --- a/meta/packages/binutils/binutils-cross-nativesdk_2.19.bb +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require binutils_${PV}.bb | ||
2 | require binutils-cross-nativesdk.inc | ||
3 | PR = "r0" | ||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb b/meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb deleted file mode 100644 index c76b5b3c07..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | PR = "r4" | ||
2 | |||
3 | require gcc-${PV}.inc | ||
4 | require gcc-cross-sdk.inc | ||
5 | require gcc-configure-sdk.inc | ||
6 | require gcc-package-sdk.inc | ||
7 | |||
8 | SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1' | ||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb b/meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb deleted file mode 100644 index 83f0ec865b..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | PR = "r6" | ||
2 | |||
3 | require gcc-${PV}.inc | ||
4 | require gcc-cross-sdk.inc | ||
5 | require gcc-configure-sdk.inc | ||
6 | require gcc-package-sdk.inc | ||
7 | |||
8 | DEPENDS += "gmp-native mpfr-native" | ||
9 | |||
10 | EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" | ||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb b/meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb deleted file mode 100644 index e2c641b49c..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | PR = "r3" | ||
2 | |||
3 | inherit nativesdk | ||
4 | |||
5 | require gcc-${PV}.inc | ||
6 | require gcc-cross-sdk.inc | ||
7 | require gcc-configure-sdk.inc | ||
8 | require gcc-package-sdk.inc | ||
9 | |||
10 | DEPENDS += "gmp-native mpfr-native" | ||
11 | |||
12 | EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ | ||
13 | --disable-libgomp --disable-libmudflap \ | ||
14 | --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" | ||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb b/meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb deleted file mode 100644 index f1d0cbe3d1..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | PR = "r6" | ||
2 | |||
3 | inherit nativesdk | ||
4 | |||
5 | require gcc-${PV}.inc | ||
6 | require gcc-cross-sdk.inc | ||
7 | require gcc-configure-sdk.inc | ||
8 | require gcc-package-sdk.inc | ||
9 | |||
10 | DEPENDS += "gmp-sdk mpfr-sdk" | ||
11 | |||
12 | EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ | ||
13 | --disable-libgomp --disable-libmudflap \ | ||
14 | --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}" | ||
15 | |||
16 | # to find libmpfr | ||
17 | export LD_LIBRARY_PATH = "${STAGING_LIBDIR}" | ||
18 | |||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb b/meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb deleted file mode 100644 index 993676f8da..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | PR = "r6" | ||
2 | |||
3 | inherit nativesdk | ||
4 | |||
5 | require gcc-${PV}.inc | ||
6 | require gcc-cross-sdk.inc | ||
7 | require gcc-configure-sdk.inc | ||
8 | require gcc-package-sdk.inc | ||
9 | |||
10 | DEPENDS += "gmp-sdk mpfr-sdk" | ||
11 | |||
12 | EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \ | ||
13 | --disable-libgomp --disable-libmudflap \ | ||
14 | --with-mpfr=${STAGING_DIR_NATIVE}${native_prefix}" | ||
15 | |||
16 | # to find libmpfr | ||
17 | export LD_LIBRARY_PATH = "${STAGING_LIBDIR}" | ||
18 | |||
diff --git a/meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb b/meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb deleted file mode 100644 index 51b2fccb50..0000000000 --- a/meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | PR = "r3" | ||
2 | |||
3 | inherit nativesdk | ||
4 | |||
5 | require gcc-${PV}.inc | ||
6 | require gcc-cross-sdk.inc | ||
7 | require gcc-configure-sdk.inc | ||
8 | require gcc-package-sdk.inc | ||