Commit Graph

51 Commits

Author SHA1 Message Date
Jussi Kukkonen db1f1adace native/nativesdk: Use fixed DISTRO_FEATURES
There seems to be little advantage to letting distro features affect
native builds. There is a significant disadvantage: a change to
DISTRO_FEATURES will trigger a lot of unnecessary native tasks. In a
test like this:
  $ bitbake core-image-minimal
  # append " systemd" to DISTRO_FEATURES
  $ bitbake core-image-minimal
The latter build takes 44 minutes (28%) of cpu-time less with this
patch (skipping 135 native tasks). Sadly wall clock time was not
affected as glibc remains the bottleneck.

Set native distro features to DISTRO_FEATURES_NATIVE appended with
an intersection of DISTRO_FEATURES and DISTRO_FEATURES_FILTER_NATIVE.
Current default values (baitbake.conf) are
* DISTRO_FEATURES_FILTER_NATIVE ?= "api-documentation" (as gtk-doc-native
has much less dependencies when built without it)
* DISTRO_FEATURES_NATIVE ?= "x11" (to enable native UIs even if target
does not containe them)

Do the variable setting in native_virtclass_handler() because otherwise
it could still be overridden by appends and the feature backfilling.
Shuffle the early returns so DISTRO_FEATURES gets set as long as
the packagename ends with "-native".

Add similar variables for nativesdk.

To make nativesdk work we need to enable the locale options so
nativesdk-glibc-locales can build and to avoid the init manager check
in the nativesdk case so add those fixes.

(From OE-Core rev: 731744d5538e315702be828e6f2bd556309dee07)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Ming Liu e378c0ee4b nativesdk.bbclass: override TARGET_* flags
Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a nativesdk recipe even they are
not in use at all.

This can lead a lot of churn when the nativesdk sysroot are shared by
machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILDSDK_* flags.

(From OE-Core rev: 85b69a5ec9ba9ea9ebdcd8ac18e1e147ddb1ff33)

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Richard Purdie 9107d6ca14 Switch to Recipe Specific Sysroots
This patch is comparatively large and invasive. It does only do one thing, switching the
system to build using recipe specific sysroots and where changes could be isolated from it,
that has been done.

With the current single sysroot approach, its possible for software to find things which
aren't in their dependencies. This leads to a determinism problem and is a growing issue in
several of the market segments where OE makes sense. The way to solve this problem for OE is
to have seperate sysroots for each recipe and these will only contain the dependencies for
that recipe.

Its worth noting that this is not task specific sysroots and that OE's dependencies do vary
enormously by task. This did result in some implementation challenges. There is nothing stopping
the implementation of task specific sysroots at some later point based on this work but
that as deemed a bridge too far right now.

Implementation details:

* Rather than installing the sysroot artefacts into a combined sysroots, they are now placed in
  TMPDIR/sysroot-components/PACKAGE_ARCH/PN.

* WORKDIR/recipe-sysroot and WORKDIR/recipe-sysroot-native are built by hardlinking in files
  from the sysroot-component trees. These new directories are known as RECIPE_SYSROOT and
  RECIPE_SYSROOT_NATIVE.

* This construction is primarily done by a new do_prepare_recipe_sysroot task which runs
  before do_configure and consists of a call to the extend_recipe_sysroot function.

* Other tasks need things in the sysroot before/after this, e.g. do_patch needs quilt-native
  and do_package_write_deb needs dpkg-native. The code therefore inspects the dependencies
  for each task and adds extend_recipe_sysroot as a prefunc if it has populate_sysroot
  dependencies.

* We have to do a search/replace 'fixme' operation on the files installed into the sysroot to
  change hardcoded paths into the correct ones. We create a fixmepath file in the component
  directory which lists the files which need this operation.

* Some files have "postinstall" commands which need to run against them, e.g. gdk-pixbuf each
  time a new loader is added. These are handled by adding files in bindir with the name
  prefixed by "postinst-" and are run in each sysroot as its created if they're present.
  This did mean most sstate postinstalls have to be rewritten but there shouldn't be many of them.

* Since a recipe can have multiple tasks and these tasks can run against each other at the same
  time we have to have a lock when we perform write operations against the sysroot. We also have
  to maintain manifests of what we install against a task checksum of the dependency. If the
  checksum changes, we remove its files and then add the new ones.

* The autotools logic for filtering the view of m4 files is no longer needed (and was the model
  for the way extend_recipe_sysroot works).

* For autotools, we used to build a combined m4 macros directory which had both the native and
  target m4 files. We can no longer do this so we use the target sysroot as the default and add
  the native sysroot as an extra backup include path. If we don't do this, we'd have to build
  target pkg-config before we could built anything using pkg-config for example (ditto gettext).
  Such dependencies would be painful so we haven't required that.

* PKDDATA_DIR was moved out the sysroot and works as before using sstate to build a hybrid copy
  for each machine. The paths therefore changed, the behaviour did not.

* The ccache class had to be reworked to function with rss.

* The TCBOOTSTRAP sysroot for compiler bootstrap is no longer needed but the -initial data
  does have to be filtered out from the main recipe sysroots. Putting "-initial" in a normal
  recipe name therefore remains a bad idea.

* The logic in insane needed tweaks to deal with the new path layout, as did the debug source
  file extraction code in package.bbclass.

* The logic in sstate.bbclass had to be rewritten since it previously only performed search and
  replace on extracted sstate and we now need this to happen even if the compiled path was
  "correct". This in theory could cause a mild performance issue but since the sysroot data
  was the main data that needed this and we'd have to do it there regardless with rss, I've opted
  just to change the way the class for everything. The built output used to build the sstate output
  is now retained and installed rather than deleted.

* The search and replace logic used in sstate objects also seemed weak/incorrect and didn't hold
  up against testing. This has been rewritten too. There are some assumptions made about paths, we
  save the 'proper' search and replace operations to fixmepath.cmd but then ignore this. What is
  here works but is a little hardcoded and an area for future improvement.

* In order to work with eSDK we need a way to build something that looks like the old style sysroot.
  "bitbake build-sysroots" will construct such a sysroot based on everything in the components
  directory that matches the current MACHINE. It will allow transition of external tools and can
  built target or native variants or both. It also supports a clean task. I'd suggest not relying on
  this for anything other than transitional purposes though. To see XXX in that sysroot, you'd have
  to have built that in a previous bitbake invocation.

* pseudo is run out of its components directory. This is fine as its statically linked.

* The hacks for wayland to see allarch dependencies in the multilib case are no longer needed
  and can be dropped.

* wic needed more extensive changes to work with rss and the fixes are in a separate commit series

* Various oe-selftest tweaks were needed since tests did assume the location to binaries and the
  combined sysroot in several cases.

* Most missing dependencies this work found have been sent out as separate patches as they were found
  but a few tweaks are still included here.

* A late addition is that extend_recipe_sysroot became multilib aware and able to populate multilib
  sysroots. I had hoped not to have to add that complexity but the meta-environment recipe forced my
  hand. That implementation can probably be neater but this is on the list of things to cleanup later
  at this point.

In summary, the impact people will likely see after this change:

* Recipes may fail with missing dependencies, particularly native tools like gettext-native,
  glib-2.0-native and libxml2.0-native. Some hosts have these installed and will mask these errors

* Any recipe/class using SSTATEPOSTINSTFUNCS will need that code rewriting into a postinst

* There was a separate patch series dealing with roots postinst native dependency issues. Any postinst
  which expects native tools at rootfs time will need to mark that dependency with PACKAGE_WRITE_DEPS.

There could well be other issues. This has been tested repeatedly against our autobuilders and oe-selftest
and issues found have been fixed. We believe at least OE-Core is in good shape but that doesn't mean
we've found all the issues.

Also, the logging is a bit chatty at the moment. It does help if something goes wrong and goes to the
task logfiles, not the console so I've intentionally left this like that for now. We can turn it down
easily enough in due course.

(From OE-Core rev: 809746f56df4b91af014bf6a3f28997d6698ac78)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:17 +00:00
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
Paul Eggleton 2b1cbb43ae classes/nativesdk: set SDK_OLDEST_KERNEL appropriately
SDK_OLDEST_KERNEL currently only controls the check on SDK installation,
however as with OLDEST_KERNEL it should be controlling the OLDEST_KERNEL
value for building glibc used in the SDK. Thus, set it in
nativesdk.bbclass. This means we need to move the default to
bitbake.conf so that it can be seen in both places.

Also set a more reasonable default for SDK_OLDEST_KERNEL for x86/x86-64 as
glibc 2.24 still supports back to 2.6.32 there and there are still
people wanting to build SDKs that will install on older distros (e.g.
CentOS 6). However it's not possible to set this with overrides since
there aren't any for the SDK_ARCH, however we can instead set the variable
from conf files in conf/machine-sdk especially as there is now a soft
default for SDKMACHINE.

Fixes [YOCTO #10561].

(From OE-Core rev: 42d5781e31c5bf76b5b7e27abed4f6f3fd65bf40)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06 23:35:33 +00:00
Richard Purdie d36c7036a2 nativesdk: Don't enable MULTILIBS
package_write_rpm references the MULTILIBS variable and the checksums
of nativesdk recipes were changing as a result of this.

We don't need/want MULTILIBS values for nativesdk so disable this.

(From OE-Core rev: 738ff6bc72533bbdeb58425b20b0bfbeff280a04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-10-01 21:45:57 +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
Richard Purdie 66a6ec2e9a nativesdk: Set PKG_CONFIG_SYSTEM_ variables
When building nativesdk recipes, we noticed paths going into .pc files
which should have been suppressed since these were standard library
search paths. pkgconfig-native sets these variables to sane values
for native recipes, we need it set to values for our specific library
paths in the nativesdk case.

Setting these values cleans up the .pc files and suppresses the paths.

(From OE-Core rev: 837c8b749b06457ba4a5a76a34ffe45d36bf4ef3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-05 11:16:41 +00:00
Christopher Larson a753bc70d5 nativesdk.bbclass: set sbindir to bindir
The sbindir vs bindir separation really doesn't mean much in this context, and
toolchain-scripts.bbclass doesn't add sbindir to the PATH, so set the former
to the latter.

(From OE-Core rev: 51a19850700bd96e3d2e104e1626aceb73a48e72)

(From OE-Core rev: 24b80d211f3808a0ffebee426932f11b8d4d46e0)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-30 12:35:59 +01:00
Chen Qi a30c6a5225 nativesdk.bbclass: set PKGDATA_DIR explicitly
For now, if we enable 'multilib' and execute `bitbake uninative-tarball
-c populate_sdk', the command would fail, complaining nativesdk-glibc not
found in package feed.

The problem is that PKGDATA_DIR is not set correctly for nativesdk packages
when multilib is enabled.

For now, we have:
meta/conf/bitbake.conf:PKGDATA_DIR = "${STAGING_DIR_HOST}/pkgdata"

The above is overriden by the following is multilib is enabled.
meta/conf/multilib.conf:PKGDATA_DIR = "${STAGING_DIR}/${MACHINE}/pkgdata"

This is correct for normal packages. However, for nativesdk packages, this
is not correctly. This is because nativesdk.bbclass set STAGING_DIR_HOST as
follows.

meta/classes/nativesdk.bbclass:STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}"

The above overrides the value in multilib.conf.

That's why we need to also set PKGDATA_DIR explicitly in nativesdk.bbclass.

(From OE-Core rev: 2f99ee5725ffc173bf32c0b707aa90adbc4eed95)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-16 17:41:53 +00: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
Peter A. Bigot 14a2d1eaa1 sdk: change EXTRA_OECONF_FPU to EXTRA_OECONF_GCC_FLOAT
This variable is used to ensure the proper version of --with-float=FOO
is passed to gcc's configure script.  gcc also has a --with-fpu=FOO
option that means something different.  To avoid confusion, change the
names to be consistent.

(From OE-Core rev: c17d883fa99b6967d83c3796d22fc0c1dbe704e6)

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-15 18:21:50 +01:00
Richard Purdie e2c2b5b3af nativesdk: Set LIBCOVERRIDE to a value
nativesdk was just unsetting LIBCOVERRIDE however that causes some build failures
for xorg-libs which used a libc override. This adds in a mechanism to force
nativesdk to glibc and give the option of allowing another selection like
uclibc if anyone ever does the work to make it operational.

(From OE-Core rev: 154f5782d95b4bca8e574d3d3fde170ce3d196ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-16 12:13:50 +00:00
Hongxu Jia 853f5db48f nativesdk.bbclass: support nativesdk to override with the PACKAGES_DYNAMIC statement
While compiling nativesdk-mtools, there was failure:
...
Nothing PROVIDES 'nativesdk-glibc-gconv-ibm850'. Close matches:
...
This patch supports nativesdk to override with the PACKAGES_DYNAMIC statement

[YOCTO #5623]
(From OE-Core rev: 315367ea9526186d5836c64867ce0cd40d9d8412)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-09 21:36:33 +00:00
Richard Purdie 4bece4b9e6 nativesdk: Fix pn check
There are missing brackets in the check meaning MLPREFIX doesn't
get set for nativesdk-qemu-helper when it should be.

(From OE-Core rev: 5011f4bc8a418d0616d2936b60ecb7ca156632a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-16 13:31:37 +01: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 50170617c6 bitbake.conf/classes/gcc: Don't hardcode -nativesdk
Hardcoding -nativesdk as the sdk package architecture is inflexible. We may have
multiple different target OS and we need a way to be able to separate them. Turning
this into a configurable value allows the flexibility we need to build different
SDKMACHINEs with different OS targets.

The commit should have no behaviour change, just makes things more configurable.

(From OE-Core rev: a2110e86b98d646e136de9ec6b8e668079b0d4f4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-23 16:20:12 +01:00
Richard Purdie b64d6af3ec Revert "nativesdk: inherit relocatable"
This reverts commit f93ddea31f.

We never run nativesdk binaries so it doesn't make sense to use the relocatable
class. The chrpath calls at packaging time will ensure the binaries are relocated
in the final packages. The binaries in the sysroot are never used.

(From OE-Core rev: 9f19d1b90c4fa04439b6267bda0484fd0b350373)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-23 16:20:12 +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
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 51ad952626 nativesdk.bbclass: Ensure we have chrpath >=0.14
Versions earlier than 0.14 can't cope with 32 bit binaries on a 64 bit
system and vice versa. This results in problems for certain SDKMACHINE
combinations on certain hosts. By ensuring we build
chrpath-replacement-native we avoid this problems and the binaries work
correctly.

[YOCTO #3161]
[YOCTO #3201]

(From OE-Core rev: f89bced26de055817100d0b0e03094b031fcfd48)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-02 17:10:34 +01:00
Richard Purdie ad23395cd1 nativesdk: Switch to using nativesdk as a prefix, not a suffix
As discussed on the mailing lists, using a suffix to package names is
hard and has lead to many recipes having to do PKGSUFFIX games. Its
looking extremely hard to scale nativesdk much further without hacking
many recipes.

By comparison, using a prefix like multilib does works much better and
doesn't involve "hacking" as many recipes. This change converts nativesdk
to use a prefix using the existing multilib infrastructure.

(From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07:00
Richard Purdie 58a8a38aa2 nativesdk: Convert to use classextend.py
This patch converts the nativesdk class itself from operating as a suffix
to a prefix (see the proceeding patch for the related changes outside this
class).

The big benefit here is that we can reuse the generic class extension code.

(From OE-Core rev: f01f0b8aed25af889f48fe1afff96feb3d9ed120)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:05 -07:00
Richard Purdie d71a35d4f6 crosssdk/nativesdk: Ensure EXTRA_OECONF_FPU is unset
If EXTRA_OECONF_FPU is left set, certain ARM variables related to hard-float
can get pulled in and trigger rebuilds of the crosssdk code. The best solution
is to simply force the variable to a known correct value for the SDK targets
currently supported in the same way as TARGET_FPU.

There is some slight rearrangement of the gcc code to ensure the variable is
always used to call the fpu function.

(From OE-Core rev: 410990445ada8cdcfaec4e6fa5791cee9a5b8983)

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>
2012-07-17 10:53:57 +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
Lianhao Lu 404cced0c2 nativesdk.bbclass: Set PACKAGE_ARCHS to SDK_PACKAGE_ARCHS.
This patch fixed the issue of reading incorrect pkgdata files. Previous
appending '-nativesdk' suffix to PACKAGE_ARCHS would result the
i686-nativesdk recipes reading in x86_64-nativesdk pkgdata files if the
MACHINE is set to qemux86-64.

Fixed bug [YOCTO #2203].

(From OE-Core rev: 951a68731f655f597c5dfa541fc913d399eabfb9)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-31 17:59:08 +01:00
Lianhao Lu 552eea2cb1 nativesdk/misc: set PKGSUFFIX for correct variable name expansion.
Set PKGSUFFIX in nativesdk.bbclass for correct variable name expansion.
This would fix bunch of "not shipped" packaging warnings in "-nativesdk"
recipes. And also bumping the corresponding PR.

(From OE-Core rev: c69268305e6f814800b64f3a4be724c40b41108c)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-23 12:13:07 +00:00
Richard Purdie c7335bd21b nativesdk.bbclass: Remove historical FILES artifact
Adding everything in ${prefix} to FILES and FILES-dbg is a historical artifact
left over from when this was sdk.bbclass back in 2009.

The BBCLASSEXTEND changes, multilib changes and cleanups to this file
over the intervening time mean this is simply no long needed.

Its also outright dangerous since it can link the packages together
in circular ways which don't make sense. The simplest thing to is
to drop this since it no longer does anything useful.

(From OE-Core rev: 9f1d23a5dd6c60ffe360d8b339768c7e4fb98323)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-16 16:05:36 +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 ea0b7440ec multilib.bbclass: Partially fix multlib image targets
This patch partially fixes problems when building multilib extended
images such as libXX-core-image-minimal. Its not a perfect/complete
solution but works much better than any previous code did.

[YOCTO #1496] (partial)
[YOCTO #1497] (partial)
[YOCTO #1498] (partial)

(From OE-Core rev: 00c38774ef0232cc2be924ed8e59220e7c452096)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-22 22:23:37 +01:00
Chris Larson f93ddea31f nativesdk: inherit relocatable
(From OE-Core rev: 6a7a5381357861a098640c42ba2f894213086b41)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-12 17:21:52 +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
Richard Purdie 0a641fea28 nativesdk.bbclass: Correct ordering of manipulations
OVERDIDES is the key variable that needs to be set prior to data finalisation.
The other variables should be manipulated after finalisation so any
DEPENDS_prepend and _append are accounted for. This patch ensures this is
the case.

The PACKAGES maniupulations are not enabled at this time as they
don't function 100% correctly yet.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-13 22:38:06 +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
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
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
Richard Purdie 2e5df820ce nativesdk.bbckass: Fix toolchain path
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-24 23:07:07 +01:00
Richard Purdie 061df5abaf meta-toolchain: Improve layout
* Switch from /usr/local/poky to /opt/poky
* Use a sysroots directory for both the "native" sdk binaries and the target
* Drop the meta-toolchain extras packages. These are replaced with packaged-staging.
* Change the nativesdk layout to match our usual filesystem layout
* Clean up various hardcoded prefix references

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-02 14:35:08 +01:00
Joshua Lock c22ab5fc9f Install cross-packages into the native sysroot
Cross is no longer required so can go away, we now install cross packages into
the native sysroot and use them from there.

This patch includes updates to classes and some recipes which reference
CROSS_DIR. Others still need fixing an image can be built and run with this
patch applied.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-04-27 18:29:57 +01:00
Richard Purdie 847324b79b classes/conf: Update to handle gcc-runtime
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-29 22:28:49 +01:00
Richard Purdie 28fc110e6d nativesdk.bbclass: Disable debug
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-02 13:16:01 +00:00
Richard Purdie 82fd3bda34 nativesdk.bbclass: Fix DEPENDS handling
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-02 13:12:53 +00:00
Richard Purdie 8aa3e16e1f nativesdk.bbclass: Drop ineffective dynamic linker flag
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-18 01:05:32 +01:00
Richard Purdie 3fbbc44cfd nativesdk/package_ipk.bbclass: Clean up sdk package architectures
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-17 22:25:25 +01:00
Richard Purdie ca667135a3 nativesdk: Convert to use crosssdk toolchain and remove binutils/gcc nativesdk recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-17 22:25:23 +01:00
Richard Purdie bc5afa640b nativesdk: Don't use search and replace on DEPENDS field
Search and replace on the DEPENDS field can cause problems if
multiple similar names are present in the string so use an
alternative approach.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-17 22:25:22 +01:00