On 28/10/2026 15:48, Paul-Antoine Arras wrote:
Since r17-1526-g619a5e5586759a "driver: Spill long COLLECT_GCC_OPTIONS to a response file [PR111527]" it is not safe to use a raw getenv call to read COLLECT_GCC_OPTIONS.As a result, with a command line longer than 1024, the check for --param=offload-gpu-mode=simt in mkoffload never saw the option and did not add -msimt. OpenMP offload compilations then failed with "'--param=offload-gpu-mode=simt-directed|simt' is incompatible with '-no-msimt'", and OpenACC ones ICEd in gen_oacc_fork. gcc/ChangeLog: * config/gcn/mkoffload.cc (main): Use read_collect_gcc_options instead of getenv to read COLLECT_GCC_OPTIONS. --- gcc/config/gcn/mkoffload.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/gcn/mkoffload.cc b/gcc/config/gcn/mkoffload.cc index f6b61cf4ea7..b79c0e215ef 100644 --- a/gcc/config/gcn/mkoffload.cc +++ b/gcc/config/gcn/mkoffload.cc @@ -1134,7 +1134,7 @@ main (int argc, char **argv)/* Add -msimt when in SIMT mode, but that option doesn't get passed directlyto mkoffload, so let's check the environment. */ - const char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS"); + const char *collect_gcc_options = read_collect_gcc_options (); if (collect_gcc_options && strstr (collect_gcc_options, "--param=offload-gpu-mode=simt")) simt = true;
Presumably this is for OG16? LGTM. Andrew
