summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-09-17 00:52:53 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-17 22:25:23 +0100
commitca667135a3b5358ebf51e3e2709ec6005f19f48b (patch)
tree0da98a2c571b6fae5ae0729b59da33e1e413ce53 /meta
parentafa02c54709474cee4bb91368a823a8678f57998 (diff)
downloadpoky-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.bbclass105
-rw-r--r--meta/packages/binutils/binutils-cross-nativesdk.inc24
-rw-r--r--meta/packages/binutils/binutils-cross-nativesdk_2.18.bb3
-rw-r--r--meta/packages/binutils/binutils-cross-nativesdk_2.19.bb3
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb8
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb10
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb14
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb18
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb18
-rw-r--r--meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb8
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'.
3EXCLUDE_FROM_WORLD = "1" 3EXCLUDE_FROM_WORLD = "1"
4 4
5# Save MULTIMACH_ARCH 5#
6OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" 6# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
7# Save PACKAGE_ARCH 7#
8OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} 8OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
9PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk" 9BASE_PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk"
10# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it 10python () {
11OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" 11 barch = bb.data.getVar('HOST_ARCH', d, True)
12BASE_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
22CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
13 23
14STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-sdk" 24TARGET_LDFLAGS += "-Wl,-dynamic-linker=${SDKPATH}/lib/ld-linux.so.2"
15STAGING_DIR_TARGET = "${STAGING_DIR}/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
16 25
17HOST_ARCH = "${BUILD_ARCH}" 26HOST_ARCH = "${SDK_ARCH}"
18HOST_VENDOR = "${BUILD_VENDOR}" 27HOST_VENDOR = "${SDK_VENDOR}"
19HOST_OS = "${BUILD_OS}" 28HOST_OS = "${SDK_OS}"
20HOST_PREFIX = "${BUILD_PREFIX}" 29HOST_PREFIX = "${SDK_PREFIX}"
21HOST_CC_ARCH = "${BUILD_CC_ARCH}" 30HOST_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
33TARGET_ARCH = "${SDK_ARCH}"
34TARGET_VENDOR = "${SDK_VENDOR}"
35TARGET_OS = "${SDK_OS}"
36TARGET_PREFIX = "${SDK_PREFIX}"
37TARGET_CC_ARCH = "${SDK_CC_ARCH}"
38
24CPPFLAGS = "${BUILDSDK_CPPFLAGS}" 39CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
25CFLAGS = "${BUILDSDK_CFLAGS}" 40CFLAGS = "${BUILDSDK_CFLAGS}"
26CXXFLAGS = "${BUILDSDK_CFLAGS}" 41CXXFLAGS = "${BUILDSDK_CFLAGS}"
27LDFLAGS = "${BUILDSDK_LDFLAGS}" 42LDFLAGS = "${BUILDSDK_LDFLAGS}"
28 43
29# Path prefixes 44# Change to place files in SDKPATH
30prefix = "${SDKPATH}" 45prefix = "${SDKPATH}"
31exec_prefix = "${prefix}" 46exec_prefix = "${SDKPATH}"
32base_prefix = "${prefix}" 47base_prefix = "${SDKPATH}"
33
34# Base paths
35export base_bindir = "${prefix}/bin"
36export base_sbindir = "${prefix}/bin"
37export base_libdir = "${prefix}/lib"
38 48
39# Architecture independent paths 49FILES_${PN} += "${prefix}"
40export datadir = "${prefix}/share"
41export sysconfdir = "${prefix}/etc"
42export sharedstatedir = "${datadir}/com"
43export localstatedir = "${prefix}/var"
44export infodir = "${datadir}/info"
45export mandir = "${datadir}/man"
46export docdir = "${datadir}/doc"
47export servicedir = "${prefix}/srv"
48
49# Architecture dependent paths
50export bindir = "${prefix}/bin"
51export sbindir = "${prefix}/bin"
52export libexecdir = "${prefix}/libexec"
53export libdir = "${prefix}/lib"
54export includedir = "${prefix}/include"
55export oldincludedir = "${prefix}/include"
56
57FILES_${PN} = "${prefix}"
58FILES_${PN}-dbg += "${prefix}/.debug \ 50FILES_${PN}-dbg += "${prefix}/.debug \
59 ${prefix}/bin/.debug \ 51 ${prefix}/bin/.debug \
60 " 52 "
@@ -62,35 +54,18 @@ FILES_${PN}-dbg += "${prefix}/.debug \
62export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" 54export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
63export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" 55export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
64 56
65python () {
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
74python __anonymous () { 57python __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 @@
1inherit nativesdk
2DEPENDS += "flex-native bison-native"
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-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 @@
1require binutils_${PV}.bb
2require binutils-cross-nativesdk.inc
3PR = "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 @@
1require binutils_${PV}.bb
2require binutils-cross-nativesdk.inc
3PR = "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 @@
1PR = "r4"
2
3require gcc-${PV}.inc
4require gcc-cross-sdk.inc
5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc
7
8SRC_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 @@
1PR = "r6"
2
3require gcc-${PV}.inc
4require gcc-cross-sdk.inc
5require gcc-configure-sdk.inc
6require gcc-package-sdk.inc
7
8DEPENDS += "gmp-native mpfr-native"
9
10EXTRA_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 @@
1PR = "r3"
2
3inherit nativesdk
4
5require gcc-${PV}.inc
6require gcc-cross-sdk.inc
7require gcc-configure-sdk.inc
8require gcc-package-sdk.inc
9
10DEPENDS += "gmp-native mpfr-native"
11
12EXTRA_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 @@
1PR = "r6"
2
3inherit nativesdk
4
5require gcc-${PV}.inc
6require gcc-cross-sdk.inc
7require gcc-configure-sdk.inc
8require gcc-package-sdk.inc
9
10DEPENDS += "gmp-sdk mpfr-sdk"
11
12EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
13 --disable-libgomp --disable-libmudflap \
14 --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
15
16# to find libmpfr
17export 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 @@
1PR = "r6"
2
3inherit nativesdk
4
5require gcc-${PV}.inc
6require gcc-cross-sdk.inc
7require gcc-configure-sdk.inc
8require gcc-package-sdk.inc
9
10DEPENDS += "gmp-sdk mpfr-sdk"
11
12EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
13 --disable-libgomp --disable-libmudflap \
14 --with-mpfr=${STAGING_DIR_NATIVE}${native_prefix}"
15
16# to find libmpfr
17export 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 @@
1PR = "r3"
2
3inherit nativesdk
4
5require gcc-${PV}.inc
6require gcc-cross-sdk.inc
7require gcc-configure-sdk.inc
8require gcc-package-sdk.inc