Article View: gnu.g++.bug
Article #1143Can't use -fPIC option
From: David Cogen
Date: Wed, 11 Nov 1992 04:49
Date: Wed, 11 Nov 1992 04:49
48 lines
1768 bytes
1768 bytes
The -fPIC and -fpic options seem to be dead. I need them to compile position
independent code for shared libraries.
The environment:
hancock% gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/specs
gcc version 2.3.1
hancock% g++ -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.1/specs
gcc version 2.3.1
hancock% cat /etc/motd
SunOS Release 4.1.1 (SUN4_2scsi) #4: Mon Jan 13 13:06:18 EST 1992
Oct 21 xv - version 2.21 displays images in the JPEG, GIF,
PBM, PGM, PPM, X11 bitmap, and PM formats
The sample source file:
hancock% cat test.cc
#include <iostream.h>
void test (int argc, char **argv)
{
cout << "argc = " << argc << "\n";
int argi;
for (argi = 0; argi < argc; argi ++) {
cout << "argv[" << argi << "] = " << argv[argi];
}
}
OK without -fPIC:
hancock% g++ -c test.cc
But not with -fPIC:
hancock% g++ -fPIC -c test.cc
/usr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 6
Please adivse. Is there a workaround? If I can't make shared libraries I will
not be able to use g++. I will be forced to use another product that is in all
other ways inferior.
Thanks,
David Cogen.
Technical Details
Message-ID:
<9211110949.AA08840@LL.MIT.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ll.mit.edu!cogenShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!emory!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ll.mit.edu!cogen From: cogen@ll.mit.edu (David Cogen) Newsgroups: gnu.g++.bug Subject: Can't use -fPIC option Message-ID: <9211110949.AA08840@LL.MIT.EDU> Date: 11 Nov 92 04:49:54 GMT Article-I.D.: LL.9211110949.AA08840 Sender: gnulists@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 48 Approved: bug-g++@prep.ai.mit.edu