Commit 0a2b72a6 by Joseph Myers Committed by Joseph Myers

linux.h, [...]: Remove definitions conditioned on USE_GNULIBC_1 or conditioned out...

	* config/linux.h, config/i386/linux.h, config/sparc/linux.h:
	Remove definitions conditioned on USE_GNULIBC_1 or conditioned
	out, and associated obsolete comments.

From-SVN: r85600
parent ca7a3bd7
2004-08-05 Joseph S. Myers <jsm@polyomino.org.uk>
* config/linux.h, config/i386/linux.h, config/sparc/linux.h:
Remove definitions conditioned on USE_GNULIBC_1 or conditioned
out, and associated obsolete comments.
2004-08-05 Nathan Sidwell <nathan@codesourcery.com> 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
* tree.h (force_fit_type): Return a tree, take three flags. * tree.h (force_fit_type): Return a tree, take three flags.
......
...@@ -83,11 +83,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -83,11 +83,7 @@ Boston, MA 02111-1307, USA. */
while (0) while (0)
#undef CPP_SPEC #undef CPP_SPEC
#ifdef USE_GNULIBC_1
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
#else
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
#endif
#undef CC1_SPEC #undef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) %{profile:-p}" #define CC1_SPEC "%(cc1_cpu) %{profile:-p}"
...@@ -109,11 +105,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -109,11 +105,7 @@ Boston, MA 02111-1307, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define LINK_EMULATION "elf_i386" #define LINK_EMULATION "elf_i386"
#ifdef USE_GNULIBC_1 #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
# define DYNAMIC_LINKER "/lib/ld-linux.so.1"
#else
# define DYNAMIC_LINKER "/lib/ld-linux.so.2"
#endif
#undef SUBTARGET_EXTRA_SPECS #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
...@@ -153,24 +145,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -153,24 +145,6 @@ Boston, MA 02111-1307, USA. */
} while (0) } while (0)
#endif #endif
#if defined(__PIC__) && defined (USE_GNULIBC_1)
/* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr,
__environ and atexit. We have to make sure they are in the .dynsym
section. We do this by forcing the assembler to create undefined
references to these symbols in the object file. */
#undef CRT_CALL_STATIC_FUNCTION
#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
asm (SECTION_OP "\n\t" \
"call " USER_LABEL_PREFIX #FUNC "\n" \
TEXT_SECTION_ASM_OP "\n\t" \
".extern ___brk_addr\n\t" \
".type ___brk_addr,@object\n\t" \
".extern __environ\n\t" \
".type __environ,@object\n\t" \
".extern atexit\n\t" \
".type atexit,@function");
#endif
/* Handle special EH pointer encodings. Absolute, pc-relative, and /* Handle special EH pointer encodings. Absolute, pc-relative, and
indirect are handled automatically. */ indirect are handled automatically. */
#define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \ #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \
...@@ -211,11 +185,11 @@ Boston, MA 02111-1307, USA. */ ...@@ -211,11 +185,11 @@ Boston, MA 02111-1307, USA. */
state data appropriately. See unwind-dw2.c for the structs. */ state data appropriately. See unwind-dw2.c for the structs. */
#ifdef IN_LIBGCC2 #ifdef IN_LIBGCC2
/* There's no sys/ucontext.h for some (all?) libc1, so no /* There's no sys/ucontext.h for glibc 2.0, so no
signal-turned-exceptions for them. There's also no configure-run for signal-turned-exceptions for them. There's also no configure-run for
the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the
target libc1 macro should be enough. */ target libc version macro should be enough. */
#if !(defined (USE_GNULIBC_1) || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)) #if !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)
#include <signal.h> #include <signal.h>
#include <sys/ucontext.h> #include <sys/ucontext.h>
...@@ -274,5 +248,5 @@ Boston, MA 02111-1307, USA. */ ...@@ -274,5 +248,5 @@ Boston, MA 02111-1307, USA. */
(FS)->retaddr_column = 8; \ (FS)->retaddr_column = 8; \
goto SUCCESS; \ goto SUCCESS; \
} while (0) } while (0)
#endif /* not USE_GNULIBC_1 */ #endif /* not glibc 2.0 */
#endif /* IN_LIBGCC2 */ #endif /* IN_LIBGCC2 */
...@@ -39,14 +39,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -39,14 +39,7 @@ Boston, MA 02111-1307, USA. */
object constructed before entering `main'. */ object constructed before entering `main'. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#ifdef USE_GNULIBC_1 #if defined HAVE_LD_PIE
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
%{!p:%{profile:gcrt1.o%s} \
%{!profile:crt1.o%s}}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
#elif defined HAVE_LD_PIE
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
...@@ -76,26 +69,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -76,26 +69,10 @@ Boston, MA 02111-1307, USA. */
#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
#undef LIB_SPEC #undef LIB_SPEC
/* We no longer link with libc_p.a or libg.a by default. If you
want to profile or debug the GNU/Linux C library, please add
-profile or -ggdb to LDFLAGS at the link time, respectively. */
#if 1
#ifdef USE_GNULIBC_1
#define LIB_SPEC \
"%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \ #define LIB_SPEC \
"%{pthread:-lpthread} \ "%{pthread:-lpthread} \
%{shared:-lc} \ %{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
#endif
#else
#define LIB_SPEC \
"%{!shared: \
%{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
#define LINUX_TARGET_OS_CPP_BUILTINS() \ #define LINUX_TARGET_OS_CPP_BUILTINS() \
do { \ do { \
...@@ -107,7 +84,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -107,7 +84,7 @@ Boston, MA 02111-1307, USA. */
builtin_assert ("system=posix"); \ builtin_assert ("system=posix"); \
} while (0) } while (0)
#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif #endif
...@@ -124,8 +101,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -124,8 +101,6 @@ Boston, MA 02111-1307, USA. */
/* Determine whether the the entire c99 runtime /* Determine whether the the entire c99 runtime
is present in the runtime library. */ is present in the runtime library. */
#ifndef USE_GNULIBC_1
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS 1
#endif
#define TARGET_HAS_F_SETLKW #define TARGET_HAS_F_SETLKW
...@@ -44,12 +44,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -44,12 +44,7 @@ Boston, MA 02111-1307, USA. */
object constructed before entering `main'. */ object constructed before entering `main'. */
#undef STARTFILE_SPEC #undef STARTFILE_SPEC
#ifdef USE_GNULIBC_1 #if defined HAVE_LD_PIE
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
#elif defined HAVE_LD_PIE
#define STARTFILE_SPEC \ #define STARTFILE_SPEC \
"%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\ "%{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}\
crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
...@@ -104,37 +99,15 @@ Boston, MA 02111-1307, USA. */ ...@@ -104,37 +99,15 @@ Boston, MA 02111-1307, USA. */
#define WCHAR_TYPE_SIZE 32 #define WCHAR_TYPE_SIZE 32
#undef CPP_SUBTARGET_SPEC #undef CPP_SUBTARGET_SPEC
#ifdef USE_GNULIBC_1
#define CPP_SUBTARGET_SPEC \
"%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \
%{mlong-double-128:-D__LONG_DOUBLE_128__}"
#else
#define CPP_SUBTARGET_SPEC \ #define CPP_SUBTARGET_SPEC \
"%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \ "%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \
%{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}" %{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}"
#endif
#undef LIB_SPEC #undef LIB_SPEC
/* We no longer link with libc_p.a or libg.a by default. If you
want to profile or debug the GNU/Linux C library, please add
-lc_p or -ggdb to LDFLAGS at the link time, respectively. */
#if 1
#ifdef USE_GNULIBC_1
#define LIB_SPEC \
"%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \ #define LIB_SPEC \
"%{pthread:-lpthread} \ "%{pthread:-lpthread} \
%{shared:-lc} \ %{shared:-lc} \
%{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
#endif
#else
#define LIB_SPEC \
"%{!shared: \
%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
%{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
#endif
/* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to for the special GCC options -static and -shared, which allow us to
...@@ -153,15 +126,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -153,15 +126,6 @@ Boston, MA 02111-1307, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC #undef LINK_SPEC
#ifdef USE_GNULIBC_1
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.1}} \
%{static:-static}}}"
#else
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \ %{!mno-relax:%{!r:-relax}} \
%{!shared: \ %{!shared: \
...@@ -170,7 +134,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -170,7 +134,6 @@ Boston, MA 02111-1307, USA. */
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}}}" %{static:-static}}}"
#endif
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas). /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
It's safe to pass -s always, even if -g is not used. */ It's safe to pass -s always, even if -g is not used. */
...@@ -230,7 +193,7 @@ do { \ ...@@ -230,7 +193,7 @@ do { \
#undef DITF_CONVERSION_LIBFUNCS #undef DITF_CONVERSION_LIBFUNCS
#define DITF_CONVERSION_LIBFUNCS 1 #define DITF_CONVERSION_LIBFUNCS 1
#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment