From: H.J. Lu Date: Sun, 15 Feb 1998 19:43:58 +0000 (+0000) Subject: elf.h (LIB_SPEC): New. X-Git-Tag: prereleases/egcs-1.0.2-prerelease~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb8c34c9c422631506a48d91c4ab9473191b6e4e;p=thirdparty%2Fgcc.git elf.h (LIB_SPEC): New. * config/alpha/elf.h (LIB_SPEC): New. Defined if USE_GNULIBC_1 is not defined. * 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/sparc/linux64.h (LIBGCC_SPEC): Removed. (CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}. (LIB_SPEC): Updated for glibc 2. From-SVN: r18014 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e83511677927..a50371c9e795 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +Sat Feb 14 15:54:28 1998 H.J. Lu (hjl@gnu.org) + + * config/alpha/elf.h (LIB_SPEC): New. Defined if + USE_GNULIBC_1 is not defined. + + * 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/sparc/linux64.h (LIBGCC_SPEC): Removed. + (CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}. + (LIB_SPEC): Updated for glibc 2. + Sat Nov 29 12:45:51 1997 Mumit Khan * config/i386/cygwin32.h (DWARF2_UNWIND): Exception handling diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h index 2279fb1de929..07599b82667f 100644 --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -62,6 +62,14 @@ Currently only Linux uses this. */ #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 --git a/gcc/config/linux.h b/gcc/config/linux.h index ba81586ae94c..530a22940787 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -104,7 +104,8 @@ Boston, MA 02111-1307, USA. */ %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ - "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ + "%{shared: -lc} \ + %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ %{profile:-lc_p} %{!profile: -lc}}" #endif #else diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 6f7a6ca9469e..da283161dd8d 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -126,7 +126,8 @@ Boston, MA 02111-1307, USA. */ %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" #else #define LIB_SPEC \ - "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ + "%{shared: -lc} \ + %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ %{profile:-lc_p} %{!profile: -lc}}" #endif #else diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 56c2183013df..5e69f515d33a 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -48,10 +48,6 @@ Boston, MA 02111-1307, USA. */ #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 @@ -111,15 +107,14 @@ Boston, MA 02111-1307, USA. */ %{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: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \ - %{!ggdb:-lc} %{ggdb:-lg}}" + "%{shared: -lc} \ + %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ + %{profile:-lc_p} %{!profile: -lc}}" /* Provide a LINK_SPEC appropriate for Linux. Here we provide support for the special GCC options -static and -shared, which allow us to