Thread View: gnu.g++.help
2 messages
2 total messages
Started by Klamer Schutte
Wed, 06 Jan 1993 08:21
Gnu ld and collect
Author: Klamer Schutte
Date: Wed, 06 Jan 1993 08:21
Date: Wed, 06 Jan 1993 08:21
11 lines
794 bytes
794 bytes
I can see advantages in using both Gnu ld and collect for linking g++ programs. (See FAQ for what reasons.) Is it possible to have both link systems available at the same time? (With a command line switch for g++, for example?) Klamer -- Klamer Schutte Tel: +31-53-892778 Fax: +31-53-340045 Faculty of electrical engineering -- University of Twente, The Netherlands preferred: klamer@mi.el.utwente.nl SMTP: klamer@utelmi01.el.utwente.nl
Re: Gnu ld and collect
Author: Joe Buck
Date: Wed, 06 Jan 1993 20:43
Date: Wed, 06 Jan 1993 20:43
36 lines
2110 bytes
2110 bytes
In article <klamer.726308465@mi.el.utwente.nl> klamer@mi.el.utwente.nl (Klamer Schutte) writes: >I can see advantages in using both Gnu ld and collect for linking g++ >programs. (See FAQ for what reasons.) Is it possible to have both >link systems available at the same time? (With a command line switch >for g++, for example?) This can be made to work on some platforms (where collect and Gnu ld both work and accept the same format of object file). Here is one very ugly way to do it that I got to work. Let's say, for example, that you have 2.3.3 installed on a sparc. The compiler passes are then in (somewhere)/lib/gcc-lib/sparc/2.3.3 (the makefile variable "libsubdir" refers to this directory). As a first step, install gcc with "--with-gnu-ld" and put Gnu ld in the libsubdir directory. Now, create a directory (somewhere)/lib/gcc-lib/sparc/2.3.3-collect. Do a symbolic link to have everything in libsubdir appear in this directory as well. Install collect in this directory. Now, you can use collect by saying "gcc -V 2.3.3-collect". Furthermore, since only the link is different, you can omit the -V switch except when you are linking. Warning: on the sparc, the Gnu linker won't call constructors properly for code compiled by a gcc binary that was configured without the --with-gnu-ld switch (the stabs directives that gld needs will be missing), but collect will not care if the stabs are present. Since having the stabs present when they are unneeded is harmless (and the space required is tiny) I think they should always be generated on platforms with a.out-style objects. -- Joe Buck jbuck@ohm.berkeley.edu
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