gcc ld - yszheda/wiki GitHub Wiki

-rpath

-l

specified version library

-fpermissive

-fno-rtti

--ffast-math

-ffp-contract

-fPIC

-rdynamic

-march

gcc -march=native -Q --help=target ...
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
gcc -march=native -Q --help=target | grep march

-soname

--as-needed

(in this case libm is considered before the object files and discarded independently from the content of the two.)
$ gcc -Wl,--as-needed -lm someunit1.o someunit2.o -o program

(this is the correct linking order to get libm linked only if needed.)
$ gcc -Wl,--as-needed someunit1.o someunit2.o -lm -o program

IMPORTANT!

-Wl,--no-undefined / -Wl,-z,defs

-Wpedantic

-save-temps

Trouble-shooting: undefined reference


__cpuinit

__PRETTY_FUNCTION__

GCC Inline Assembly

Trouble-shooting

cstdlib : fatal error: stdlib.h: No such file or directory

⚠️ **GitHub.com Fallback** ⚠️