These flags are specific to ELF, but are still accepted by GNU ld, even if it does not do anything. This patch adds them as ignored option for the sake of compatibility.
Unless there are motivating examples that some options are incorrectly used in a prevailing way, it doesn't seem right to ignore options from another binary format which cannot be properly modeled.
Ignoring -fPIC seems fine.
As linking against DLL import libraries kinda works like --as-needed (only ending up with a runtime dependency if symbols actually are referenced), would you consider accepting --as-needed but omitting --no-as-needed?
I don't feel strongly about --no-as-needed and it seems the user on the PR has no issue with not having support for it as well, so following this discussion I'll remove it from the ignore list.
Thanks. GNU ld lexsup.c generally ignores options not meaningful on other binary formats. Ignoring more options like it does will improve compatibility but may not be necessary when the use case is uncommon or falls more into the pilot error category.