The switch to clang-7 uncovered a new feature. Clang now does "library
call simplification" and silently rewrites library calls it knows about.

I discovered this because cgdconfig -g would crash after switching to
clang-7.

Clang helpfully replaced the call to fread() in
sbin/cgdconfig/utils.c:bits_fget() by a call to fread_unlocked().
glibc's fread_unlocked wasn't happy with the NetBSD FILE* it got passed.

I worked around that by passing -fno-builtin to it.
I figure that -fno-builtin-fread would have worked for this particular
case too.  But then we would have to probe a large number of platform and
version depenend -fno-builtin-<func> options to prevent the re-writing of
library calls in the NetBSD libs to ones in the host's libs.

Anyway, I have rumpctrl off -current sources building on Travis now.

After this three week run I think I've had enough of wresting with
toolchains for a couple of days, though.

--chris

Reply via email to