Thread View: gnu.gcc.help
2 messages
2 total messages
Started by Paul Tatarsky
Tue, 03 Nov 1992 22:56
Gcc 2.3.1 and collect2 library paths
Author: Paul Tatarsky
Date: Tue, 03 Nov 1992 22:56
Date: Tue, 03 Nov 1992 22:56
32 lines
1857 bytes
1857 bytes
With gcc2.2.2 using g++ one did not have to tell g++ where libg++ was. Under gcc2.3.1 which I just installed it appears that g++ wants you to tell it where libg++ is with a -L. Is this true or did I screw up the install. I just built gcc the same way I have in the past on a decstation. Nothing fancy. From the final link of a trivial C++ program: g++ -v -o foo foo.C 2.2.2 /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.2.2/ld -EL -o foo /usr/lib/crt0.o -L/usr/local/gnu/lib -L/usr/local/gnu/lib -L/usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.2.2 -L/usr/lib/cmplrs/cc -L/usr/lib/cmplrs/cc -L/usr/local/gnu/lib foo.o -lg++ -lgcc -lc -lgcc (Note the -L statements are correct for my installation) 2.3.1 /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/ld -EL -o foo /usr/lib/crt0.o /usr/tmp/cca186051.o -lg++ /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/libgcc.a -lc /usr/local/gnu/lib/gcc-lib/mips-dec-ultrix/2.3.1/libgcc.a ld: Can't locate file for: -lg++ collect: /usr/bin/ld returned 1 exit status (Note the changed system of direct paths to libgcc and no -L/usr/local/gnu/lib) If I add a -L/usr/local/gnu/lib it all works fine, my question is how do I get back the older more convenient "autolink" if you will. Or, do I need to do something special with my install that I didn't have to do under gcc2.2.2? Paul Tatarsky email: paul@cse.ucsc.edu UC Santa Cruz CIS/CE Board Technical Staff
Re: Gcc 2.3.1 and collect2 library paths
Author: Tom McConnell~
Date: Thu, 05 Nov 1992 19:56
Date: Thu, 05 Nov 1992 19:56
45 lines
1920 bytes
1920 bytes
In article <1d702iINNcg4@darkstar.UCSC.EDU>, paul@aztec.ucsc.edu (Paul Tatarsky) writes:
> With gcc2.2.2 using g++ one did not have to tell g++
> where libg++ was. Under gcc2.3.1 which I just installed
> it appears that g++ wants you to tell it where libg++ is
> with a -L. Is this true or did I screw up the install.
>
<stuff deleted>
>
> Paul Tatarsky email: paul@cse.ucsc.edu
> UC Santa Cruz
> CIS/CE Board
> Technical Staff
I have found the same problem for an RS/6000, AIX-3.1.6. I patched g++ and c++
as a work around, but from glancing at gcc.c, it looks like something is broken
in the add_prefix() function, used at line 3296.
The simple (yet brain dead :) fix is to hard code the library in g++ and c++,
like this:
*** ./c++_orig Thu Nov 5 07:02:18 1992
--- ./c++ Thu Nov 5 07:02:45 1992
***************
*** 25,29 ****
quote=
# $library is made empty to disable use of libg++.
! library=-lg++
numargs=$#
--- 25,29 ----
quote=
# $library is made empty to disable use of libg++.
! library="-L/stor/gnu/aix/lib -lg++"
numargs=$#
Cheers,
Tom McConnell
--
Tom McConnell | Internet: tmcconne@sedona.intel.com
Intel, Corp. C3-91 | Phone: (602)-554-8229
5000 W. Chandler Blvd. | The opinions expressed are my own. No one in
Chandler, AZ 85226 | their right mind would claim them.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads