You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by rj...@apache.org on 2008/01/04 14:57:45 UTC

svn commit: r608842 - /tomcat/connectors/trunk/jni/native/build/tcnative.m4

Author: rjung
Date: Fri Jan  4 05:57:44 2008
New Revision: 608842

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

Modified: tomcat/connectors/trunk/jni/native/build/tcnative.m4
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jni/native/build/tcnative.m4?rev=608842&r1=608841&r2=608842&view=diff
==============================================================================
--- tomcat/connectors/trunk/jni/native/build/tcnative.m4 (original)
+++ tomcat/connectors/trunk/jni/native/build/tcnative.m4 Fri Jan  4 05:57:44 2008
@@ -336,7 +336,7 @@
                 TCN_OPENSSL_LIBS="-L$use_openssl/lib -Wl,+b: -lssl -lcrypto"
                 ;;
             *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"
                 ;;
             *)
                 TCN_OPENSSL_LIBS="-L$use_openssl/lib -lssl -lcrypto"



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r608842 - /tomcat/connectors/trunk/jni/native/build/tcnative.m4

Posted by Mladen Turk <mt...@apache.org>.
Rainer Jung wrote:
> 
> And those three are all correct and equivalent:
> 
> -Wl,-rpath,<path>
> -Wl,--rpath,<path>
> -Wl,--rpath -Wl,<path>
>

Ok, so -Wl,-rpath,<path> it is. Cool :)

Cheers,
Mladen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r608842 - /tomcat/connectors/trunk/jni/native/build/tcnative.m4

Posted by Rainer Jung <ra...@kippdata.de>.
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:
> rjung@apache.org 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: svn commit: r608842 - /tomcat/connectors/trunk/jni/native/build/tcnative.m4

Posted by Mladen Turk <mt...@apache.org>.
rjung@apache.org 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org