From patchwork Tue Jun 15 19:19:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: RFA: PATCH to invoke lto-wrapper with -v if -debug was passed to collect2 Date: Tue, 15 Jun 2010 09:19:52 -0000 From: Jason Merrill X-Patchwork-Id: 55782 Message-Id: <4C17D258.3070302@redhat.com> To: gcc-patches List I couldn't figure out any flag to give GCC to make it run lto-wrapper with -v, so I hacked up collect2 a bit: with this patch, gcc -Wl,-debug will end up calling lto-wrapper -v. OK for trunk? commit 5f1e09f7fc9572c77ebdfa31eb187683eaf15d74 Author: Jason Merrill Date: Mon Jun 14 01:42:16 2010 -0400 * collect2.c (maybe_run_lto_and_relink): If -debug, pass -v down. diff --git a/gcc/collect2.c b/gcc/collect2.c index 42db3cb..1931ea7 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -962,6 +962,9 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, *lto_c_ptr++ = lto_wrapper; + if (debug) + *lto_c_ptr++ = "-v"; + /* Add LTO objects to the wrapper command line. */ for (list = lto_objects.first; list; list = list->next) *lto_c_ptr++ = list->name;