Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] buildtools-tarball: Change the way the SDK is sanitized
@ 2013-06-24 14:47 Mark Hatle
  2013-06-24 15:31 ` Paul Eggleton
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2013-06-24 14:47 UTC (permalink / raw)
  To: openembedded-core

The previous method of shrinking down the scale of the environment-setup
file would not work properly when the target is configured with multilibs.

In addition, the configured machine name and similar settings could leak
into the SDK naming.  This was resolved by clearing the SDK generated
files and generating our own custom files.

Note, the name of the environment-setup now is suffixed with the SDK_SYS.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/recipes-core/meta/buildtools-tarball.bb | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index f8024f9..8b68f71 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -49,8 +49,15 @@ inherit meta
 inherit populate_sdk
 
 create_sdk_files_append () {
-	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config*
-	
-	cat ${SDK_OUTPUT}/${SDKPATH}/environment-setup* | grep " PATH=\|OECORE_NATIVE_SYSROOT" > ${WORKDIR}/envtmp
-	mv ${WORKDIR}/envtmp ${SDK_OUTPUT}/${SDKPATH}/environment-setup*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
+
+	# Generate new (mini) sdk-environment-setup file
+	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
+	touch $script
+	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+
+	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 }
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread
* Re: [PATCH] buildtools-tarball: Change the way the SDK is sanitized
@ 2013-06-24 16:10 Hatle, Mark
  2013-06-24 17:57 ` Chris Larson
  0 siblings, 1 reply; 5+ messages in thread
From: Hatle, Mark @ 2013-06-24 16:10 UTC (permalink / raw)
  To: 'Paul Eggleton'
  Cc: 'openembedded-core@lists.openembedded.org'

[-- Attachment #1: Type: text/plain, Size: 769 bytes --]

Stupid phone will only allow me to top post. Anyway, that line was copied out of the populate_sdk bbclass. So if it is a bash-ism then it needs to be fixed there as well.

-----Original Message-----
From: Paul Eggleton [paul.eggleton@linux.intel.com<mailto:paul.eggleton@linux.intel.com>]
Sent: Monday, June 24, 2013 08:31 AM Pacific Standard Time
To: Hatle, Mark
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] buildtools-tarball: Change the way the SDK is sanitized


On Monday 24 June 2013 09:47:15 Mark Hatle wrote:
> +     script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}

I could be wrong but I think this may be a bashism...

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 1367 bytes --]

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

end of thread, other threads:[~2013-06-24 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 14:47 [PATCH] buildtools-tarball: Change the way the SDK is sanitized Mark Hatle
2013-06-24 15:31 ` Paul Eggleton
2013-06-24 15:33   ` Paul Eggleton
  -- strict thread matches above, loose matches on Subject: below --
2013-06-24 16:10 Hatle, Mark
2013-06-24 17:57 ` Chris Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox