To add a followup question:
How does one pass LDFLAGS like options to the maven nar linker?
Specifically I would like to pass --no-as-needed option to the linker.
When I set :
<linker>
<name>${linker-name}</name>
<options>
<option>-Wl,-u,_cmdenv_lib </option>
<option>--no-as-needed -loppcmdenv</option>
...
I get error g++ "--no-as-needed" unrecognized command.
here is the relevant debug log:
https://gist.github.com/hodiapa/4edac7482a48139707189ce317b25de8