aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-01-18 15:46:43 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2008-01-18 15:46:43 +0000
commit28a0816854bc2a988f69f6f6a41455208b97ac96 (patch)
tree84df8eb9f36c5fe1275521e9196420e0b58781f1 /gcc
parent1ea193c21f060b7e7837138122b24c9d07f57d57 (diff)
downloadgcc-28a0816854bc2a988f69f6f6a41455208b97ac96.zip
gcc-28a0816854bc2a988f69f6f6a41455208b97ac96.tar.gz
gcc-28a0816854bc2a988f69f6f6a41455208b97ac96.tar.bz2
common.opt: Add fmerge-debug-strings.
./: * common.opt: Add fmerge-debug-strings. * dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Test flag_merge_debug_strings rather than flag_merge_constants. * doc/invoke.texi (Option Summary): Mention -fmerge-debug-strings. (Debugging Options): Document -fmerge-debug-strings. testsuite/: * gcc.dg/debug/dwarf2/var1.c: Add -fno-merge-debug-strings. From-SVN: r131630
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/common.opt7
-rw-r--r--gcc/doc/invoke.texi16
-rw-r--r--gcc/dwarf2out.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/var1.c2
6 files changed, 33 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a4c939c..3c5183a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2008-01-18 Ian Lance Taylor <iant@google.com>
+ * common.opt: Add fmerge-debug-strings.
+ * dwarf2out.c (DEBUG_STR_SECTION_FLAGS): Test
+ flag_merge_debug_strings rather than flag_merge_constants.
+ * doc/invoke.texi (Option Summary): Mention
+ -fmerge-debug-strings.
+ (Debugging Options): Document -fmerge-debug-strings.
+
+2008-01-18 Ian Lance Taylor <iant@google.com>
+
PR c++/33407
* tree.h (DECL_IS_OPERATOR_NEW): Define.
(struct tree_function_decl): Add new field operator_new_flag.
diff --git a/gcc/common.opt b/gcc/common.opt
index e4916e4..5c659e4 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -1,6 +1,7 @@
; Options for the language- and target-independent parts of the compiler.
-; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+; Free Software Foundation, Inc.
;
; This file is part of GCC.
;
@@ -664,6 +665,10 @@ fmerge-constants
Common Report Var(flag_merge_constants,1) VarExists Optimization
Attempt to merge identical constants across compilation units
+fmerge-debug-strings
+Common Report Var(flag_merge_debug_strings) Init(1)
+Attempt to merge identical debug strings across compilation units
+
fmessage-length=
Common RejectNegative Joined UInteger
-fmessage-length=<number> Limit diagnostics to <number> characters per line. 0 suppresses line-wrapping
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index f864cb0..ea54e45 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1,5 +1,5 @@
@c Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+@c 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
@c Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -11,8 +11,8 @@
@c man begin COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007 Free Software Foundation, Inc.
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
@@ -304,7 +304,7 @@ Objective-C and Objective-C++ Dialects}.
-ftest-coverage -ftime-report -fvar-tracking @gol
-g -g@var{level} -gcoff -gdwarf-2 @gol
-ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ @gol
--fdebug-prefix-map=@var{old}=@var{new} @gol
+-fmerge-debug-strings -fdebug-prefix-map=@var{old}=@var{new} @gol
-femit-struct-debug-baseonly -femit-struct-debug-reduced @gol
-femit-struct-debug-detailed@r{[}=@var{spec-list}@r{]} @gol
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
@@ -4162,6 +4162,14 @@ The default is @samp{-femit-struct-debug-detailed=all}.
This option works only with DWARF 2.
+@item -fmerge-debug-strings
+@opindex fmerge-debug-strings
+Direct the linker to merge together strings which are identical in
+different object files. This is not supported by all assemblers or
+linker. This decreases the size of the debug information in the
+output file at the cost of increasing link processing time. This is
+on by default.
+
@item -fdebug-prefix-map=@var{old}=@var{new}
@opindex fdebug-prefix-map
When compiling files in directory @file{@var{old}}, record debugging
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index d06e499..3a5b897c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4393,7 +4393,7 @@ static int maybe_emit_file (struct dwarf_file_data *fd);
/* Section flags for .debug_str section. */
#define DEBUG_STR_SECTION_FLAGS \
- (HAVE_GAS_SHF_MERGE && flag_merge_constants \
+ (HAVE_GAS_SHF_MERGE && flag_merge_debug_strings \
? SECTION_DEBUG | SECTION_MERGE | SECTION_STRINGS | 1 \
: SECTION_DEBUG)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cc3ec9c..2c3053c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2008-01-18 Ian Lance Taylor <iant@google.com>
+ * gcc.dg/debug/dwarf2/var1.c: Add -fno-merge-debug-strings.
+
+2008-01-18 Ian Lance Taylor <iant@google.com>
+
PR c++/33407
* g++.dg/init/new26.C: New test.
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
index 7580450..04dd129 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
@@ -1,6 +1,6 @@
/* PR 23190 */
/* { dg-do compile }
-/* { dg-options "-gdwarf-2 -dA" } */
+/* { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } */
/* { dg-final { scan-assembler "xyzzy\[^\\n\\r\]+DW_AT_name" } } */
void f(void)