From 5bbb9f06f6b4319a5b96f0fa60352b630365c443 Mon Sep 17 00:00:00 2001 From: zack Date: Sun, 31 Jan 1999 17:46:42 +0000 Subject: [PATCH] 1999-01-31 17:52 -0500 Zack Weinberg * 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 --- gcc/ch/ChangeLog | 7 +++++++ gcc/ch/lang-specs.h | 4 ++-- gcc/config/alpha/elf.h | 5 +++-- gcc/config/arm/linux-elf.h | 7 ++++--- gcc/config/elfos.h | 7 ++++--- gcc/config/i386/osfrose.h | 4 ++-- gcc/config/i386/sco5.h | 5 +++-- gcc/config/i860/fx2800.h | 7 ++++--- gcc/config/mips/gnu.h | 7 ++++--- gcc/config/ptx4.h | 7 ++++--- gcc/config/svr4.h | 7 ++++--- gcc/cp/decl2.c | 5 ----- gcc/flags.h | 8 +++++++- gcc/gcc.c | 6 +++--- gcc/toplev.c | 9 ++++++++- 15 files changed, 59 insertions(+), 36 deletions(-) diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index b4f5771bc5a..a76fe91bddf 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,10 @@ +Sun Jan 31 20:34:29 1999 Zack Weinberg + + * 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. diff --git a/gcc/ch/lang-specs.h b/gcc/ch/lang-specs.h index de73ff8f650..af7b3b3b3f4 100644 --- a/gcc/ch/lang-specs.h +++ b/gcc/ch/lang-specs.h @@ -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 \ diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h index d32ca413f8f..b90ce9fa914 100644 --- a/gcc/config/alpha/elf.h +++ b/gcc/config/alpha/elf.h @@ -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 diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index d90609303ff..7d08cad9efd 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -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 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 diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h index a149ab13d32..e06ff6970c9 100644 --- a/gcc/config/elfos.h +++ b/gcc/config/elfos.h @@ -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. */ diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h index 9cfe187ea09..4d0161c32a8 100644 --- a/gcc/config/i386/osfrose.h +++ b/gcc/config/i386/osfrose.h @@ -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; \ diff --git a/gcc/config/i386/sco5.h b/gcc/config/i386/sco5.h index 16ee95737d5..6664ab38238 100644 --- a/gcc/config/i386/sco5.h +++ b/gcc/config/i386/sco5.h @@ -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 diff --git a/gcc/config/i860/fx2800.h b/gcc/config/i860/fx2800.h index 26c7c253755..50014eac71d 100644 --- a/gcc/config/i860/fx2800.h +++ b/gcc/config/i860/fx2800.h @@ -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) diff --git a/gcc/config/mips/gnu.h b/gcc/config/mips/gnu.h index bf48bc4dbca..734548b5211 100644 --- a/gcc/config/mips/gnu.h +++ b/gcc/config/mips/gnu.h @@ -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 diff --git a/gcc/config/ptx4.h b/gcc/config/ptx4.h index aa31924032f..b1eaabeb4cc 100644 --- a/gcc/config/ptx4.h +++ b/gcc/config/ptx4.h @@ -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. */ diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h index 1211f680ee3..d0362e2662e 100644 --- a/gcc/config/svr4.h +++ b/gcc/config/svr4.h @@ -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. */ diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 5c1cb4c26de..7b3d52fb2a6 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -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}, diff --git a/gcc/flags.h b/gcc/flags.h index 9db5e19f42d..e73c3fdbfc7 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -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; diff --git a/gcc/gcc.c b/gcc/gcc.c index 4d1dce712ba..75d2f7eff2c 100644 --- 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\ diff --git a/gcc/toplev.c b/gcc/toplev.c index 2b73288123a..c23292842c6 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -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])) -- 2.11.0