Skip to contentSkip to conversation

autotools.bbclass: Move --with-sysroot to CONFIGUREOPTS

PATCH In review Khem Raj 2 participants 3 messages Oct 19, 2010

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 autotools.bbclass: Move --with-sysroot to CONFIGUREOPTS

* This is added to CONFIGUREOPTS so it can be filtered out when needed. Recipes like gcc need this to be filtered

---
 classes/autotools.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
classes/autotools.bbclass +3 -2
index ce4f66a..a634201 100644
@@ -75,12 +75,13 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
 		  --includedir=${includedir} \
 		  --oldincludedir=${oldincludedir} \
 		  --infodir=${infodir} \
-		  --mandir=${mandir}"
+		  --mandir=${mandir} \
+		  ${@["","--with-sysroot"][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes"]} \
+		"
 
 oe_runconf () {
 	if [ -x ${S}/configure ] ; then
 		${S}/configure \
-		${@["","--with-sysroot"][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == "yes"]} \
 		${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
 	else
 		oefatal "no configure script found"
Signature · 1 line
1.7.1
author
#1 lore raw

PATCH 2/2 gcc-configure-target.inc: Filter out --with-sysroot

* For target gcc we dont need to specify --with-sysroot even with libtool 2.4

---
 recipes/gcc/gcc-configure-target.inc |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
recipes/gcc/gcc-configure-target.inc +7 -1
index 03d7a6b..4c9ef8b 100644
@@ -3,4 +3,10 @@ require gcc-configure-common.inc
 EXTRA_OECONF_PATHS = " \
     --with-local-prefix=${prefix}/local \
     --with-gxx-include-dir=${includedir}/c++/${BINV} \
-    --with-build-sysroot=${STAGING_DIR_HOST}"
+    --with-build-sysroot=${STAGING_DIR_HOST} \
+   "
+
+python __anonymous () {
+	cfg = oe_filter_out('^--with-sysroot$', bb.data.getVar('CONFIGUREOPTS', d, 1) or "", d)
+	bb.data.setVar('CONFIGUREOPTS', cfg, d)
+}
Signature · 1 line
1.7.1
#2 lore raw

Re: [PATCH 2/2] gcc-configure-target.inc: Filter out --with-sysroot

recipes/gcc/gcc-configure-target.inc require gcc-configure-common.inc · line 12

Quoted 5 lines · Khem Raj
(quoted diff) +2 -0
+python __anonymous () {
+       cfg = oe_filter_out('^--with-sysroot

, bb.data.getVar('CONFIGUREOPTS', d, 1) or "", d)

recipes/gcc/gcc-configure-target.inc +2 -0
+       bb.data.setVar('CONFIGUREOPTS', cfg, d)
+}

Try this instead, *after* the inherit of autotools, to avoid the anonymous python:

CONFIGUREOPTS := "${@oe_filter_out('--with-sysroot=', '${CONFIGUREOPTS}', d)}"

(also note the ^ isn't necessary, filter_out uses re.match(), not re.search(), so its required to match at the beginning of the word)

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics