Le 03/08/2023 à 16:54, Andrew Stubbs a écrit : > On 18/07/2023 08:24, Sisak, Janos Mihaly via Gcc-help wrote: >> Good day everyone! >> >> I’ve been trying to compile GCC 13.1 with nvptx offloading but I’m >> having no success. >> The host machine is an Ubuntu 20.04.6 LTS, with GCC 11.1 from the >> repositories. >> >> I compile and install binutils, nvptx-tools then I try to configure >> and buil gcc with target=nvptx-none. It fails during libatomic or >> libbacktrace with this error: >> configure:3721: /home/uig13265/offload/wrk/build-gcc-nvptx/./gcc/xgcc >> -B/home/uig13265/offload/wrk/build-gcc-nvptx/./gcc/ >> -B/home/uig13265/offload/install/nvptx-none/bin/ >> -B/home/uig13265/offload/install/nvptx-none/lib/ -isystem >> /home/uig13265/offload/install/nvptx-none/include -isystem >> /home/uig13265/offload/install/nvptx-none/sys-include    -V >&5 >> xgcc: error: unrecognized command-line option '-V' >> xgcc: fatal error: no input files >> compilation terminated. >> >> I tried to google the error and I found that maybe my newlib is >> wrong. I tried both the mentorgraphics repo (marked obsolete) and the >> Cygwin repo (release cygwin-3.4.7). No success. >> >> I attached the failing log, the script used for downloading the repos >> and the script used for compiling the sources. If you have five >> minutes and can help, please do, would be very much appreciated. > > Are you following the instructions at > https://gcc.gnu.org/wiki/Offloading#How_to_build_an_offloading-enabled_GCC > ? > > The "Cygwin" Newlib is the correct one, but the configuration needs to > be right, and the newlib soft-link needs to be in place when you build > the compiler. > > Andrew Hi Sisak I have the attached script that allow me to build GCC from the git repo. It works for a while for me on AMD cpu + Nvidia GPU architecture. I have reported what I think to be a bug in the compiler many weeks ago (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109699, still with unconfirmed status in the bug list) and I often check my small test-case code with latest GCC version to see if some improvements allow its resolution. So all should run "automagically" for building the compilers every week.... Look at lines 8, 9 and 11 for your local setup and lines 35 and 36 to select the release you need. I'm using RHEL familly OS but it should run on Ubuntu I think. Of course if something is wrong and you improve the script, publish your new version in this thread ! Patrick