re PR lto/44150 (g++.dg/lto/20081109 cp_lto_20081109_0.o-cp_lto_20081109_1.o)
authorRichard Guenther <rguenther@suse.de>
Mon, 15 Nov 2010 09:43:01 +0000 (09:43 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 15 Nov 2010 09:43:01 +0000 (09:43 +0000)
2010-11-15  Richard Guenther  <rguenther@suse.de>

PR lto/44150
* lto-opts.c (lto_write_options): Write -fexceptions even if
not set by the user.

From-SVN: r166744

gcc/ChangeLog
gcc/lto-opts.c

index ea3e335bbd147ca323c821cb6042753cb716a1a4..08864a5bec1b7506adf5485a63ab0856f98a15c8 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-15  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/44150
+       * lto-opts.c (lto_write_options): Write -fexceptions even if
+       not set by the user.
+
 2010-11-13  Paolo Bonzini  <bonzini@gnu.org>
 
        PR c/46462
index eeb41e9d4ce818be2967fe0c5708cf1d11bb06f9..807f55b227fcddc858ec06f383bae5efcc419b3f 100644 (file)
@@ -299,6 +299,13 @@ lto_write_options (void)
   struct lto_simple_header header;
   struct lto_output_stream *header_stream;
 
+  /* Targets and languages can provide defaults for -fexceptions but
+     we only process user options from the command-line.  Until we
+     serialize out a white list of options from the new global state
+     explicitly append important options as user options here.  */
+  if (flag_exceptions)
+    lto_register_user_option (OPT_fexceptions, NULL, 1, CL_COMMON);
+
   lto_begin_section (section_name, !flag_wpa);
   free (section_name);