===================================================================
@@ -1064,9 +1064,6 @@ static const char *const multilib_defaults_raw[] =
static const char *const driver_self_specs[] = {
"%{fdump-final-insns:-fdump-final-insns=.} %<fdump-final-insns",
#ifdef ENABLE_OFFLOADING
- /* If the user didn't specify any, default to all configured offload
- targets. */
- "%{!foffload=*:-foffload=" OFFLOAD_TARGETS "}",
/* If linking against libgomp, add a setup file. */
"%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*} 1):" \
"%:add-omp-infile()}",
@@ -4291,6 +4288,11 @@ process_command (unsigned int decoded_options_coun
CL_DRIVER, &handlers, global_dc);
}
+ /* If the user didn't specify any, default to all configured offload
+ targets. */
+ if (offload_targets == NULL)
+ handle_foffload_option (OFFLOAD_TARGETS);
+
if (output_file
&& strcmp (output_file, "-") != 0
&& strcmp (output_file, HOST_BIT_BUCKET) != 0)