]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: forward '-v' command-line option to assembler
authorThomas Schwinge <thomas@codesourcery.com>
Sun, 29 May 2022 20:31:43 +0000 (22:31 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Mon, 26 Sep 2022 14:18:13 +0000 (16:18 +0200)
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+}
    [...]

(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): Define.

(cherry picked from commit 84072a2615ec1f5f35e994128a6dc22af5bf1322)

gcc/ChangeLog.omp
gcc/config/nvptx/nvptx.h

index 3b27de7994877b3ce511642a4543393068e3f3fc..662430dd6ec579591d726c67b8e010d8d60621c5 100644 (file)
@@ -1,3 +1,10 @@
+2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>
+
+       Backported from master:
+       2022-09-26  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * config/nvptx/nvptx.h (ASM_SPEC): Define.
+
 2022-09-24  Tobias Burnus  <tobias@codesourcery.com>
 
        Backport from mainline:
index 712974405668e69c57c5dd2b63a26523843ef532..9c883ba272a9dd5b53fa040dc87af1e081a85d05 100644 (file)
 
 /* Run-time Target.  */
 
+/* Assembler supports '-v' option; handle similar to
+   '../../gcc.cc:asm_options', 'HAVE_GNU_AS'.  */
+#define ASM_SPEC "%{v}"
+
 #define STARTFILE_SPEC "%{mmainkernel:crt0.o}"
 
 #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins ()