Merge pull request #3115 from makise-homura/e2k-lcc-support
Support lcc compiler for e2k (Elbrus) architecturepull/3416/head
commit
86f725c1e5
16 changed files with 199 additions and 16 deletions
@ -0,0 +1,23 @@ |
||||
## Support for lcc compiler for e2k (Elbrus) architecture |
||||
|
||||
In this version, a support for lcc compiler for Elbrus processors |
||||
based on [e2k microarchitecture](https://en.wikipedia.org/wiki/Elbrus_2000) |
||||
has been added. |
||||
|
||||
Examples of such CPUs: |
||||
* [Elbrus-8S](https://en.wikipedia.org/wiki/Elbrus-8S); |
||||
* Elbrus-4S; |
||||
* [Elbrus-2S+](https://en.wikipedia.org/wiki/Elbrus-2S%2B). |
||||
|
||||
Such compiler have a similar behavior as gcc (basic option compatibility), |
||||
but, in is not strictly compatible with gcc as of current version. |
||||
|
||||
Major differences as of version 1.21.22: |
||||
* it does not support LTO and PCH; |
||||
* it suffers from the same dependency file creation error as icc; |
||||
* it has minor differences in output, especially version output; |
||||
* it differently reacts to lchmod() detection; |
||||
* some backend messages are produced in ru_RU.KOI8-R even if LANG=C; |
||||
* its preprocessor treats some characters differently. |
||||
|
||||
So every noted difference is properly handled now in meson. |
@ -1,4 +1,10 @@ |
||||
project('pch test', 'c') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
cc_id = cc.get_id() |
||||
if cc_id == 'lcc' |
||||
error('MESON_SKIP_TEST: Elbrus compiler does not support PCH.') |
||||
endif |
||||
|
||||
exe = executable('prog', 'prog.c', |
||||
c_pch : ['pch/prog_pch.c', 'pch/prog.h']) |
||||
|
@ -1,4 +1,14 @@ |
||||
project('header in file list', 'c') |
||||
|
||||
cc_id = meson.get_compiler('c').get_id() |
||||
cc_ver = meson.get_compiler('c').version() |
||||
|
||||
if cc_id == 'intel' or (cc_id == 'lcc' and cc_ver.version_compare('<=1.23.08') |
||||
# ICC and LCC <= 1.23.08 do not escape spaces in paths in the dependency file, so Ninja |
||||
# (correctly) thinks that the rule has multiple outputs and errors out: |
||||
# 'depfile has multiple output paths' |
||||
error('MESON_SKIP_TEST: Skipping test because your compiler is known to generate broken dependency files') |
||||
endif |
||||
|
||||
exe = executable('prog', 'prog.c', 'header.h') |
||||
test('basic', exe) |
||||
|
@ -1,5 +1,5 @@ |
||||
project('reconfigure test', ['c']) |
||||
|
||||
if get_option('b_lto') != true |
||||
error('b_lto not set') |
||||
if get_option('b_coverage') != true |
||||
error('b_coverage not set') |
||||
endif |
||||
|
Loading…
Reference in new issue