All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: [PATCH 0/1] Build system/SDK/ADT differ in toolchain config
@ 2012-07-10 20:54 Mark Hatle
  2012-07-10 20:54 ` RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system Mark Hatle
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2012-07-10 20:54 UTC (permalink / raw)
  To: yocto, openembedded-core

(Yes this is intentionally cross posted to both the Yocto Project list and the
oe-core list.  The code affects the generated SDK, as well as potentially
ADT imported SDKs... so both sides need to be verified and commented on to
say if this is a reasonable change.)

The problem we found is that if you have a tune that specifies a
TUNE_LDARGS in such as "-m elf_x86_64", it was being added to the LDFLAGS in
the environment script.  When you went to run configure, the LDFLAGS were
loaded, but 'gcc' was used as ld.  Causing -m elf_x86_64 to spit out an error
that it was invalid..

Comparing the build system to the SDK/ADT export, it was clear that the
TUNE_*ARGS were being passed directly on the CC, LD, CXX, AS, etc lines
and not as part of their "optional" arguments.  The change in question
syncs up the build system and the SDK/ADT exports to be the same, ensuring
that CC= is the same within and externally to the build system.

I tested that the following works:

${CC} hello.c -o hello

make CC="${CC}"  (note the " is important!)

./configure ....
make

What I did -not- test was the ADT Installer/import tooling into eclipse or
any other frameworks.

The following changes since commit ce37c45abb4cf43e5009867f695982de2eb33450:

  subversion: do_install failed (parallel issue) (2012-07-10 20:34:41 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib mhatle/sdk
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=mhatle/sdk

Mark Hatle (1):
  toolchain-scripts: Sync the SDK/ADT values to the build system

 meta/classes/toolchain-scripts.bbclass |   63 +++++++++++++++++++++++---------
 1 files changed, 45 insertions(+), 18 deletions(-)

-- 
1.7.3.4



^ permalink raw reply	[flat|nested] 5+ messages in thread

* RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system
  2012-07-10 20:54 RFC: [PATCH 0/1] Build system/SDK/ADT differ in toolchain config Mark Hatle
@ 2012-07-10 20:54 ` Mark Hatle
  2012-07-11 10:48     ` Richard Purdie
  2012-07-18  7:52   ` Saul Wold
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Hatle @ 2012-07-10 20:54 UTC (permalink / raw)
  To: yocto, openembedded-core

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.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/toolchain-scripts.bbclass |   63 +++++++++++++++++++++++---------
 1 files changed, 45 insertions(+), 18 deletions(-)

diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index bedcd61..bf37ec9 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -14,9 +14,18 @@ toolchain_create_sdk_env_script () {
 	echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
 	echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
-	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
-	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
+	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
+	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
+	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
+	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
+	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
 	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
+	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
+	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
+	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
+	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
+	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
+	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
 	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
 	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
 	if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -26,10 +35,10 @@ toolchain_create_sdk_env_script () {
 		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
 		ln -s /usr/local local
 	fi
-	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
-	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
-	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
-	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
+	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
+	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
+	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
+	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
 	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
 	echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script
 	echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
@@ -49,9 +58,18 @@ toolchain_create_tree_env_script () {
 
 	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
 
-	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
-	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
+	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
+	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
 	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
+	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
+	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
+	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
+	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
+	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
+	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
 	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
 	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
 	if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -61,10 +79,10 @@ toolchain_create_tree_env_script () {
 		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
 		ln -s /usr/local local
 	fi
-	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
-	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
-	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
-	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
+	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
+	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
+	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
+	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
 	echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
 	echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
 	echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script
@@ -83,9 +101,18 @@ toolchain_create_sdk_env_script_for_installer () {
 	echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
 	echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script
 	echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
-	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
-	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
+	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
+	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
+	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
+	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
+	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
 	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
+	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
+	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
+	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
+	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
+	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
+	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
 	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
 	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script
 	if [ "${TARGET_OS}" = "darwin8" ]; then
@@ -95,10 +122,10 @@ toolchain_create_sdk_env_script_for_installer () {
 		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
 		ln -s /usr/local local
 	fi
-	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
-	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
-	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
-	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
+	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
+	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
+	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
+	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
 	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
 	echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
         echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
-- 
1.7.3.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system
  2012-07-10 20:54 ` RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system Mark Hatle
@ 2012-07-11 10:48     ` Richard Purdie
  2012-07-18  7:52   ` Saul Wold
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-07-11 10:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: yocto

On Tue, 2012-07-10 at 15:54 -0500, Mark Hatle wrote:
> 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.
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  meta/classes/toolchain-scripts.bbclass |   63 +++++++++++++++++++++++---------
>  1 files changed, 45 insertions(+), 18 deletions(-)

I'm all for merging this. Jessica, is this likely to cause any problems
for the ADT?

Cheers,

Richard


> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index bedcd61..bf37ec9 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -14,9 +14,18 @@ toolchain_create_sdk_env_script () {
>  	echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
>  	echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
>  	echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -26,10 +35,10 @@ toolchain_create_sdk_env_script () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script
>  	echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
> @@ -49,9 +58,18 @@ toolchain_create_tree_env_script () {
>  
>  	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
>  
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -61,10 +79,10 @@ toolchain_create_tree_env_script () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
>  	echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script
> @@ -83,9 +101,18 @@ toolchain_create_sdk_env_script_for_installer () {
>  	echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
>  	echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script
>  	echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -95,10 +122,10 @@ toolchain_create_sdk_env_script_for_installer () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
>          echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system
@ 2012-07-11 10:48     ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2012-07-11 10:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: yocto

On Tue, 2012-07-10 at 15:54 -0500, Mark Hatle wrote:
> 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.
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  meta/classes/toolchain-scripts.bbclass |   63 +++++++++++++++++++++++---------
>  1 files changed, 45 insertions(+), 18 deletions(-)

I'm all for merging this. Jessica, is this likely to cause any problems
for the ADT?

Cheers,

Richard


> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index bedcd61..bf37ec9 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -14,9 +14,18 @@ toolchain_create_sdk_env_script () {
>  	echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
>  	echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
>  	echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -26,10 +35,10 @@ toolchain_create_sdk_env_script () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script
>  	echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
> @@ -49,9 +58,18 @@ toolchain_create_tree_env_script () {
>  
>  	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
>  
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -61,10 +79,10 @@ toolchain_create_tree_env_script () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
>  	echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script
> @@ -83,9 +101,18 @@ toolchain_create_sdk_env_script_for_installer () {
>  	echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
>  	echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script
>  	echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
>  	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>  	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>  	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script
>  	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -95,10 +122,10 @@ toolchain_create_sdk_env_script_for_installer () {
>  		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>  		ln -s /usr/local local
>  	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>  	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>  	echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
>          echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system
  2012-07-10 20:54 ` RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system Mark Hatle
  2012-07-11 10:48     ` Richard Purdie
@ 2012-07-18  7:52   ` Saul Wold
  1 sibling, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-07-18  7:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On 07/10/2012 01:54 PM, Mark Hatle wrote:
> 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.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>   meta/classes/toolchain-scripts.bbclass |   63 +++++++++++++++++++++++---------
>   1 files changed, 45 insertions(+), 18 deletions(-)
>
> diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
> index bedcd61..bf37ec9 100644
> --- a/meta/classes/toolchain-scripts.bbclass
> +++ b/meta/classes/toolchain-scripts.bbclass
> @@ -14,9 +14,18 @@ toolchain_create_sdk_env_script () {
>   	echo 'export PKG_CONFIG_SYSROOT_DIR=${SDKTARGETSYSROOT}' >> $script
>   	echo 'export PKG_CONFIG_PATH=${SDKTARGETSYSROOT}${libdir}/pkgconfig' >> $script
>   	echo 'export CONFIG_SITE=${SDKPATH}/site-config-${REAL_MULTIMACH_TARGET_SYS}' >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
>   	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>   	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>   	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=${SDKTARGETSYSROOT}"' >> $script
>   	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -26,10 +35,10 @@ toolchain_create_sdk_env_script () {
>   		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>   		ln -s /usr/local local
>   	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${SDKTARGETSYSROOT}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>   	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>   	echo 'export OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"' >> $script
>   	echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
> @@ -49,9 +58,18 @@ toolchain_create_tree_env_script () {
>
>   	echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script
>
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
>   	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>   	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>   	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${BUILD_SYS} --with-libtool-sysroot=${STAGING_DIR_TARGET}"' >> $script
>   	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -61,10 +79,10 @@ toolchain_create_tree_env_script () {
>   		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>   		ln -s /usr/local local
>   	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=${STAGING_DIR_TARGET}"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>   	echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
>   	echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
>   	echo 'export OECORE_ACLOCAL_OPTS="-I ${STAGING_DIR_NATIVE}/usr/share/aclocal"' >> $script
> @@ -83,9 +101,18 @@ toolchain_create_sdk_env_script_for_installer () {
>   	echo 'export PKG_CONFIG_SYSROOT_DIR=##SDKTARGETSYSROOT##' >> $script
>   	echo 'export PKG_CONFIG_PATH=##SDKTARGETSYSROOT##${target_libdir}/pkgconfig' >> $script
>   	echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script
> -	echo 'export CC=${TARGET_PREFIX}gcc' >> $script
> -	echo 'export CXX=${TARGET_PREFIX}g++' >> $script
> +	echo 'export CC="${TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CXX="${TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CPP="${TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export AS="${TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script
> +	echo 'export LD="${TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
>   	echo 'export GDB=${TARGET_PREFIX}gdb' >> $script
> +	echo 'export STRIP=${TARGET_PREFIX}strip' >> $script
> +	echo 'export RANLIB=${TARGET_PREFIX}ranlib' >> $script
> +	echo 'export OBJCOPY=${TARGET_PREFIX}objcopy' >> $script
> +	echo 'export OBJDUMP=${TARGET_PREFIX}objdump' >> $script
> +	echo 'export AR=${TARGET_PREFIX}-ar' >> $script
> +	echo 'export NM=${TARGET_PREFIX}-nm' >> $script
>   	echo 'export TARGET_PREFIX=${TARGET_PREFIX}' >> $script
>   	echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=##SDKTARGETSYSROOT##"' >> $script
>   	if [ "${TARGET_OS}" = "darwin8" ]; then
> @@ -95,10 +122,10 @@ toolchain_create_sdk_env_script_for_installer () {
>   		cd ${SDK_OUTPUT}${SDKTARGETSYSROOT}/usr
>   		ln -s /usr/local local
>   	fi
> -	echo 'export CFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CXXFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export LDFLAGS="${TARGET_LD_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> -	echo 'export CPPFLAGS="${TARGET_CC_ARCH} --sysroot=##SDKTARGETSYSROOT##"' >> $script
> +	echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script
> +	echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script
> +	echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script
> +	echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script
>   	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
>   	echo 'export OECORE_TARGET_SYSROOT="##SDKTARGETSYSROOT##"' >> $script
>           echo 'export OECORE_ACLOCAL_OPTS="-I ${SDKPATHNATIVE}/usr/share/aclocal"' >> $script
>

Merged into OE-Core

Thanks
	Sau!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-18  8:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 20:54 RFC: [PATCH 0/1] Build system/SDK/ADT differ in toolchain config Mark Hatle
2012-07-10 20:54 ` RFC: [PATCH 1/1] toolchain-scripts: Sync the SDK/ADT values to the build system Mark Hatle
2012-07-11 10:48   ` [OE-core] " Richard Purdie
2012-07-11 10:48     ` Richard Purdie
2012-07-18  7:52   ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.