summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-07-10 15:54:38 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-17 18:02:55 +0100
commit5ed19a40f407efa1e6a2043bd8e36d729968c446 (patch)
treef8fe6632db34c213d97a2849a1d942219b9c1fd8 /meta/classes
parent0082a64386372bf25b72ed2e18ef6c3e1e756c42 (diff)
downloadpoky-5ed19a40f407efa1e6a2043bd8e36d729968c446.tar.gz
toolchain-scripts: Sync the SDK/ADT values to the build system
The build system passes specific TUNE (fundamental) flag values to various tools instead of using a shell wrapper or similar. It is important that the build system and ADT/SDK match the behaviors exactly, or we are likely to have differences in the way build-system and external components are built leading to configuration, compilation and/or run-time problems. (From OE-Core rev: 2bd0aaf98c5d586638d82f5f22c1c24122a889a3) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/toolchain-scripts.bbclass63
1 files changed, 45 insertions, 18 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index bedcd612fe..bf37ec9ac8 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -14,9 +14,18 @@ toolchain_create_sdk_env_script () {
14 echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script 14 echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
15 echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script 15 echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
16 echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script 16 echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
17 echo 'export CC=${TARGET_PREFIX}gcc' >> $script 17 echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
18 echo 'export CXX=${TARGET_PREFIX}g++' >> $script 18 echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
19 echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
20 echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
21 echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
19 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script 22 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
23 echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
24 echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
25 echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
26 echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
27 echo 'export AR=${TARGET_PREFIX}-ar' >> $script
28 echo 'export NM=${TARGET_PREFIX}-nm' >> $script
20 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script 29 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
21 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script 30 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
22 if [ "${TARGET_OS}" = "darwin8" ]; then 31 if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -26,10 +35,10 @@ toolchain_create_sdk_env_script () {
26 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr 35 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
27 ln -s /usr/local local 36 ln -s /usr/local local
28 fi 37 fi
29 echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script 38 echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
30 echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script 39 echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
31 echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script 40 echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
32 echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script 41 echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
33 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script 42 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
34 echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script 43 echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script
35 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script 44 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
@@ -49,9 +58,18 @@ toolchain_create_tree_env_script () {
49 58
50 echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script 59 echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
51 60
52 echo 'export CC=${TARGET_PREFIX}gcc' >> $script 61 echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
53 echo 'export CXX=${TARGET_PREFIX}g++' >> $script 62 echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
63 echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
64 echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
65 echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
54 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script 66 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
67 echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
68 echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
69 echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
70 echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
71 echo 'export AR=${TARGET_PREFIX}-ar' >> $script
72 echo 'export NM=${TARGET_PREFIX}-nm' >> $script
55 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script 73 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
56 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script 74 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
57 if [ "${TARGET_OS}" = "darwin8" ]; then 75 if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -61,10 +79,10 @@ toolchain_create_tree_env_script () {
61 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr 79 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
62 ln -s /usr/local local 80 ln -s /usr/local local
63 fi 81 fi
64 echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script 82 echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
65 echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script 83 echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
66 echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script 84 echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
67 echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script 85 echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
68 echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script 86 echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
69 echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script 87 echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
70 echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script 88 echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script
@@ -83,9 +101,18 @@ toolchain_create_sdk_env_script_for_installer () {
83 echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script 101 echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
84 echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script 102 echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script
85 echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script 103 echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
86 echo 'export CC=${TARGET_PREFIX}gcc' >> $script 104 echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
87 echo 'export CXX=${TARGET_PREFIX}g++' >> $script 105 echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
106 echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
107 echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
108 echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
88 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script 109 echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
110 echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
111 echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
112 echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
113 echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
114 echo 'export AR=${TARGET_PREFIX}-ar' >> $script
115 echo 'export NM=${TARGET_PREFIX}-nm' >> $script
89 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script 116 echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
90 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script 117 echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script
91 if [ "${TARGET_OS}" = "darwin8" ]; then 118 if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -95,10 +122,10 @@ toolchain_create_sdk_env_script_for_installer () {
95 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr 122 cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
96 ln -s /usr/local local 123 ln -s /usr/local local
97 fi 124 fi
98 echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script 125 echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
99 echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script 126 echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
100 echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script 127 echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
101 echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script 128 echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
102 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script 129 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
103 echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script 130 echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
104 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script 131 echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script