Hello Eric,
On 26.06.24 01:35, Eric Botcazou wrote:
Here, the "-march=armv7-a+simd" was moved after the "-gnatez". So this
option is dropped in switch-c.adb and doesn't get added to the ALI file.
This comes from the spec magic implemented in ada/gcc-interface/lang-specs.h
and it looks like the '+' character is not matched by '*' or some such.
thanks for the hint. So, maybe the problem is here:
%{gnatea:-gnatez} %{g*&m*&f*} \
From the documentation
(https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html):
%{S*}
Substitutes all the switches specified to GCC whose names start
with -S, but which also take an argument. This is used for switches like
-o, -D, -I, etc. GCC considers -o foo as being one switch whose name
starts with ‘o’. %{o*} substitutes this text, including the space. Thus
two arguments are generated.
%{S*&T*}
Like %{S*}, but preserve order of S and T options (the order of S
and T in the spec is not significant). There can be any number of
ampersand-separated variables; for each the wild card is optional.
Useful for CPP as ‘%{D*&U*&A*}’.
It looks like this is working as documented. I checked this with the
following spec file:
*startfile:
BEGIN %{g*&m*&f*} END
On my x86_64 host GCC, this works fine:
gcc -specs=test.spec -wrapper echo main.c -mfoo=bar+blub -march=armv7-a+simd
... BEGIN -mfoo=bar+blub -march=armv7-a+simd END ...
On the arm GCC, it looks good also:
arm-rtems6-gcc -specs=test.spec -wrapper echo main.c -mfoo=bar+blub
-march=armv7-a+simd
... BEGIN -mfoo=bar+blub -marm -mlibarch=armv7-a -march=armv7-a END ...
arm-rtems6-gcc -specs=test.spec -wrapper echo main.c -mfoo=bar+blub
-march=armv7-a+simd -mfloat-abi=hard
... BEGIN -mfoo=bar+blub -mfloat-abi=hard -marm -mlibarch=armv7-a+simd
-march=armv7-a+simd END ...
--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/