Skip to contentSkip to conversation

buildtools-tarball.bb: 32bit tools need pseudo 32bit library

PATCH In review Juro Bystricky 2 participants 4 messages Dec 3, 2015 – Dec 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 buildtools-tarball.bb: 32bit tools need pseudo 32bit library

"pseudo" does not build 32 bit library by default on 64 bit host, but the 32 bit library is needed when using 32 bit development tools (buildtools-tarball) running on a 64 bit host. Building of the library can be forced if the environment variable NO32LIBS is set to "0".

Hence for 32 bit buildtools we export the environment variable NO32LIBS="0" and NO32LIBS is also added into BB_ENV_EXTRAWHITE (if not already there).

[YOCTO#8581]

---
 meta/recipes-core/meta/buildtools-tarball.bb | 6 ++++++
 1 file changed, 6 insertions(+)
meta/recipes-core/meta/buildtools-tarball.bb +6 -0
index 840434c..8ad4e91 100644
@@ -56,4 +56,10 @@ create_sdk_files_append () {
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+
+	if [ ${SDKMACHINE} = "i686" ]; then
+		echo 'export NO32LIBS="0"' >>$script
+		echo 'echo "$BB_ENV_EXTRAWHITE" | grep -q "NO32LIBS"' >>$script
+		echo '[ $? != 0 ] && export BB_ENV_EXTRAWHITE="NO32LIBS $BB_ENV_EXTRAWHITE"' >>$script
+	fi
 }
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITE

According to the BitBake User Manual the environment variable BB_ENV_EXTRAWHITE specifies an additional set of variables to allow through (whitelist) from the external environment into BitBake's datastore. However, running:

  $ source oe-init-build-env build-name

will overwrite any pre-existing BB_ENV_EXTRAWHITE variables.
This patch modifies this behaviour: all oe-build-internal BB_ENV_EXTRAWHITE variables are appended to any potentially already existing BB_ENV_EXTRAWHITE variables. (The variables are only appended if not already in BB_ENV_EXTRAWHITE)

---
 scripts/oe-buildenv-internal | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/oe-buildenv-internal +5 -1
index 9ed2721..51e449a 100755
@@ -102,8 +102,12 @@ unset BITBAKEDIR NEWPATHS
 # Used by the runqemu script
 export BUILDDIR
 export PATH
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
+
+BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
 HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \
 all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \
 SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \
 SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR"
+
+echo "$BB_ENV_EXTRAWHITE" | grep -q "${BB_ENV_EXTRAWHITE_OE}"
+[ $? != 0 ] && export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE_OE} $BB_ENV_EXTRAWHITE"
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 2/2] oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITE

Quoted 24 lines · Juro Bystricky

According to the BitBake User Manual the environment variable BB_ENV_EXTRAWHITE specifies an additional set of variables to allow through (whitelist) from the external environment into BitBake's datastore. However, running:

  $ source oe-init-build-env build-name

will overwrite any pre-existing BB_ENV_EXTRAWHITE variables.
This patch modifies this behaviour: all oe-build-internal BB_ENV_EXTRAWHITE variables are appended to any potentially already existing BB_ENV_EXTRAWHITE variables. (The variables are only appended if not already in BB_ENV_EXTRAWHITE)

---
 scripts/oe-buildenv-internal | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/oe-buildenv-internal +0 -0
index 9ed2721..51e449a 100755
@@ -102,8 +102,12 @@ unset BITBAKEDIR NEWPATHS
 # Used by the runqemu script
 export BUILDDIR
 export PATH

scripts/oe-buildenv-internal unset BITBAKEDIR NEWPATHS · line 113

Quoted 10 lines
scripts/oe-buildenv-internal +5 -1
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
+
+BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
 HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \
 all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \
 SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \
 SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR"
+
+echo "$BB_ENV_EXTRAWHITE" | grep -q "${BB_ENV_EXTRAWHITE_OE}"
+[ $? != 0 ] && export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE_OE} $BB_ENV_EXTRAWHITE"

If ${BB_ENV_EXTRAWHITE_OE} is found in ${BB_ENV_EXTRAWHITE} (e.g. if oe-init-build-env is re-run from a shell where it has already been run before), then this change cause oe-buildenv-internal to exit with a non-zero status, which will prevent oe-init-build-env from calling oe-setup-builddir or cd'ing to ${BUILDDIR}. Is that really the intention? It breaks my typical work flow...

Quoted 8 lines

--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Re: [PATCH 2/2] oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITE

Thanks, it is a legitimate bug, certainly not intended.
I already posted a patch to the mailing list last week.

Quoted 70 lines

-----Original Message-----
From: Andre McCurdy [mailto:[email protected]]
Sent: Monday, December 14, 2015 3:47 PM
To: Bystricky, Juro
Cc: OE Core mailing list; [email protected]
Subject: Re: [OE-core] [PATCH 2/2] oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITE

Quoted 3 lines · Juro Bystricky

According to the BitBake User Manual the environment variable BB_ENV_EXTRAWHITE specifies an additional set of variables to allow through (whitelist) from the external environment into BitBake's datastore.

However, running:

scripts/oe-buildenv-internal unset BITBAKEDIR NEWPATHS # Used by the

Quoted 19 lines
  $ source oe-init-build-env build-name

will overwrite any pre-existing BB_ENV_EXTRAWHITE variables. This patch modifies this behaviour: all oe-build-internal BB_ENV_EXTRAWHITE variables are appended to any potentially already existing BB_ENV_EXTRAWHITE variables. (The variables are only appended if not already in BB_ENV_EXTRAWHITE)

---
 scripts/oe-buildenv-internal | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/scripts/oe-buildenv-internal index 9ed2721..51e449a 100755

scripts/oe-buildenv-internal +0 -0
@@ -102,8 +102,12 @@ unset BITBAKEDIR NEWPATHS  # Used by the

runqemu

Quoted 2 lines

script export BUILDDIR export PATH -export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY

http_proxy

scripts/oe-buildenv-internal

Quoted 3 lines

\

scripts/oe-buildenv-internal +2 -0
+
+BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC

HTTP_PROXY

Quoted 3 lines

+http_proxy \
HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy
ALL_PROXY \ all_proxy NO_PROXY no_proxy SSH_AGENT_PID

SSH_AUTH_SOCK

Quoted 1 line

BB_SRCREV_POLICY \ SDKMACHINE BB_NUMBER_THREADS

BB_NO_NETWORK

Quoted 1 line

PARALLEL_MAKE GIT_PROXY_COMMAND \ SOCKS5_PASSWD

SOCKS5_USER SCREENDIR STAMPS_DIR"

scripts/oe-buildenv-internal unset BITBAKEDIR NEWPATHS

Quoted 3 lines
scripts/oe-buildenv-internal +3 -0
+
+echo "$BB_ENV_EXTRAWHITE" | grep -q "${BB_ENV_EXTRAWHITE_OE}"
+[ $? != 0 ] && export

BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE_OE}
$BB_ENV_EXTRAWHITE"

If ${BB_ENV_EXTRAWHITE_OE} is found in ${BB_ENV_EXTRAWHITE} (e.g. if oe-init-build-env is re-run from a shell where it has already been run before), then this change cause oe-buildenv-internal to exit with a non-zero status, which will prevent oe-init-build-env from calling oe-setup-builddir or cd'ing to ${BUILDDIR}. Is that really the intention? It breaks my typical work flow...

Quoted 8 lines

--
1.9.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core