On Wed, Dec 15, 2021 at 10:01 AM Patrick Begou via Gcc-help <gcc-help@xxxxxxxxxxx> wrote: > > I've spent a couple of days trying your suggestion but it did not works > for me... > > - I've then tried to specify the compiler where to look for the include > files using: > > CFLAGS="-I/usr/include" ../gcc/configure \ > --target=nvptx-none > --with-build-time-tools=$install_dir/nvptx-none/bin \ > --enable-as-accelerator-for=$target \ > --disable-sjlj-exceptions \ > --enable-newlib-io-long-long \ > --enable-languages="c,c++,fortran,lto" \ > --prefix=$install_dir > > but it has no effect as it is not the installed gcc which fails to > compile but the just created xgcc: > > */robin/data/begou/GCC11/GCC11.2-offload/build-nvptx-gcc/./gcc/**xgcc* > -B/robin/data/begou/GCC11/GCC11.2-offload/build-nvptx-gcc/./gcc/ > -nostdinc > -B/robin/data/begou/GCC11/GCC11.2-offload/build-nvptx-gcc/nvptx-none/newlib/ > -isystem > /robin/data/begou/GCC11/GCC11.2-offload/build-nvptx-gcc/nvptx-none/newlib/targ-include > -isystem /robin/data/begou/GCC11/GCC11.2-offload/gcc/newlib/libc/include > -B/opt/GCC11.2/nvptx-none/bin/ -B/opt/GCC11.2/nvptx-none/lib/ -isystem > /opt/GCC11.2/nvptx-none/include -isystem > /opt/GCC11.2/nvptx-none/sys-include -g -O2 -mgomp -O2 -g -O2 > -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing > -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wstrict-prototypes > -Wmissing-prototypes -Wno-error=format-diag -Wold-style-definition > -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc > -fno-stack-protector -Dinhibit_libc -I. -I. -I../../.././gcc > -I../../../../gcc/libgcc -I../../../../gcc/libgcc/. > -I../../../../gcc/libgcc/../gcc -I../../../../gcc/libgcc/../include > -DHAVE_CC_TLS -DUSE_EMUTLS -o _gcov_merge_add.o -MT _gcov_merge_add.o > -MD -MP -MF _gcov_merge_add.dep -DL_gcov_merge_add -c > ../../../../gcc/libgcc/libgcov-merge.c > > /In file included from ../../../../gcc/libgcc/libgcov-merge.c:26:// > //../../../../gcc/libgcc/libgcov.h:49:10: fatal error: sys/mman.h: No > such file or directory// That’s not what I suggested. I suggested that you get rid of HAVE_SYS_MMAN_H in this directory (libgcc). It does not strictly require mmap and will also build without it.