On Thu, 29 Nov 2018 15:39:26 +0100
Landry Breuil <landry@openbsd.org> wrote:
> : && /usr/obj/ports/libvmime-0.9.4/bin/cc -O2 -pipe CMakeFiles/cmTC_a4ed1.dir/testCCompiler.c.o -o cmTC_a4ed1 -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && :
> /usr/bin/ld: cannot find -lgcc
By my guess, this ports-clang can't link executables. There is a
line `GCC_VER = 4.9.4` in devel/llvm/Makefile, but gcc 6.4.0 installs
/usr/local/lib/gcc/powerpc-unknown-openbsd6.4/6.4.0/libgcc.a
so there is no 4.9.4/libgcc.a for clang to find.
I don't know why clang wants libgcc.a. I do know that clang++ wants
libestdc++ from gcc-libs, because the base libstdc++ is too old, and
there is no base libc++. For this reason, lang/clang/clang.port.mk
uses `MODULES += gcc4` to ask lang/gcc/6/gcc4.port.mk for the
dependency on gcc-libs. Then gcc4.port.mk does `MODGCC4_LANGS += c`
(which seems wrong, because the C compiler should be clang, not gcc),
so it adds another dependency on gcc. This might cause any port with
CHOSEN_COMPILER=ports-clang to doubly depend on llvm and gcc.
--
George Koehler <kernigh@gmail.com>
No comments:
Post a Comment