Subject: toolchain/15024: patch
To: None <>
From: Michael Rauch <>
List: netbsd-bugs
Date: 12/28/2001 16:48:09
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


I think I've got a solution for this PR, but I'd like confirmation from our 
toolchain experts if this patch really DTRT. 

There were two issues: first, -p* catches not only -p and -pg as intended, 
but also -pipe, -pedantic, ...; second, -lgcc_p was pulled in even if we 
are linking shared libraries and already have -lgcc_pic, which seems to be 
a not very good idea (unless libgcc_p.a is compiled -fPIC which I haven't 

At least it works for me and I've just finished a mozilla compile on 
-current/i386 of Dec 23 (although it was the 0.9.5 version, for totally 
unrelated reasons).


Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename="gcc-lgcc.patch"

Index: netbsd.h
RCS file: /cvsroot/gnusrc/gnu/dist/toolchain/gcc/config/netbsd.h,v
retrieving revision 1.12
diff -u -r1.12 netbsd.h
--- netbsd.h	2001/12/20 00:18:01	1.12
+++ netbsd.h	2001/12/28 10:48:43
@@ -62,7 +62,7 @@
 #undef  LIBGCC_SPEC
-#define LIBGCC_SPEC "%{!symbolic:%{!shared:%{!p*:-lgcc}}%{shared:-lgcc_pic}%{p*:-lgcc_p}}"
+#define LIBGCC_SPEC "%{!symbolic:%{!shared:%{!p:%{!pg:-lgcc}}%{p:-lgcc_p}%{pg:-lgcc_p}}%{shared:-lgcc_pic}}"
 #define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"