From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17150 invoked by alias); 26 Apr 2004 14:02:31 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17126 invoked from network); 26 Apr 2004 14:02:21 -0000 Received: from unknown (HELO relay-1.seagha.com) (217.66.0.18) by sources.redhat.com with SMTP; 26 Apr 2004 14:02:21 -0000 Received: from nt-server2.antwerp.seagha.com ([10.200.1.35] helo=nt_server2.antwerp.seagha.com) by relay-1.seagha.com with esmtp id 1BI6gE-00038i-6b for gcc@gcc.gnu.org; Mon, 26 Apr 2004 16:01:54 +0200 Received: by nt-server2.antwerp.seagha.com with Internet Mail Service (5.5.2653.19) id ; Mon, 26 Apr 2004 16:02:34 +0200 Message-ID: <6DED3619289CD311BCEB00508B8E133601A68654@nt-server2.antwerp.seagha.com> From: Karl Vogel To: "'gcc@gcc.gnu.org'" Subject: HP/Compaq Tru64 linker semantics Date: Mon, 26 Apr 2004 16:59:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2004-04/txt/msg01207.txt.bz2 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