gcn/mkoffload.cc: Pass -save-temps on for the hsaco step
Checks
Commit Message
Found when comparing '-v -Wl,-v' output as despite -save-temps multiple runs
yielded differed results.
Fixed as attached.
OK for mainline?
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
Comments
On 13/03/2023 12:25, Tobias Burnus wrote:
> Found when comparing '-v -Wl,-v' output as despite -save-temps multiple
> runs
> yielded differed results.
>
> Fixed as attached.
> OK for mainline?
OK.
Andrew
gcn/mkoffload.cc: Pass -save-temps on for the hsaco step
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.
@@ -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")