-shared.
* config/alpha/linux-elf.h (LIB_SPEC): Likewise.
* config/alpha/linux.h (LIB_SPEC): Likewise.
* config/arm/linux-elf.h (LIB_SPEC): Likewise.
* config/pa/pa-linux.h (LIB_SPEC): Likewise.
* config/sparc/linux.h (LIB_SPEC): Likewise.
* config/sparc/linux64.h (LIB_SPEC): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59992
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * config/linux.h (LIB_SPEC): If -pthread, add -lpthread even if
+ -shared.
+ * config/alpha/linux-elf.h (LIB_SPEC): Likewise.
+ * config/alpha/linux.h (LIB_SPEC): Likewise.
+ * config/arm/linux-elf.h (LIB_SPEC): Likewise.
+ * config/pa/pa-linux.h (LIB_SPEC): Likewise.
+ * config/sparc/linux.h (LIB_SPEC): Likewise.
+ * config/sparc/linux64.h (LIB_SPEC): Likewise.
+
2002-12-09 Larin Hennessy <larin@science.oregonstate.edu>
* doc/invoke.texi: Document UltraSparc III option.
#ifndef USE_GNULIBC_1
#undef LIB_SPEC
#define LIB_SPEC \
-"%{shared:-lc}%{!shared:%{pthread:-lpthread }%{profile:-lc_p}%{!profile:-lc}} "
+"%{pthread:-lpthread }%{shared:-lc}%{!shared:%{profile:-lc_p}%{!profile:-lc}} "
#endif
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared: %{profile:-lc_p}%{!profile:-lc}}"
/* Show that we need a GP when profiling. */
#undef TARGET_PROFILING_NEEDS_GP
/* Now we define the strings used to build the spec file. */
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
#endif
#else
#define LIB_SPEC \
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lgcc -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{shared-libgcc: -lgcc} %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lgcc -lc} \
+ %{!shared:%{mieee-fp:-lieee} %{shared-libgcc:-lgcc} %{profile:-lc_p}%{!profile:-lc}}"
#undef ASM_SPEC
#define ASM_SPEC \
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
#endif
#else
#define LIB_SPEC \
#undef LIB_SPEC
#define LIB_SPEC \
- "%{shared: -lc} \
- %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
- %{profile:-lc_p} %{!profile: -lc}}"
+ "%{pthread:-lpthread} \
+ %{shared:-lc} \
+ %{!shared: %{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
/* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to