Patch for egcs 1.0.2
H.J. Lu
hjl@lucon.org
Sat Feb 14 15:56:00 GMT 1998
> > Sat Jan 10 14:03:43 1998 H.J. Lu (hjl@gnu.org)
> >
> > * config/linux.h (LIB_SPEC): Add -lc for -shared if
> > USE_GNULIBC_1 is not defined.
> > * config/sparc/linux.h; Ditto.
> >
> > * config/sparc/linux64.h (LIB_SPEC): Add -lc for -shared.
> >
> > * config/alpha/linux-elf.h (LIB_SPEC): New. Defined if
> > USE_GNULIBC_1 is not defined.
> I've installed this patch into the mainline sources.
>
> However, it does not apply to the release branch well, which is
> a significant worry. If you want this patch in 1.0.2, please send
> me a diff appropriate for the release branch.
>
> Thanks,
>
Ok. Here is the patch for the release branch.
Thanks.
--
H.J. Lu (hjl@gnu.org)
--
Sat Feb 14 15:54:28 1998 H.J. Lu (hjl@gnu.org)
* config/linux.h (LIB_SPEC): Add -lc for -shared if
USE_GNULIBC_1 is not defined.
* config/sparc/linux.h; Ditto.
* config/sparc/linux64.h (LIB_SPEC): Add -lc for -shared.
* config/alpha/linux-elf.h (LIB_SPEC): New. Defined if
USE_GNULIBC_1 is not defined.
Tue Dec 16 23:25:45 1997 H.J. Lu (hjl@gnu.org)
* config/sparc/linux64.h (LIBGCC_SPEC): Removed.
(CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}.
(LIB_SPEC): Updated for glibc 2.
diff -ur -x CVS ./config/alpha/elf.h /home/work/misc/gnu/import/egcs/gcc/config/alpha/elf.h
--- ./config/alpha/elf.h Sat Feb 14 15:43:17 1998
+++ /home/work/misc/gnu/import/egcs/gcc/config/alpha/elf.h Wed Sep 10 17:07:06 1997
@@ -62,14 +62,6 @@
#define DEFAULT_VTABLE_THUNKS 1
#endif
-#ifndef USE_GNULIBC_1
-#undef LIB_SPEC
-#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
-#endif
-
/* Output at beginning of assembler file. */
#undef ASM_FILE_START
diff -ur -x CVS ./config/linux.h /home/work/misc/gnu/import/egcs/gcc/config/linux.h
--- ./config/linux.h Sat Feb 14 15:38:06 1998
+++ /home/work/misc/gnu/import/egcs/gcc/config/linux.h Wed Aug 27 00:26:17 1997
@@ -104,8 +104,7 @@
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
#endif
#else
diff -ur -x CVS ./config/sparc/linux.h /home/work/misc/gnu/import/egcs/gcc/config/sparc/linux.h
--- ./config/sparc/linux.h Sat Feb 14 15:38:06 1998
+++ /home/work/misc/gnu/import/egcs/gcc/config/sparc/linux.h Mon Oct 20 13:49:15 1997
@@ -126,8 +126,7 @@
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
#endif
#else
diff -ur -x CVS ./config/sparc/linux64.h /home/work/misc/gnu/import/egcs/gcc/config/sparc/linux64.h
--- ./config/sparc/linux64.h Sat Feb 14 15:49:31 1998
+++ /home/work/misc/gnu/import/egcs/gcc/config/sparc/linux64.h Mon Oct 20 13:49:15 1997
@@ -48,6 +48,10 @@
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC "-Av9a"
+#undef LIBGCC_SPEC
+#define LIBGCC_SPEC \
+ "%{!shared:-lgcc}"
+
/* Provide a STARTFILE_SPEC appropriate for Linux. Here we add
the Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -107,14 +111,15 @@
%{fPIC:-D__PIC__ -D__pic__} \
%{fpic:-D__PIC__ -D__pic__} \
%{posix:-D_POSIX_SOURCE} \
-%{pthread:-D_REENTRANT} \
"
-
+/* We no longer link with libc_p.a or libg.a by default. If you
+ * want to profile or debug the Linux C library, please add
+ * -lc_p or -ggdb to LDFLAGS at the link time, respectively.
+ */
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
+ %{!ggdb:-lc} %{ggdb:-lg}}"
/* Provide a LINK_SPEC appropriate for Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to
More information about the Gcc
mailing list