Remove svr4.h

Richard Guenther richard.guenther@gmail.com
Wed Dec 22 12:18:00 GMT 2010


On Tue, Dec 21, 2010 at 12:37 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> This patch finishes eliminating svr4.h by removing the file and all
> comments referencing it (except the one in elfos.h noting it was based
> on svr4.h).
>
> Most comments mentioning svr4.h did not appear to say anything worth
> preserving; apart from references to svr4.h (often out of date,
> e.g. saying that a macro was defined there that hasn't been defined
> there for a long time) they were often generic descriptions of the
> macro semantics, which we don't want in individual targets (only in
> the generic manual), rather than saying anything specific to the
> particular target.  Thus, the bulk of the comments were removed rather
> than updated.  In some cases it *is* now the case that the target
> structure of defining and redefining macros is needlessly complicated
> now it is no longer necessary to override what svr4.h does, but
> detailed cleanup of how individual targets define macros is out of the
> scope of this patch series.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Also
> tested building cc1 and xgcc for crosses to: bfin-elf cris-elf
> fr30-elf frv-elf i686-openbsd i686-wrs-vxworks ia64-elf iq2000-elf
> m68k-elf m68k-linux-gnu mips-wrs-vxworks moxie-elf i686-netbsd
> powerpc-eabi sh-elf i686-solaris2.10 sparc-elf xstormy16-elf
> v850-elf.  OK to commit?

Ok.

Thanks,
Richard.

> 2010-12-20  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/svr4.h: Remove.
>        * system.h (USING_SVR4_H, SVR4_ASM_SPEC): Poison.
>        * config.gcc, config/bfin/bfin.h, config/cris/cris.h,
>        config/fr30/fr30.h, config/frv/frv.h, config/i386/openbsdelf.h,
>        config/i386/vx-common.h, config/ia64/elf.h, config/ia64/ia64.h,
>        config/ia64/sysv4.h, config/iq2000/iq2000.h, config/m68k/linux.h,
>        config/m68k/m68kelf.h, config/mips/mips.h, config/mips/vxworks.h,
>        config/moxie/moxie.h, config/netbsd-aout.h, config/openbsd.h,
>        config/rs6000/sysv4.h, config/sh/elf.h, config/sh/sh.h,
>        config/sol2.h, config/sparc/sysv4.h, config/stormy16/stormy16.h,
>        config/v850/v850.h, config/vxworks.h: Remove or update comments
>        referring to svr4.h.
>
> Index: gcc/system.h
> ===================================================================
> --- gcc/system.h        (revision 168085)
> +++ gcc/system.h        (working copy)
> @@ -822,7 +822,8 @@ extern void fancy_abort (const char *, i
>        SWITCH_CURTAILS_COMPILATION SWITCH_TAKES_ARG WORD_SWITCH_TAKES_ARG \
>        TARGET_OPTION_TRANSLATE_TABLE HANDLE_PRAGMA_PACK_PUSH_POP          \
>        HANDLE_SYSV_PRAGMA HANDLE_PRAGMA_WEAK CONDITIONAL_REGISTER_USAGE   \
> -       FUNCTION_ARG_BOUNDARY MUST_USE_SJLJ_EXCEPTIONS US_SOFTWARE_GOFAST
> +       FUNCTION_ARG_BOUNDARY MUST_USE_SJLJ_EXCEPTIONS US_SOFTWARE_GOFAST  \
> +       USING_SVR4_H SVR4_ASM_SPEC
>
>  /* Hooks that are no longer used.  */
>  #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE  \
> Index: gcc/config.gcc
> ===================================================================
> --- gcc/config.gcc      (revision 168085)
> +++ gcc/config.gcc      (working copy)
> @@ -72,7 +72,7 @@
>  #  tm_file             A list of target macro files, if different from
>  #                      "$cpu_type/$cpu_type.h". Usually it's constructed
>  #                      per target in a way like this:
> -#                      tm_file="${tm_file} dbxelf.h elfos.h svr4.h ${cpu_type.h}/elf.h"
> +#                      tm_file="${tm_file} dbxelf.h elfos.h ${cpu_type.h}/elf.h"
>  #                      Note that the preferred order is:
>  #                      - specific target header "${cpu_type}/${cpu_type.h}"
>  #                      - generic headers like dbxelf.h elfos.h, etc.
> Index: gcc/config/frv/frv.h
> ===================================================================
> --- gcc/config/frv/frv.h        (revision 168085)
> +++ gcc/config/frv/frv.h        (working copy)
> @@ -55,14 +55,6 @@
>  # define SUBTARGET_DRIVER_SELF_SPECS
>  #endif
>
> -/* A C string constant that tells the GCC driver program options to pass to
> -   the assembler.  It can also specify how to translate options you give to GNU
> -   CC into options for GCC to pass to the assembler.  See the file `sun3.h'
> -   for an example of this.
> -
> -   Do not define this macro if it does not need to do anything.
> -
> -   Defined in svr4.h.  */
>  #undef  ASM_SPEC
>  #define ASM_SPEC "\
>  %{G*} %{Ym,*} %{Yd,*} \
> @@ -79,24 +71,9 @@
>     %{mno-fdpic:-mnopic} %{mfdpic} \
>     %{fpic|fpie: -mpic} %{fPIC|fPIE: -mPIC} %{mlibrary-pic}}"
>
> -/* Another C string constant used much like `LINK_SPEC'.  The difference
> -   between the two is that `STARTFILE_SPEC' is used at the very beginning of
> -   the command given to the linker.
> -
> -   If this macro is not defined, a default is provided that loads the standard
> -   C startup file from the usual place.  See `gcc.c'.
> -
> -   Defined in svr4.h.  */
>  #undef  STARTFILE_SPEC
>  #define STARTFILE_SPEC "crt0%O%s frvbegin%O%s"
>
> -/* Another C string constant used much like `LINK_SPEC'.  The difference
> -   between the two is that `ENDFILE_SPEC' is used at the very end of the
> -   command given to the linker.
> -
> -   Do not define this macro if it does not need to do anything.
> -
> -   Defined in svr4.h.  */
>  #undef  ENDFILE_SPEC
>  #define ENDFILE_SPEC "frvend%O%s"
>
> @@ -142,15 +119,6 @@
>  /* For ABI compliance, we need to put bss data into the normal data section.  */
>  #define CC1_SPEC "%{G*}"
>
> -/* A C string constant that tells the GCC driver program options to pass to
> -   the linker.  It can also specify how to translate options you give to GCC
> -   into options for GCC to pass to the linker.
> -
> -   Do not define this macro if it does not need to do anything.
> -
> -   Defined in svr4.h.  */
> -/* Override the svr4.h version with one that dispenses without the svr4
> -   shared library options, notably -G.  */
>  #undef LINK_SPEC
>  #define LINK_SPEC "\
>  %{h*} %{v:-V} \
> @@ -162,15 +130,6 @@
>  %{YP,*} \
>  %{Qy:} %{!Qn:-Qy}"
>
> -/* Another C string constant used much like `LINK_SPEC'.  The difference
> -   between the two is that `LIB_SPEC' is used at the end of the command given
> -   to the linker.
> -
> -   If this macro is not defined, a default is provided that loads the standard
> -   C library from the usual place.  See `gcc.c'.
> -
> -   Defined in svr4.h.  */
> -
>  #undef  LIB_SPEC
>  #define LIB_SPEC "--start-group -lc -lsim --end-group"
>
> @@ -428,67 +387,6 @@
>    slower in that case, define this macro as 0.  */
>  #define STRICT_ALIGNMENT 1
>
> -/* Define this if you wish to imitate the way many other C compilers handle
> -   alignment of bitfields and the structures that contain them.
> -
> -   The behavior is that the type written for a bit-field (`int', `short', or
> -   other integer type) imposes an alignment for the entire structure, as if the
> -   structure really did contain an ordinary field of that type.  In addition,
> -   the bit-field is placed within the structure so that it would fit within such
> -   a field, not crossing a boundary for it.
> -
> -   Thus, on most machines, a bit-field whose type is written as `int' would not
> -   cross a four-byte boundary, and would force four-byte alignment for the
> -   whole structure.  (The alignment used may not be four bytes; it is
> -   controlled by the other alignment parameters.)
> -
> -   If the macro is defined, its definition should be a C expression; a nonzero
> -   value for the expression enables this behavior.
> -
> -   Note that if this macro is not defined, or its value is zero, some bitfields
> -   may cross more than one alignment boundary.  The compiler can support such
> -   references if there are `insv', `extv', and `extzv' insns that can directly
> -   reference memory.
> -
> -   The other known way of making bitfields work is to define
> -   `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'.  Then every
> -   structure can be accessed with fullwords.
> -
> -   Unless the machine has bit-field instructions or you define
> -   `STRUCTURE_SIZE_BOUNDARY' that way, you must define
> -   `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
> -
> -   If your aim is to make GCC use the same conventions for laying out
> -   bitfields as are used by another compiler, here is how to investigate what
> -   the other compiler does.  Compile and run this program:
> -
> -        struct foo1
> -        {
> -          char x;
> -          char :0;
> -          char y;
> -        };
> -
> -        struct foo2
> -        {
> -          char x;
> -          int :0;
> -          char y;
> -        };
> -
> -        main ()
> -        {
> -          printf ("Size of foo1 is %d\n",
> -                  sizeof (struct foo1));
> -          printf ("Size of foo2 is %d\n",
> -                  sizeof (struct foo2));
> -          exit (0);
> -        }
> -
> -   If this prints 2 and 5, then the compiler's behavior is what you would get
> -   from `PCC_BITFIELD_TYPE_MATTERS'.
> -
> -   Defined in svr4.h.  */
>  #define PCC_BITFIELD_TYPE_MATTERS 1
>
>
> @@ -1855,15 +1753,6 @@ __asm__("\n"                                                             \
>  /* Short Data Support */
>  #define SDATA_SECTION_ASM_OP   "\t.section .sdata,\"aw\""
>
> -/* On svr4, we *do* have support for the .init and .fini sections, and we
> -   can put stuff in there to be executed before and after `main'.  We let
> -   crtstuff.c and other files know this by defining the following symbols.
> -   The definitions say how to change sections to the .init and .fini
> -   sections.  This is the same for all known svr4 assemblers.
> -
> -   The standard System V.4 macros will work, but they look ugly in the
> -   assembly output, so redefine them.  */
> -
>  #undef INIT_SECTION_ASM_OP
>  #undef FINI_SECTION_ASM_OP
>  #define INIT_SECTION_ASM_OP    "\t.section .init,\"ax\""
> @@ -1942,13 +1831,6 @@ do {                                                                     \
>    variables are output.  */
>  #undef ASM_OUTPUT_LOCAL
>
> -/* Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a separate,
> -   explicit argument.  If you define this macro, it is used in place of
> -   `ASM_OUTPUT_LOCAL', and gives you more flexibility in handling the required
> -   alignment of the variable.  The alignment is specified as the number of
> -   bits.
> -
> -   Defined in svr4.h.  */
>  #undef ASM_OUTPUT_ALIGNED_LOCAL
>
>  /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME.  */
> @@ -1989,21 +1871,6 @@ do {                                                                     \
>  /* Globalizing directive for a label.  */
>  #define GLOBAL_ASM_OP "\t.globl "
>
> -/* A C statement to store into the string STRING a label whose name is made
> -   from the string PREFIX and the number NUM.
> -
> -   This string, when output subsequently by `assemble_name', should produce the
> -   output that `(*targetm.asm_out.internal_label)' would produce with the same PREFIX
> -   and NUM.
> -
> -   If the string begins with `*', then `assemble_name' will output the rest of
> -   the string unchanged.  It is often convenient for
> -   `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way.  If the string doesn't
> -   start with `*', then `ASM_OUTPUT_LABELREF' gets to output the string, and
> -   may change it.  (Of course, `ASM_OUTPUT_LABELREF' is also part of your
> -   machine description, so you should know what it does on your machine.)
> -
> -   Defined in svr4.h.  */
>  #undef ASM_GENERATE_INTERNAL_LABEL
>  #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)                        \
>  do {                                                                   \
> @@ -2013,13 +1880,6 @@ do {                                                                     \
>
>  /* Macros Controlling Initialization Routines.  */
>
> -/* If defined, a C string constant for the assembler operation to identify the
> -   following data as initialization code.  If not defined, GCC will assume
> -   such a section does not exist.  When you are using special sections for
> -   initialization and termination functions, this macro also controls how
> -   `crtstuff.c' and `libgcc2.c' arrange to run the initialization functions.
> -
> -   Defined in svr4.h.  */
>  #undef INIT_SECTION_ASM_OP
>
>  /* If defined, `main' will call `__main' despite the presence of
> @@ -2113,12 +1973,6 @@ do {                                                                     \
>  #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\
>   frv_final_prescan_insn (INSN, OPVEC, NOPERANDS)
>
> -/* If defined, C string expressions to be used for the `%R', `%L', `%U', and
> -   `%I' options of `asm_fprintf' (see `final.c').  These are useful when a
> -   single `md' file must support multiple assembler formats.  In that case, the
> -   various `tm.h' files can define these macros differently.
> -
> -   USER_LABEL_PREFIX is defined in svr4.h.  */
>  #undef USER_LABEL_PREFIX
>  #define USER_LABEL_PREFIX ""
>  #define REGISTER_PREFIX ""
> @@ -2175,11 +2029,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
>
>  /* Assembler Commands for Alignment.  */
>
> -/* A C statement to output to the stdio stream STREAM an assembler instruction
> -   to advance the location counter by NBYTES bytes.  Those bytes should be zero
> -   when loaded.  NBYTES will be a C expression of type `int'.
> -
> -   Defined in svr4.h.  */
>  #undef  ASM_OUTPUT_SKIP
>  #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
>   fprintf (STREAM, "\t.zero\t%u\n", (int)(NBYTES))
> @@ -2215,17 +2064,6 @@ fprintf (STREAM, "\t.word .L%d\n", VALUE
>    This declaration is required.  */
>  #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
>
> -/* A C expression that returns the type of debugging output GCC produces
> -   when the user specifies `-g' or `-ggdb'.  Define this if you have arranged
> -   for GCC to support more than one format of debugging output.  Currently,
> -   the allowable values are `DBX_DEBUG', `SDB_DEBUG', `DWARF_DEBUG',
> -   `DWARF2_DEBUG', and `XCOFF_DEBUG'.
> -
> -   The value of this macro only affects the default debugging output; the user
> -   can always get a specific type of output by using `-gstabs', `-gcoff',
> -   `-gdwarf-1', `-gdwarf-2', or `-gxcoff'.
> -
> -   Defined in svr4.h.  */
>  #undef  PREFERRED_DEBUGGING_TYPE
>  #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
>
> Index: gcc/config/sparc/sysv4.h
> ===================================================================
> --- gcc/config/sparc/sysv4.h    (revision 168085)
> +++ gcc/config/sparc/sysv4.h    (working copy)
> @@ -24,19 +24,15 @@ along with GCC; see the file COPYING3.
>  #define TARGET_VERSION fprintf (stderr, " (sparc ELF)");
>  #endif
>
> -/* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h.
> -   Why, exactly, is svr4.h messing with this?  Seems like the chip
> -   would know best.  */
> -
>  #undef SIZE_TYPE
>  #define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int")
>
>  #undef PTRDIFF_TYPE
>  #define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
>
> -/* Undefined some symbols which are defined in "svr4.h" but which are
> -   appropriate only for typical svr4 systems, but not for the specific
> -   case of svr4 running on a SPARC.  */
> +/* Undefined some symbols which are appropriate only for typical svr4
> +   systems, but not for the specific case of svr4 running on a
> +   SPARC.  */
>
>  #undef INIT_SECTION_ASM_OP
>  #undef FINI_SECTION_ASM_OP
> Index: gcc/config/netbsd-aout.h
> ===================================================================
> --- gcc/config/netbsd-aout.h    (revision 168085)
> +++ gcc/config/netbsd-aout.h    (working copy)
> @@ -69,8 +69,6 @@ along with GCC; see the file COPYING3.
>  #undef LINK_SPEC
>  #define LINK_SPEC NETBSD_LINK_SPEC_AOUT
>
> -/* Some imports from svr4.h in support of shared libraries.  */
> -
>  /* Define the strings used for the .type, .size, and .set directives.
>    These strings generally do not vary from one system running NetBSD
>    to another, but if a given system needs to use different pseudo-op
> Index: gcc/config/i386/vx-common.h
> ===================================================================
> --- gcc/config/i386/vx-common.h (revision 168085)
> +++ gcc/config/i386/vx-common.h (working copy)
> @@ -26,8 +26,8 @@ along with GCC; see the file COPYING3.
>  #define TARGET_SUBTARGET_DEFAULT \
>        (MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_VECT8_RETURNS)
>
> -/* Provide our target specific DBX_REGISTER_NUMBER, as advertised by the
> -   common svr4.h.  VxWorks relies on the SVR4 numbering.  */
> +/* Provide our target specific DBX_REGISTER_NUMBER.  VxWorks relies on
> +   the SVR4 numbering.  */
>
>  #undef DBX_REGISTER_NUMBER
>  #define DBX_REGISTER_NUMBER(n)  svr4_dbx_register_map[n]
> Index: gcc/config/i386/openbsdelf.h
> ===================================================================
> --- gcc/config/i386/openbsdelf.h        (revision 168085)
> +++ gcc/config/i386/openbsdelf.h        (working copy)
> @@ -18,8 +18,8 @@ You should have received a copy of the G
>  along with GCC; see the file COPYING3.  If not see
>  <http://www.gnu.org/licenses/>.  */
>
> -/* This gets defined in tm.h->linux.h->svr4.h, and keeps us from using
> -   libraries compiled with the native cc, so undef it. */
> +/* This keeps us from using libraries compiled with the native cc, so
> +   undef it. */
>  #undef NO_DOLLAR_IN_LABEL
>
>  /* Override the default comment-starter of "/".  */
> Index: gcc/config/sol2.h
> ===================================================================
> --- gcc/config/sol2.h   (revision 168085)
> +++ gcc/config/sol2.h   (working copy)
> @@ -179,7 +179,6 @@ along with GCC; see the file COPYING3.
>  #undef LINK_ARCH_SPEC
>  #define LINK_ARCH_SPEC LINK_ARCH32_SPEC
>
> -/* This should be the same as in svr4.h, except with -R added.  */
>  #undef  LINK_SPEC
>  #define LINK_SPEC \
>   "%{h*} %{v:-V} \
> Index: gcc/config/sh/elf.h
> ===================================================================
> --- gcc/config/sh/elf.h (revision 168085)
> +++ gcc/config/sh/elf.h (working copy)
> @@ -1,5 +1,5 @@
>  /* Definitions of target machine for gcc for Renesas / SuperH SH using ELF.
> -   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2004, 2005, 2007
> +   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2004, 2005, 2007, 2010
>    Free Software Foundation, Inc.
>    Contributed by Ian Lance Taylor <ian@cygnus.com>.
>
> @@ -32,8 +32,6 @@ along with GCC; see the file COPYING3.
>  /* use a more compact format for line information */
>  #define DWARF2_ASM_LINE_DEBUG_INFO 1
>
> -/* WCHAR_TYPE / WCHAR_TYPE_SIZE are defined to long int / BITS_PER_WORD in
> -   svr4.h, but these work out as 64 bit for shmedia64.  */
>  #undef WCHAR_TYPE
>  /* #define WCHAR_TYPE (TARGET_SH5 ? "int" : "long int") */
>  #define WCHAR_TYPE SH_ELF_WCHAR_TYPE
> @@ -66,8 +64,6 @@ along with GCC; see the file COPYING3.
>  #define LINK_EMUL_PREFIX "sh%{ml:l}elf"
>  #endif
>
> -/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it
> -   again.  */
>  #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO)
>
>  #undef ASM_GENERATE_INTERNAL_LABEL
> Index: gcc/config/sh/sh.h
> ===================================================================
> --- gcc/config/sh/sh.h  (revision 168085)
> +++ gcc/config/sh/sh.h  (working copy)
> @@ -405,8 +405,7 @@ do { \
>  #define SUBTARGET_LINK_EMUL_SUFFIX ""
>  #define SUBTARGET_LINK_SPEC ""
>
> -/* svr4.h redefines LINK_SPEC inappropriately, so go via SH_LINK_SPEC,
> -   so that we can undo the damage without code replication.  */
> +/* Go via SH_LINK_SPEC to avoid code replication.  */
>  #define LINK_SPEC SH_LINK_SPEC
>
>  #define SH_LINK_SPEC "\
> @@ -2224,8 +2223,6 @@ struct sh_args {
>  /* DBX register number for a given compiler register number.  */
>  /* GDB has FPUL at 23 and FP0 at 25, so we must add one to all FP registers
>    to match gdb.  */
> -/* svr4.h undefines this macro, yet we really want to use the same numbers
> -   for coff as for elf, so we go via another macro: SH_DBX_REGISTER_NUMBER.  */
>  /* expand_builtin_init_dwarf_reg_sizes uses this to test if a
>    register exists, so we should return -1 for invalid register numbers.  */
>  #define DBX_REGISTER_NUMBER(REGNO) SH_DBX_REGISTER_NUMBER (REGNO)
> Index: gcc/config/stormy16/stormy16.h
> ===================================================================
> --- gcc/config/stormy16/stormy16.h      (revision 168085)
> +++ gcc/config/stormy16/stormy16.h      (working copy)
> @@ -514,7 +514,6 @@ enum reg_class
>
>  #define PRINT_OPERAND_ADDRESS(STREAM, X) xstormy16_print_operand_address (STREAM, X)
>
> -/* USER_LABEL_PREFIX is defined in svr4.h.  */
>  #define REGISTER_PREFIX ""
>  #define LOCAL_LABEL_PREFIX "."
>  #define USER_LABEL_PREFIX ""
> @@ -556,7 +555,6 @@ enum reg_class
>
>  /* Macros Affecting all Debug Formats.  */
>
> -/* Defined in svr4.h.  */
>  #undef  PREFERRED_DEBUGGING_TYPE
>  #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
>
> Index: gcc/config/fr30/fr30.h
> ===================================================================
> --- gcc/config/fr30/fr30.h      (revision 168085)
> +++ gcc/config/fr30/fr30.h      (working copy)
> @@ -97,7 +97,6 @@ along with GCC; see the file COPYING3.
>
>  #define STRICT_ALIGNMENT 1
>
> -/* Defined in svr4.h.  */
>  #define PCC_BITFIELD_TYPE_MATTERS 1
>
>  /*}}}*/
> @@ -850,12 +849,6 @@ enum reg_class
>
>  #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X)
>
> -/* If defined, C string expressions to be used for the `%R', `%L', `%U', and
> -   `%I' options of `asm_fprintf' (see `final.c').  These are useful when a
> -   single `md' file must support multiple assembler formats.  In that case, the
> -   various `tm.h' files can define these macros differently.
> -
> -   USER_LABEL_PREFIX is defined in svr4.h.  */
>  #define REGISTER_PREFIX "%"
>  #define LOCAL_LABEL_PREFIX "."
>  #define USER_LABEL_PREFIX ""
> Index: gcc/config/moxie/moxie.h
> ===================================================================
> --- gcc/config/moxie/moxie.h    (revision 168085)
> +++ gcc/config/moxie/moxie.h    (working copy)
> @@ -21,14 +21,6 @@
>  #ifndef GCC_MOXIE_H
>  #define GCC_MOXIE_H
>
> -/* Another C string constant used much like `LINK_SPEC'.  The difference
> -   between the two is that `STARTFILE_SPEC' is used at the very beginning of
> -   the command given to the linker.
> -
> -   If this macro is not defined, a default is provided that loads the standard
> -   C startup file from the usual place.  See `gcc.c'.
> -
> -   Defined in svr4.h.  */
>  #undef  STARTFILE_SPEC
>  #define STARTFILE_SPEC "crt0%O%s crti.o%s crtbegin.o%s"
>
> Index: gcc/config/cris/cris.h
> ===================================================================
> --- gcc/config/cris/cris.h      (revision 168085)
> +++ gcc/config/cris/cris.h      (working copy)
> @@ -211,7 +211,6 @@ extern int cris_cpu_version;
>    to avoid *only* picking up the linux multilib subdir from the "-B./"
>    option during build, while still giving it preference.  We'd need some
>    %s-variant that checked for existence of some specific file.  */
> -/* Override previous definitions (svr4.h).  */
>  #undef LINK_SPEC
>  #define LINK_SPEC \
>  "%{v:--verbose}\
> Index: gcc/config/iq2000/iq2000.h
> ===================================================================
> --- gcc/config/iq2000/iq2000.h  (revision 168085)
> +++ gcc/config/iq2000/iq2000.h  (working copy)
> @@ -21,7 +21,7 @@
>
>  /* Driver configuration.  */
>
> -/* The svr4.h LIB_SPEC with -leval and --*group tacked on */
> +/* A generic LIB_SPEC with -leval and --*group tacked on.  */
>  #undef  LIB_SPEC
>  #define LIB_SPEC "%{!shared:%{!symbolic:--start-group -lc -leval -lgcc --end-group}}"
>
> Index: gcc/config/svr4.h
> ===================================================================
> --- gcc/config/svr4.h   (revision 168085)
> +++ gcc/config/svr4.h   (working copy)
> @@ -1,177 +0,0 @@
> -/* Operating system specific defines to be used when targeting GCC for some
> -   generic System V Release 4 system.
> -   Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
> -   2000, 2001, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
> -   Contributed by Ron Guilmette (rfg@monkeys.com).
> -
> -This file is part of GCC.
> -
> -GCC is free software; you can redistribute it and/or modify
> -it under the terms of the GNU General Public License as published by
> -the Free Software Foundation; either version 3, or (at your option)
> -any later version.
> -
> -GCC is distributed in the hope that it will be useful,
> -but WITHOUT ANY WARRANTY; without even the implied warranty of
> -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> -GNU General Public License for more details.
> -
> -Under Section 7 of GPL version 3, you are granted additional
> -permissions described in the GCC Runtime Library Exception, version
> -3.1, as published by the Free Software Foundation.
> -
> -You should have received a copy of the GNU General Public License and
> -a copy of the GCC Runtime Library Exception along with this program;
> -see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
> -<http://www.gnu.org/licenses/>.  */
> -
> -
> -/* To use this file, make up a line like that in config.gcc:
> -
> -       tm_file="$tm_file elfos.h svr4.h MACHINE/svr4.h"
> -
> -   where MACHINE is replaced by the name of the basic hardware that you
> -   are targeting for.  Then, in the file MACHINE/svr4.h, put any really
> -   system-specific defines (or overrides of defines) which you find that
> -   you need.
> -*/
> -
> -/* Define a symbol indicating that we are using svr4.h.  */
> -#define USING_SVR4_H
> -
> -/* Cpp, assembler, linker, library, and startfile spec's.  */
> -
> -/* Provide an ASM_SPEC appropriate for svr4.
> -   If we're not using GAS, we try to support as
> -   many of the specialized svr4 assembler options as seems reasonable,
> -   given that there are certain options which we can't (or shouldn't)
> -   support directly due to the fact that they conflict with other options
> -   for other svr4 tools (e.g. ld) or with other options for GCC itself.
> -   For example, we don't support the -o (output file) or -R (remove
> -   input file) options because GCC already handles these things.  We
> -   also don't support the -m (run m4) option for the assembler because
> -   that conflicts with the -m (produce load map) option of the svr4
> -   linker.  We do however allow passing arbitrary options to the svr4
> -   assembler via the -Wa, option.
> -
> -   Note that gcc doesn't allow a space to follow -Y in a -Ym,* or -Yd,*
> -   option.
> -
> -   The svr4 assembler wants '-' on the command line if it's expected to
> -   read its stdin.
> -*/
> -
> -#ifdef USE_GAS
> -#define SVR4_ASM_SPEC \
> -  ""
> -#else
> -#define SVR4_ASM_SPEC \
> -  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
> -#endif
> -
> -#undef  ASM_SPEC
> -#define ASM_SPEC SVR4_ASM_SPEC
> -
> -/* Provide a LIB_SPEC appropriate for svr4.  Here we tack on the default
> -   standard C library (unless we are building a shared library).  */
> -
> -#undef LIB_SPEC
> -#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
> -
> -/* Provide an ENDFILE_SPEC appropriate for svr4.  Here we tack on our own
> -   magical crtend.o file (see crtstuff.c) which provides part of the
> -   support for getting C++ file-scope static object constructed before
> -   entering `main', followed by the normal svr3/svr4 "finalizer" file,
> -   which is either `gcrtn.o' or `crtn.o'.  */
> -
> -#undef  ENDFILE_SPEC
> -#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
> -
> -/* Provide a LINK_SPEC appropriate for svr4.  Here we provide support
> -   for the special GCC options -static, -shared, and -symbolic which
> -   allow us to link things in one of these three modes by applying the
> -   appropriate combinations of options at link-time.  We also provide
> -   support here for as many of the other svr4 linker options as seems
> -   reasonable, given that some of them conflict with options for other
> -   svr4 tools (e.g. the assembler).  In particular, we do support the
> -   -z*, -V, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
> -   -o*, -r, -s, -u*, and -L* options are directly supported by gcc.c
> -   itself.  We don't directly support the -m (generate load map)
> -   option because that conflicts with the -m (run m4) option of the
> -   svr4 assembler.  We also don't directly support the svr4 linker's
> -   -I* or -M* options because these conflict with existing GCC
> -   options.  We do however allow passing arbitrary options to the svr4
> -   linker via the -Wl, option, in gcc.c.  We don't support the svr4
> -   linker's -a option at all because it is totally useless and because
> -   it conflicts with GCC's own -a option.
> -
> -   Note that gcc doesn't allow a space to follow -Y in a -YP,* option.
> -
> -   When the -G link option is used (-shared and -symbolic) a final link is
> -   not being done.  */
> -
> -#undef LINK_SPEC
> -#ifdef CROSS_DIRECTORY_STRUCTURE
> -#define LINK_SPEC "%{h*} %{v:-V} \
> -                  %{static:-dn -Bstatic} \
> -                  %{shared:-G -dy -z text} \
> -                  %{symbolic:-Bsymbolic -G -dy -z text} \
> -                  %{G:-G} \
> -                  %{YP,*} \
> -                  %{Qy:} %{!Qn:-Qy}"
> -#else
> -#define LINK_SPEC "%{h*} %{v:-V} \
> -                  %{static:-dn -Bstatic} \
> -                  %{shared:-G -dy -z text} \
> -                  %{symbolic:-Bsymbolic -G -dy -z text} \
> -                  %{G:-G} \
> -                  %{YP,*} \
> -                  %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
> -                   %{!p:-Y P,/usr/ccs/lib:/usr/lib}} \
> -                  %{Qy:} %{!Qn:-Qy}"
> -#endif
> -
> -/* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o
> -   or /usr/ccs/lib/values-Xa.o for each final link step (depending
> -   upon the other gcc options selected, such as -ansi).  These files
> -   each contain one (initialized) copy of a special variable called
> -   `_lib_version'.  Each one of these files has `_lib_version' initialized
> -   to a different (enum) value.  The SVR4 library routines query the
> -   value of `_lib_version' at run to decide how they should behave.
> -   Specifically, they decide (based upon the value of `_lib_version')
> -   if they will act in a strictly ANSI conforming manner or not.  */
> -
> -#undef STARTFILE_SPEC
> -#define STARTFILE_SPEC "%{!shared: \
> -                        %{!symbolic: \
> -                         %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
> -                       %{pg:gcrti.o%s}%{!pg:crti.o%s} \
> -                       %{ansi:values-Xc.o%s} \
> -                       %{!ansi:values-Xa.o%s} \
> -                       crtbegin.o%s"
> -
> -/* The numbers used to denote specific machine registers in the System V
> -   Release 4 DWARF debugging information are quite likely to be totally
> -   different from the numbers used in BSD stabs debugging information
> -   for the same kind of target machine.  Thus, we undefine the macro
> -   DBX_REGISTER_NUMBER here as an extra inducement to get people to
> -   provide proper machine-specific definitions of DBX_REGISTER_NUMBER
> -   (which is also used to provide DWARF registers numbers in dwarfout.c)
> -   in their tm.h files which include this file.  */
> -
> -#undef DBX_REGISTER_NUMBER
> -
> -/* Define the actual types of some ANSI-mandated types.  (These
> -   definitions should work for most SVR4 systems).  */
> -
> -#undef  SIZE_TYPE
> -#define SIZE_TYPE "unsigned int"
> -
> -#undef  PTRDIFF_TYPE
> -#define PTRDIFF_TYPE "int"
> -
> -#undef  WCHAR_TYPE
> -#define WCHAR_TYPE "long int"
> -
> -#undef  WCHAR_TYPE_SIZE
> -#define WCHAR_TYPE_SIZE BITS_PER_WORD
> Index: gcc/config/ia64/elf.h
> ===================================================================
> --- gcc/config/ia64/elf.h       (revision 168085)
> +++ gcc/config/ia64/elf.h       (working copy)
> @@ -1,6 +1,6 @@
>  /* Definitions for embedded ia64-elf target.
>
> -Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
> +Copyright (C) 2000, 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
>
>  This file is part of GCC.
>
> @@ -59,8 +59,8 @@ see the files COPYING3 and COPYING.RUNTI
>  #define LINK_SPEC "%{!mgnu-ld:-dn -N so}"
>  #endif
>
> -/* svr4.h links with crti.o/crtn.o, but elfos.h does not.  We override elfos.h
> -   so that we can use the standard ELF Unix method.  */
> +/* elfos.h does not link with crti.o/crtn.o.  We override elfos.h so
> +   that we can use the standard ELF Unix method.  */
>  #undef  ENDFILE_SPEC
>  #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
>
> Index: gcc/config/ia64/ia64.h
> ===================================================================
> --- gcc/config/ia64/ia64.h      (revision 168085)
> +++ gcc/config/ia64/ia64.h      (working copy)
> @@ -1322,11 +1322,6 @@ do {                                                                     \
>
>  #define ASM_APP_OFF (TARGET_GNU_AS ? "#NO_APP\n" : "//NO_APP\n")
>
> -/* Output of Uninitialized Variables.  */
> -
> -/* This is all handled by svr4.h.  */
> -
> -
>  /* Output and Generation of Labels.  */
>
>  /* A C statement (sans semicolon) to output to the stdio stream STREAM the
> @@ -1383,7 +1378,7 @@ do {                                                                      \
>
>  /* Macros Controlling Initialization Routines.  */
>
> -/* This is handled by svr4.h and sysv4.h.  */
> +/* This is handled by sysv4.h.  */
>
>
>  /* Output of Assembler Instructions.  */
> @@ -1656,12 +1651,12 @@ do {                                                                    \
>
>  /* Macros Affecting all Debug Formats.  */
>
> -/* This is handled in svr4.h and sysv4.h.  */
> +/* This is handled in sysv4.h.  */
>
>
>  /* Specific Options for DBX Output.  */
>
> -/* This is handled by dbxelf.h which is included by svr4.h.  */
> +/* This is handled by dbxelf.h.  */
>
>
>  /* Open ended Hooks for DBX Output.  */
> Index: gcc/config/ia64/sysv4.h
> ===================================================================
> --- gcc/config/ia64/sysv4.h     (revision 168085)
> +++ gcc/config/ia64/sysv4.h     (working copy)
> @@ -1,4 +1,4 @@
> -/* Override definitions in elfos.h/svr4.h to be correct for IA64.
> +/* Override definitions in elfos.h to be correct for IA64.
>
>  Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005,
>  2007, 2010 Free Software Foundation, Inc.
> @@ -104,13 +104,9 @@ do {                                               \
>  #undef FINI_SECTION_ASM_OP
>  #define FINI_SECTION_ASM_OP    "\t.section\t.fini,\"ax\",\"progbits\""
>
> -/* svr4.h undefines this, so we need to define it here.  */
>  #define DBX_REGISTER_NUMBER(REGNO) \
>   ia64_dbx_register_number(REGNO)
>
> -/* Things that svr4.h defines to the wrong type, because it assumes 32-bit
> -   ints and 32-bit longs.  */
> -
>  #undef SIZE_TYPE
>  #define SIZE_TYPE "long unsigned int"
>
> Index: gcc/config/m68k/linux.h
> ===================================================================
> --- gcc/config/m68k/linux.h     (revision 168085)
> +++ gcc/config/m68k/linux.h     (working copy)
> @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3.
>  #undef TARGET_VERSION
>  #define TARGET_VERSION fprintf (stderr, " (68k GNU/Linux with ELF)");
>
> -/* Add %(asm_cpu_spec) to the svr4.h definition of ASM_SPEC.  */
> +/* Add %(asm_cpu_spec) to a generic definition of ASM_SPEC.  */
>  #undef ASM_SPEC
>  #define ASM_SPEC "%(asm_cpu_spec) %(asm_pcrel_spec) \
>   %{Qy:} %{!Qn:-Qy} %{Ym,*} %{Yd,*}"
> Index: gcc/config/m68k/m68kelf.h
> ===================================================================
> --- gcc/config/m68k/m68kelf.h   (revision 168085)
> +++ gcc/config/m68k/m68kelf.h   (working copy)
> @@ -1,7 +1,7 @@
>  /* m68kelf support, derived from m68kv4.h */
>
>  /* Target definitions for GNU compiler for mc680x0 running System V.4
> -   Copyright (C) 1991, 1993, 2000, 2002, 2003, 2004, 2007
> +   Copyright (C) 1991, 1993, 2000, 2002, 2003, 2004, 2007, 2010
>    Free Software Foundation, Inc.
>
>    Written by Ron Guilmette (rfg@netcom.com) and Fred Fish (fnf@cygnus.com).
> @@ -126,8 +126,8 @@ do {                                                                \
>
>  #define JUMP_TABLES_IN_TEXT_SECTION 1
>
> -/* Override the definition in svr4.h. In m68k svr4, using swbeg is the
> -   standard way to do switch table.  */
> +/* In m68k svr4, using swbeg is the standard way to do switch
> +   table.  */
>  #undef ASM_OUTPUT_BEFORE_CASE_LABEL
>  #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE)            \
>   fprintf ((FILE), "%s&%d\n", SWBEG_ASM_OP, XVECLEN (PATTERN (TABLE), 1));
> Index: gcc/config/rs6000/sysv4.h
> ===================================================================
> --- gcc/config/rs6000/sysv4.h   (revision 168085)
> +++ gcc/config/rs6000/sysv4.h   (working copy)
> @@ -273,13 +273,9 @@ do {                                                                       \
>  /* Type used for ptrdiff_t, as a string used in a declaration.  */
>  #define PTRDIFF_TYPE "int"
>
> -/* Type used for wchar_t, as a string used in a declaration.  */
> -/* Override svr4.h definition.  */
>  #undef WCHAR_TYPE
>  #define WCHAR_TYPE "long int"
>
> -/* Width of wchar_t in bits.  */
> -/* Override svr4.h definition.  */
>  #undef WCHAR_TYPE_SIZE
>  #define WCHAR_TYPE_SIZE 32
>
> @@ -404,8 +400,6 @@ do {                                                                        \
>  #define        LOCAL_LABEL_PREFIX "."
>  #define        USER_LABEL_PREFIX ""
>
> -/* svr4.h overrides (*targetm.asm_out.internal_label).  */
> -
>  #define        ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX)   \
>   asm_fprintf (FILE, "%L%s", PREFIX)
>
> @@ -550,8 +544,6 @@ extern int fixuplabelno;
>   while (0)
>  #endif
>
> -/* Pass various options to the assembler.  */
> -/* Override svr4.h definition.  */
>  #undef ASM_SPEC
>  #define        ASM_SPEC "%(asm_cpu) \
>  %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
> @@ -640,7 +632,6 @@ extern int fixuplabelno;
>
>  #define LINK_START_DEFAULT_SPEC ""
>
> -/* Override svr4.h definition.  */
>  #undef LINK_SPEC
>  #define        LINK_SPEC "\
>  %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \
> @@ -716,7 +707,6 @@ extern int fixuplabelno;
>
>  #define        CPP_OS_DEFAULT_SPEC ""
>
> -/* Override svr4.h definition.  */
>  #undef STARTFILE_SPEC
>  #define        STARTFILE_SPEC "\
>  %{mads         : %(startfile_ads)         ; \
> @@ -732,7 +722,6 @@ extern int fixuplabelno;
>
>  #define        STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
>
> -/* Override svr4.h definition.  */
>  #undef LIB_SPEC
>  #define        LIB_SPEC "\
>  %{mads         : %(lib_ads)         ; \
> @@ -748,7 +737,6 @@ extern int fixuplabelno;
>
>  #define LIB_DEFAULT_SPEC "-lc"
>
> -/* Override svr4.h definition.  */
>  #undef ENDFILE_SPEC
>  #define        ENDFILE_SPEC "\
>  %{mads         : %(endfile_ads)         ; \
> Index: gcc/config/mips/mips.h
> ===================================================================
> --- gcc/config/mips/mips.h      (revision 168085)
> +++ gcc/config/mips/mips.h      (working copy)
> @@ -2802,9 +2802,6 @@ while (0)
>  #define ASM_COMMENT_START " #"
>  #endif
>
> -/* Default definitions for size_t and ptrdiff_t.  We must override the
> -   definitions from ../svr4.h on mips-*-linux-gnu.  */
> -
>  #undef SIZE_TYPE
>  #define SIZE_TYPE (POINTER_SIZE == 64 ? "long unsigned int" : "unsigned int")
>
> Index: gcc/config/mips/vxworks.h
> ===================================================================
> --- gcc/config/mips/vxworks.h   (revision 168085)
> +++ gcc/config/mips/vxworks.h   (working copy)
> @@ -33,7 +33,6 @@ along with GCC; see the file COPYING3.
>  %(subtarget_asm_spec)"
>
>  #undef LINK_SPEC
> -/* LINK_SPEC is clobbered in svr4.h. ugh!  */
>  #define LINK_SPEC "\
>  %(endian_spec) \
>  %{!G:-G 0} %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} \
> Index: gcc/config/openbsd.h
> ===================================================================
> --- gcc/config/openbsd.h        (revision 168085)
> +++ gcc/config/openbsd.h        (working copy)
> @@ -157,9 +157,7 @@ while (0)
>  #define DBX_NO_XREFS
>
>
> -/* Support of shared libraries, mostly imported from svr4.h through netbsd.  */
> -/* Two differences from svr4.h:
> -   - we use . - _func instead of a local label,
> +/* - we use . - _func instead of a local label,
>    - we put extra spaces in expressions such as
>      .type _func , @function
>      This is more readable for a human being and confuses c++filt less.  */
> Index: gcc/config/v850/v850.h
> ===================================================================
> --- gcc/config/v850/v850.h      (revision 168085)
> +++ gcc/config/v850/v850.h      (working copy)
> @@ -25,7 +25,6 @@
>  extern GTY(()) rtx v850_compare_op0;
>  extern GTY(()) rtx v850_compare_op1;
>
> -/* These are defined in svr4.h but we want to override them.  */
>  #undef LIB_SPEC
>  #define LIB_SPEC "%{!shared:%{!symbolic:--start-group -lc -lgcc --end-group}}"
>
> @@ -931,7 +930,6 @@ typedef enum
>    it.  */
>  #define JUMP_TABLES_IN_TEXT_SECTION (!TARGET_JUMP_TABLES_IN_DATA_SECTION)
>
> -/* svr4.h defines this assuming that 4 byte alignment is required.  */
>  #undef ASM_OUTPUT_BEFORE_CASE_LABEL
>  #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
>   ASM_OUTPUT_ALIGN ((FILE), (TARGET_BIG_SWITCH ? 2 : 1));
> Index: gcc/config/vxworks.h
> ===================================================================
> --- gcc/config/vxworks.h        (revision 168085)
> +++ gcc/config/vxworks.h        (working copy)
> @@ -109,7 +109,6 @@ extern void vxworks_asm_out_destructor (
>  #undef VXWORKS_GOTT_INDEX
>  #define VXWORKS_GOTT_INDEX "__GOTT_INDEX__"
>
> -/* As for svr4.h (which not all VxWorks targets include). */
>  #undef PTRDIFF_TYPE
>  #define PTRDIFF_TYPE "int"
>
> Index: gcc/config/bfin/bfin.h
> ===================================================================
> --- gcc/config/bfin/bfin.h      (revision 168085)
> +++ gcc/config/bfin/bfin.h      (working copy)
> @@ -238,14 +238,6 @@ extern unsigned int bfin_workarounds;
>   %{mfast-fp:-lbffastfp} %G %L %{mfast-fp:-lbffastfp} %G \
>  "
>
> -/* A C string constant that tells the GCC driver program options to pass to
> -   the assembler.  It can also specify how to translate options you give to GNU
> -   CC into options for GCC to pass to the assembler.  See the file `sun3.h'
> -   for an example of this.
> -
> -   Do not define this macro if it does not need to do anything.
> -
> -   Defined in svr4.h.  */
>  #undef  ASM_SPEC
>  #define ASM_SPEC "\
>  %{Ym,*} %{Yd,*} \
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
>



More information about the Gcc-patches mailing list