Commit Graph

79 Commits

Author SHA1 Message Date
Joshua Lock c4e2c59088 meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

(From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16 10:23:23 +00:00
Ross Burton 922a745993 classes/native: set lt_cv_sys_lib_dlsearch_path_spec
This variable is used by libtool to know what paths are on the default loader
search path.  As we have modified loader paths, native.bbclass can tell libtool
that both the sysroot libdir and the host library paths are searched, so no
RPATHs for those will be generated.

(From OE-Core rev: 2d0a1b029447842a6f97f72ae636c9020c4206a9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-04 16:29:04 +01:00
Richard Purdie ed5daa177b bitbake.conf/native/nativesdk: Set PKG_CONFIG_SYSTEM_ at top level
Setting PKG_CONFIG_SYSTEM_{HEADERS/INCLUDE}_PATH for nativesdk isn't
enough, we also need to deal with multlib cases where libdir from
pkg-config-native isn't correct. Native builds are about the only
case where this variable shouldn't be set.

Therefore move the code from nativesdk to bitbake.conf and unexport it
in the native case.

(From OE-Core rev: 46c48c26ab1916e2dfb841d74a0f2a58d8b2b870)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06 23:10:44 +00:00
Phil Blundell ba2fdcddaf native.bbclass: Set CXXFLAGS from BUILD_CXXFLAGS not BUILD_CFLAGS
Although BUILD_CXXFLAGS, by default, expands to the same thing as
BUILD_CFLAGS there is no guarantee that this will be true in all
cases.  When setting CXXFLAGS we should use the former.

(From OE-Core rev: fd75637d97cc3d669229e59c1d21ce7038fc92d7)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31 13:29:49 +00:00
Richard Purdie 0da1d71809 nopackages: Add class for recipes which don't generate packages
It turns out writing the same list of packaging tasks multiple
times in multiple places is error prone. Move this to a new class
'nopackages", migrate existing users and add glibc-initial and
libgcc-initial since we don't want packages for those recipes.

This means the sstate for those recipes won't be installed, saving
small amounts of build time and bandwidth.

A reference to the old package_write task is also dropped.

(From OE-Core rev: cece583d58f82a50c3a4eac876eb326ac3b8f5e5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14 22:30:57 +00:00
Richard Purdie b68de1cdc5 native: Move virtclass override to earlier so DEPENDS is handled correctly
Currently the virtclass override is added too late to be taken into
account when DEPENDS and other variables are processed by the virtclass
extension code. This sets the overrides in a more optimal place, meaning
they are accounted for in variables like DEPENDS.

Recipes in meta-oe like libwmf-native showed the issue.

(From OE-Core rev: e9bfd0583d7796cb9f71ff8762650e057103e3d2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 23:37:21 +01:00
Richard Purdie fe405a4968 native: Improve PROVIDES handling
Since this class works on pre finalised data, the logic hasn't needed
to be exact. If we change the way the finalised data works, we find
that certain dependencies can be dropped (e.g. pn isn't in the name).

To fix this, restructure the function to alter each entry in turn
and not drop any entries.

(From OE-Core rev: 4434977ccb95f8f366ba133366093b8c7ef1f718)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-26 10:57:51 +01:00
Mario Domenech Goulart 24b8347724 native.bbclass: avoid unintended substring replacement when setting PROVIDES
The way native_virtclass_handler was implemented leaded to
unintended substring replacements when setting PROVIDES for
native providers, in case the original PROVIDES value contains
providees with common substrings.

Here's a practical case where the old behavior was problematic:
the oracle-jse-jdk-x86-64 recipe provides both virtual/java and
virtual/javac:

Before:

$ bitbake -e oracle-jse-jdk-x86-64-native | grep ^PROVIDES=
PROVIDES="oracle-jse-jdk-x86-64-native  virtual/java-native virtual/java-nativec"

After:

$ bitbake -e oracle-jse-jdk-x86-64-native | grep ^PROVIDES=
PROVIDES="oracle-jse-jdk-x86-64-native virtual/java-native virtual/javac-native"

Change-Id: I8186992dae58e37c2a2364586360ff9b7da9198f
(From OE-Core rev: c28291f1fb07fbc80275d9bceefed642c963e204)

Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-16 22:31:50 +01:00
Ross Burton 8ac69a923c native: remove PN from DEPENDS automatically
If a recipe (say, wayland) has DEPENDS=wayland-native and BBCLASSEXTEND=native,
when built as wayland-native it has DEPENDS=wayland-native which results in a
circular dependency.

Typically this is resolved by having explicit DEPENDS_class-native statements
but as this is duplication which can lead to inconsistent dependencies,
automatically remove the circular dependency.

(From OE-Core rev: 3e9392c0965166462e0993d46f4cc2fb1832f1e5)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:53:55 +00:00
Ross Burton ac638b7bd1 native.bbclass: use BUILD_* variables
Instead of replicating the logic for the host compiler naming from bitbake.conf,
use the BUILD_* variables directly.

Also change BUILD_CPP to use gcc -E (which native.bbclass previously used), as
some recipes (e.g. grub-efi) use ${CPP} with multiple input files, which gcc -E
can handle but cpp can't.

(From OE-Core rev: 9237d18964ff0bf76f5c37fca21ab3974d81d0d2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-24 17:36:16 +01:00
Robert Yang 051f6a19f9 native.bbclass: deltask package_qa
The native recipe doesn't need package_qa, and it has a race issue with
do_unpack which requires the clean dir of ${S}, then causes error:

NOTE: recipe opkg-utils-native-0.1.8+gitAUTOINC+eae0d8fa44-r0: task do_package_qa: Failed
ERROR: Task 283 (virtual:native:/path/to/opkg-utils_git.bb, do_package_qa) failed with exit code '1'

(From OE-Core rev: 6ad0979a6064755fd6d86b568bd3cbbcdd3d4e37)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-09-01 17:17:11 +01:00
Khem Raj d09e6d8830 native/nativesdk: Clear MACHINEOVERRIDES
In cases where we override variables e.g PACKAGE_ARCH
conditionally and use a MACHINEOVERRIDE to qualify the
override like

PACKAGE_ARCH_<MACHINE> = "some target PACKAGE_ARCH"

This would also be effective if this recipe is
BBEXTENDED to native or nativesdk which is undesired
This particular issue will cause wrong sysroot to be
used for nativesdk case since PACKAGE_ARCH would have
been modified and eventually changing value of
STAGING_DIR_TARGET which we use as --sysroot option
to cross and cross-canadian built SDK gcc

(From OE-Core rev: 6907da7eb44dca812dbb9e214357ee96e9ff738a)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27 12:12:29 +01:00
Matthieu Crapet a08ef9a3a3 native.bbclass: Properly define directories
For most users this commit will have no effect. But if you come across the idea of giving
different names for paths, you'll get some troubles.

When a recipe inherit native, properly define bindir, sbindir, includedir, sysconfdir, datadir
(using xxxdir_native definitions from meta/conf/bitbake.conf).

For example, edit "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/quilt-native/temp/log.do_configure"
and see what are the arguments given by oe_runconf.

Notice that ${docdir}, ${mandir}, ${infodir}, ${localstatedir} have no associated _native definition.

(From OE-Core rev: 15345ddd4be6a0b041b3d6caaad48d46b22142e9)

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-14 08:43:56 +01:00
Richard Purdie bc19e915fb classes/lib/oe: Fix cross/crosssdk references
With the renaming of the cross packages, its no longer possible to use
endswith("-cross") and similar to detect cross packages. Replace these
references with other techniques.

This resolves certain build from sstate failures which were due to the
system believing cross packages were target packages and therefore
dependency handling was altered.

(From OE-Core rev: 91edf4cac223298e50a4b8e59dd19f1b272e3418)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11 12:27:22 +01:00
Mike Crowe 370ae2720f native.bbclass: Override TARGET_ flags too
TARGET_LDFLAGS is currently defined in bitbake.conf to contain
${TARGET_LINK_HASH_STYLE} which differs between MIPS and other
targets. Since TARGET_LDFLAGS is an exported variable it affects the hash
of every shell task even if it is not used.

We don't want native recipe tasks to have different hashes purely because
they happen to have been built in order to satisfy dependencies for
different MACHINEs since this causes lots of churn in the native sysroot
when switching between MACHINEs.

Making native.bbclass override TARGET_LDFLAGS to use BUILD_LDFLAGS ensures
consistent hashes and is a sensible thing to be doing anyway.

Although they don't appear to have the same detrimental affect on task
hashes TARGET_CPPFLAGS, TARGET_CFLAGS and TARGET_CXXFLAGS should be
overridden too.

(From OE-Core rev: 05a70ac30b37cab0952f1b9df501993a9dec70da)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24 17:55:16 +01:00
Richard Purdie 14471d201b native: Use deltask to remove tasks which have no purpose
core-image-sato has 47703 inter task dependencies before this patch
and 29883 afterwards which is a significant worthwhile task graph
simplification.

(From OE-Core rev: ac4b1518ec549b5a4d7a79c60dbf96b90797e1d8)

(From OE-Core rev: 8f4f229ba8117ba411a858bf47f88a370bb70491)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20 12:26:25 +00:00
Richard Purdie cae2315266 bitbake.conf/native.bbclass: Use FC instead of F77 for fortran
gcc tooling appears to be standardising around the FC variable naming.
This patch changes the F77 namespace to FC instead and use the default
gfortran compiler. If anyone needs the F77 variables or tools, those
can still be made on a case by case basis.

Also updates local.conf.sample.extended accordingly.

(From OE-Core rev: ae8c17be2845eff2be8394a5d9a45e6aa321c33d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05 14:25:23 +00:00
Richard Purdie 6dff1bc80f cross/crosssdl/native/nativesdk: Fix do_packagedata stamps
If you build nativesdk for machine A, then change to B you will see sstate
manifest warnings for the packagedata files. The stamps are machine
specific and should not be, ditto for native.

This patch copies the populate-sysroot extra stamp entries to avoid
these warnings.

(From OE-Core rev: a64de25d6006ec6dd777d8f3820a48244dfbf62b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 18:26:50 +01:00
Richard Purdie 08d902ac8f native: Use a native site file and ensure the correct sed is used
native recipes were not using the site files. There are some things we need
to correct such as not using the path to sed-native. This allows us
to deploy settings globally for all recipes rather than hacking around
then in individual recipes as libtool-native used to for sed.

This fixes a regression introduced by
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=32edeb391f2107bb66b361cdcd4b8d4447731c33

(From OE-Core rev: db2eb3258844458569b7d4e6ed82c345858a3b99)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:57 +01:00
Richard Purdie 24b1fe929b gettext: Improve USE_NLS handling for nativesdk/crosssdk/cross-canadian
The gettext handling of USE_NLS has become a bit tricky to understand, or
alter from the SDK context. This patch introduces a SDKUSE_NLS which can
be set to configure a given SDK/ADT to use NLS or not. This is independent
of the target system NLS usage.

The code in gettext.bbclass is therefore simplified and the classes
themselves now set USE_NLS to appropriate values. No NLS is used
for native, cross and crosssdk since it is never used there and
would just increase build time.

(From OE-Core rev: fe634d47449899f7424adb77ff5bc7ddf8a07a47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-23 16:20:11 +01:00
Richard Purdie 53841ce521 classes/conf: Add eventmasks for event handlers
Now that bitbake supports masking events for event handlers, lets use
this so event handlers are only called for events they care about. This
lets us simplify the code indentation a bit at least as well as mildly
improving the event handling performance.

(From OE-Core rev: bff73743280f9eafebe4591f7368ead91a4eb74d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:55:47 +01:00
Björn Stenberg 44120a053c ptest bug fixes
Move ${PN}-ptest to start of PACKAGES to ensure all ptest files are
packaged in the -ptest package.

Add QA exclusions to insane.bbclass to ensure -ptest packages can contain
any files they need.

Disable ptest for native packages.

Don't emit errors on missing _ptest functions.

(From OE-Core rev: 01bea4ef932e46eb2fcc8b4be7ff5e2b5b2a0978)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Anders Roxell <anders.roxell@enea.com>
Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11 12:20:35 +01:00
Richard Purdie 3247292683 Split do_packagedata task from do_package
Currently, do_rootfs has a dependency on all the do_package output being present
due to its usage of the pkgdata directories. This means that if you run:

bitbake xxxx-image -c rootfs

you end up having to fetch and unpack all the do_package data which is usually
large and inefficient. It also means rm_work has to leave all the do_package
data lying around so rootfs works.

This patch splits the actual creation of the pkgdata directory off into a separate
task, "packagedata" which happens immediately after do_package. We can then remap
the dependencies so this task is depended upon, not do_package. Sstate can then be
programmed not to require do_package at the appropriate times.

Whilst this patch doesn't do so, it opens the possibility of rm_work wiping
out the do_package output from WORKDIR as long as it also removed the do_package
stamp (both normal and setscene variants) and allowing more space savings
with rm_work which has been regularly requested.

(From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:47 +00:00
Richard Purdie e917c7b5a3 classes: Drop do_package stamp-extra-info
This was needed when do_package for target recipes was target specific
however since it now isn't we can remove these stale references.

(From OE-Core rev: 1c54d8c3639659bc8cf8fa2786a1aa9ed785b723)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21 16:56:03 +00:00
Richard Purdie 2c494b2090 classes: Be consistent about sstate-inputdirs/outputdirs ending with '/'
If sstate-inputdirs and sstate-outputdirs don't match with ending '/'
characters, the manifest file can end up corrupted. This change
ensures the metadata is consistent in ending do_populate_root tasks
with this character to avoid manifest file corruption.

(From OE-Core rev: 3910eaf88d14904eef85b9e391387547df7fc54e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14 14:38:28 +00:00
Robert Yang 51c7ad682f classes: replace virtclass-native(sdk) with class-native(sdk)
The overrides virtclass-native and virtclass-nativesdk are deprecated,
which should be replaced by class-native and class-nativesdk.

[YOCTO #3297]

(From OE-Core rev: 9fbeab63315fef0dbcc91c5e7051665764758a6e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02 16:18:27 +00:00
Richard Purdie a68c7c792e package.bbclass: Switch shlibs to pkgdata directory and make package non-machine specific
Currently, do_package is machine specific since the shlibs data is installed
into each machine specific sysroot. This change moves the shlibs data to the
pkgdata structure, at the expense of having to iterate over a set of shlibs
directories instead of a single one.

It turns out this isn't any particular hardship for the code and as a result,
do_package stops being machine specific leading to optimisations for builds
that use a common PACKAGE_ARCH.

(From OE-Core rev: cc088489d70fb27d460c3dbe35d6ea382123c134)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-22 09:47:47 +01:00
Saul Wold 6b66a81ef7 native.bbclass: correct PATH to have native-intercept be prepended
This was needed since it was after the sysroots and thus in some cases
the native sysroot chown was being found and used instead of the script
provided by native-intercept/chown.  This was noticed by the non-gplv3
build since it's coreutils depends on coreutils-native.

(From OE-Core rev: bb5095d3f73a00222f50f9dd2cf8dc27cc72b4a2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:26:44 +01:00
Richard Purdie 71b78f0483 classes: Add recipe class to overrides
We have currently no override to detect a recipe being build cross, crosssdk
or for target at times we can use virtclass-native and virtclass-nativesdk to
override stuff in recipes but we dont have way to modify a variables
based on recipe type always.

This patch adds in such an override and in particular makes a target override
class available.

With this change now we can say:

EXTRA_OECONF_class-target = "...."
EXTRA_OECONF_class-native = "..."
EXTRA_OECONF_class-nativesdk = "..."
EXTRA_OECONF_class-crosssdk= "..."

Based of an original patch by Khem Raj

(From OE-Core rev: cf332fd9bf685f6d42b11c1f0c37b934c7f5bcbe)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-30 11:37:22 +01:00
Richard Purdie 40f95685e6 gzip/pigz-native: Install into a prefix to avoid clashing with system binaries
Due to the system providing a copy of gzip, we face some issues when we
'shadow' that copy with our own leading to a varient of race type bugs,
and issues for example if a dependency such as libz is missing but the
binary is still present. We usually rely on our dependency logic to protect
us from this but for gzip, we don't have this protection since its not listed
by all its users (and doing so would be impractical).

This patch installed pigz and gzip into their own directory which we only
add to PATH when we explictly want these binaries in much the same way we do
with perl-native. This means dependency logic is correct when we use the binary
and everything should work well.

The patch adds an explict dependency into image.bbclass since the accelerated
speed of compression is most appreciated at rootfs time.

(From OE-Core rev: 7a98c0ef28822ae1fcee45b14db3edcfd4c7ad8f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21 15:33:07 +00:00
Robert Yang 5b67d645e3 native.bbclass: make TOOLCHAIN_OPTIONS empty
The native pkg doesn't need the TOOLCHAIN_OPTIONS, but it maybe used by
native pkgs, for example, the cmake.bbclass uses TOOLCHAIN_OPTIONS:

OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS}"

and TOOLCHAIN_OPTIONS is:
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"

If a native pkg inherits cmake.bbclass, then:
TOOLCHAIN_OPTIONS = " --sysroot="

and OECMAKE_C_FLAGS would be:
${HOST_CC_ARCH} --sysroot= ${CPPFLAGS}

This would cause unexpected errors, I think that we can make
TOOLCHAIN_OPTIONS empty in native.bbclass since native pkg doesn't need
it.

[YOCTO #2124]

(From OE-Core rev: e5555c743a9637f86a0a2c4c45a63a80838e81ae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-19 20:28:46 +00:00
Richard Purdie 0fa52f7078 native.bbclass: Fix variable remapping coverage
When looking for RDEPENDS to process, bitbake iterates through PACKAGES
*and* PN. Since native.bbclass sets PACKAGES to be empty, its pointless
remapping the list of PACKAGES since this does nothing. There is a problem
since *_${PN} are used by bitbake but not remapped by the native.bbclass
class extension code.

This changes the code to remap _${PN} in both expanded and unexpanded
forms. As a result of this, various surprising dependencies are uncovered
and the patch rectifies those. These are real bugs since they're injecting
unneeded (unremapped) dependencies into the dependency chain.

(From OE-Core rev: 0f485bfd6fc82a109b9da629e464fca1e90faec3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05 12:36:28 +00:00
Khem Raj bf45449f1a classes, conf: Exclude native and nativesdk recipes from libc specific override
Based on suggestions from RP

libc-uclibc and libc-glibc overrides are for denoting
system C library in use on the target and not for the
host therefore we make sure that the override only takes
effect for target recipes only.

(From OE-Core rev: 6e2b53f47da0e97271fb51b281d24da1e1d549cc)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01 16:54:07 +00:00
Richard Purdie 0a434ac101 getVar/setVar cleanups
Complete the bb.data.getVar/setVar replacements with accesses
directly to the data store object.

(From OE-Core rev: 2864ff6a4b3c3f9b3bbb6d2597243cc5d3715939)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27 10:25:34 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Richard Purdie d7babed94f native.bbclass: Ensure native recipes have a deterministic baselib value
Changes to baselib by specific machine configuration were resulting
in sstate cache invalidation, particularly in multilib configurations.

This patch ensures this doesn't happen and native sstate cache files
are reusable.

(From OE-Core rev: d0915fb0a2cc80ad45b3fd526d3b29a91d99572c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-07 11:35:43 +01:00
Richard Purdie 9fe66fd8e2 autotools.bbclass: Set the dynamic linker search path for libtool correctly
libtool obtains the search path from /etc/ld.so.conf and hardcodes /usr/lib
and /lib. This results in host contamination and variable sets of RPATH
values ending up in binaries.

By exporting the correct values for all autotools recipes we avoid this.

(From OE-Core rev: 93e595d5c89ebacdb8d1e6fcfe6f58fe2d30de28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26 17:56:43 +01:00
Nitin A Kamble 17e8d8558d toolchain-scripts & other classes: add TARGET_LD_ARCH & TARGET_AS_ARCH vars
This is comming from x32 need to pass special parameters to ld & as.

(From OE-Core rev: 96931af89f9cc3056e413cff437a85eca85b3b75)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-05 17:15:59 +01:00
Richard Purdie 5aa96bd0ef bitbake.conf/classes: Variable cleanup
This patch removes the variables BASE_PACKAGE_ARCH, BASEPKG_HOST_SYS,
BASEPKG_TARGET_SYS and also removes the immediate assignments in
several core classes as these are no longer required.

This should make it clearer what some of the core variables do and
simplfy some overly complex and confusing class code.

(From OE-Core rev: d5521be2dcbaf213c140b0d12a4176380874426b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 14:36:30 +01:00
Yu Ke e90b231562 native.bbclass: generate libdir from libdir_native
currently, the libdir in native.bbclass is inherited from target libdir
defined in bitbake.conf. This is not correct in concept, instead, it
should be inherited from libdir_native. Current code works because both
the target libdir and libdir_native are the same value "/usr/lib".
But if libdir changes (e.g. to /usr/lib64), then build will break.

This patch make libdir generated from libdir_native to fix this issue.

(From OE-Core rev: fe45ef3d77d963136a13687bc14165a30e170d23)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-12 15:00:46 +01:00
Mark Hatle 13f3607779 native.bbclass: Add a simple chown intercept command
During native recipe processing we want to intercept any calls to chown
and do nothing.  This prevents errors and allows the same recipes to be
used for both native and target recipes.

(From OE-Core rev: 7fd8287d3320231db83c36d09f2b841e520fcfe9)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-23 21:08:01 +01:00
Richard Purdie 1b53eef276 native/nativesdk: Clean up the depends ordering after bitbake override handling updates
This massively cleans up the dependency handling in the two classes
when interacting with BBCLASSEXTEND.

This change has a dependency on the bitbake override handling change
and also the existence of the RecipePreFinalise event.

(From OE-Core rev: f183c7cfe377fa6ed2777605c3590a9dda2060df)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:49:10 +01:00
Dexuan Cui 5565b30589 native.bbclass: allow a native package to be populated into its own dir
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
2011-06-09 16:58:33 +01:00
Otavio Salvador 9c272d93c6 cmake.bbclass: fix qmake and rpath issues
Sync with OE at 3b7d83362027fde4f6850533ab83277d95dda961 however
without changing the way of generating the toolchain file and making
it branding agnostic.

(From OE-Core rev: ee98c2b095b991901b6c2125b2428985c873b4bd)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-11 16:41:52 +01:00
Ilya Yanok 889551a570 native, nativesdk, crosssdk: reset TARGET_FPU
When building one of the native, nativesdk or crosssdk packages TARGET_*
variables' values are no longer related to the target we set via MACHINE
variable, they are now related to the BUILD (native) or SDK (nativesdk,
crosssdk) targets instead. We need to change TARGET_FPU variable
accordingly or some of the recipes (the ones that check for TARGET_FPU
value, most notably gcc and eglibc) might be confused.

It's probably cleaner not to reset TARGET_FPU but to change it to
something like ${BUILD_FPU} (for native) or ${SDK_FPU} (for crosssdk and
nativesdk) but as long as BUILD and SDK are x86 it's safe to just reset
TARGET_FPU.

(From OE-Core rev: 0d4ea5d7486dc35001582bef3ff6ebfad0606bda)

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-05 22:20:52 +01:00
Chris Larson bfd7283a6b native: empty PACKAGES_DYNAMIC the way we do PACKAGES
Without this, as a specific example, one has both gtk+-native and gtk+ runtime
providing gdk-pixbuf-loader-*, and you can get bitbake preference conflicts as
a result if you have preferences specified for both gtk+ and gtk+-native for
other things.

(From OE-Core rev: 41d77ac37f606e54293826ba1e94a4254bddbfa6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23 15:43:49 +00:00
Dongxiao Xu 7f41f1a888 bitbake: machine specific sysroots implementation
This commit changes the sysroots path to be machine specific.

Changes includes:

1) STAGING_DIR_TARGET and STRAGING_DIR_HOST points to machine specific
paths.

2) task stamp files. Adding ${MACHINE} info into stamp files for
do_populate_sysroots and do_package tasks. Add a BB_STAMPTASK_BLACKLIST
to keep native, nativesdk, crosssdk, and cross-canadian stamp unchanged.

3) siteconfig path. Separate the site config path for different machines
to avoid one machine adopting the cache file of another machine.

4) sstate. Add machine name to sstate manifest file.
Change relocation code for sstate paths since sysroot is machine.
Keep native, nativesdk, crosssdk, and cross-canadian unchanged.

5) toolchain scripts. Change the environment path to point to machine
specific sysroots in toolchain scripts bbclass.

6) Relocate la files when populating to a different machine of the same
architecture.

7) Exclude STAGING_DIR_TARGET and STAGING_DIR_HOST parameter from sstate
siginfo since they contain ${MACHINE} information.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
2011-01-25 12:25:46 +00:00
Dongxiao Xu bc9d2fbfd4 staging: Use relative path in sysroot-destdir for target recipes
Original we used absolute path in sysroot-destdir for both native and
target recipes. This commit changes target recipes to use relative path
which is same as the image directory.

[sgw: merged with libtool sysroot work]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-01-21 11:18:37 +00:00
Richard Purdie 6e440f84f9 native.bbclass: Mark various package functions as noexec since they don't do any work
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:54:32 -08:00
Richard Purdie 8044fc3347 native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed target and native dependency trees
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-28 13:54:32 -08:00