]> code.ossystems Code Review - openembedded-core.git/commitdiff
nativesdk: Convert to use crosssdk toolchain and remove binutils/gcc nativesdk recipes
authorRichard Purdie <rpurdie@linux.intel.com>
Wed, 16 Sep 2009 23:52:53 +0000 (00:52 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 17 Sep 2009 21:25:23 +0000 (22:25 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/nativesdk.bbclass
meta/packages/binutils/binutils-cross-nativesdk.inc [deleted file]
meta/packages/binutils/binutils-cross-nativesdk_2.18.bb [deleted file]
meta/packages/binutils/binutils-cross-nativesdk_2.19.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_3.4.4.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_4.1.2.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_4.2.3.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_4.3.1.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_4.3.3.bb [deleted file]
meta/packages/gcc/gcc-cross-nativesdk_csl-arm-2005q3.bb [deleted file]

index 59d3320c3c08449e87e14f1375abd4d052204554..964d39955bb90036d58da30aa0fc5a20badb2a65 100644 (file)
@@ -2,59 +2,51 @@
 # or indirectly via dependency.  No need to be in 'world'.
 EXCLUDE_FROM_WORLD = "1"
 
-# Save MULTIMACH_ARCH
-OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}"
-# Save PACKAGE_ARCH
-OLD_PACKAGE_ARCH := ${PACKAGE_ARCH}
-PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk"
-# Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
-OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
-BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
+#
+# Update BASE_PACKAGE_ARCH and PACKAGE_ARCHS
+#
+OLD_PACKAGE_ARCH := ${BASE_PACKAGE_ARCH}
+BASE_PACKAGE_ARCH = "${HOST_ARCH}-${OLD_PACKAGE_ARCH}-nativesdk"
+python () {
+    barch = bb.data.getVar('HOST_ARCH', d, True)
+    archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
+    sdkarchs = []
+    for arch in archs:
+        sdkarchs.append(barch + '-' + arch + '-nativesdk')
+    bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
+}
+
+#STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-nativesdk"
+#STAGING_DIR_TARGET = "${STAGING_DIR}/${BASEPKG_TARGET_SYS}-nativesdk"
+
+CROSS_DIR = "${TMPDIR}/cross/${HOST_ARCH}"
 
-STAGING_DIR_HOST = "${STAGING_DIR}/${HOST_SYS}-sdk"
-STAGING_DIR_TARGET = "${STAGING_DIR}/${OLD_MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
+TARGET_LDFLAGS += "-Wl,-dynamic-linker=${SDKPATH}/lib/ld-linux.so.2"
 
-HOST_ARCH = "${BUILD_ARCH}"
-HOST_VENDOR = "${BUILD_VENDOR}"
-HOST_OS = "${BUILD_OS}"
-HOST_PREFIX = "${BUILD_PREFIX}"
-HOST_CC_ARCH = "${BUILD_CC_ARCH}"
+HOST_ARCH = "${SDK_ARCH}"
+HOST_VENDOR = "${SDK_VENDOR}"
+HOST_OS = "${SDK_OS}"
+HOST_PREFIX = "${SDK_PREFIX}"
+HOST_CC_ARCH = "${SDK_CC_ARCH}"
 #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}"
 
+TARGET_ARCH = "${SDK_ARCH}"
+TARGET_VENDOR = "${SDK_VENDOR}"
+TARGET_OS = "${SDK_OS}"
+TARGET_PREFIX = "${SDK_PREFIX}"
+TARGET_CC_ARCH = "${SDK_CC_ARCH}"
+
 CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
 CFLAGS = "${BUILDSDK_CFLAGS}"
 CXXFLAGS = "${BUILDSDK_CFLAGS}"
 LDFLAGS = "${BUILDSDK_LDFLAGS}"
 
-# Path prefixes
+# Change to place files in SDKPATH
 prefix = "${SDKPATH}"
-exec_prefix = "${prefix}"
-base_prefix = "${prefix}"
-
-# Base paths
-export base_bindir = "${prefix}/bin"
-export base_sbindir = "${prefix}/bin"
-export base_libdir = "${prefix}/lib"
+exec_prefix = "${SDKPATH}"
+base_prefix = "${SDKPATH}"
 
-# Architecture independent paths
-export datadir = "${prefix}/share"
-export sysconfdir = "${prefix}/etc"
-export sharedstatedir = "${datadir}/com"
-export localstatedir = "${prefix}/var"
-export infodir = "${datadir}/info"
-export mandir = "${datadir}/man"
-export docdir = "${datadir}/doc"
-export servicedir = "${prefix}/srv"
-
-# Architecture dependent paths
-export bindir = "${prefix}/bin"
-export sbindir = "${prefix}/bin"
-export libexecdir = "${prefix}/libexec"
-export libdir = "${prefix}/lib"
-export includedir = "${prefix}/include"
-export oldincludedir = "${prefix}/include"
-
-FILES_${PN} = "${prefix}"
+FILES_${PN} += "${prefix}"
 FILES_${PN}-dbg += "${prefix}/.debug \
                     ${prefix}/bin/.debug \
                    "
@@ -62,35 +54,18 @@ FILES_${PN}-dbg += "${prefix}/.debug \
 export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig"
 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
 
-python () {
-    barch = bb.data.getVar('BUILD_ARCH', d, True)
-    archs = bb.data.getVar('PACKAGE_ARCHS', d, True).split()
-    sdkarchs = []
-    for arch in archs:
-        sdkarchs.append(barch + '-' + arch + '-sdk')
-    bb.data.setVar('PACKAGE_ARCHS', " ".join(sdkarchs), d)
-}
-
 python __anonymous () {
     pn = bb.data.getVar("PN", d, True)
     depends = bb.data.getVar("DEPENDS", d, True)
     deps = bb.utils.explode_deps(depends)
     newdeps = []
-    if "nativesdk" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""):
-        autoextend = True
-    else:
-        autoextend = False
     for dep in deps:
         if dep.endswith("-native") or dep.endswith("-cross"):
             newdeps.append(dep)
+        elif dep.endswith("-gcc-intermediate") or dep.endswith("-gcc-initial") or dep.endswith("-gcc"):
+            newdeps.append(dep + "-crosssdk")
         elif not dep.endswith("-nativesdk"):
-            if autoextend:
-                newdeps.append(dep + "-nativesdk")
-            elif pn == 'gcc-cross-nativesdk':
-                newdeps.append(dep)
-            else:
-                newdeps.append(dep)
-                bb.note("%s has depends %s which doesn't end in -nativesdk?" % (pn, dep))
+            newdeps.append(dep + "-nativesdk")
         else:
             newdeps.append(dep)
     bb.data.setVar("DEPENDS", " ".join(newdeps), d)
@@ -99,12 +74,8 @@ python __anonymous () {
         if prov.find(pn) != -1:
             continue
         if not prov.endswith("-nativesdk"):
-            if autoextend:
-                provides = provides.replace(prov, prov + "-nativesdk")
-            #else:
-            #    bb.note("%s has rouge PROVIDES of %s which doesn't end in -sdk?" % (pn, prov))
+            provides = provides.replace(prov, prov + "-nativesdk")
     bb.data.setVar("PROVIDES", provides, d)
-
 }
 
 
diff --git a/meta/packages/binutils/binutils-cross-nativesdk.inc b/meta/packages/binutils/binutils-cross-nativesdk.inc
deleted file mode 100644 (file)
index 986ead4..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-inherit nativesdk
-DEPENDS += "flex-native bison-native"
-EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \
-               --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
-       :
-}
-
-do_install () {
-        autotools_do_install
-
-       # Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks
-       rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
-       rm ${D}${prefix}/${TARGET_SYS}/bin/*
-       for l in ${D}${bindir}/*; do
-               ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
-       done
-
-        # Install the libiberty header
-        install -d ${D}${includedir}
-        install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
-        install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-}
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 (file)
index 7eb313f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require binutils_${PV}.bb
-require binutils-cross-nativesdk.inc
-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 (file)
index 3bb6e5e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-require binutils_${PV}.bb
-require binutils-cross-nativesdk.inc
-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 (file)
index c76b5b3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-PR = "r4"
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-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 (file)
index 83f0ec8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-PR = "r6"
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-DEPENDS += "gmp-native mpfr-native"
-
-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 (file)
index e2c641b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-PR = "r3"
-
-inherit nativesdk
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-DEPENDS += "gmp-native mpfr-native"
-
-EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
-               --disable-libgomp --disable-libmudflap \
-               --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 (file)
index f1d0cbe..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-PR = "r6"
-
-inherit nativesdk
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-DEPENDS += "gmp-sdk mpfr-sdk"
-
-EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
-               --disable-libgomp --disable-libmudflap \
-               --with-mpfr=${STAGING_DIR_NATIVE}${prefix_native}"
-
-# to find libmpfr
-export LD_LIBRARY_PATH = "${STAGING_LIBDIR}"
-
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 (file)
index 993676f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-PR = "r6"
-
-inherit nativesdk
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc
-
-DEPENDS += "gmp-sdk mpfr-sdk"
-
-EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
-               --disable-libgomp --disable-libmudflap \
-               --with-mpfr=${STAGING_DIR_NATIVE}${native_prefix}"
-
-# to find libmpfr
-export LD_LIBRARY_PATH = "${STAGING_LIBDIR}"
-
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 (file)
index 51b2fcc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-PR = "r3"
-
-inherit nativesdk
-
-require gcc-${PV}.inc
-require gcc-cross-sdk.inc
-require gcc-configure-sdk.inc
-require gcc-package-sdk.inc