The flags are always used as gcc flags. The --Wl,something doesn't work,
the docs also say it's -Wl,...
The --rpath and -rpath both work, they get passed through to ld
unchanged. GNU ld man page says:
For options whose names are multiple letters, either one
dash or two can precede the option name; for example,
-trace-symbol and --trace-symbol are equivalent.
The option itself is documented in the ld manual as -rpath. So most
people use -rpath, but some are used to precede long arguments always
with "--".
Finally concerning putting the rpath flag and the path itself into one
Wl: separating with commas is equivalent to splitting into separate Wls.
Result:
--Wl,-rpath,<path> wrong
And those three are all correct and equivalent:
-Wl,-rpath,<path>
-Wl,--rpath,<path>
-Wl,--rpath -Wl,<path>
Regards,
Rainer
Mladen Turk schrieb:
[EMAIL PROTECTED] wrote:
URL: http://svn.apache.org/viewvc?rev=608842&view=rev
Log:
Correct syntax of linker flag for gcc.
Modified:
tomcat/connectors/trunk/jni/native/build/tcnative.m4
*linux*)
- TCN_OPENSSL_LIBS="-L$use_openssl/lib
--Wl,-rpath,$use_openssl/lib -lssl -lcrypto"
+ TCN_OPENSSL_LIBS="-L$use_openssl/lib
-Wl,-rpath,$use_openssl/lib -lssl -lcrypto"
Not sure why but linux links (libtool --mode=link) with those flags without
any problem.
However the APR says:
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
So, what's correct?
--Wl,-rpath,<path> -Wl,-rpath,<path> -Wl,--rpath,<path> or -Wl,--rpath
-Wl,<path>
Regards,
Mladen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]