* nvptx: forward '-v' command-line option to assembler, linker (was: [MentorEmbedded/nvptx-tools] Issue 30: Ignore not-supported sm_* error without --verify (PR #31)) [not found] ` <MentorEmbedded/nvptx-tools/pull/31/c1094932979@github.com> @ 2022-05-29 20:49 ` Thomas Schwinge 2022-05-30 7:06 ` Tobias Burnus 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-05-29 20:49 UTC (permalink / raw) To: gcc-patches, Tom de Vries, Tobias Burnus [-- Attachment #1: Type: text/plain, Size: 972 bytes --] Hi! One item from <https://github.com/MentorEmbedded/nvptx-tools/pull/31#issuecomment-1094932979>: On 2022-04-11T04:25:01-0700, Tobias Burnus <notifications@github.com> wrote: > we could consider invoking nvptx-as with `-v` from GCC to make this more prominent – at least when building GCC itself. _(The user could do `-Wa,-v` to force this warning.)_ Not sure if that's what you had in mind, but what do you think about the attached "nvptx: forward '-v' command-line option to assembler, linker"? OK to push to GCC master branch (after merging <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout")? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: nvptx: forward '-v' command-line option to assembler, linker (was: [MentorEmbedded/nvptx-tools] Issue 30: Ignore not-supported sm_* error without --verify (PR #31)) 2022-05-29 20:49 ` nvptx: forward '-v' command-line option to assembler, linker (was: [MentorEmbedded/nvptx-tools] Issue 30: Ignore not-supported sm_* error without --verify (PR #31)) Thomas Schwinge @ 2022-05-30 7:06 ` Tobias Burnus 2022-06-07 15:41 ` [PING] nvptx: forward '-v' command-line option to assembler, linker Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Tobias Burnus @ 2022-05-30 7:06 UTC (permalink / raw) To: Thomas Schwinge, gcc-patches, Tom de Vries Hi Thomas, On 29.05.22 22:49, Thomas Schwinge wrote: > Not sure if that's what you had in mind, but what do you think about the > attached "nvptx: forward '-v' command-line option to assembler, linker"? > OK to push to GCC master branch (after merging > <https://github.com/MentorEmbedded/nvptx-tools/pull/37> > "Put '-v' verbose output onto stderr instead of stdout")? I was mainly thinking of some way to have it available — which '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the nvptx-tools patch actually makes use of the '-v'.) If I understand your patch correctly, this patch now causes 'gcc -v' to imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already outputs a lot of lines and those lines can be helpful to understand what happens and what not. Tom, your thoughts on this? Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING] nvptx: forward '-v' command-line option to assembler, linker 2022-05-30 7:06 ` Tobias Burnus @ 2022-06-07 15:41 ` Thomas Schwinge 2022-07-05 14:58 ` [PING^2] " Thomas Schwinge 2022-09-05 15:02 ` [PING] " Tom de Vries 0 siblings, 2 replies; 11+ messages in thread From: Thomas Schwinge @ 2022-06-07 15:41 UTC (permalink / raw) To: Tobias Burnus, gcc-patches, Tom de Vries [-- Attachment #1: Type: text/plain, Size: 1272 bytes --] Hi! On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: > On 29.05.22 22:49, Thomas Schwinge wrote: >> Not sure if that's what you had in mind, but what do you think about the >> attached "nvptx: forward '-v' command-line option to assembler, linker"? >> OK to push to GCC master branch (after merging >> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >> "Put '-v' verbose output onto stderr instead of stdout")? > > I was mainly thinking of some way to have it available — which > '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the > nvptx-tools patch actually makes use of the '-v'.) (Merged a week ago.) > If I understand your patch correctly, this patch now causes 'gcc -v' to > imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already > outputs a lot of lines and those lines can be helpful to understand what > happens and what not. ACK. > Tom, your thoughts on this? Ping. Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^2] nvptx: forward '-v' command-line option to assembler, linker 2022-06-07 15:41 ` [PING] nvptx: forward '-v' command-line option to assembler, linker Thomas Schwinge @ 2022-07-05 14:58 ` Thomas Schwinge 2022-07-13 8:41 ` [PING^3] " Thomas Schwinge 2022-09-05 15:02 ` [PING] " Tom de Vries 1 sibling, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-07-05 14:58 UTC (permalink / raw) To: Tom de Vries, gcc-patches; +Cc: Tobias Burnus [-- Attachment #1: Type: text/plain, Size: 1392 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-06-07T17:41:16+0200, I wrote: > Hi! > > On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >> On 29.05.22 22:49, Thomas Schwinge wrote: >>> Not sure if that's what you had in mind, but what do you think about the >>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>> OK to push to GCC master branch (after merging >>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>> "Put '-v' verbose output onto stderr instead of stdout")? >> >> I was mainly thinking of some way to have it available — which >> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >> nvptx-tools patch actually makes use of the '-v'.) > > (Merged a week ago.) > >> If I understand your patch correctly, this patch now causes 'gcc -v' to >> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >> outputs a lot of lines and those lines can be helpful to understand what >> happens and what not. > > ACK. > >> Tom, your thoughts on this? > > Ping. > > > Grüße > Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^3] nvptx: forward '-v' command-line option to assembler, linker 2022-07-05 14:58 ` [PING^2] " Thomas Schwinge @ 2022-07-13 8:41 ` Thomas Schwinge 2022-07-20 12:44 ` [PING^4] " Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-07-13 8:41 UTC (permalink / raw) To: Tom de Vries, gcc-patches; +Cc: Tobias Burnus [-- Attachment #1: Type: text/plain, Size: 1520 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-07-05T16:58:54+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-06-07T17:41:16+0200, I wrote: >> Hi! >> >> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>> Not sure if that's what you had in mind, but what do you think about the >>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>> OK to push to GCC master branch (after merging >>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>> "Put '-v' verbose output onto stderr instead of stdout")? >>> >>> I was mainly thinking of some way to have it available — which >>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>> nvptx-tools patch actually makes use of the '-v'.) >> >> (Merged a week ago.) >> >>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>> outputs a lot of lines and those lines can be helpful to understand what >>> happens and what not. >> >> ACK. >> >>> Tom, your thoughts on this? >> >> Ping. >> >> >> Grüße >> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^4] nvptx: forward '-v' command-line option to assembler, linker 2022-07-13 8:41 ` [PING^3] " Thomas Schwinge @ 2022-07-20 12:44 ` Thomas Schwinge 2022-07-27 15:48 ` [PING^5] " Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-07-20 12:44 UTC (permalink / raw) To: Tom de Vries, gcc-patches; +Cc: Tobias Burnus [-- Attachment #1: Type: text/plain, Size: 1658 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-07-13T10:41:23+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-05T16:58:54+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-06-07T17:41:16+0200, I wrote: >>> Hi! >>> >>> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>>> Not sure if that's what you had in mind, but what do you think about the >>>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>>> OK to push to GCC master branch (after merging >>>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>>> "Put '-v' verbose output onto stderr instead of stdout")? >>>> >>>> I was mainly thinking of some way to have it available — which >>>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>>> nvptx-tools patch actually makes use of the '-v'.) >>> >>> (Merged a week ago.) >>> >>>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>>> outputs a lot of lines and those lines can be helpful to understand what >>>> happens and what not. >>> >>> ACK. >>> >>>> Tom, your thoughts on this? >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^5] nvptx: forward '-v' command-line option to assembler, linker 2022-07-20 12:44 ` [PING^4] " Thomas Schwinge @ 2022-07-27 15:48 ` Thomas Schwinge 2022-08-06 19:20 ` [PING^6] " Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-07-27 15:48 UTC (permalink / raw) To: Tom de Vries, gcc-patches; +Cc: Tobias Burnus [-- Attachment #1: Type: text/plain, Size: 1806 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-07-20T14:44:36+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-13T10:41:23+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-05T16:58:54+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas >>> >>> >>> On 2022-06-07T17:41:16+0200, I wrote: >>>> Hi! >>>> >>>> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>>>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>>>> Not sure if that's what you had in mind, but what do you think about the >>>>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>>>> OK to push to GCC master branch (after merging >>>>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>>>> "Put '-v' verbose output onto stderr instead of stdout")? >>>>> >>>>> I was mainly thinking of some way to have it available — which >>>>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>>>> nvptx-tools patch actually makes use of the '-v'.) >>>> >>>> (Merged a week ago.) >>>> >>>>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>>>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>>>> outputs a lot of lines and those lines can be helpful to understand what >>>>> happens and what not. >>>> >>>> ACK. >>>> >>>>> Tom, your thoughts on this? >>>> >>>> Ping. >>>> >>>> >>>> Grüße >>>> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^6] nvptx: forward '-v' command-line option to assembler, linker 2022-07-27 15:48 ` [PING^5] " Thomas Schwinge @ 2022-08-06 19:20 ` Thomas Schwinge 2022-08-16 15:12 ` [PING^7] " Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-08-06 19:20 UTC (permalink / raw) To: Tom de Vries, gcc-patches [-- Attachment #1: Type: text/plain, Size: 1964 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-07-27T17:48:46+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-20T14:44:36+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-13T10:41:23+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas >>> >>> >>> On 2022-07-05T16:58:54+0200, I wrote: >>>> Hi Tom! >>>> >>>> Ping. >>>> >>>> >>>> Grüße >>>> Thomas >>>> >>>> >>>> On 2022-06-07T17:41:16+0200, I wrote: >>>>> Hi! >>>>> >>>>> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>>>>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>>>>> Not sure if that's what you had in mind, but what do you think about the >>>>>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>>>>> OK to push to GCC master branch (after merging >>>>>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>>>>> "Put '-v' verbose output onto stderr instead of stdout")? >>>>>> >>>>>> I was mainly thinking of some way to have it available — which >>>>>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>>>>> nvptx-tools patch actually makes use of the '-v'.) >>>>> >>>>> (Merged a week ago.) >>>>> >>>>>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>>>>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>>>>> outputs a lot of lines and those lines can be helpful to understand what >>>>>> happens and what not. >>>>> >>>>> ACK. >>>>> >>>>>> Tom, your thoughts on this? >>>>> >>>>> Ping. >>>>> >>>>> >>>>> Grüße >>>>> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^7] nvptx: forward '-v' command-line option to assembler, linker 2022-08-06 19:20 ` [PING^6] " Thomas Schwinge @ 2022-08-16 15:12 ` Thomas Schwinge 2022-08-30 13:44 ` [PING^8] " Thomas Schwinge 0 siblings, 1 reply; 11+ messages in thread From: Thomas Schwinge @ 2022-08-16 15:12 UTC (permalink / raw) To: Tom de Vries, gcc-patches [-- Attachment #1: Type: text/plain, Size: 2132 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-08-06T21:20:23+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-07-27T17:48:46+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-20T14:44:36+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas >>> >>> >>> On 2022-07-13T10:41:23+0200, I wrote: >>>> Hi Tom! >>>> >>>> Ping. >>>> >>>> >>>> Grüße >>>> Thomas >>>> >>>> >>>> On 2022-07-05T16:58:54+0200, I wrote: >>>>> Hi Tom! >>>>> >>>>> Ping. >>>>> >>>>> >>>>> Grüße >>>>> Thomas >>>>> >>>>> >>>>> On 2022-06-07T17:41:16+0200, I wrote: >>>>>> Hi! >>>>>> >>>>>> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>>>>>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>>>>>> Not sure if that's what you had in mind, but what do you think about the >>>>>>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>>>>>> OK to push to GCC master branch (after merging >>>>>>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>>>>>> "Put '-v' verbose output onto stderr instead of stdout")? >>>>>>> >>>>>>> I was mainly thinking of some way to have it available — which >>>>>>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>>>>>> nvptx-tools patch actually makes use of the '-v'.) >>>>>> >>>>>> (Merged a week ago.) >>>>>> >>>>>>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>>>>>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>>>>>> outputs a lot of lines and those lines can be helpful to understand what >>>>>>> happens and what not. >>>>>> >>>>>> ACK. >>>>>> >>>>>>> Tom, your thoughts on this? >>>>>> >>>>>> Ping. >>>>>> >>>>>> >>>>>> Grüße >>>>>> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PING^8] nvptx: forward '-v' command-line option to assembler, linker 2022-08-16 15:12 ` [PING^7] " Thomas Schwinge @ 2022-08-30 13:44 ` Thomas Schwinge 0 siblings, 0 replies; 11+ messages in thread From: Thomas Schwinge @ 2022-08-30 13:44 UTC (permalink / raw) To: Tom de Vries, gcc-patches [-- Attachment #1: Type: text/plain, Size: 2310 bytes --] Hi Tom! Ping. Grüße Thomas On 2022-08-16T17:12:47+0200, I wrote: > Hi Tom! > > Ping. > > > Grüße > Thomas > > > On 2022-08-06T21:20:23+0200, I wrote: >> Hi Tom! >> >> Ping. >> >> >> Grüße >> Thomas >> >> >> On 2022-07-27T17:48:46+0200, I wrote: >>> Hi Tom! >>> >>> Ping. >>> >>> >>> Grüße >>> Thomas >>> >>> >>> On 2022-07-20T14:44:36+0200, I wrote: >>>> Hi Tom! >>>> >>>> Ping. >>>> >>>> >>>> Grüße >>>> Thomas >>>> >>>> >>>> On 2022-07-13T10:41:23+0200, I wrote: >>>>> Hi Tom! >>>>> >>>>> Ping. >>>>> >>>>> >>>>> Grüße >>>>> Thomas >>>>> >>>>> >>>>> On 2022-07-05T16:58:54+0200, I wrote: >>>>>> Hi Tom! >>>>>> >>>>>> Ping. >>>>>> >>>>>> >>>>>> Grüße >>>>>> Thomas >>>>>> >>>>>> >>>>>> On 2022-06-07T17:41:16+0200, I wrote: >>>>>>> Hi! >>>>>>> >>>>>>> On 2022-05-30T09:06:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote: >>>>>>>> On 29.05.22 22:49, Thomas Schwinge wrote: >>>>>>>>> Not sure if that's what you had in mind, but what do you think about the >>>>>>>>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>>>>>>>> OK to push to GCC master branch (after merging >>>>>>>>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>>>>>>>> "Put '-v' verbose output onto stderr instead of stdout")? >>>>>>>> >>>>>>>> I was mainly thinking of some way to have it available — which >>>>>>>> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >>>>>>>> nvptx-tools patch actually makes use of the '-v'.) >>>>>>> >>>>>>> (Merged a week ago.) >>>>>>> >>>>>>>> If I understand your patch correctly, this patch now causes 'gcc -v' to >>>>>>>> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >>>>>>>> outputs a lot of lines and those lines can be helpful to understand what >>>>>>>> happens and what not. >>>>>>> >>>>>>> ACK. >>>>>>> >>>>>>>> Tom, your thoughts on this? >>>>>>> >>>>>>> Ping. >>>>>>> >>>>>>> >>>>>>> Grüße >>>>>>> Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch --] [-- Type: text/x-diff, Size: 2074 bytes --] From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge <thomas@codesourcery.com> Date: Sun, 29 May 2022 22:31:43 +0200 Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker For example, for offloading compilation with '-save-temps -v', before vs. after word-diff then looks like: [...] [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s {+Verifying sm_30 code with sm_35 code generation.+} {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} [...] [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc {+collect2 version 12.0.1 20220428 (experimental)+} {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} {+Linking ./a.xnvptx-none.mkoffload.o as 0+} {+trying lib libc.a+} {+trying lib libgcc.a+} {+trying lib libgomp.a+} {+Resolving abort+} {+Resolving acc_on_device+} {+Linking libgomp.a::oacc-init.o/ as 1+} {+Linking libc.a::lib_a-abort.o/ as 2+} [...] (This depends on <https://github.com/MentorEmbedded/nvptx-tools/pull/37> "Put '-v' verbose output onto stderr instead of stdout".) gcc/ * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. --- gcc/config/nvptx/nvptx.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index ed72c253191..b184f1d0150 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -27,6 +27,13 @@ /* Run-time Target. */ +/* Assembler supports '-v' option; handle similar to + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ +#define ASM_SPEC "%{v}" + +/* Linker supports '-v' option. */ +#define LINK_SPEC "%{v}" + #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -- 2.25.1 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PING] nvptx: forward '-v' command-line option to assembler, linker 2022-06-07 15:41 ` [PING] nvptx: forward '-v' command-line option to assembler, linker Thomas Schwinge 2022-07-05 14:58 ` [PING^2] " Thomas Schwinge @ 2022-09-05 15:02 ` Tom de Vries 1 sibling, 0 replies; 11+ messages in thread From: Tom de Vries @ 2022-09-05 15:02 UTC (permalink / raw) To: Thomas Schwinge, Tobias Burnus, gcc-patches On 6/7/22 17:41, Thomas Schwinge wrote: > Subject: > [PING] nvptx: forward '-v' command-line option to assembler, linker > From: > Thomas Schwinge <thomas@codesourcery.com> > Date: > 6/7/22, 17:41 > > To: > Tobias Burnus <tobias@codesourcery.com>, <gcc-patches@gcc.gnu.org>, "Tom > de Vries" <tdevries@suse.de> > > > Hi! > > On 2022-05-30T09:06:21+0200, Tobias Burnus<tobias@codesourcery.com> wrote: >> On 29.05.22 22:49, Thomas Schwinge wrote: >>> Not sure if that's what you had in mind, but what do you think about the >>> attached "nvptx: forward '-v' command-line option to assembler, linker"? >>> OK to push to GCC master branch (after merging >>> <https://github.com/MentorEmbedded/nvptx-tools/pull/37> >>> "Put '-v' verbose output onto stderr instead of stdout")? >> I was mainly thinking of some way to have it available — which >> '-foffload-options=-Wa,-v' already permits on the GCC side. (Once the >> nvptx-tools patch actually makes use of the '-v'.) > (Merged a week ago.) > >> If I understand your patch correctly, this patch now causes 'gcc -v' to >> imply 'gcc -v -Wa,-v'. I think that's okay, since 'gcc -v' already >> outputs a lot of lines and those lines can be helpful to understand what >> happens and what not. > ACK. > >> Tom, your thoughts on this? > Ping. > > > Grüße > Thomas > > > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 > > > 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch > > From 17c35607d4927299b0c4bd19dd6fd205c85c4a4b Mon Sep 17 00:00:00 2001 > From: Thomas Schwinge<thomas@codesourcery.com> > Date: Sun, 29 May 2022 22:31:43 +0200 > Subject: [PATCH] nvptx: forward '-v' command-line option to assembler, linker > > For example, for offloading compilation with '-save-temps -v', before vs. after > word-diff then looks like: > > [...] > [...]/build-gcc-offload-nvptx-none/gcc/as {+-v -v+} -o ./a.xnvptx-none.mkoffload.o ./a.xnvptx-none.mkoffload.s > {+Verifying sm_30 code with sm_35 code generation.+} > {+ ptxas -c -o /dev/null ./a.xnvptx-none.mkoffload.o --gpu-name sm_35 -O0+} > [...] > [...]/build-gcc-offload-nvptx-none/gcc/collect2 {+-v -v+} -o ./a.xnvptx-none.mkoffload [...] @./a.xnvptx-none.mkoffload.args.1 -lgomp -lgcc -lc -lgcc > {+collect2 version 12.0.1 20220428 (experimental)+} > {+[...]/build-gcc-offload-nvptx-none/gcc/collect-ld -v -v -o ./a.xnvptx-none.mkoffload [...] ./a.xnvptx-none.mkoffload.o -lgomp -lgcc -lc -lgcc+} > {+Linking ./a.xnvptx-none.mkoffload.o as 0+} > {+trying lib libc.a+} > {+trying lib libgcc.a+} > {+trying lib libgomp.a+} > {+Resolving abort+} > {+Resolving acc_on_device+} > {+Linking libgomp.a::oacc-init.o/ as 1+} > {+Linking libc.a::lib_a-abort.o/ as 2+} > [...] > > (This depends on<https://github.com/MentorEmbedded/nvptx-tools/pull/37> > "Put '-v' verbose output onto stderr instead of stdout".) > Ack, I see that has been merged. The ASM_SPEC part LGTM. The LINK_SPEC part results looked very verbose to me at first glance, given that it prints info that with gnu ld we'd only see with -Wl,-trace. But I suppose that's more of a question of what we print with nvptx-none-ld -v. Still, I wonder, normally we don't pass -v to ld, and need -Wl,-v for that. So, any particular reason why we would do things differently for nvptx? Thanks, - Tom > gcc/ > * config/nvptx/nvptx.h (ASM_SPEC, LINK_SPEC): Define. > --- > gcc/config/nvptx/nvptx.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h > index ed72c253191..b184f1d0150 100644 > --- a/gcc/config/nvptx/nvptx.h > +++ b/gcc/config/nvptx/nvptx.h > @@ -27,6 +27,13 @@ > > /* Run-time Target. */ > > +/* Assembler supports '-v' option; handle similar to > + '../../gcc.cc:asm_options', 'HAVE_GNU_AS'. */ > +#define ASM_SPEC "%{v}" > + > +/* Linker supports '-v' option. */ > +#define LINK_SPEC "%{v}" > + > #define STARTFILE_SPEC "%{mmainkernel:crt0.o}" > > #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () > -- 2.25.1 > > Attachments: > > 0001-nvptx-forward-v-command-line-option-to-assembler-lin.patch 2.0 KB > ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-09-05 15:02 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <MentorEmbedded/nvptx-tools/pull/31@github.com> [not found] ` <MentorEmbedded/nvptx-tools/pull/31/c1094932979@github.com> 2022-05-29 20:49 ` nvptx: forward '-v' command-line option to assembler, linker (was: [MentorEmbedded/nvptx-tools] Issue 30: Ignore not-supported sm_* error without --verify (PR #31)) Thomas Schwinge 2022-05-30 7:06 ` Tobias Burnus 2022-06-07 15:41 ` [PING] nvptx: forward '-v' command-line option to assembler, linker Thomas Schwinge 2022-07-05 14:58 ` [PING^2] " Thomas Schwinge 2022-07-13 8:41 ` [PING^3] " Thomas Schwinge 2022-07-20 12:44 ` [PING^4] " Thomas Schwinge 2022-07-27 15:48 ` [PING^5] " Thomas Schwinge 2022-08-06 19:20 ` [PING^6] " Thomas Schwinge 2022-08-16 15:12 ` [PING^7] " Thomas Schwinge 2022-08-30 13:44 ` [PING^8] " Thomas Schwinge 2022-09-05 15:02 ` [PING] " Tom de Vries
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).