summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>2000-10-23 13:19:35 +0000
committermycroft <mycroft@NetBSD.org>2000-10-23 13:19:35 +0000
commitfa3aaf6d8bfdda8fa045035663cb9310985c751b (patch)
tree5b373c58f583de7d2f45e0b9b5d80fdc3ddc9ac3 /gnu
parentdc0fe34aa7a50132673067dd6eda2dc4b5a90085 (diff)
Modify LIB_SPEC and LIBGCC_SPEC so that -lc and -lgcc are not included when
-shared or -symbolic (as on other platforms). Also, override LIBGCC_SPEC for all platforms (where it would incorrectly include the .a file explicitly on some). This should fix Mozilla on macppc.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/dist/gcc/config/netbsd.h11
-rw-r--r--gnu/dist/toolchain/gcc/config/netbsd.h11
2 files changed, 18 insertions, 4 deletions
diff --git a/gnu/dist/gcc/config/netbsd.h b/gnu/dist/gcc/config/netbsd.h
index 3c2ef276bda..a86c822d1f5 100644
--- a/gnu/dist/gcc/config/netbsd.h
+++ b/gnu/dist/gcc/config/netbsd.h
@@ -49,12 +49,19 @@
/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
libc, depending on whether we're doing profiling; if `-posix' is specified,
- link against the appropriate libposix first. */
+ link against the appropriate libposix first. Don't include libc when
+ linking a shared library. */
#undef LIB_SPEC
#define LIB_SPEC \
"%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
- %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+ %{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}"
+
+/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
+ libgcc when -symbolic. */
+
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
/* #ifdef NETBSD_AOUT */
diff --git a/gnu/dist/toolchain/gcc/config/netbsd.h b/gnu/dist/toolchain/gcc/config/netbsd.h
index 09920beb7af..f8b18c99f36 100644
--- a/gnu/dist/toolchain/gcc/config/netbsd.h
+++ b/gnu/dist/toolchain/gcc/config/netbsd.h
@@ -49,12 +49,19 @@
/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
libc, depending on whether we're doing profiling; if `-posix' is specified,
- link against the appropriate libposix first. */
+ link against the appropriate libposix first. Don't include libc when
+ linking a shared library. */
#undef LIB_SPEC
#define LIB_SPEC \
"%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
- %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+ %{!shared:%{!symbolic:%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}}"
+
+/* Provide a LIBGCC_SPEC appropriate for NetBSD. We also want to exclude
+ libgcc when -symbolic. */
+
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
/* #ifdef NETBSD_AOUT */