maven-nar/nar-maven-plugin

Certain gcc/g++ arguments being passed through to linker

Closed this issue · 1 comments

Problem

For the gcc/g++ linker, some arguments can be passed manually, but the -specs= and -std= cannot.
These arguments currently get prefixed with the -Wl, flag, which passes them to the linker, causing an error:
....../arm-none-eabi/bin/ld: unrecognized option '--specs=nosys.specs'
As the plugin passes -Wl,--specs=nosys.specs (taken from running with the -X option). Running this independently without the -Wl,, the compilation works fine.

Solution

I've forked the project and created what I think is a fix, simply changing the linkerOptions into regular expressions, so that more complicated options can be excluded from the decoration, then excluding the relevant options.
I ran the change locally and it seemed to work as I'd expect.

Believe you have resolved in #391