1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

Enhance legacy GNU assembler flag detection

This commit is contained in:
John Dallaway 2024-01-26 17:16:19 +00:00
parent 233c6d8696
commit dd543580a5
3 changed files with 10 additions and 1 deletions

View file

@ -6,6 +6,15 @@ This is the New & Noteworthy page for CDT 11.5 which is part of Eclipse 2024-03
# Release Notes
# Build
## Preprocessor activation for GNU assembly language files
The managed build system now invokes `gcc -c` to build GNU assembly language source files rather than invoking `as` directly. The revised behaviour ensures that the GNU preprocessor is active when building `*.S` and `*.sx` files to match user expectations. In the case of existing managed build projects, a new GNU assembler tool command generator applies the `-Wa,` prefix to user-specified assembler flags where appropriate. Users may revert to the previous behaviour by overriding the assembler command within the project properties dialog:
<p align="center"><img src="images/CDT-11.5-gnu-as-command.png" width="80%"></p>
The new behaviour applies to managed build configurations using a _Cross GCC_, _Cygwin GCC_, _Linux GCC_ or _MinGW GCC_ toolchain.
# API Changes, current and planned

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View file

@ -41,7 +41,7 @@ public class GnuAsmFlagsCommandGenerator implements IOptionCommandGenerator {
private static final String DO_NOT_LINK_FLAG = "-c"; //$NON-NLS-1$
private static final Pattern DO_NOT_LINK_PATTERN = Pattern.compile("(^|\\s)-c($|\\s)"); //$NON-NLS-1$
private static final Pattern ASM_FLAG_PATTERN = Pattern.compile("-[aDKLR]\\S*"); //$NON-NLS-1$
private static final Pattern ASM_FLAG_PATTERN = Pattern.compile("(?<=^|\\s)-[aDKLR]\\S*"); //$NON-NLS-1$
@Override
public String generateCommand(IOption option, IVariableSubstitutor macroSubstitutor) {