[elbe-devel] [PATCH v2 19/24] sdk/environment-setup: add file

Manuel Traut manut at linutronix.de
Thu Feb 8 14:17:05 CET 2018


This is based on 'meta/classes/toolchain-scripts.bbclass' see file
header for copyright details.

It was modified to be a mako template.

Signed-off-by: Manuel Traut <manut at linutronix.de>
---
 elbepack/makofiles/environment-setup-elbe.mako | 93 ++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)
 create mode 100644 elbepack/makofiles/environment-setup-elbe.mako

diff --git a/elbepack/makofiles/environment-setup-elbe.mako b/elbepack/makofiles/environment-setup-elbe.mako
new file mode 100644
index 00000000..095101c7
--- /dev/null
+++ b/elbepack/makofiles/environment-setup-elbe.mako
@@ -0,0 +1,93 @@
+# This file was copied from http://git.yoctoproject.org/git/poky
+#                           16e22f3e37788afb83044f5089d24187d70094bd
+#
+# origin location of the file is: 'meta/classes/toolchain-scripts.bbclass'
+#
+# known authors of the origin file are:
+#
+# Richard Purdie <richard.purdie at linuxfoundation.org>
+# Lianhao Lu <lianhao.lu at intel.com>
+# Jessica Zhang <jessica.zhang at intel.com>
+# Richard Purdie <rpurdie at linux.intel.com>
+# Joshua Lock <joshua.g.lock at intel.com>
+# Mark Hatle <mark.hatle at windriver.com>
+# Otavio Salvador <otavio at ossystems.com.br>
+# Randy Witt <randy.e.witt at linux.intel.com>
+# Dongxiao Xu <dongxiao.xu at intel.com>
+# Joshua Lock <josh at linux.intel.com>
+# Khem Raj <raj.khem at gmail.com>
+# Robert Yang <liezhi.yang at windriver.com>
+# Ross Burton <ross.burton at intel.com>
+# Stephano Cetola <stephano.cetola at linux.intel.com>
+# Zongchun Yu <b40527 at freescale.com>
+# Andre McCurdy <armccurdy at gmail.com>
+# Christopher Larson <chris_larson at mentor.com>
+# Denys Dmytriyenko <denys at ti.com>
+# Fang Jia <fang.jia at windriver.com>
+# Jacob Kroon <jacob.kroon at gmail.com>
+# Jun Zhang <jun.zhang at windriver.com>
+# Kevin Tian <kevin.tian at intel.com>
+# Koen Kooi <koen at dominion.thruhere.net>
+# Laszlo Papp <lpapp at kde.org>
+# Laurentiu Palcu <laurentiu.palcu at intel.com>
+# Martin Ertsaas <mertsas at cisco.com>
+# Nitin A Kamble <nitin.a.kamble at intel.com>
+#
+# The 'meta' folder of the origin repo contains a
+# COPYING.GPLv2 and COPYING.MIT file.
+
+# Check for LD_LIBRARY_PATH being set, which can break SDK and generally is a bad practice
+# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
+# http://xahlee.info/UnixResource_dir/_/ldpath.html
+# Only disable this check if you are absolutely know what you are doing!
+if [ ! -z "$LD_LIBRARY_PATH" ]; then
+    echo "Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'"
+    echo "but please check why this was set in the first place and that it's safe to unset."
+    echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."
+    echo "For more references see:"
+    echo "  http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"
+    echo "  http://xahlee.info/UnixResource_dir/_/ldpath.html"
+    return 1
+fi
+export SDKTARGETSYSROOT=/opt/elbe-sdk/sysroots/target
+export PATH=/opt/elbe-sdk/sysroots/host/usr/bin:/opt/elbe-sdk/sysroots/host/usr/sbin:/opt/elbe-sdk/sysroots/host/bin:/opt/elbe-sdk/sysroots/host/sbin:$PATH
+export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
+export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/${real_multimach_target_sys}/pkgconfig
+export OECORE_NATIVE_SYSROOT="/opt/elbe-sdk/sysroots/host"
+export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
+export CC="${real_multimach_target_sys}-gcc --sysroot=$SDKTARGETSYSROOT"
+export CXX="${real_multimach_target_sys}-g++ --sysroot=$SDKTARGETSYSROOT"
+export CPP="${real_multimach_target_sys}-gcc -E --sysroot=$SDKTARGETSYSROOT"
+export AS="${real_multimach_target_sys}-as"
+export LD="${real_multimach_target_sys}-ld --sysroot=$SDKTARGETSYSROOT"
+export GDB=${real_multimach_target_sys}-gdb
+export STRIP=${real_multimach_target_sys}-strip
+export RANLIB=${real_multimach_target_sys}-ranlib
+export OBJCOPY=${real_multimach_target_sys}-objcopy
+export OBJDUMP=${real_multimach_target_sys}-objdump
+export AR=${real_multimach_target_sys}-ar
+export NM=${real_multimach_target_sys}-nm
+export M4=m4
+export TARGET_PREFIX=${real_multimach_target_sys}-
+export CONFIGURE_FLAGS="--target=${sdk_arch}-linux --host=${real_multimach_target_sys} --build=${sdk_arch}-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"
+export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
+export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
+export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
+export CPPFLAGS=""
+export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"
+export OECORE_DISTRO_VERSION="${sdk_version}"
+export OECORE_SDK_VERSION="${sdk_version}"
+export ARCH=x86
+export CROSS_COMPILE=${real_multimach_target_sys}-
+
+# Append environment subscripts
+if [ -d "$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then
+    for envfile in $OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do
+      . $envfile
+    done
+fi
+if [ -d "$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
+    for envfile in $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
+      . $envfile
+    done
+fi
-- 
2.15.1




More information about the elbe-devel mailing list