From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11674 invoked by alias); 26 Dec 2002 22:26:01 -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 11659 invoked by uid 71); 26 Dec 2002 22:26:01 -0000 Date: Thu, 26 Dec 2002 14:26:00 -0000 Message-ID: <20021226222601.11658.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "John David Anglin" Subject: PATCH: Re: other/9031 Reply-To: "John David Anglin" X-SW-Source: 2002-12/txt/msg01302.txt.bz2 List-Id: The following reply was made to PR other/9031; it has been noted by GNATS. From: "John David Anglin" To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org Cc: dave.anglin@nrc.ca, gcc-patches@gcc.gnu.org, binutils@sources.redhat.com Subject: PATCH: Re: other/9031 Date: Thu, 26 Dec 2002 17:16:02 -0500 (EST) > Thank you very much for your problem report. > It has the internal identification `other/9031'. > The individual assigned to look at your > report is: unassigned. > > >Category: other > >Responsible: unassigned > >Synopsis: Cygnus configure versus libtool AC_PROG_LD macro > >Arrival-Date: Fri Dec 20 12:36:00 PST 2002 The enclosed patch fixes the problem reported in other/9031. The technique for determining LD is derived from that used by the libtool AC_PROG_LD macro. Tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11. Ok for main? Dave -- J. David Anglin dave.anglin@nrc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6605) 2002-12-26 John David Anglin * configure (LD): Try to set LD to the ld used by gcc when using gcc and not doing a Canadian Cross. Index: configure =================================================================== RCS file: /cvsroot/gcc/gcc/configure,v retrieving revision 1.50 diff -u -3 -p -r1.50 configure --- configure 16 Dec 2002 18:18:42 -0000 1.50 +++ configure 21 Dec 2002 21:08:30 -0000 @@ -1059,6 +1059,29 @@ else fi fi + # If we are using gcc, try to set the LD default to the ld used by gcc. + case "${CC}" in + *gcc) + case $host in + *-*-mingw*) + gcc_prog_ld="`$CC -print-prog-name=ld 2>&1 | tr -d '\015'`" ;; + *) + gcc_prog_ld="`$CC -print-prog-name=ld 2>&1`" ;; + esac + case $gcc_prog_ld in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + gcc_prog_ld=`echo $gcc_prog_ld| sed 's%\\\\%/%g'` + while echo $gcc_prog_ld| grep "$re_direlt" > /dev/null 2>&1; do + gcc_prog_ld=`echo $gcc_prog_ld| sed "s%$re_direlt%/%"` + done + LD="$gcc_prog_ld" ;; + esac + ;; + esac + CXX=${CXX-"c++"} CFLAGS=${CFLAGS-"-g"} CXXFLAGS=${CXXFLAGS-"-g -O2"}