[PATCH v2 1/1] Makefile: pass -ansi option to cmd_gen_envp
Rasmus Villemoes
rasmus.villemoes at prevas.dk
Wed Dec 20 10:35:39 CET 2023
On 20/12/2023 09.59, Sébastien Szymanski wrote:
> Without the '-ansi' option, the 'linux' string in env. files is replaced
> with the string '1 '. For example, in the
> board/armadeus/opos6uldev/opos6uldev.env file,
>
> kernelimg=opos6ul-linux.bin
>
> becomes
>
> kernelimg=opos6ul-1 .bin
>
> in the include/generated/env.in file.
>
> That's because 'linux' is a System-specific Predefined Macros. [1]
>
> Pass the '-ansi' option as suggested by the GCC documentation. [1]
So when the .dtb files are built, we use
-x assembler-with-cpp -undef
and that -undef seems to suppress a lot more than just the linux and
unix defines. So I wonder if this case should also use that? I think
that would also allow the c++ comments to remain.
Rasmus
More information about the U-Boot
mailing list