Article View: gnu.gcc.bug
Article #1375gcc-2.3.1: g++ doesn't handle -l well
From: Joe Korty
Date: Thu, 12 Nov 1992 19:56
Date: Thu, 12 Nov 1992 19:56
44 lines
1622 bytes
1622 bytes
The script g++ fails to correctly link the below c++ program, since the place it puts the -lg++ in the underlying call to gcc is *after* any user-specified -l options, not before. This causes link edit failures, since some routines in -lg++ call routines in -lmath, and there is no way using g++ that -lmath can be specified after the embedded -lg++. g++ complex.C -lmath link failures gcc complex.C -lmath -lg++ what the above invokes gcc complex.C -lg++ -lmath works A possible ad-hoc is for g++ to append `-lg++ -lmath' to the command line, not just `-lg++'. This was run on an m88k system V release 3 style OS. -- Joe Korty, REAL/IX Operating Systems MODCOMP, an AEG Company Telephone: (305) 977-1820 1650 West McNab Road Fax: (305) 977-1638 P.O. Box 6099 E-mail: uunet!modcomp!joe Ft. Lauderdale, FL 33309-1088 *** /usr/nosupport/bin/g++ Tue Sep 8 17:38:59 1992 --- /usr/nosupport/bin/gpp Thu Nov 12 14:53:43 1992 *************** *** 4,10 **** newargs= quote=no ! library=-lg++ havefiles= for arg in $*; --- 4,10 ---- newargs= quote=no ! library='-lg++ -lmath' havefiles= for arg in $*;
Technical Details
Message-ID:
<m0mpkel-0001TuC@rlxdev.modcomp.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!modcomp.COM!joeShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!modcomp.COM!joe From: joe@modcomp.COM (Joe Korty) Subject: gcc-2.3.1: g++ doesn't handle -l well Message-ID: <m0mpkel-0001TuC@rlxdev.modcomp.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 12 Nov 1992 19:56:47 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 45