summaryrefslogtreecommitdiffstats
path: root/meta/classes/nativesdk.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-09-16 23:52:53 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2009-09-17 21:25:23 (GMT)
commitca667135a3b5358ebf51e3e2709ec6005f19f48b (patch)
tree0da98a2c571b6fae5ae0729b59da33e1e413ce53 /meta/classes/nativesdk.bbclass
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/classes/nativesdk.bbclass')
-rw-r--r--meta/classes/nativesdk.bbclass105
1 files changed, 38 insertions, 67 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index 59d3320..964d399 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