OSDN Git Service

1999-01-31 17:52 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu>
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Jan 1999 17:46:42 +0000 (17:46 +0000)
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 31 Jan 1999 17:46:42 +0000 (17:46 +0000)
* flags.h: Declare flag_no_ident.
* toplev.c: Define flag_no_ident.  Process -f(no-)ident here.
* c-decl.c: Don't define flag_no_ident.  Don't process
          -f(no-)ident switches here.
* ch/decl.c: Likewise.
* cp/decl2.c: Likewise.
* c-tree.h: Don't declare flag_no_ident.
* ch/ch-tree.h: Likewise.
* cp/cp-tree.h: Likewise.
* config/elfos.h (ASM_FILE_END): Output final .ident directive
          only if !flag_no_ident.
* config/ptx4.h: Likewise.
* config/svr4.h: Likewise.
* config/alpha/elf.h: Likewise.
* config/arm/linux-elf.h: Likewise.
* config/i386/sco5.h: Likewise.
* config/i860/fx2800.h: Likewise.
* config/mips/gnu.h: Likewise.
* config/i386/osfrose.h: Likewise.
* gcc.c (C specs): Map -Qn to -fno-ident.
* ch/lang-specs.h: Likewise.
* cp/lang-specs.h: Likewise.
* f/lang-specs.h: Likewise.
* objc/lang-specs.h: Likewise.
* java/lang-specs.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24943 138bc75d-0d04-0410-961f-82ee72b054a4

15 files changed:
gcc/ch/ChangeLog
gcc/ch/lang-specs.h
gcc/config/alpha/elf.h
gcc/config/arm/linux-elf.h
gcc/config/elfos.h
gcc/config/i386/osfrose.h
gcc/config/i386/sco5.h
gcc/config/i860/fx2800.h
gcc/config/mips/gnu.h
gcc/config/ptx4.h
gcc/config/svr4.h
gcc/cp/decl2.c
gcc/flags.h
gcc/gcc.c
gcc/toplev.c

index b4f5771..a76fe91 100644 (file)
@@ -1,3 +1,10 @@
+Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
+
+       * decl2.c: Don't define flag_no_ident here.  Don't process
+       -f(no-)ident here.
+       * ch-tree.h: Don't declare flag_no_ident here.
+       * lang-specs.h: Map -Qn to -fno-ident.
+
 Tue Jan 19 23:24:36 1999  Jeffrey A Law  (law@cygnus.com)
 
        * Makefile.in (typeck.o): Depend on insn-codes.h.
index de73ff8..af7b3b3 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for specs for GNU CHILL.
-   Copyright (C) 1995, 1998 Free Software Foundation, Inc..
+   Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc..
 
 This file is part of GNU CC.
 
@@ -35,7 +35,7 @@ Boston, MA 02111-1307, USA.  */
                   %{!Q:-quiet} -dumpbase %b.ch %{d*} %{m*} %{a}\
                   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{itu} \
                   %{v:-version} %{pg:-p} %{p} %{f*} %{I*} \
-                  %{aux-info*} %X \
+                  %{aux-info*} %{Qn:-fno-ident} %X \
                   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
               %{!S:as %a %Y \
index d32ca41..b90ce9f 100644 (file)
@@ -83,8 +83,9 @@ extern void output_file_directive ();
 #else
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
-     fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",             \
-             IDENT_ASM_OP, version_string);                    \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",           \
+                IDENT_ASM_OP, version_string);                 \
    } while (0)
 #endif
 
index d906093..7d08cad 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for ARM running Linux-based GNU systems using ELF
-   Copyright (C) 1993, 1994, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1993, 1994, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Philip Blundell <philb@gnu.org>
 
 This file is part of GNU CC.
@@ -88,8 +88,9 @@ Boston, MA 02111-1307, USA.  */
 #else
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
-     fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",             \
-             IDENT_ASM_OP, version_string);                    \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",           \
+                IDENT_ASM_OP, version_string);                 \
    } while (0)
 #endif
 
index a149ab1..e06ff69 100644 (file)
@@ -1,6 +1,6 @@
 /* elfos.h  --  operating system specific defines to be used when
    targeting GCC for some generic ELF system
-   Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1994, 1995, 1999 Free Software Foundation, Inc.
    Based on svr4.h contributed by Ron Guilmette (rfg@netcom.com).
 
 This file is part of GNU CC.
@@ -41,8 +41,9 @@ Boston, MA 02111-1307, USA.  */
 
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
-     fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",             \
-             IDENT_ASM_OP, version_string);                    \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",           \
+                IDENT_ASM_OP, version_string);                 \
    } while (0)
 
 /* Output #ident as a .ident.  */
index 9cfe187..4d0161c 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.
    Intel 386 (OSF/1 with OSF/rose) version.
-   Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1996, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -752,7 +752,7 @@ do                                                                  \
     if (HALF_PIC_P ())                                                 \
       HALF_PIC_FINISH (STREAM);                                                \
                                                                        \
-    if (TARGET_IDENT)                                                  \
+    if (TARGET_IDENT && !flag_no_ident)                                        \
       {                                                                        \
        char *fstart = main_input_filename;                             \
        char *fname;                                                    \
index 16ee957..6664ab3 100644 (file)
@@ -211,8 +211,9 @@ do {                                                                        \
 #undef ASM_FILE_END
 #define ASM_FILE_END(FILE)                                             \
 do {                                                                   \
-  fprintf ((FILE), "%s\t\"GCC: (GNU) %s\"\n",                          \
-    IDENT_ASM_OP, version_string);                                     \
+     if (!flag_no_ident)                                               \
+       fprintf ((FILE), "%s\t\"GCC: (GNU) %s\"\n",                     \
+                IDENT_ASM_OP, version_string);                         \
 } while (0)
 
 #undef ASM_FINISH_DECLARE_OBJECT
index 26c7c25..50014ea 100644 (file)
@@ -1,6 +1,6 @@
 /* Target definitions for GNU compiler for Alliant FX/2800
    running Concentrix 2.2
-   Copyright (C) 1991, 1996, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1996, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Howard Chu (hyc@hanauma.jpl.nasa.gov).
 
 This file is part of GNU CC.
@@ -351,6 +351,7 @@ do {                                                                \
        text_section();                                         \
        fputs("__ETEXT:\n", (FILE));                            \
      }                                                         \
-     fprintf ((FILE), "\t.ident\t\"GCC: (GNU) %s\"\n",         \
-             version_string);                                  \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t.ident\t\"GCC: (GNU) %s\"\n",       \
+                version_string);                               \
    } while (0)
index bf48bc4..734548b 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler.  MIPS GNU Hurd version.
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -52,8 +52,9 @@ Boston, MA 02111-1307, USA.  */
 #define ASM_FILE_END(FILE)                                             \
   do {                                                                 \
        mips_asm_file_end(FILE);                                        \
-       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",                   \
-               IDENT_ASM_OP, version_string);                          \
+       if (!flag_no_ident)                                             \
+         fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",                 \
+                  IDENT_ASM_OP, version_string);                       \
   } while (0)
 
 #undef ASM_OUTPUT_SOURCE_LINE
index aa31924..b1eaabe 100644 (file)
@@ -1,6 +1,6 @@
 /* Operating system specific defines to be used when targeting GCC for some
    generic System V Release 4 system.
-   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com).
    Renamed and changed to suit Dynix/ptx v4 and later.
    Modified by Tim Wright (timw@sequent.com).
@@ -183,8 +183,9 @@ Boston, MA 02111-1307, USA.
 
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
-     fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",             \
-             IDENT_ASM_OP, version_string);                    \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",           \
+                IDENT_ASM_OP, version_string);                 \
    } while (0)
 
 /* Allow #sccs in preprocessor.  */
index 1211f68..d0362e2 100644 (file)
@@ -1,6 +1,6 @@
 /* Operating system specific defines to be used when targeting GCC for some
    generic System V Release 4 system.
-   Copyright (C) 1991, 94-97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1991, 94-98, 1999 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com).
 
 This file is part of GNU CC.
@@ -212,8 +212,9 @@ Boston, MA 02111-1307, USA.
 
 #define ASM_FILE_END(FILE)                                     \
 do {                                                           \
-     fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",             \
-             IDENT_ASM_OP, version_string);                    \
+     if (!flag_no_ident)                                       \
+       fprintf ((FILE), "\t%s\t\"GCC: (GNU) %s\"\n",           \
+                IDENT_ASM_OP, version_string);                 \
    } while (0)
 
 /* Allow #sccs in preprocessor.  */
index 5c1cb4c..7b3d52f 100644 (file)
@@ -142,10 +142,6 @@ int flag_traditional;
 
 int flag_signed_bitfields = 1;
 
-/* Nonzero means handle `#ident' directives.  0 means ignore them.  */
-
-int flag_no_ident;
-
 /* Nonzero means enable obscure ANSI features and disable GNU extensions
    that might cause ANSI-compliant code to be miscompiled.  */
 
@@ -466,7 +462,6 @@ static struct { char *string; int *variable; int on_value;} lang_f_options[] =
   {"cond-mismatch", &flag_cond_mismatch, 1},
   {"asm", &flag_no_asm, 0},
   {"builtin", &flag_no_builtin, 0},
-  {"ident", &flag_no_ident, 0},
 
   /* C++-only options.  */
   {"access-control", &flag_access_control, 1},
index 9db5e19..e73c3fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Compilation switch flag definitions for GNU CC.
-   Copyright (C) 1987, 88, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1987, 88, 94-98, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -517,3 +517,9 @@ enum graph_dump_types
   vcg
 };
 extern enum graph_dump_types graph_dump_format;
+
+/* Nonzero means ignore `#ident' directives.  0 means handle them.
+   On SVR4 targets, it also controls whether or not to emit a
+   string identifying the compiler.  */
+
+extern int flag_no_ident;
index 4d1dce7..75d2f7e 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -605,7 +605,7 @@ static struct compiler default_compilers[] =
                   %{ftraditional:-traditional}\
                   %{traditional-cpp:-traditional}\
                  %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-                 %{aux-info*}\
+                 %{aux-info*} %{Qn:-fno-ident}\
                  %{--help:--help}\
                  %{g*} %{O*} %{W*} %{w} %{pedantic*}\
                  %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
@@ -632,7 +632,7 @@ static struct compiler default_compilers[] =
                   %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
                   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*}\
                   %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-                  %{aux-info*}\
+                  %{aux-info*} %{Qn:-fno-ident}\
                   %{--help:--help} \
                   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
@@ -676,7 +676,7 @@ static struct compiler default_compilers[] =
    {"%{!M:%{!MM:%{!E:cc1 %i %1 %{!Q:-quiet} %{d*} %{m*} %{a*}\
                        %{g*} %{O*} %{W*} %{w} %{pedantic*} %{std*}\
                        %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\
-                       %{aux-info*}\
+                       %{aux-info*} %{Qn:-fno-ident}\
                        %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                        %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
                     %{!S:as %a %Y\
index 2b73288..c232928 100644 (file)
@@ -746,6 +746,11 @@ int flag_strict_aliasing = 0;
 /* Instrument functions with calls at entry and exit, for profiling.  */
 int flag_instrument_function_entry_exit = 0;
 
+/* Nonzero means ignore `#ident' directives.  0 means handle them.
+   On SVR4 targets, it also controls whether or not to emit a
+   string identifying the compiler.  */
+
+int flag_no_ident = 0;
 
 /* Table of supported debugging formats.  */
 static struct
@@ -952,7 +957,9 @@ lang_independent_options f_options[] =
   {"instrument-functions", &flag_instrument_function_entry_exit, 1,
    "Instrument function entry/exit with profiling calls"},
   {"leading-underscore", &flag_leading_underscore, 1,
-   "External symbols have a leading underscore" }
+   "External symbols have a leading underscore" },
+  {"ident", &flag_no_ident, 0,
+   "Process #ident directives"}
 };
 
 #define NUM_ELEM(a)  (sizeof (a) / sizeof ((a)[0]))