Commit graph

78 commits

Author SHA1 Message Date
Anas Nashif 839db87bb8 toolchain: host toolchain does not support newlib
The host toolchain does not support newlib.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-10 11:57:17 -06:00
Anas Nashif fc3d8ac863 toolchain: espressif: mark newlib support false
newlib is not supported with this toolchain, so mark it as such and
filter tests based on the variable defined in the toolchain file.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-07 22:46:10 -06:00
Anas Nashif 114a1154ef toolchain: Support multiple versions of the Zephyr SDK
Depending on the installed and enabled SDK, we now load the right
configuration allowing people to migrate gracefully to the new SDK.

The selection is done based on the version of the SDK. Minimal required
SDK is still kept as 0.9.5.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 10:51:14 -06:00
Anas Nashif 55cf16a524 toolchains: move zephyr sdk host tools to toolchain folder
Should be part of other files related to the Zephyr SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-24 10:51:14 -06:00
Mark Ruvald Pedersen 2cf134f797 cmake: Introduce host toolchain for POSIX arch
Make POSIX's host toolchain follow convention of other toolchains.

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2019-01-10 14:56:32 -05:00
Anas Nashif 857644997e xtools: support xtensa hal
Xtensa toolchain has a HAL library that needs to be compiled in similar
to how we do this with the Zephyr SDK.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-01-04 14:32:30 -05:00
Mark Ruvald Pedersen 0efad5f7fd cmake: Whitespace and commentary fixes
Cosmetics, no functional change expected.
Fixed leading space alignment.
Replaced tabs with spaces.
Emulation error message output is now aligned.

To locate tabs in cmake, the following bash is useful:
grep -PRil "\t" * | grep -i cmake | grep -v ^sanity

Signed-off-by: Mark Ruvald Pedersen <mped@oticon.com>
2018-12-20 12:23:50 +01:00
Sebastian Bøe a0a63ac344 cmake: Split toolchain configuration into pre-and post-DT
Split up the toolchain configuration into two phases, generic and
target. The 'generic' phase configures the toolchain just enough to be
able to preprocess DT files. The 'target' phase completes the
configuration with target-specific configuration.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-14 13:16:28 +01:00
Sebastian Bøe ef5cdbb390 cmake: toolchain: clang: Use 'find_program' and TOOLCHAIN_HOME
Align 'clang' with 'gcc' by having it also use 'find_program' instead
of 'set' to assign toolchain paths.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-13 08:36:58 -06:00
Sebastian Bøe ab2139a90f cmake: toolchain: llvm: Move the compiler assignment into 'compiler'
Align 'clang' with gcc by having it also set CMAKE_C_COMPILER in the
'compiler' build script instead of the 'toolchain' build script.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-13 08:36:58 -06:00
Sebastian Bøe bb278b688e cmake: toolchain: Change the names of 'clang' and 'llvm'
The 'llvm' and 'clang' build scripts have been named strangely. It is
more natural for 'clang' to be the compiler, and 'llvm' to be the
toolchain.

This commit rectifies this by renaming the files.

This also fixes #11187

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-13 08:36:58 -06:00
Sebastian Bøe 87858fd4e2 cmake: toolchain: Minor refactoring
Fixed whitespace such that 'XTOOLS_TOOLCHAIN_PATH' is vertically
aligned.

Also, combined two cmake invocations of 'list' into one.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe e9a49047a0 cmake: Remove unnecessary comments
Remove unnecessary comments.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe 75811428c3 cmake: toolchain: Use ARCH instead of CONFIG_ARCH
ARCH is available before CONFIG_ARCH, and is otherwise identical. So
it is better to use ARCH than CONFIG_ARCH as this allows the code to
be moved around more freely.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe 4f61c2a58d xcc: Drop the seemingly unused XCC_BUILD variable
Drop the seemingly unused XCC_BUILD variable because it depends on
Kconfig and we need to cut the toolchain's dependency on Kconfig.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-12-07 12:53:20 -05:00
Sebastian Bøe 8ba5aff8c0 kconfig: Drop support for specifying CROSS_COMPILE through Kconfig
When we move DT infront of Kconfig we are going to need access to a C
toolchain before Kconfig is evaluated. This means it will not be
possible to specify the toolchain used through Kconfig.

To deal with this we ...

Drop support for specifying CROSS_COMPILE through Kconfig. Still
available is the ability to specify CROSS_COMPILE through the
environment or through a CMake variable.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-11-19 15:04:13 -05:00
Daniel Leung 2ce9d81a88 cmake: xcc: fix compile warnings and errors
XCC does not support the "-undef" flag so set NOSYSDEF_CFLAGS to
empty string to fix compile warning.

Also, XCC does not supply the macro __SIZEOF_LONG__ which breaks
the build. So define it.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2018-11-01 16:30:02 -04:00
Carles Cufi 957262e37d build: Replace GCC ARM Embedded with GNU Arm Embedded
The old GCC ARM Embedded website on launchpad
(https://launchpad.net/gcc-arm-embedded) has been superseeded by the new
GNU Arm Embedded one
(https://developer.arm.com/open-source/gnu-toolchain/gnu-rm).

This also means a change of name from "GCC" to "GNU". Reflect this in
the enviroment variables so that the proper term is used henceforth.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-08-09 13:57:55 +02:00
Anas Nashif 93ca721c48 xtools: set toolchain vendor to zephyr
For xtools, we set the vendor to zephyr directly and do not get it from
a variable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-13 16:17:23 -05:00
Anas Nashif 0009df8212 toolchains: fix multilib libc linking with xtools
Fixed linking with multilib toolchains by adjust the path to sysroot.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif 458fe44692 toolchain: iamcu support with xtools toolchain
Support both x86 and iamcu variants of the toolchain.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif 7c15934b53 toolchains: add xtools support for ARC
Latest crosstools NG supports ARC, so add it here for those who build
their own toolchains using xtools-ng or use the scripts from sdk-ng repo
in the zephyr project.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-08 15:39:35 -04:00
Anas Nashif 72edc4e15f clang/llvm: add initial configuration file for clang
Add an LLVM backend and a clang toolchain variant to support building
with llvm coming with popular Linux distributions.

This has been tested with X86 boards:
- quark_d2000_crb
- quark_se_c1000_devboard/Arduino 101

Use:

export ZEPHYR_TOOLCHAIN_VARIANT=clang

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-01 22:58:09 +02:00
Sebastian Bøe cde6bef778 kconfig: Drop support for CONFIG_TOOLCHAIN_VARIANT
The Kconfig option TOOLCHAIN_VARIANT (not to be confused with
ZEPHYR_TOOLCHAIN_VARIANT) is a legacy configuration option that has
very few use-cases and can easily be dropped.

It's functionality is easily covered by CONFIG_X86_IAMCU and
ZEPHYR_TOOLCHAIN_VARIANT.

This commit removes all references of it from Zephyr.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-05-22 11:15:36 -04:00
Rajavardhan Gundi 08172cdf83 xtensa: provide XCC compiler support for Xtensa
This patchset provides Xtensa's xcc compiler support for Xtensa
projects in Cmake. This requires the below environment variables
to be defined aptly. The appropriate xcc license information also
need to be supplied.

ZEPHYR_GCC_VARIANT=xcc
TOOLCHAIN_VER=RF-2015.3-linux
XTENSA_CORE=cavs21_LX6HiFi3_RF3_WB16
XTENSA_SYSTEM=/opt/xtensa/XtDevTools/install/tools/
		RF-2015.3-linux/XtensaTools/config/
XTENSA_BUILD_PATHS=/opt/xtensa/XtDevTools/install/builds/

Change-Id: Ib3c10e8095439b0e32276ff37c00eca8420773ec
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-05-01 16:46:41 -04:00
Anas Nashif f8c1cc175a toolchain: update xtools config
Add placeholders for all possible xtools toolchains.

Fixes #6911

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-30 12:54:35 -04:00
Marti Bolivar 98456b30f8 cmake: fix set_ifndef() usage patterns
If the value argument to set_ifndef() may be unset, the entire value
must be double-quoted to avoid a CMake syntax error.

Fix call sites which don't handle this, or which otherwise make
non-idiomatic use of this function.

Signed-off-by: Marti Bolivar <marti@opensourcefoundries.com>
2018-03-23 05:32:44 -04:00
Anas Nashif 622ab2f6fd toolchain: organise toolchain/compiler files
Move toolchain definitions into toolchain/ and move compilers to
compilers/
Usage of toolchain- for everything was confusing, there are the actual
compiler related definitions and there is the toolchain/SDK related
configs, so keeping them separate helps understand the different and
prevents confusion.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-13 07:44:45 -08:00