https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95316
Bug ID: 95316
Summary: [10 Regression] binary built with -fopenacc fails to
run when not all offload compilers are installed that
were configured
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at debian dot org
Target Milestone: ---
This is usage regression; in gcc-9 building with
gcc-9 -o mandel-accel mandel.c -Wall -O2 -fopenacc
and running the mandel-accel binary works, if the nvptx offload compiler is
installed.
Building that with gcc-10 leads to:
$ gcc-10 -o mandel-accel mandel.c -Wall -O3 -fopenacc
lto-wrapper: fatal error: could not find accel/amdgcn-amdhsa/mkoffload in
/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/10/:/usr/lib/gcc/x86_64-linux-gnu/
(consider using ‘-B’)
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
because gcc-10 was configured with more than one offload target. Installing
all configured offload compilers works around it, or building for the offload
targets explicitly (-foffload=nvptx-none).
Expected behavior: Just print a warning when an offload compiler for a target
cannot be found.
Note: the packaged compilers for Debian/Ubuntu are gcc-10, gcc-10-offload-nvptx
and gcc-10-offload-amdgcn.
See https://launchpad.net/bugs/1878760