Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc move the LIBGCC_PICSUFFIX hack in...



details:   https://anonhg.NetBSD.org/src/rev/201c20b40652
branches:  trunk
changeset: 766712:201c20b40652
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Jul 01 01:23:00 2011 +0000

description:
move the LIBGCC_PICSUFFIX hack into netbsd.h as the REAL_LIBGCC_SPEC.

diffstat:

 external/gpl3/gcc/dist/gcc/config/netbsd.h |  19 ++++++++++++----
 external/gpl3/gcc/dist/gcc/gcc.c           |  33 ++++-------------------------
 2 files changed, 19 insertions(+), 33 deletions(-)

diffs (86 lines):

diff -r d8f9b4af8042 -r 201c20b40652 external/gpl3/gcc/dist/gcc/config/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/netbsd.h        Fri Jul 01 01:22:07 2011 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/netbsd.h        Fri Jul 01 01:23:00 2011 +0000
@@ -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            \
diff -r d8f9b4af8042 -r 201c20b40652 external/gpl3/gcc/dist/gcc/gcc.c
--- a/external/gpl3/gcc/dist/gcc/gcc.c  Fri Jul 01 01:22:07 2011 +0000
+++ b/external/gpl3/gcc/dist/gcc/gcc.c  Fri Jul 01 01:23:00 2011 +0000
@@ -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, "}"



Home | Main Index | Thread Index | Old Index