diff options
author | Scott Garman <scott.a.garman@intel.com> | 2010-12-21 14:17:58 -0800 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2011-01-21 01:36:15 -0800 |
commit | 1a7509d673023da5d1db579450beb897129a30e8 (patch) | |
tree | 8650f296869fe3f235e9d43d5c3288bfbf6840bb /meta | |
parent | ded899b5804c7ceb108e9476d1164f7da0adfb34 (diff) | |
download | poky-1a7509d673023da5d1db579450beb897129a30e8.tar.gz |
autotools.bbclass: libtool sysroot support changes
We do not do it for native recipes, as the native compiler should
fall back to a prefix of /usr and not solely depend on the sysroot.
Otherwise we end up staging everything in the native sysroot before
we start to build target recipes.
Also remove la mangling code, which is no longer necessary.
Commit derived from Khem Raj's OE commits.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/autotools.bbclass | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 324cbff47a..39f5036ecf 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -38,6 +38,12 @@ def autotools_set_crosscompiling(d): | |||
38 | return " cross_compiling=yes" | 38 | return " cross_compiling=yes" |
39 | return "" | 39 | return "" |
40 | 40 | ||
41 | def append_libtool_sysroot(d): | ||
42 | # Only supply libtool sysroot option for non-native packages | ||
43 | if not bb.data.inherits_class('native', d): | ||
44 | return '--with-libtool-sysroot=${STAGING_DIR_HOST}' | ||
45 | return "" | ||
46 | |||
41 | # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" | 47 | # EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" |
42 | 48 | ||
43 | CONFIGUREOPTS = " --build=${BUILD_SYS} \ | 49 | CONFIGUREOPTS = " --build=${BUILD_SYS} \ |
@@ -56,14 +62,13 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \ | |||
56 | --includedir=${includedir} \ | 62 | --includedir=${includedir} \ |
57 | --oldincludedir=${oldincludedir} \ | 63 | --oldincludedir=${oldincludedir} \ |
58 | --infodir=${infodir} \ | 64 | --infodir=${infodir} \ |
59 | --mandir=${mandir}" | 65 | --mandir=${mandir} \ |
66 | ${@append_libtool_sysroot(d)}" | ||
60 | 67 | ||
61 | oe_runconf () { | 68 | oe_runconf () { |
62 | if [ -x ${S}/configure ] ; then | 69 | if [ -x ${S}/configure ] ; then |
63 | cfgcmd="${S}/configure \ | 70 | cfgcmd="${S}/configure \ |
64 | ${CONFIGUREOPTS} \ | 71 | ${CONFIGUREOPTS} ${EXTRA_OECONF} $@" |
65 | ${EXTRA_OECONF} \ | ||
66 | $@" | ||
67 | oenote "Running $cfgcmd..." | 72 | oenote "Running $cfgcmd..." |
68 | $cfgcmd || oefatal "oe_runconf failed" | 73 | $cfgcmd || oefatal "oe_runconf failed" |
69 | else | 74 | else |
@@ -152,18 +157,6 @@ autotools_do_install() { | |||
152 | oe_runmake 'DESTDIR=${D}' install | 157 | oe_runmake 'DESTDIR=${D}' install |
153 | } | 158 | } |
154 | 159 | ||
155 | PACKAGE_PREPROCESS_FUNCS += "autotools_prepackage_lamangler" | ||
156 | |||
157 | autotools_prepackage_lamangler () { | ||
158 | for i in `find ${PKGD} -name "*.la"` ; do \ | ||
159 | sed -i -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ | ||
160 | -e 's:${D}::g;' \ | ||
161 | -e 's:-I${WORKDIR}\S*: :g;' \ | ||
162 | -e 's:-L${WORKDIR}\S*: :g;' \ | ||
163 | $i | ||
164 | done | ||
165 | } | ||
166 | |||
167 | autotools_stage_dir() { | 160 | autotools_stage_dir() { |
168 | sysroot_stage_dir $1 $2 | 161 | sysroot_stage_dir $1 $2 |
169 | } | 162 | } |