diff options
author | Tobias Burnus <tburnus@baylibre.com> | 2024-04-03 15:47:12 +0200 |
---|---|---|
committer | Tobias Burnus <tburnus@baylibre.com> | 2024-04-03 15:47:12 +0200 |
commit | 6f91cce9a314cd4bce16fe52a2ffbeb93d59320b (patch) | |
tree | aea15638e6ffa2f5645a4f3ee48d83cb00a82acf | |
parent | d60968de6961cef144a5cf8701ea0d3f4ea90f18 (diff) | |
download | gcc-6f91cce9a314cd4bce16fe52a2ffbeb93d59320b.zip gcc-6f91cce9a314cd4bce16fe52a2ffbeb93d59320b.tar.gz gcc-6f91cce9a314cd4bce16fe52a2ffbeb93d59320b.tar.bz2 |
lto-wrapper.cc: Add offload target name to 'offload_args' suffix
lto-wrapper.cc's compile_offload_image calls mkoffload with
an @./a.offload_args argument ('a.' in case of, e.g., 'a.out'). However,
when generating code for both nvptx and gcn, they use the same name
with -save-temps. Hence, this commit adds a <target> + '.' before
'offload_args' in line with other offload-target-specific files.
gcc/ChangeLog:
* lto-wrapper.cc (compile_offload_image): Prefix 'offload_args'
suffix by the target name.
-rw-r--r-- | gcc/lto-wrapper.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/lto-wrapper.cc b/gcc/lto-wrapper.cc index ca53e4b..610594c 100644 --- a/gcc/lto-wrapper.cc +++ b/gcc/lto-wrapper.cc @@ -993,7 +993,8 @@ compile_offload_image (const char *target, const char *compiler_path, obstack_ptr_grow (&argv_obstack, NULL); argv = XOBFINISH (&argv_obstack, char **); - fork_execute (argv[0], argv, true, "offload_args"); + suffix = concat (target, ".offload_args", NULL); + fork_execute (argv[0], argv, true, suffix); obstack_free (&argv_obstack, NULL); free_array_of_ptrs ((void **) paths, n_paths); |