]> git.ipfire.org Git - people/ms/gcc.git/commitdiff
gcn/mkoffload.cc: Pass -save-temps on for the hsaco step
authorTobias Burnus <tobias@codesourcery.com>
Mon, 13 Mar 2023 13:24:33 +0000 (14:24 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 13 Mar 2023 13:24:33 +0000 (14:24 +0100)
For the assembly/linking step of the device code, the "-save-temps" was not
passed on, such that amdgcn-amdhsa/bin/as and amdgcn-amdhsa's collect2
were invoked with '-o /tmp/cc...' and '@/tmp/cc...', respectively.
The -dump... prefix (...mkoffload.hsaco) was already properly set.

gcc/ChangeLog:

* config/gcn/mkoffload.cc (main): Pass -save-temps on for the
hsaco assemble/link.

gcc/config/gcn/mkoffload.cc

index 9493f89fec3d2491abc3e62f50c4cb62d5a7df1f..61bc927307782647e911692f17a0b099f01167d9 100644 (file)
@@ -1082,6 +1082,9 @@ main (int argc, char **argv)
       if (verbose)
        obstack_ptr_grow (&ld_argv_obstack, "-v");
 
+      if (save_temps)
+       obstack_ptr_grow (&ld_argv_obstack, "-save-temps");
+
       for (int i = 1; i < argc; i++)
        if (startswith (argv[i], "-l")
            || startswith (argv[i], "-Wl")