From 0a2b72a6ec53c08ec143fedd2811efe4d23dcc1c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 5 Aug 2004 10:12:12 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/linux.h | 36 +++++------------------------------ gcc/config/linux.h | 29 ++-------------------------- gcc/config/sparc/linux.h | 41 ++-------------------------------------- 4 files changed, 15 insertions(+), 97 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d3c1d6bb911..32ef013b52f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-08-05 Joseph S. Myers + + * 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 * tree.h (force_fit_type): Return a tree, take three flags. diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 85e6cf2c98f..08b859ac310 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -83,11 +83,7 @@ Boston, MA 02111-1307, USA. */ while (0) #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}" -#endif #undef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) %{profile:-p}" @@ -109,11 +105,7 @@ Boston, MA 02111-1307, USA. */ /* If ELF is the default format, we should not use /lib/elf. */ #define LINK_EMULATION "elf_i386" -#ifdef USE_GNULIBC_1 -# define DYNAMIC_LINKER "/lib/ld-linux.so.1" -#else -# define DYNAMIC_LINKER "/lib/ld-linux.so.2" -#endif +#define DYNAMIC_LINKER "/lib/ld-linux.so.2" #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ @@ -153,24 +145,6 @@ Boston, MA 02111-1307, USA. */ } while (0) #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 indirect are handled automatically. */ #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(FILE, ENCODING, SIZE, ADDR, DONE) \ @@ -211,11 +185,11 @@ Boston, MA 02111-1307, USA. */ state data appropriately. See unwind-dw2.c for the structs. */ #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 the target, so we can't check on (e.g.) HAVE_SYS_UCONTEXT_H. Using the - target libc1 macro should be enough. */ -#if !(defined (USE_GNULIBC_1) || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0)) + target libc version macro should be enough. */ +#if !(__GLIBC__ == 2 && __GLIBC_MINOR__ == 0) #include #include @@ -274,5 +248,5 @@ Boston, MA 02111-1307, USA. */ (FS)->retaddr_column = 8; \ goto SUCCESS; \ } while (0) -#endif /* not USE_GNULIBC_1 */ +#endif /* not glibc 2.0 */ #endif /* IN_LIBGCC2 */ diff --git a/gcc/config/linux.h b/gcc/config/linux.h index af7bf257ec4..5b6ff5471d2 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -39,14 +39,7 @@ Boston, MA 02111-1307, USA. */ object constructed before entering `main'. */ #undef STARTFILE_SPEC -#ifdef USE_GNULIBC_1 -#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 +#if defined HAVE_LD_PIE #define STARTFILE_SPEC \ "%{!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}" @@ -76,26 +69,10 @@ Boston, MA 02111-1307, USA. */ #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" #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 \ "%{pthread:-lpthread} \ %{shared:-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() \ do { \ @@ -107,7 +84,7 @@ Boston, MA 02111-1307, USA. */ builtin_assert ("system=posix"); \ } 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} " #endif @@ -124,8 +101,6 @@ Boston, MA 02111-1307, USA. */ /* Determine whether the the entire c99 runtime is present in the runtime library. */ -#ifndef USE_GNULIBC_1 #define TARGET_C99_FUNCTIONS 1 -#endif #define TARGET_HAS_F_SETLKW diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index ea947a811ed..2ee6ad90513 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -44,12 +44,7 @@ Boston, MA 02111-1307, USA. */ object constructed before entering `main'. */ #undef STARTFILE_SPEC -#ifdef USE_GNULIBC_1 -#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 +#if defined HAVE_LD_PIE #define STARTFILE_SPEC \ "%{!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}" @@ -104,37 +99,15 @@ Boston, MA 02111-1307, USA. */ #define WCHAR_TYPE_SIZE 32 #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 \ "%{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE} \ %{pthread:-D_REENTRANT} %{mlong-double-128:-D__LONG_DOUBLE_128__}" -#endif #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 \ "%{pthread:-lpthread} \ %{shared:-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 for the special GCC options -static and -shared, which allow us to @@ -153,15 +126,6 @@ Boston, MA 02111-1307, USA. */ /* If ELF is the default format, we should not use /lib/elf. */ #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} \ %{!mno-relax:%{!r:-relax}} \ %{!shared: \ @@ -170,7 +134,6 @@ Boston, MA 02111-1307, USA. */ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{static:-static}}}" -#endif /* 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. */ @@ -230,7 +193,7 @@ do { \ #undef DITF_CONVERSION_LIBFUNCS #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} " #endif -- 2.30.2