From 0fe78d19df60f6131586feb556c1e92bb3c03961 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 30 Sep 2015 18:42:32 +0200 Subject: [PATCH] Pass on the verbose flag "-v" to/in the mkoffloads gcc/ * config/i386/intelmic-mkoffload.c (main): Parse "-v" flag. (generate_target_descr_file, generate_target_offloadend_file) (generate_host_descr_file, prepare_target_image, main): Pass it on. * config/nvptx/mkoffload.c (main): Parse "-v" flag. (compile_native, main): Pass it on. * lto-wrapper.c (compile_offload_image): Likewise. From-SVN: r228301 --- gcc/ChangeLog | 10 ++++++++++ gcc/config/i386/intelmic-mkoffload.c | 10 ++++++++++ gcc/config/nvptx/mkoffload.c | 6 ++++++ gcc/lto-wrapper.c | 2 ++ 4 files changed, 28 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15f84aba529..ba82953f558 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2015-09-30 Thomas Schwinge + + * config/i386/intelmic-mkoffload.c (main): Parse "-v" flag. + (generate_target_descr_file, generate_target_offloadend_file) + (generate_host_descr_file, prepare_target_image, main): Pass it + on. + * config/nvptx/mkoffload.c (main): Parse "-v" flag. + (compile_native, main): Pass it on. + * lto-wrapper.c (compile_offload_image): Likewise. + 2015-09-30 Thomas Schwinge Ilya Verbin Andrey Turetskiy diff --git a/gcc/config/i386/intelmic-mkoffload.c b/gcc/config/i386/intelmic-mkoffload.c index ae88ecdf549..14f3fb37fb2 100644 --- a/gcc/config/i386/intelmic-mkoffload.c +++ b/gcc/config/i386/intelmic-mkoffload.c @@ -281,6 +281,8 @@ generate_target_descr_file (const char *target_compiler) struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, target_compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-c"); obstack_ptr_grow (&argv_obstack, "-shared"); obstack_ptr_grow (&argv_obstack, "-fPIC"); @@ -319,6 +321,8 @@ generate_target_offloadend_file (const char *target_compiler) struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, target_compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-c"); obstack_ptr_grow (&argv_obstack, "-shared"); obstack_ptr_grow (&argv_obstack, "-fPIC"); @@ -382,6 +386,8 @@ generate_host_descr_file (const char *host_compiler) struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, host_compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-c"); obstack_ptr_grow (&argv_obstack, "-fPIC"); obstack_ptr_grow (&argv_obstack, "-shared"); @@ -428,6 +434,8 @@ prepare_target_image (const char *target_compiler, int argc, char **argv) struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, target_compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-xlto"); obstack_ptr_grow (&argv_obstack, "-shared"); obstack_ptr_grow (&argv_obstack, "-fPIC"); @@ -560,6 +568,8 @@ main (int argc, char **argv) "unrecognizable argument of option " STR); } #undef STR + else if (strcmp (argv[i], "-v") == 0) + verbose = true; } const char *target_so_filename diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c index fe0e8cd56ec..99c0254e586 100644 --- a/gcc/config/nvptx/mkoffload.c +++ b/gcc/config/nvptx/mkoffload.c @@ -925,6 +925,8 @@ compile_native (const char *infile, const char *outfile, const char *compiler) struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); switch (offload_abi) { case OFFLOAD_ABI_LP64: @@ -1028,11 +1030,15 @@ main (int argc, char **argv) "unrecognizable argument of option " STR); } #undef STR + else if (strcmp (argv[i], "-v") == 0) + verbose = true; } struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, driver); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-xlto"); switch (offload_abi) { diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index e13a82a28c8..f932758da95 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -685,6 +685,8 @@ compile_offload_image (const char *target, const char *compiler_path, struct obstack argv_obstack; obstack_init (&argv_obstack); obstack_ptr_grow (&argv_obstack, compiler); + if (verbose) + obstack_ptr_grow (&argv_obstack, "-v"); obstack_ptr_grow (&argv_obstack, "-o"); obstack_ptr_grow (&argv_obstack, filename); -- 2.30.2