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

Torben Hohn torben.hohn at linutronix.de
Thu Feb 8 16:45:21 CET 2018


On Thu, Feb 08, 2018 at 02:17:05PM +0100, Manuel Traut wrote:
> 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>

Reviewed-by: Torben Hohn <torben.hohn 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
> 

-- 
Mit freundlichen Grüßen
Torben Hohn

Linutronix GmbH

Standort: Bremen

Phone: +49 7556 25 999 18; Fax.: +49 7556 25 999 99

Firmensitz / Registered Office: D-88690 Uhldingen, Bahnhofstr. 3
Registergericht / Local District Court: Amtsgericht Freiburg i. Br.; HRB
Nr. / Trade register no.: 700 806

Geschäftsführer / Managing Directors: Heinz Egger, Thomas Gleixner

Eine Bitte von uns: Sollten Sie diese E-Mail irrtümlich erhalten haben,
benachrichtigen Sie uns in diesem Falle bitte sobald wie es Ihnen
möglich ist, durch Antwort-Mail. Vielen Dank!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.linutronix.de/pipermail/elbe-devel/attachments/20180208/4648b439/attachment.sig>


More information about the elbe-devel mailing list