-P is an option that was inherited from the old MetaWare compiler.
[ccac foo.c -P] is actually a shortcut for: [ccac -E foo.c -o foo.i].
In new version of mwdt, -P option can't redirect the output. we need
to use -E option, which works in all versions.
-P: Preprocess the file and write it to <src>.i (C) or
<src>.ii(C++). No compilation is performed.
-E: Run preprocessor only.
Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
We don't use xcheck (we disable it by passing '-Hnoxcheck' to
linker) so let's avoid xcheck object linkage as well by
passing '-Hnoxcheck_obj' option.
'-Hnoxcheck_obj' option implies the '-Hnoxcheck' option.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Fixes: #28847
This commit fixes two places that was causing gen_relocate_app to fail
in windows.
gen_relocate_app.py now splits only on first `:` in
`<MEM_REGION>:<file>`.
Windows contains `:` in path, thus only first `:` is valid for splitting
mem region and file path.
Second part of the issue is fixed in CMake where `'` was used for
quoting of command arguments.
This causes a file not found on Windows because the final `'` would be
treated as part of the filename. Similar the first `'` would be treated
as path of the mem region name.
This is fixed by using `"` for quoting, which works correctly on all
platforms.
gen_relocate_app.py:403: UserWarning: File: .../kernel/sem.c' Not found
Note the stray `'` ^^^
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
-Hnocopyr option suppress copyright message in case of LDAC linker
but in case of LLDAC linker somehow it leads to partial linking
and generation output file with relocations. Looks like we
are converting MWDT option to LLVM option incorrectly in this
case. Among the partial linking itself it may cause build errors
when 'elf.get_dwarf_info' from 'gen_kobject_list.py' meets the
arch-specific relocation which isn't supported by 'elftools'
It requires future investigation, let's disable -Hnocopyr for now
to have elf image linked correctly.
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
The current zephyr_get_compile_<type> flags returns compile / include
flags based on generator expressions.
But they also included a space.
This have the unintended side-effect that when the properties are
fetched into another variable and later appended to lists in order to
finally be used in a CMake target function / custom command, then CMake
in some cases will quote the string, creating a quoted argument like:
"arg0 arg1 arg2: instead of individual arguments like: "arg0" "arg1"
"arg2".
By using $<SEMICOLON>, then arguments are seperated correctly.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit fixes an issue where the list returned by
zephyr_get_include_directories_for_lang() would be a space separated
list, cause the arguments to be quoted during linking.
This is fixed by requesting `$<SEMICOLON>` to be used as separated which
which again ensures a correct expansion of the list.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
* 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>