The -Wl,xxx
option for gcc passes a comma-separated list of tokens as a space-separated list of arguments to the linker. So
gcc -Wl,aaa,bbb,ccc
eventually becomes a linker call
ld aaa bbb ccc
In your case, you want to say "ld -rpath .
", so you pass this to gcc as -Wl,-rpath,.
Alternatively, you can specify repeat instances of -Wl
:
gcc -Wl,aaa -Wl,bbb -Wl,ccc
Note that there is no comma between aaa
and the second -Wl
.
Or, in your case, -Wl,-rpath -Wl,.
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…