summaryrefslogtreecommitdiffstats
path: root/meta/classes/native.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* gettext: Improve USE_NLS handling for nativesdk/crosssdk/cross-canadianRichard Purdie2013-08-231-0/+2
| | | | | | | | | | | | | | | | 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>
* classes/conf: Add eventmasks for event handlersRichard Purdie2013-06-141-3/+1
| | | | | | | | | | | 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>
* ptest bug fixesBjörn Stenberg2013-04-111-0/+3
| | | | | | | | | | | | | | | | | | | 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>
* Split do_packagedata task from do_packageRichard Purdie2013-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* classes: Drop do_package stamp-extra-infoRichard Purdie2012-11-211-1/+0
| | | | | | | | | 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>
* classes: Be consistent about sstate-inputdirs/outputdirs ending with '/'Richard Purdie2012-11-141-2/+2
| | | | | | | | | | | 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>
* classes: replace virtclass-native(sdk) with class-native(sdk)Robert Yang2012-11-021-3/+3
| | | | | | | | | | | | | 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>
* package.bbclass: Switch shlibs to pkgdata directory and make package ↵Richard Purdie2012-10-221-1/+0
| | | | | | | | | | | | | | | | | 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>
* native.bbclass: correct PATH to have native-intercept be prependedSaul Wold2012-06-281-1/+1
| | | | | | | | | | | | 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>
* classes: Add recipe class to overridesRichard Purdie2012-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* gzip/pigz-native: Install into a prefix to avoid clashing with system binariesRichard Purdie2012-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* native.bbclass: make TOOLCHAIN_OPTIONS emptyRobert Yang2012-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* native.bbclass: Fix variable remapping coverageRichard Purdie2012-01-051-1/+1
| | | | | | | | | | | | | | | | | 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>
* classes, conf: Exclude native and nativesdk recipes from libc specific overrideKhem Raj2011-12-011-0/+3
| | | | | | | | | | | | | | 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>
* getVar/setVar cleanupsRichard Purdie2011-11-271-2/+2
| | | | | | | | | 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>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-6/+6
| | | | | | | | | | | | | | | | | 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>
* native.bbclass: Ensure native recipes have a deterministic baselib valueRichard Purdie2011-10-071-0/+2
| | | | | | | | | | | | 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>
* autotools.bbclass: Set the dynamic linker search path for libtool correctlyRichard Purdie2011-09-261-0/+3
| | | | | | | | | | | | 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>
* toolchain-scripts & other classes: add TARGET_LD_ARCH & TARGET_AS_ARCH varsNitin A Kamble2011-08-051-3/+7
| | | | | | | | | 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>
* bitbake.conf/classes: Variable cleanupRichard Purdie2011-07-251-4/+0
| | | | | | | | | | | | | 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>
* native.bbclass: generate libdir from libdir_nativeYu Ke2011-07-121-0/+2
| | | | | | | | | | | | | | | 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>
* native.bbclass: Add a simple chown intercept commandMark Hatle2011-06-231-0/+2
| | | | | | | | | | | 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>
* native/nativesdk: Clean up the depends ordering after bitbake override ↵Richard Purdie2011-06-091-32/+40
| | | | | | | | | | | | | | | 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>
* native.bbclass: allow a native package to be populated into its own dirDexuan Cui2011-06-091-0/+5
| | | | Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
* cmake.bbclass: fix qmake and rpath issuesOtavio Salvador2011-05-111-0/+4
| | | | | | | | | | | 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>
* native, nativesdk, crosssdk: reset TARGET_FPUIlya Yanok2011-04-051-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* native: empty PACKAGES_DYNAMIC the way we do PACKAGESChris Larson2011-03-231-0/+2
| | | | | | | | | | | | 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>
* bitbake: machine specific sysroots implementationDongxiao Xu2011-01-251-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: Use relative path in sysroot-destdir for target recipesDongxiao Xu2011-01-211-0/+3
| | | | | | | | | | 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>
* native.bbclass: Mark various package functions as noexec since they don't do ↵Richard Purdie2010-11-281-0/+5
| | | | | | any work Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclasS: Add handing to remap RDEPENDS fields and avoid crossed ↵Richard Purdie2010-11-281-1/+13
| | | | | | target and native dependency trees Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Ensure EXTRA_NATIVE_PKGCONFIG_PATH has a default valueRichard Purdie2010-08-181-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Finally deprecate all legacy do_stage functions. This changes the existing ↵Richard Purdie2010-07-221-24/+0
| | | | | | | | warning into a fatal error if any legacy do_stage functions are found. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* relocatable.bbclass: remove hard-coded rpaths from native binariesJoshua Lock2010-02-111-0/+3
| | | | | | | | | | | The relocatable path will pre-process built binaries in SYSROOT_DESTDIR and replace any harcoded dynamic link rpaths with relative paths. Add an inherit of class in native.bbclass to make our native packages relocatable and tweak the chrpath recipe so that the native package can make itself relocatable with the just built chrpath binary. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* gettext.bbclass: Set the gettext dependencies correctly for target, cross ↵Richard Purdie2010-01-051-0/+2
| | | | | | and native packages Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Make sure PACKAGES is empty in case _prepend or _append are usedRichard Purdie2009-11-161-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Fix DEPENDS handling for BBCLASSEXTEND useRichard Purdie2009-11-131-29/+21
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* base/autotools.bbclass: Make sure extra dependencies are not lost for native ↵Richard Purdie2009-11-131-2/+0
| | | | | | and nativesdk BBCLASSEXTEND. Ugly but no simpler/neater way seems possible Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Improve DEPENDS mangling code so sub matches don't break ↵Richard Purdie2009-11-131-5/+11
| | | | | | upon substitutions Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: If do_stage isn't overridden, allow do_install to run for ↵Richard Purdie2009-11-131-5/+5
| | | | | | | | native packages Also let do_install run for packages that run autotools_stage_all directly Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Use prefix_native variableRichard Purdie2009-09-171-2/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Remove layout_* variablesRichard Purdie2009-09-171-26/+9
| | | | | | | | | | | | Remove layout_* variables and replace them with variables specific to the different classes. The layout variables were only useful for the native/cross classes and caused more confusion than they solved. They didn't scale to the sdk class. It now clear a small set of native/cross variables fulfil the needs. This patch also changes native.bbclass to use "/" as the STAGING_DIR which makes sense since we're installing binaries into the locations we're compiling them for. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Drop INHIBIT_NATIVE_STAGE_INSTALL function and wrap logic in ↵Richard Purdie2009-06-111-10/+16
| | | | | | a do_stage_native() wrapper which packaged-staging can detect Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* native.bbclass: Add virtclass-native to OVERRIDES and use in fakeroot to ↵Richard Purdie2009-01-051-0/+1
| | | | function correctly
* native.bbclass: Handling remapping of PROVIDES similar to sdk.bbclassRichard Purdie2009-01-051-0/+10
|
* Remove unneeded S variablesRichard Purdie2009-01-031-0/+2
|
* zlib: Clean up recipe and use BBCLASSEXTEND for native and sdk versionsRichard Purdie2009-01-031-0/+6
|
* native/sdk.bbclass: Handle DEPENDS and PROVIDES fields magically, remove a ↵Richard Purdie2009-01-031-0/+18
| | | | number of xorg sdk and native packages replacing with BBCLASSEXTEND
* native.bbclass: Also override BASE_PACKAGE_ARCHRichard Purdie2008-07-211-0/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4917 311d38ba-8fff-0310-9ca6-ca027cbcb966
* native.bbclass: Override BASEPKG_HOST_SYS and TARGET_SYS in the native caseRichard Purdie2008-07-211-0/+3
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4916 311d38ba-8fff-0310-9ca6-ca027cbcb966