Commit graph

9 commits

Author SHA1 Message Date
Nikolay Agishev 3ccbef2d55 ARCMWDT: Turn off picolibc support
MetaWare toolchain doesn't support building Zephyr with
Picolibc module. This PR fixes biuld process by turning off
picolibc support on compiler side.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-18 15:54:05 +03:00
Nikolay Agishev e97d33d0c8 ARCMWDT: Fix building under hwmv2 model
On very early stage build system needs to get access to DTC preprocessor.
MWDT has no it's own preprocessor, so here zephyr-SDK preprocessor is used.
On latest build stages zephyr-SDK objcoby also required as MWDT binutils
don't support all features. This at the same time requires that
ZEPHYR_SDK_INSTALL_DIR must be initialized with valid arch-dependent
prefix.

Zephyr-SDK requires ARCH variable to be initialized before
include "generic.cmake", but in hew HWMv2 model ARCH variable will be
initialized more later. This workaround uses any (first awailable,
independent on ARCH) toolchain from SDK for DTC preprocessing only.
For other build stages ARCMWDT will be used.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-05-07 10:44:15 +02:00
Pieter De Gendt cb459f12ba arcmwdt: Enable GNU C Extensions
Replace the global CSTD property with a Kconfig symbol selection.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-04-25 09:54:39 +00:00
Evgeniy Paltsev c75bf5ebc5 ARC: MWDT: cleanup search path handling
Cleanup ARC MWDT search path handling:
 * Don't print warning if ARCMWDT_TOOLCHAIN_PATH is missing but
   METAWARE_ROOT is set. Treat it as valid case and do message
   with status level instead of warning.
 * Make rest of the error messages more understandable for users.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-29 10:03:35 +00:00
Evgeniy Paltsev b64cfe9832 ARC: MWDT: rework GNU helper tools usage
As of today MWDT toolchain in case of Zephyr may use few
tools from GNU toolchain - GNU compiler for DTS preprocessing
and objcopy for section renaming.

Currently we were trying to find any GNU compiler & objcopy
which start to cause compatibility issues for new targets -
i.e. not every objcopy knows new ARC targets.

Let's use ARC GNU tools from Zephyr SDK as we still usually
require it when building with MWDT for other tools like DTC
(device tree compiler)

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-17 07:44:31 -04:00
Evgeniy Paltsev 1f57517e2c ARC: ARCMWDT: check METAWARE_ROOT if ARCMWDT_TOOLCHAIN_PATH missing
ARC MWDT toolchain installation provides METAWARE_ROOT environment
variable. Let's check METAWARE_ROOT environment variable if
zephyr-specific option ARCMWDT_TOOLCHAIN_PATH missing.

That improves user experience.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-03-30 13:49:40 +02:00
Evgeniy Paltsev ae79de1930 ARC: MWDT add TLS support
Add thread local storage support for ARC MWDT toolchain.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-11-29 09:48:23 +01:00
Torsten Rasmussen 56c827ac2c cmake: use zephyr_get in toolchains to ensure identical behavior.
Fixes: #40389

Update toolchain handling to use zephyr_get() to ensure consistent
handling of CMake cache variables, environment variable, and CMake
local variables.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2022-09-02 15:16:50 +02:00
Wayne Ren b868018b51 cmake: add metaware toolchain support in build system
* add metaware toolchain support in build system:
   * compiler
   * linker
   * binutils
     * gcc objcopy is used because it can't be replaced
       with mwdt's binutils currently
* To use ARC metaware toolchain, you'd better:
   * in Linux/Unix environment
   * install arc gcc/zephyr toolchain to use gnu's objcopy
     tool
   * set ZEPHYR_TOOLCHAIN_VARIANT=arcmwdt

Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2020-09-05 10:22:56 -05:00