This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about very old patch
- To: Jason Merrill <jason at yorick dot cygnus dot com>
- Subject: Question about very old patch
- From: Marc Espie <Marc dot Espie at liafa dot jussieu dot fr>
- Date: Sun, 17 Sep 2000 15:22:12 +0200
- Cc: gcc at gcc dot gnu dot org
Mon Dec 4 22:17:37 1995 Jason Merrill <jason@yorick.cygnus.com>
* gcc.c (LIBGCC_SPEC): Do link with libgcc when -shared.
* alpha.h (LIBGCC_SPEC): Remove.
* linux.h (LIBGCC_SPEC): Remove.
* svr4.h (LIBGCC_SPEC): Remove.
* i386/t-crtpic (TARGET_LIBGCC2_CFLAGS): Use -fPIC.
* t-pa (TARGET_LIBGCC2_CFLAGS): Use -fPIC.
* sparc/t-sunos41 (TARGET_LIBGCC2_CFLAGS): Use -fPIC.
* sparc/t-sol2 (TARGET_LIBGCC2_CFLAGS): Use -fPIC.
* configure (i386-linux): Use i386/t-crtpic.
I know, this is positively ancient, but could you outline what prompted
that decision, whether it still makes sense, etc ?
I noticed it because OpenBSD is massively switching to using gcc -shared
to build libraries (failure in lib Obj-C and various C++ libraries due
to the need to collect constructors) and I got a large number of RRS
text relocations from our linker.
I assume I need to use -fPIC for libgcc.a. This is probably as easy as
it goes, but I want to know the reason.
Actually, I also want to clarify things because gcc documentation was
not updated, and the LIBGCC_SPEC description is at odds with what has
been going on for... five years ! So it might make sense to flesh out
a small paragraph that explains why this is a good idea.
--
Marc Espie
|anime, sf, juggling, unicycle, acrobatics, comics...
|AmigaOS, OpenBSD, C++, perl, Icon, PostScript...
| `real programmers don't die, they just get out of beta'