aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/native.bbclass
AgeCommit message (Collapse)Author
2018-05-22bitbake.conf: drop _build-${BUILD_OS} over-rideAndre McCurdy
Building on a host OS other than a recent version of Linux is not recommended or supported. Drop the historical _build-${BUILD_OS} over-ride to avoid giving the impression that other host OS's might be supported. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-15native.bbclass: drop _virtclass-native and _virtclass-nativesdk overridesAndre McCurdy
The _virtclass-XXX over-rides are problematic in that they are higher priority than _forcevariable, which is documented as being the highest priority over-ride. Since they are now obsolete (replaced by _class-native and _class-nativesdk) drop them entirely rather than try to fix their priority. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-04native bbclass: handle base_libdir as wellKoen Kooi
Native.bbclass needs to fixup both base_libdir and libdir to handle things like multiarch. This fixes wic and ext4.* image failures during do_rootfs where mkfs.ext4 can't find its libraries. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-01-09native/cross: remove redundant DEPENDS_GETTEXT assignmentRoss Burton
DEPENDS_GETTEXT defaults to gettext-native, so there's no need to set it again in these classes. Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-06-16meta: Drop further remnants of uclibc supportRichard Purdie
uclibc support was removed a while ago and musl works much better. Start to remove the various overrides and patches related to uclibc which are no longer needed. uclibc support in a layer would still be possible. I have strong reasons to believe nobody is still using uclibc since patches are missing and I doubt the metadata even parses anymore. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12native/nativesdk: Ensure DISTRO_FEATURES is determisticRichard Purdie
set() order is random and hence the filtered native/nativesdk DISTRO_FEATURES could be set to random ordering. We've been lucky so far this tended not to cause issues but some queued changes highedlighted this. Thrown in a sorted() so the order is deterministic and we get consistent hash checksums between runs and between machines. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-10bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-componentsPeter Kjellerstedt
The path to where to install and find the sysroot components is used in many places. This warrants it to get its own variable. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12native/nativesdk: Use fixed DISTRO_FEATURESJussi Kukkonen
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. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-23native.bbclass: clear MACHINE_FEATURESAndre McCurdy
Try to avoid native recipes accidentally being dependent on MACHINE_FEATURES. This simple change doesn't prevent MACHINE_FEATURES set via MACHINE_FEATURES_BACKFILL sneaking through, but it's better than nothing. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-23native.bbclass: populate native recipe with it's filesSaul Wold
This allows a native package's recipe-sysroot-native to be populated with that packages native image files. This in turns allows it to be used by scripts or other tools without creating un-necessary DEPENDS. An example of this is systemtap-native and the crosstap script. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31sstate: Make SSTATE_SCAN_CMD vars configurable using weak defaults.Kristian Amlie
For this we move them out of the python section so they can be overridden on a per-recipe basis. The motivation for this change is that not all tool chains need the path modifications provided by the command, and these will provide alternative or empty commands. The Go compiler is such an example. Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23Switch to Recipe Specific SysrootsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
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\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-10-03classes/native: set lt_cv_sys_lib_dlsearch_path_specRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-06bitbake.conf/native/nativesdk: Set PKG_CONFIG_SYSTEM_ at top levelRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31native.bbclass: Set CXXFLAGS from BUILD_CXXFLAGS not BUILD_CFLAGSPhil Blundell
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. Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-14nopackages: Add class for recipes which don't generate packagesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21native: Move virtclass override to earlier so DEPENDS is handled correctlyRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-25native: Improve PROVIDES handlingRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-15native.bbclass: avoid unintended substring replacement when setting PROVIDESMario Domenech Goulart
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 Signed-off-by: Mario Domenech Goulart <mario@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-02-03native: remove PN from DEPENDS automaticallyRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-10-24native.bbclass: use BUILD_* variablesRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-09-01native.bbclass: deltask package_qaRobert Yang
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' Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27native/nativesdk: Clear MACHINEOVERRIDESKhem Raj
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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-14native.bbclass: Properly define directoriesMatthieu Crapet
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. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-11classes/lib/oe: Fix cross/crosssdk referencesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-04-24native.bbclass: Override TARGET_ flags tooMike Crowe
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. Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-20native: Use deltask to remove tasks which have no purposeRichard Purdie
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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-05bitbake.conf/native.bbclass: Use FC instead of F77 for fortranRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04cross/crosssdl/native/nativesdk: Fix do_packagedata stampsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30native: Use a native site file and ensure the correct sed is usedRichard Purdie
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 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-08-22gettext: Improve USE_NLS handling for nativesdk/crosssdk/cross-canadianRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14classes/conf: Add eventmasks for event handlersRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-11ptest bug fixesBjörn Stenberg
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. 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-01-25Split do_packagedata task from do_packageRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-21classes: Drop do_package stamp-extra-infoRichard Purdie
This was needed when do_package for target recipes was target specific however since it now isn't we can remove these stale references. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-14classes: Be consistent about sstate-inputdirs/outputdirs ending with '/'Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang
The overrides virtclass-native and virtclass-nativesdk are deprecated, which should be replaced by class-native and class-nativesdk. [YOCTO #3297] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-10-22package.bbclass: Switch shlibs to pkgdata directory and make package ↵Richard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28native.bbclass: correct PATH to have native-intercept be prependedSaul Wold
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. Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-04-26classes: Add recipe class to overridesRichard Purdie
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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21gzip/pigz-native: Install into a prefix to avoid clashing with system binariesRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-19native.bbclass: make TOOLCHAIN_OPTIONS emptyRobert Yang
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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2012-01-05native.bbclass: Fix variable remapping coverageRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01classes, conf: Exclude native and nativesdk recipes from libc specific overrideKhem Raj
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. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-26getVar/setVar cleanupsRichard Purdie
Complete the bb.data.getVar/setVar replacements with accesses directly to the data store object. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie
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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-06native.bbclass: Ensure native recipes have a deterministic baselib valueRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-26autotools.bbclass: Set the dynamic linker search path for libtool correctlyRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-05toolchain-scripts & other classes: add TARGET_LD_ARCH & TARGET_AS_ARCH varsNitin A Kamble
This is comming from x32 need to pass special parameters to ld & as. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>