Commit Graph

36 Commits

Author SHA1 Message Date
Richard Purdie 20a86e16bc cross-canadian: Fix TUNE_PKGARCH references
The cross-canadian compilers are now build once per architecture but were being
installed into tune specific locations which is incorrect. This adjusts things
so they are make TARGET_ARCH specific. We gain the tune specific parts from the
target sysroot which remains tune specific, the compiler and tools are independent
ot that.

binutils/gcc require sysroot options but since we reset at runtime, these shouldn't
have dependencies in the sstate checksums. They are therefore also excluded.

With these patches, switching machines does not result in a rebuild of *-cross-canadian
and the compiler is correctly located and referenced in the target images.

(From OE-Core rev: f58acab6414fe96d9e07ebbe86b348d2ac2bed5f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-04 18:26:50 +01:00
Richard Purdie 8ebe7be3d9 bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory
Currently we have a hierarchy of pkgdata directories and the code has to put together
a search path and look through each in turn until it finds the data it needs.

This has lead to a number of hardcoded paths and file globing which
is unpredictable and undesirable. Worse, certain tricks that should be
easy like a GL specific package architecture become problematic with the
curretn search paths.

With the modern sstate code, we can do better and construct a single pkgdata
directory for each machine in just the same way as we do for the sysroot. This
is already tried and well tested. With such a single directory, all the code that
iterated through multiple pkgdata directories and simply be removed and give
a significant simplification of the code. Even existing build directories adapt
to the change well since the package contents doesn't change, just the location
they're installed to and the stamp for them.

The only complication is the we need a different shlibs directory for each
multilib. These are only used by package.bbclass and the simple fix is to
add MLPREFIX to the shlib directory name. This means the multilib packages will
repackage and the sstate checksum will change but an existing build directory
will adapt to the changes safely.

It is close to release however I believe the benefits this patch give us
are worth consideration for inclusion and give us more options for dealing
with problems like the GL one. It also sets the ground work well for
shlibs improvements in 1.6.

(From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-14 08:21:00 +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 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 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 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
Laurentiu Palcu 7d68b952cb cross-canadian.bbclass: add native chrpath dependency
In order for the RPATHs in 32bit toolchain binaries to be relocated
properly, chrpath >=0.14 is needed.

[YOCTO #3161]
[YOCTO #3201]

(From OE-Core rev: 71c71b972100803d33fbb062a237e8a15167387b)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-05 12:25:14 +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 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
Nitin A Kamble 8691a58826 cross-canadian.bbclass: fix rpath for sdk executables
This makes the libraries located in places like this findable:
/usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib

Which avoids linking cross canadian sdk executables with host libraries like this:

$ ldd /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/x86_64-oe-linux/x86_64-oe-linux-gdb
        linux-vdso.so.1 =>  (0x00007fffb7fff000)
        libreadline.so.6 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/x86_64-oe-linux/../libreadline.so.6 (0x00007fbfb5511000)
        libdl.so.2 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libdl.so.2 (0x00007fbfb530c000)
        libncurses.so.5 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libncurses.so.5 (0x00007fbfb50e9000)
        libtinfo.so.5 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libtinfo.so.5 (0x00007fbfb4ec2000)
        libz.so.1 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/x86_64-oe-linux/../libz.so.1 (0x00007fbfb4cac000)
        libm.so.6 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libm.so.6 (0x00007fbfb4a2a000)
        libpthread.so.0 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libpthread.so.0 (0x00007fbfb480d000)
        libutil.so.1 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libutil.so.1 (0x00007fbfb4609000)
        libexpat.so.1 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/lib/x86_64-oe-linux/../libexpat.so.1 (0x00007fbfb43e0000)
        libc.so.6 => /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/libc.so.6 (0x00007fbfb4059000)
        /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000003f05000000)

[RP: Whitespace tweaks]
(From OE-Core rev: c97f7f4e4ecd6c431712059c34ebc17b68b055ae)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-31 18:00:59 +01:00
Richard Purdie be1443b9d0 cross-canadian: Set STAGING_DIR_HOST correctly
As reported by Martin Jansa, the path to nativesdk sysroot was changing between
nativesdk and cross-canadian recipes. The problem was the incorrect deinfition of
STAGING_DIR_HOST in cross-canadian.bbclass.

Since nothing really uses the cross-canadian output in the sysroot, only the
packages, its not surprising this bug has gone un-noticed.

(From OE-Core rev: 8c6966cb8e353dc28819419ea7e395fb0d5f2536)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26 10:56:44 +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
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 1d2f3957b5 classes/conf: Drop MULTIMACH_ARCH variable, it adds unused complexity and serves no useful purpose
(From OE-Core rev: e623d3015bbdeb2b42b9763937be899a1fa9c0ca)

Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 13:55:39 +01:00
Lianhao Lu e8dfc44a0c cross-canadian.bbclass: Correct deb package arch.
Set DPKG_ARCH to make debian package to be generated with correct
architecture.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-28 17:00:59 +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
Lianhao Lu 6a31a2a89e meta-environment: Added package of meta-environment-${TARGET_ARCH} for
environment files.

[BUGID #565] Fixing bug #565, added package of
meta-environment-${TARGET_ARCH} for environment files used by
cross-canadian toolchain.

Also corrected the situation of empty config site file for target.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2010-12-21 08:53:20 +00:00
Richard Purdie 05053efa86 cross-canadian: Update after PN changes to include TARGET_ARCH
This patch massively simplifies the canadian packaging and allows
multiple toolchain targets to be parallel installed into the same
nativesdk sysroot without package name conflits. Since we now do
this, we can simplify cross-canadian to become more like nativesdk.

This is a first pass over this task, similar changes would be
desireable to cross and the whole MULTIMACH_ARCH mess can then
probably be similified much further.

Signed-off-by: Richgard Purdie <rpurdie@linux.intel.com>
2010-12-10 16:57:21 +00:00
Lianhao Lu 2021e2a74f Using TRANSLATED_TARGET_ARCH instead of TARGET_ARCH.
Using TRANSLATED_TARGET_ARCH instead of TARGET_ARCH for
cross-canadian packages. This is due to the TARGET_ARCH of x86_64
would results incorrect packaging in cross-canadian packages.

The pacakge name appendix of x86_64 target in cross-canadian
packages is x86-64.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2010-12-10 15:36:48 +00:00
Koen Kooi 8e51f52dc5 cross-canadian bbclass: replace hardcoded -pokysdk with SDK_VENDOR
Signed-off-by: Koen Kooi <k-kooi@ti.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-03 12:58:23 +00:00
Richard Purdie cb5d51a485 cross-canadian.bbclass: Set TOOLCHAIN_OPTIONS to point at the correct sysroot
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-17 19:55:39 +01:00
Richard Purdie ec8f5299d9 cross-canadian: Move binaries into a subdirectory of bin to allow multimachine installs and update users accordingly
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-03 20:04:33 +01:00
Richard Purdie faf6b2d33e cross-canadian.bbclass: Tweak secondary toolchain path component to account for multimachine
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-25 15:42:56 +01:00
Richard Purdie 0babe2c507 cross-canadian.bbclass: Add in the target compiler paths as well as the sdk compilers
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-25 01:37:53 +01:00
Richard Purdie 42df9e99a4 cross-canadian: Fix toolchain path
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-25 01:12:06 +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 b8e16403fa cross-canadian: ensure package dependencies are generated correctly
cross-canadian packages need to look for their SOLIBS in the nativesdk
sysroot so that dependencies are correctly picked up and meta-toolchains are
correctly built.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-06-25 14:54:20 +01:00
Richard Purdie a06a85ab9b cross/cross-canadian.bbclass: Save target_exec_prefix variable
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-06-08 20:30:26 +01:00
Joshua Lock 6458da896f Fix references to CROSS_DIR now that it has been removed
CROSS_DIR is no longer removed so fix up classes, packages and documentation
which refer to it.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-04-28 16:47:14 +01:00
Richard Purdie d6c7a44b94 gcc-cross-canadian: Fix include paths and hence c++ compiler issues
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-20 15:56:35 +00:00
Richard Purdie 9604ad0ddf cross-canadian: Fix gettext issues
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-14 11:25:42 +00:00
Richard Purdie 4248fbef9f cross-canadian: Set PKGHIST_DIR to a correct value
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-02 11:34:47 +00: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 afa02c5470 cross-canadian: Add cross-canadian class with gcc and binutils recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-09-17 22:25:23 +01:00