From 014d92e193f6ef3d06143984524b72ee020a7c04 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 11 Nov 2010 23:54:53 +0100 Subject: invoke.texi (-fwhopr): Merge into -flto section. * doc/invoke.texi (-fwhopr): Merge into -flto section. (-flto-partition): Document none. * gcc.c (LINK_COMMAND_SPEC): Remove -fwhopr. * lto-wrapper.c: Update comment. (run_gcc): Update LTO option parsing. * opts.c (finish_options): add support -flto-partition=none (common_handle_option): Remove fwhopr. * common.opt: Turn fwhopr into flto. * collect2.c (main): Update option handling. * cgraphunit.c (cgraph_decide_is_function_needed): Remove flag_whopr. * ipa-split.c (execute_split_functions): Remove flag_whopr. * ipa.c (function_and_variable_visibility): Remove flag_whopr. * ipa-prop.c (ipa_compute_jump_functions): Remove flag_whopr. * varpool.c (decide_is_variable_needed): Remove flag_whopr. * gcc.dg/20081223-1.c: Update LTO options. * gcc.dg/lto/20090206-1_0.c: Update LTO options. * gcc.dg/lto/20081118_0.c: Update LTO options. * gcc.dg/lto/ipareference_0.c: Update LTO options. * gcc.dg/lto/20100423-2_0.c: Update LTO options. * gcc.dg/lto/20081201-1_0.c: Update LTO options. * gcc.dg/lto/ipacp_0.c: Update LTO options. * gcc.dg/lto/20090116_0.c: Update LTO options. * gcc.dg/lto/20091015-1_0.c: Update LTO options. * gcc.dg/lto/20090126-2_0.c: Update LTO options. * gcc.dg/lto/20081202-2_0.c: Update LTO options. * gcc.dg/lto/20081204-1_0.c: Update LTO options. * gcc.dg/lto/const-uniq_0.c: Update LTO options. * gcc.dg/lto/20081224_0.c: Update LTO options. * gcc.dg/lto/20090219_0.c: Update LTO options. * gcc.dg/lto/ipareference2_0.c: Update LTO options. * gcc.dg/lto/20090206-2_0.c: Update LTO options. * gcc.dg/lto/20081115_0.c: Update LTO options. * gcc.dg/lto/20081201-2_0.c: Update LTO options. * gcc.dg/lto/20081120-2_0.c: Update LTO options. * gcc.dg/lto/materialize-1_0.c: Update LTO options. * gcc.dg/lto/20090126-1_0.c: Update LTO options. * gcc.dg/lto/20081202-1_0.c: Update LTO options. * gcc.dg/lto/noreturn-1_0.c: Update LTO options. * g++.dg/20090107-1.C: Update LTO options. * g++.dg/lto/pr45679-2_0.C: Update LTO options. * g++.dg/lto/20081123_0.C: Update LTO options. * g++.dg/lto/20090313_0.C: Update LTO options. * g++.dg/lto/20081125_0.C: Update LTO options. * g++.dg/lto/20081109-1_0.C: Update LTO options. * g++.dg/lto/20081219_0.C: Update LTO options. * g++.dg/lto/20100724-1_0.C: Update LTO options. * g++.dg/lto/20081204-1_0.C: Update LTO options. * g++.dg/lto/20090303_0.C: Update LTO options. * g++.dg/lto/20100723-1_0.C: Update LTO options. * g++.dg/lto/pr45679-1_0.C: Update LTO options. * g++.dg/lto/20090128_0.C: Update LTO options. * g++.dg/lto/20081204-2_0.C: Update LTO options. * g++.dg/lto/20090302_0.C: Update LTO options. * g++.dg/lto/20081119-1_0.C: Update LTO options. * g++.dg/lto/20081118_0.C: Update LTO options. * g++.dg/20090121-1.C: Update LTO options. * objc.dg/lto/lto.exp: Update LTO options. * lib/lto.exp: Update LTO options. * lib/gcc-dg.exp: Update LTO options. * lib/c-torture.exp: Update LTO options. * obj-c++.dg/lto/lto.exp: Update LTO options. From-SVN: r166625 --- gcc/collect2.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'gcc/collect2.c') diff --git a/gcc/collect2.c b/gcc/collect2.c index 37a535b..0d745ae 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1196,21 +1196,20 @@ main (int argc, char **argv) /* Parse command line early for instances of -debug. This allows the debug flag to be set before functions like find_a_file() - are called. We also look for the -flto or -fwhopr flag to know + are called. We also look for the -flto or -flto-partition=none flag to know what LTO mode we are in. */ { int i; + bool no_partition = false; for (i = 1; argv[i] != NULL; i ++) { if (! strcmp (argv[i], "-debug")) debug = true; - else if (! strcmp (argv[i], "-flto") && ! use_plugin) - { - use_verbose = true; - lto_mode = LTO_MODE_LTO; - } - else if (! strncmp (argv[i], "-fwhopr", 7) && ! use_plugin) + else if (! strcmp (argv[i], "-flto-partition=none")) + no_partition = true; + else if ((! strncmp (argv[i], "-flto=", 6) + || ! strcmp (argv[i], "-flto")) && ! use_plugin) { use_verbose = true; lto_mode = LTO_MODE_WHOPR; @@ -1239,6 +1238,8 @@ main (int argc, char **argv) #endif } vflag = debug; + if (no_partition) + lto_mode = LTO_MODE_LTO; } #ifndef DEFAULT_A_OUT_NAME @@ -1485,8 +1486,7 @@ main (int argc, char **argv) break; case 'f': - if (strcmp (arg, "-flto") == 0 - || strncmp (arg, "-fwhopr", 7) == 0) + if (strncmp (arg, "-flto", 5) == 0) { #ifdef ENABLE_LTO /* Do not pass LTO flag to the linker. */ -- cgit v1.1