Skip to content

Commit

Permalink
Enhance legacy GNU assembler flag detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jld01 committed Jan 27, 2024
1 parent 233c6d8 commit dd54358
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions NewAndNoteworthy/CDT-11.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd54358

Please sign in to comment.