Commit Graph

116 Commits

Author SHA1 Message Date
Noor-Ahsan
6455f012f7 Merge pull request #141 from MentorEmbedded/avoid-32-bit-pseudo-deps-for-64-bit-exttc
tcmode: disable 32-bit pseudo for 64-bit codebench
2016-11-02 14:30:25 +05:00
Christopher Larson
8beb762f87 tcmode: add EXTERNAL_TARGET_SYS to BUILDCFG_VARS
It's useful to know which target triplet/system was selected by the logic in
the tcmode file, as it searches EXTERNAL_TOOLCHAIN to determine which to use.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-10-31 15:05:08 -07:00
Christopher Larson
b10e0d438b tcmode: disable 32-bit pseudo for 64-bit codebench
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-10-29 18:39:18 -07:00
Christopher Larson
ff09932eb4 tcmode: drop old triplets/prefixes
Per @Noor-Ahsan, drop old unsupported lite toolchain triplets.

JIRA: SB-8226

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-10-17 09:09:41 -07:00
Christopher Larson
fbf6ffdc72 Add bits to handle the new codebench layout
If the user hasn't set EXTERNAL_TOOLCHAIN, but CODEBENCH_PATH is set, then we
automatically set both EXTERNAL_TOOLCHAIN and EXTERNAL_TARGET_SYS based on the
installed toolchains in CODEBENCH_PATH/../toolchains.

This adds a new variable, rather than allowing EXTERNAL_TOOLCHAIN to point to
CodeBench instead of the actual toolchain path, to keep the clean separation
between the generic toolchain logic and that which is specific to our
toolchains, and also avoids overloading the variable's meaning.

JIRA: SB-7881

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-09-30 09:07:41 -07:00
Christopher Larson
f23e3c8a4b tcmode: sort EXTERNAL_TARGET_SYSTEMS by priority
If multiple are available, the 'mentor' triplets are preferred, as that's the
non-lite toolchain. Sort them so those are first, as we stop at the first one
we find.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-09-30 09:07:41 -07:00
Christopher Larson
dc7560396c Merge remote-tracking branch 'origin/cedar' into cedar-merge
* origin/cedar:
  tcmode-external-sourcery: Add MGLS_LICENSE_FILE if not found in environment

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-03-25 20:08:44 -07:00
Christopher Larson
d075fdc52f tcmode: use -Wl,--as-needed
There's no reason not to make use of it, and it's used by default with the
internal toolchain, so this aligns us closer to that.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-03-18 17:06:05 -07:00
Christopher Larson
47779f4795 Merge pull request #125 from kergoth/improve-missing-binary-error 2016-03-15 08:43:05 -07:00
Sujith Haridasan
d2c9b9ca7c tcmode-external-sourcery: Add MGLS_LICENSE_FILE if not found in environment
Add MGLS_LICESNE_FILE and LM_LICENSE_FILE if not found in environment.

JIRA: SB-6778

Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
2016-03-11 11:52:46 +05:30
Christopher Larson
d2b234e5d3 Pass *_LICENSE_FILE to gcc in msgxx-glibc test
This can fix a failure to pick up the needed argument for our flags.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-03-09 20:04:02 -07:00
Christopher Larson
96866fa35b Improve the error for missing gcc binary
Old messages:

    WARNING: EXTERNAL_TARGET_SYS == TARGET_SYS. This indicates that the prefixes specified by EXTERNAL_TARGET_SYSTEMS were not found.
    ERROR: EXTERNAL_TOOLCHAIN gcc path '<external-toolchain>/bin/arm-mel-linux-gnueabi-gcc' does not exist

New message:

    ERROR: Unable to locate prefixed gcc binary for arm-mel-linux-gnueabi in <external-toolchain>/bin

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-03-09 20:03:39 -07:00
Christopher Larson
8ce4d4c958 Set BASELIB rather than baselib
We get build failures otherwise.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-03-08 13:34:12 -07:00
Christopher Larson
26e7e8a719 Switch nativesdk-external-script to target
This alters the vars for the cross-compiler, not the build tools, so this is
most appropriate, and is one less thing to have in TOOLCHAIN_HOST_TASK.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-02-20 11:14:29 -07:00
Christopher Larson
bff6639c33 tcmode: define LDEMULATION_x86-64
Work around failure in 'perf' due to use of ld rather than gcc to link.

JIRA: SB-6527

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-02-01 16:41:12 -07:00
Christopher Larson
4e46bea8b9 tcmode: also override baselib for x86-64
The Sourcery x86-64 toolchain leaves 'lib' empty and uses 'lib64' for
everything, so force that in the tcmode the way we do for aarch64.

This also switches from hardcoding BASELIB to using the bits defined in the
tuning files, to reduce how much is being hardcoded.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2016-01-22 09:19:33 -07:00
Drew Moseley
5dd5e8f4f9 external-sourcery: Set PREFERRED_PROVIDER of gdbserver to gdb
This forces the default setup to require gdbserver from the gdb package
rather than pulling it from the external-sourcery packages.

This allows the inclusion of target-tools (and specifically gdb) in the
build image without resulting in multiple providers of gdbserver.

Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
2016-01-04 15:53:55 -07:00
Abdur Rehman
6dc3851551 sourcery-tuning: remove -mcpu flag for t4240rdb-64b
Remove -mcpu=e6500 flag from TUNE_CCARGS for t4240rdb-64b
to match the toolchain options, in ADE's environment script,
with the CS3 data used by the IDE(Sourcery CodeBench).

IDE reads in the individual ABI and other toolchain options
from ADE's environment-setup script and attempts to map each
value to its appropriate OptionValue in the target data
plugin.xml. Many of the the values in the plugin.xml
(particularly the ABI values) originate from the CS3
information.

When the IDE finds a value in environment-setup script which
cannot be mapped to a value in plugin.xml, e.g -mcpu=e6500 in
this case, it simply appends it to the misc option field and
this behavior is known to be imperfect.

JIRA: SB-6290

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
2015-12-08 20:11:29 +05:00
Abdur Rehman
9c6f30b657 sourcery-tuning: add tune args for e6500
Move bits for setting TUNE_CCARGS and TUNE_ASARGS for e6500
from tune-ppce6500.inc to sourcery-tuning.inc.

tune-ppce6500.inc has some additional bits compared to the
same file in poky. Only move those additional bits to
sourcery-tuning.

Remove tune-ppce6500.inc as it is no longer required.

JIRA: CB-5647

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
2015-11-13 20:50:49 +05:00
Christopher Larson
d2b3e641de tcmode: explicitly check for bindir's existence
JIRA: SB-6206

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-11-04 09:58:32 -07:00
Christopher Larson
c2a2eb36f0 tcmode: kill redundant Error: in sanity check errors
bb.fatal already prints ERROR:, so prefixing it with Error: is pointless and
redundant.

JIRA: SB-6206

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-11-04 09:58:26 -07:00
Abdur Rehman
3ac97834f1 tcmode: set localedir back to ${exec_prefix}/lib/locale
This reverts commit 4c72f28c6e
to align localedir with the external toolchain

Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
2015-10-21 21:46:45 +05:00
Christopher Larson
89002198a4 tcmode: fix BASELIB for aarch64
The library path in the sourcery toolchain for aarch64 is lib64, not lib.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-10-14 21:13:22 -07:00
Christopher Larson
b90444dfbd tcmode: add aarch64 to EXTERNAL_TARGET_SYSTEMS
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-10-13 12:45:54 -07:00
Christopher Larson
5ce0b68788 Use --no-sysroot-suffix
With this, we can avoid the need to create a symlink for the multilib sysroot
suffix. This also adds a nativesdk package to the sdk to adjust the
environment setup there to use it as well.

JIRA: SB-6018

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-10-07 12:56:19 -07:00
Christopher Larson
4c72f28c6e tcmode: drop wrong localedir override
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-09-17 14:34:13 -07:00
Christopher Larson
fc71b90a13 tcmode: improve CodeBench PATH removal
We were explicitly removing the old default install path. Rather than
explicitly removing the new install path, remove */codebench/bin/, since
that's the new structure of the installs.

JIRA: SB-5383

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-08-04 12:07:54 -07:00
Christopher Larson
bfc86fd9c4 oe.external: move common functions here
Also provide external-common.bbclass to wrap its inclusion and setup
associated metadata. This will make easier to search sysroots for files
without pulling in the rest of the external toolchain class.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-07-29 13:10:51 -07:00
Christopher Larson
e030657d62 sourcery-tuning: fix -march=armv5e failures
The most common failure case was qemuarm. Currently, ARMPKGSFX_THUMB is used
in TUNE_CCARGS, and it only includes 't' when ARM_INSTRUCTION_SET=thumb.
Bypass that check for armv5, as we need -march=armv5te rather than
-march=armv5t, but we still want -mthumb removed when appropriate.

Fixes #86

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-07-29 11:24:37 -07:00
Christopher Larson
bae98b2af6 tcmode: blacklist gcc-source
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-07-21 12:46:11 -07:00
Christopher Larson
ba1954bc85 Split out blacklist_dynamic.bbclass
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2015-07-21 12:45:42 -07:00
Christopher Larson
f21cb41351 Properly blacklist ${TARGET_ARCH}-suffixed recipes
This fixes issues with multilib handling.

JIRA: SB-4705

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-06-30 19:11:19 -07:00
Christopher Larson
2a27def5b6 gcc-runtime-external: use upstream metadata
Also splits sanitizers into gcc-sanitizers to align with oe-core.

JIRA: SB-5005

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-30 09:02:18 -07:00
Christopher Larson
c95d2ddbc0 tcmode: blacklist libgcc-initial
Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-28 11:45:16 -07:00
Christopher Larson
251db4c885 tcmode: improve external toolchain sanity checks
- Move from BuildStarted time to TreeDataPreparationStarted, as we want
  bitbake -e to work, so it has to run after ConfigParsed, and we want to see
  these errors rather than the highly verbose unbuildable -external recipe
  errors which occur when generating the runqueue, so we need to run before
  BuildStarted.
- Add 'does gcc exist' sanity test. This also shows an informative warning if
  the bindir exists, but the gcc binary doesn't, and EXTERNAL_TARGET_SYS ==
  TARGET_SYS, which indicates we failed to find a prefix via
  EXTERNAL_TARGET_SYSTEMS.
- Add 'is GCC_VERSION UNKNOWN' sanity test, mentioning the failure of gcc
  version extraction, and pointing to the debug messages to see what actually
  happened.

JIRA: SB-4850, SB-1029

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-20 13:29:31 -07:00
Christopher Larson
05a7e45b7b tcmode: don't use the Name handling in inline python
Currently, the checksumming doesn't handle it well.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-20 13:22:12 -07:00
Christopher Larson
6ffb77e4c9 external-run: use debug messages, not warnings
While these messages are useful when debugging, the warnings clutter up the
log due to running before our sanity checks, potentially confusing the user.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-20 13:16:10 -07:00
Christopher Larson
13b7be29ba Handle EXTERNAL_TOOLCHAIN correctly in checksums
We want the path included in the checksums for the -external-cross recipes, as
they wrap the external binaries and hardcode that path, but we don't want it
included in the checksums for anything else, and we don't want rebuilding the
external-cross recipes to cause rebuilds of thing sthat depend upon them.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-01 13:17:32 -07:00
Christopher Larson
279a1b01d9 tcmode: don't include EXTERNAL_TARGET_SYSTEMS in checksums
We only care about the resulting value of EXTERNAL_TARGET_SYS, not the
components that fed into it.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-01 13:16:39 -07:00
Christopher Larson
5f40a4db3c tcmode: ensure that SOURCERY_VERSION's value is in our checksums
Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-04-01 13:15:35 -07:00
Christopher Larson
a653aaf0c9 Merge pull request #63 from MentorEmbedded/external-run-in-tmpdir
external-run.inc: run in TMPDIR, not TOPDIR
2015-03-31 11:49:56 -07:00
Christopher Larson
4a2f9d3bb1 external-run.inc: run in TMPDIR, not TOPDIR
TMPDIR is already in the BB_HASHBASE_WHITELIST, whereas TOPDIR is not.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-03-31 11:48:44 -07:00
Christopher Larson
864d52f9c8 tcmode: drop sdk toolchain removal
This is more a distro/user decision, I think, so move it there. Also this was
insufficient, as just removing `packagegroup-cross-canadian-${MACHINE}` without
adding back in `meta-environment-${MACHINE}` results in an sdk which hangs on
install.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2015-01-27 09:04:51 -07:00
Christopher Larson
0beb66b376 Split up external-sourcery-toolchain into separate recipes
common-license.bbclass will set LIC_FILES_CHKSUM to a common license file
based on LICENSE, which is appropriate for a case where we have no sources to
refer to.
external-toolchain.bbclass, among other things, handles extraction of files in
the external toolchain sysroot, based on patterns in the FILES variables,
checking alternate locations to better support any arbitrary toolchain, and
has basic mirror handling for checking multiple paths within the sysroots.

Under normal circumstances, I'd want this to use highly granular commits, but
this branch has been extremely long lived (>1yr) and is such an invasive
refactoring that attempting to break it down now would be of limited
usefulness.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2014-12-19 10:35:25 -07:00
Christopher Larson
c9e4b593af tcmode: don't set SDKGCCVERSION
There's no need for the crosssdk and nativesdk gcc bits to be the same version
as the external toolchain.

JIRA: SB-3919

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2014-10-31 20:32:49 -07:00
Christopher Larson
8856633063 Merge remote-tracking branch 'origin/release/2014.05'
* origin/release/2014.05:
  tcmode: disable pseudo for gcc/g++/cpp
  Revert "Merge pull request #36 from MentorEmbedded/sb-1905"
2014-10-27 17:34:18 -07:00
Christopher Larson
0bad0369f0 Adjust for poky switching to glibc
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2014-09-02 09:07:08 -07:00
Christopher Larson
6dae53dcd3 Merge remote-tracking branch 'origin/daisy'
* origin/daisy:
  tcmode: Add -msgxx-glibc option if supported by the tools.
2014-07-21 12:44:55 -07:00
Christopher Larson
e7c5f947bf tcmode: disable pseudo for gcc/g++/cpp
The sourcery toolchain writes temporary files to /tmp, and includes the
username. If multiple users are doing builds with pseudo enabled, it'll try to
write to the other user's file, since both will use 'root', and the build will
fail as a result.

We don't want to wrap all the toolcahin binaries, as they don't all call the
tools which write these lockfiles, and objcopy has to be excluded, as it
modifies installed binaries when the packaging process splits out the debug
info. If that operation occurs outside of pseudo's knowledge, Bad Things will
happen.

JIRA: MEIP-393, SB-1905

Signed-off-by: Christopher Larson <kergoth@gmail.com>
2014-07-21 11:34:22 -07:00
Christopher Larson
6f37610680 Revert "Merge pull request #36 from MentorEmbedded/sb-1905"
This reverts commit f901bfd098, reversing
changes made to 69d2f98eda.

cs-license & friends don't obey TMPDIR, so this workaround had no useful
effect for our builds.
2014-07-18 16:03:21 -07:00