Commit ae623d16 authored by Fangrui Song's avatar Fangrui Song
Browse files

[Driver,Gnu] Simplify -static -static-pie -shared -pie handling and suppress...

[Driver,Gnu] Simplify -static -static-pie -shared -pie handling and suppress -shared -rdynamic warning

These options select different link modes (note: -shared -static can be
used together for musl and mingw). It makes sense to place them
together, which enables some simplification. The relevant ld options
are now consistently placed after -m, similar to GCC.

While here, suppress -Wunused-command-line-argument warning when -shared
-rdynamic are used together (introduced by commit
291f4a00). It can be argued either way
whether the warning is justified (in ELF linkers --export-dynamic
functionality is subsumed by -shared), but it is not useful (users can
do -Wl,--export-dynamic, bypassing the driver diagnostic).
parent ac3779e9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment