Hi all, this patch does two things: (A) Documentation for -fopenmp This finally adds documentation - which was lacking a long time but is increasingly demanded. Often used options: -foffload='-lm' and '-lgfortran' -foffload=(nvptx-none=)-latomic -foffload=(amdgcn-amdhsa=)-march=gfx906 * * * (B) -foffload=default Came up for the testsuite as libatomic is sometimes needed for nvptx and unsupported (not build) for GCN. When GCC is configured to support more than one offload target: * -foffload=-latomic → fails to build on GCN * -foffload=nvptx-none=-latomic → disables all but nvptx However, it might be also useful in the real world. * * * Loosely tested without offloading support and with only one offload target. As the following works, I assume the patch is fine – but I would not mind if someone else would test it, who built GCC with multiple offload targets. For testing, I want to note that gcc -v 2>&1|grep OFFLOAD_TARGET shows the configured targets (and OFFLOAD_TARGET_DEFAULT=1 when configured with --enable-offload-defaulted). As soon as -foffload=... has been specified, the output is changed to only include the specified devices. * * * Thoughts? Comments? Suggestions? Test results? OK? * * * Crossref: * Configure option --enable-offload-defaulted, see https://gcc.gnu.org/install/configure.html * PR about documenting -foffload: https://gcc.gnu.org/PR67300 * Current documentation in the wiki: https://gcc.gnu.org/wiki/Offloading (First line: 'compilation options' link) * Email thread about -foffload=default, -foffload=nvptx-none=-latomic disabling other hosts and (next in thread) automatically linking -latomic. https://gcc.gnu.org/pipermail/gcc-patches/2021-May/570627.html Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf