Hi! On Fri, 9 Mar 2018 17:15:16 +0100, Siegmar Gross <siegmar.gr...@informatik.hs-fulda.de> wrote: > [...] > configure: error: "libffi has not been ported to nvptx-unknown-none." > [...]
Right, such things are not supported for a "--target=nvptx" compiler. But, if your desire is to just enable additional languages, without offloading support for them (which doesn't exist, as discussed in my other email), then the solution is to just specify them in "--enable-languages" for your "gcc-8.0.0_host_build" (host compiler) but not for your "gcc-8.0.0_build" (nvptx offloading compiler), keeping the latter at "--enable-languages=c,c++,fortran,lto". Specifically: > >> I used the following commands to build everything. > >> > >> setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/usr/local/cuda/lib64 > >> setenv CUDA_INC_PATH /usr/local/cuda/include > >> setenv CUDA_LIB_PATH /usr/local/cuda/lib64 > >> set path = ( ${path} /usr/local/cuda/bin ) > >> > >> mkdir make_nvptx-tools > >> cd make_nvptx-tools > >> ../nvptx-tools/configure --prefix=/usr/local/gcc-8.0.0 \ > >> |& tee log.configure > >> make |& tee log.make > >> make install |& tee log.make-install > >> cd .. > >> > >> mkdir gcc-8.0.0_build > >> cd gcc-8.0.0_build > >> ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.0.0 \ > >> --target=nvptx-none \ > >> --enable-as-accelerator-for=x86_64-pc-linux-gnu \ > >> --with-build-time-tools=/usr/local/gcc-8.0.0/nvptx-none/bin \ > >> --disable-sjlj-exceptions \ > >> --with-newlib \ > >> --enable-newlib-io-long-long \ > >> --enable-languages=c,c++,objc,obj-c++,fortran,go,lto \ Continue to use "--enable-languages=c,c++,fortran,lto" here. > >> |& tee log.configure > >> make -j 6 |& tee log.make > >> make -j 6 install |& tee log.make-install > >> > >> mkdir ../gcc-8.0.0_host_build > >> cd ../gcc-8.0.0_host_build > >> ../gcc-8.0.0/configure --prefix=/usr/local/gcc-8.0.0 \ > >> --build=x86_64-pc-linux-gnu \ > >> --host=x86_64-pc-linux-gnu \ > >> --target=x86_64-pc-linux-gnu \ > >> --enable-offload-targets=nvptx-none=/usr/local/gcc-8.0.0/bin \ > >> --with-cuda-driver=/usr/local/cuda/ \ > >> --enable-languages=c,c++,objc,obj-c++,fortran,go,lto \ That should work fine. > >> --enable-nls \ > >> --enable-threads=posix \ > >> --with-gmp-lib=/usr/local/lib64 \ > >> --with-gmp-include=/usr/local/include \ > >> --with-mpfr-lib=/usr/local/lib64 \ > >> --with-mpfr-include=/usr/local/include \ > >> --with-mpc-lib=/usr/local/lib64 \ > >> --with-mpc-include=/usr/local/include \ > >> --with-isl-lib=/usr/local/lib64 \ > >> --with-isl-include=/usr/local/include \ > >> |& tee log.configure > >> make -j 6 |& tee log.make > >> make -j 6 install |& tee log.make-install Grüße Thomas