On 4/27/21 12:22 PM, Tobias Burnus wrote: > This is based on Jakub's patch* which is used with many distributions – and > is has > to be maintained by all of them; otherwise issues like lp #1878760 might > creep in, > as discussed in #gcc yesterday. - As I am a huge fan of reducing code > duplication > and local patches, I propose to add it to GCC proper behind a configure flag. > > The patch idea is: offloading support is configured for one or multiple > offload > devices > but compilation silently ignores a target if its offload compiler is not > found at > compile time and also dlopen errors of the associated libgomp plugin is also > silently ignored such that also the system where the program is run do not > show > a run-time error. > > This makes a lot of sense for distribution compilers – as it permits to > configure > GCC to support offloading to one/multiple offload targets, but the actual > offload compiler and the run-time support can be put into separate, optional > packages. > > (When -foffload=$TARGET is specified explicitly, it still gives > an error if the offload compiler is not installed; this does not not affect > the > libgomp/run-time side.) > > However, for nondistro builds, compilers are usually installed "as is" and not > split into different packages – thus, compilation or run-time issues should > give > an error. > > Hence, the distro behaviour is only active when configured with > --enable-offload-defaulted. > > Comments? OK for mainline?
please document that option in gcc/doc/install.texi. Matthias