Patchwork PR lto/50964: [trans-mem] fail gracefully when -flto and -fgnu-tm

login
register
mail settings
Submitter Aldy Hernandez
Date Nov. 6, 2011, 9:05 p.m.
Message ID <4EB6F681.9050000@redhat.com>
Download mbox | patch
Permalink /patch/123967/
State New
Headers show

Comments

Aldy Hernandez - Nov. 6, 2011, 9:05 p.m.
> "LTO support is currently not supported with transactional memory"
>
> 'support' mentioned one too many times.  Maybe 'LTO is currently not
> supported with transactional memory'?
>
>
> Diego.

How is this?
* opts.c (finish_options): Error out when using -flto and
	-fgnu-tm.
Diego Novillo - Nov. 6, 2011, 9:09 p.m.
On 11-11-06 16:05 , Aldy Hernandez wrote:
>
>> "LTO support is currently not supported with transactional memory"
>>
>> 'support' mentioned one too many times. Maybe 'LTO is currently not
>> supported with transactional memory'?
>>
>>
>> Diego.
>
> How is this?

OK.  Thanks.


Diego.

Patch

Index: opts.c
===================================================================
--- opts.c	(revision 181028)
+++ opts.c	(working copy)
@@ -784,6 +784,8 @@  finish_options (struct gcc_options *opts
 #endif
       if (!opts->x_flag_fat_lto_objects && !HAVE_LTO_PLUGIN)
         error_at (loc, "-fno-fat-lto-objects are supported only with linker plugin.");
+      if (opts->x_flag_tm)
+	error_at (loc, "LTO is currently not supported with transactional memory");
 }
   if ((opts->x_flag_lto_partition_balanced != 0) + (opts->x_flag_lto_partition_1to1 != 0)
        + (opts->x_flag_lto_partition_none != 0) >= 1)