diff --git a/NewAndNoteworthy/CDT-11.5.md b/NewAndNoteworthy/CDT-11.5.md index 97649b4ed86..de301af88f8 100644 --- a/NewAndNoteworthy/CDT-11.5.md +++ b/NewAndNoteworthy/CDT-11.5.md @@ -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: + +

+ +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 diff --git a/NewAndNoteworthy/images/CDT-11.5-gnu-as-command.png b/NewAndNoteworthy/images/CDT-11.5-gnu-as-command.png new file mode 100644 index 00000000000..3b6f6c48bef Binary files /dev/null and b/NewAndNoteworthy/images/CDT-11.5-gnu-as-command.png differ diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuAsmFlagsCommandGenerator.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuAsmFlagsCommandGenerator.java index 9f9dca78290..2c5d8c236ca 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuAsmFlagsCommandGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuAsmFlagsCommandGenerator.java @@ -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) {