From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15628 invoked by alias); 6 Aug 2002 22:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 15608 invoked by uid 71); 6 Aug 2002 22:46:01 -0000 Resent-Date: 6 Aug 2002 22:46:01 -0000 Resent-Message-ID: <20020806224601.15607.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, keith_richling@agilent.com Received: (qmail 9539 invoked by uid 61); 6 Aug 2002 22:37:52 -0000 Message-Id: <20020806223752.9538.qmail@sources.redhat.com> Date: Tue, 06 Aug 2002 15:46:00 -0000 From: keith_richling@agilent.com Reply-To: keith_richling@agilent.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7512: ld getting passed incorrect options with hppa64-hp-hpux11.00 X-SW-Source: 2002-08/txt/msg00113.txt.bz2 List-Id: >Number: 7512 >Category: c++ >Synopsis: ld getting passed incorrect options with hppa64-hp-hpux11.00 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Aug 06 15:46:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Keith Richling >Release: 3.1.1 >Organization: >Environment: >Description: When g++ is asked to build a shared library through the -shared option on hppa64-hp-hpux11.00 I get the following error: ld: Unrecognized argument: -shared Fatal error. collect2: ld returned 1 exit status >How-To-Repeat: // Begin foo.C #include int main() { std::cout << "Hello world." << std::endl; } // End foo.C I built g++ using the configure options of --host=hppa64-hp-hpux11.00 --disable-shared --disable-threads --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-gnu-as --with-as=/PATH_TO_BINUTILS/as --enable-languages=c,c++ I get the error with the following compile lines: g++ -c foo.C g++ -shared foo.o -o foo.sl >Fix: Applied the following change to gcc/config/pa/pa64-hpux.h 26c26 < "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-shared}" --- > "-E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" >Release-Note: >Audit-Trail: >Unformatted: