Open vovagubin1987 opened 6 years ago
I'll take a look. I've quite a few local changes I need to commit. Unfortunately, I can only build test, if you're willing to run-test, that would be great!
I've got it building successfully. I will push all my latest changes to the repo today. Let me know if it then works for you.
I will also add a stable gcc-8 release alongside the the live ebuilds.
@vovagubin1987 That was a lot more work than I thought it would be. I now have a properly slotted offload-gcc-nvptx ebuild which works for both versioned and live compiler builds.
I'm about to push it, if you could test it, that would be great!
I'm dropping sys-devel/gcc from the overlay so to use the plugin you'll need to use repos.conf to inherit the eclass for where your gcc ebuilds are located.
I compiled gcc-nvptx 8.0 and gcc with offload 8.0 only with gcc version 6.4
I suspect that kernel version is probably too old. The eclass only provides USE=offload-nvptx for version 7+.
kernel? I meant compiler!
I need to make sure the offload driver is added to DEPEND for the gcc build.
I've fixed the dependency to the gcc version/slot.
All you should have to do is ensure your /etc/portage/repos.conf/gentoo.conf includes::
[DEFAULT]
main-repo = gentoo
eclass-overrides = gentoo-gpu
Then when you emerge sys-devel/gcc:8 with USE=offload-nvptx it should pull in the appropriate version.
I'll add ebuilds for all the current (suitable) portage versions.
gcc-7.3 support is there now.
Probably a bit late now, but I've been able to test and fix up the offloading support in conjunction with ROCm since I now have a GPU I can test with. I need to bump the NVPTX version, but I need someone willing to test it.
cp doc/gcc.1 doc/g++.1 build/genmodes -h > tmp-modes.h /bin/bash /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc/../move-if-change tmp-modes.h insn-modes.h echo timestamp > s-modes-h build/genmodes -i > tmp-modes-inline.h /bin/bash /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc/../move-if-change tmp-modes-inline.h \ insn-modes-inline.h echo timestamp > s-modes-inline-h build/gengtype \ -S /var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/gcc-8.0.0-9999/gcc -I gtyp-input.list -w tmp-gtype.state make[2]: [Makefile:2651: s-gtype] Illegal instruction rm fsf-funding.pod gcov.pod gpl.pod cpp.pod gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod make[2]: Leaving directory '/var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/build/gcc' make[1]: [Makefile:4237: all-gcc] Error 2 make[1]: Leaving directory '/var/calculate/tmp/portage/sys-devel/offload-gcc-nvptx-8.0.0_pre9999/work/build' make: *** [Makefile:892: all] Error 2
emerge --info '=sys-devel/offload-gcc-nvptx-8.0.0_pre9999::gentoo-gpu'
,emerge -pqv '=sys-devel/offload-gcc-nvptx-8.0.0_pre9999::gentoo-gpu'
.