Hi,

ports prrovide two gcc's 4.9 and 8.
I have a program which compiles fine with up to gcc 7, also the system clang is too "new". On OpenBSD 6.4 I could use the system clang.

Now, a solution would be to install gcc 6.5 or 7.4, a compiler which I know works fine on NetBSD and Linux for ArcticFox.

I want to make it as stock as possible, I did not apply any patches. I took inspiration from:

https://raw.githubusercontent.com/openbsd/ports/master/lang/gcc/8/Makefile


I installed gmake, gas, bison, libexecinfo

I ended up with this command line (the rationale is not to overwrite anything of ports, put it :

./configure --prefix=/usr/local/gcc7 --program-suffix=7 --enable-languages=c,c++,objc,obj-c++ --enable-shared --enable-wchar_t --enable-threads=posix --disable-nls --with-system-zlib --disable-libmudflap --disable-libgomp --disable-libssp --with-gnu-ld --with-gnu-as --with-gmp=/usr/local --disable-libstdcxx-pch --without-isl --enable-cpp --with-arch=sandybridge --with-tune=sandybridge --enable-default-pie CC=clang CXX=clang++ AS=gas

however compilation fails:

checking whether the /home/multix/code/gcc-7.4.0/host-x86_64-unknown-openbsd6.5/gcc/xgcc -B/home/multix/code/gcc-7.4.0/host-x86_64-unknown-openbsd6.5/gcc/ -B/usr/local/gcc7/x86_64-unknown-openbsd6.5/bin/ -B/usr/local/gcc7/x86_64-unknown-openbsd6.5/lib/ -isystem /usr/local/gcc7/x86_64-unknown-openbsd6.5/include -isystem /usr/local/gcc7/x86_64-unknown-openbsd6.5/sys-include    linker (/home/multix/code/gcc-7.4.0/host-x86_64-unknown-openbsd6.5/gcc/collect-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... openbsd6.5 ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
gmake[2]: *** [Makefile:13983: configure-stage1-target-libstdc++-v3] Error 1
gmake[2]: Leaving directory '/home/multix/code/gcc-7.4.0'



Anyone has a useful suggestion to get gcc7 ?

Thanks,

Riccardo

Reply via email to