public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* HP/Compaq Tru64 linker semantics
@ 2004-04-26 16:59 Karl Vogel
  2004-04-28 21:56 ` Jim Wilson
  0 siblings, 1 reply; 9+ messages in thread
From: Karl Vogel @ 2004-04-26 16:59 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

Since GNU as and GNU ld don't work on a Tru64 system, the system provided
linker is used. This linker differs in the way it looks for shared/archive
libraries.

From the ld [1] man page:

  When linking a shared object, ld searches all library directories for the
  shared object library (libx.so). If it cannot find the shared object
  library, it again searches all library directories for the archive library
  (libx.a).


It can be told to look for both the shared and the archive library in a
directory, before skipping to the next directory path:

  -oldstyle_liblookup
      Cause ld to search each library directory, first for the shared object
      library (libx.so) and then for the archive library (libx.a).

Which is the way GNU ld works.


For reference, I ran into this problem trying to use a newer (archive)
library than the (shared) library installed on the base system. (Berkeley DB
4.2.x package of http://www.openpkg.org)
I used the following patch on my system to get it in line with GNU ld:

--- gcc/config/alpha/osf.h.orig 2004-04-26 15:10:02 +0200
+++ gcc/config/alpha/osf.h      2004-04-26 15:10:18 +0200
@@ -79,7 +79,7 @@
    constructor and call-frame data structures are not accidentally
    overridden.  */
 #define LINK_SPEC  \
-  "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
+  "-oldstyle_liblookup -G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
    %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
    %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"



I was wondering what the general opinion is.. follow GNU ld as close as
possible? Or follow the standard way of the platform?!




[1]
http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V50_HTML/MAN/MAN1/0241
____.HTM

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-04-29 18:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 16:59 HP/Compaq Tru64 linker semantics Karl Vogel
2004-04-28 21:56 ` Jim Wilson
2004-04-28 22:40   ` Rainer Orth
2004-04-28 22:43     ` Andrew Pinski
2004-04-28 23:47       ` Rainer Orth
2004-04-29  0:49     ` Jim Wilson
2004-04-29  0:55       ` Rainer Orth
2004-04-29  4:07         ` Karl Vogel
2004-04-29 21:03           ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).