Module Name:    src
Committed By:   mrg
Date:           Fri Jul  1 01:23:01 UTC 2011

Modified Files:
        src/external/gpl3/gcc/dist/gcc: gcc.c
        src/external/gpl3/gcc/dist/gcc/config: netbsd.h

Log Message:
move the LIBGCC_PICSUFFIX hack into netbsd.h as the REAL_LIBGCC_SPEC.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/gcc.c
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/gcc/config/netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/gcc.c
diff -u src/external/gpl3/gcc/dist/gcc/gcc.c:1.6 src/external/gpl3/gcc/dist/gcc/gcc.c:1.7
--- src/external/gpl3/gcc/dist/gcc/gcc.c:1.6	Thu Jun 30 03:37:23 2011
+++ src/external/gpl3/gcc/dist/gcc/gcc.c	Fri Jul  1 01:23:00 2011
@@ -1753,47 +1753,24 @@
 {
   char *buf;
 
-  buf = concat ("%{static",
-#ifdef LIBGCC_PICSUFFIX
-		": ", static_name, " ", eh_name, "}",
-		"%{static-libgcc: ",
-		"%{!shared:", static_name, " ", eh_name, "}",
-		"%{shared:", static_name, LIBGCC_PICSUFFIX, " ",
-		eh_name, LIBGCC_PICSUFFIX, "}",
-#else
- 		"|static-libgcc:", static_name, " ", eh_name,
-#endif
-		"}"
+  buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name, "}"
 		"%{!static:%{!static-libgcc:"
 #if USE_LD_AS_NEEDED
 		"%{!shared-libgcc:",
-		static_name,
-#ifdef LIBGCC_PICSUFFIX
-		LIBGCC_PICSUFFIX,
-#endif
-		" --as-needed ", shared_name, " --no-as-needed"
+		static_name, " --as-needed ", shared_name, " --no-as-needed"
 		"}"
 		"%{shared-libgcc:",
-		shared_name, "%{!shared: ", static_name,
-#ifdef LIBGCC_PICSUFFIX
-		LIBGCC_PICSUFFIX,
-#endif
-		"}"
+		shared_name, "%{!shared: ", static_name, "}"
 		"}"
 #else
 		"%{!shared:"
 		"%{!shared-libgcc:", static_name, " ", eh_name, "}"
 		"%{shared-libgcc:", shared_name, " ", static_name, "}"
 		"}"
-/* XXX NH XXX */
-#ifdef LINK_EH_SPEC || 1
+#ifdef LINK_EH_SPEC
 		"%{shared:"
 		"%{shared-libgcc:", shared_name, "}"
-		"%{!shared-libgcc:", static_name,
-#ifdef LIBGCC_PICSUFFIX
-		LIBGCC_PICSUFFIX,
-#endif
-		"}"
+		"%{!shared-libgcc:", static_name, "}"
 		"}"
 #else
 		"%{shared:", shared_name, "}"

Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.4 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.5
--- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.4	Tue Jun 28 09:27:39 2011
+++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h	Fri Jul  1 01:23:01 2011
@@ -149,12 +149,21 @@
 #undef LIB_SPEC
 #define LIB_SPEC NETBSD_LIB_SPEC
 
-/* Don't provide a LIBGCC_SPEC appropriate for NetBSD as the default
-   is correct. In the --disabled-shared case -lgcc is perfect.  */
+/* Provide a LIBGCC_SPEC for NetBSD that will find libgcc_pic.  Override
+   the this entirely by defining REAL_LIBGCC_SPEC.  */
 
-#if defined(NETBSD_TOOLS) || defined(NETBSD_NATIVE)
-#define LIBGCC_PICSUFFIX	"_pic"
-#endif
+#define NETBSD_LIBGCC_SPEC						\
+  "%{static:-lgcc -lgcc_eh}						\
+   %{static-libgcc:							\
+     %{!shared:-lgcc -lgcc_eh						\
+       %{shared:-lgcc_pic -lgcc_eh_pic}}}				\
+   %{!static:								\
+     %{!static-libgcc:							\
+       %{!shared-libgcc:-lgcc_pic --as-needed -lgcc_s --no-as-needed }	\
+       %{shared-libgcc:-lgcc_s						\
+         %{!shared: -lgcc_pic}}}}"					\
+
+#define REAL_LIBGCC_SPEC NETBSD_LIBGCC_SPEC
 
 /* Pass -cxx-isystem to cc1/cc1plus.  */
 #define NETBSD_CC1_AND_CC1PLUS_SPEC		\

Reply via email to