From 2996c17fcb14e2865a8a26ce636d6afdc9a13d6c Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 3 Nov 2010 15:00:52 +0000 Subject: [PATCH] opts.c (finish_options): Properly check for all WHOPR flags before complaining about -flto-partition. 2010-11-03 Richard Guenther * opts.c (finish_options): Properly check for all WHOPR flags before complaining about -flto-partition. From-SVN: r166250 --- gcc/ChangeLog | 5 +++++ gcc/opts.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 49e208e29e9..87db9f81269 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-03 Richard Guenther + + * opts.c (finish_options): Properly check for all WHOPR + flags before complaining about -flto-partition. + 2010-11-04 Alan Modra * config/rs6000/rs6000.c (rs6000_pic_labelno): Make static. diff --git a/gcc/opts.c b/gcc/opts.c index 1a39b628a86..ce2618e04cc 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1239,8 +1239,8 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set) { if (flag_lto_partition_balanced && flag_lto_partition_1to1) error ("Only one -flto-partitoin value can be specified"); - if (!flag_whopr) - error ("-flto-partitoin has effect only with -fwhopr"); + if (!flag_whopr && !flag_wpa && !flag_ltrans) + error ("-flto-partition has no effect without -fwhopr"); } /* Reconcile -flto and -fwhopr. Set additional flags as appropriate and -- 2.30.2