On 01/10/2019 15:15, Christoph Badura wrote:
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.
Heh. Yes turn off as many optimizations and helpful features as
required. rumpctrl isn't performance-sensitive, so no reason for added
complexity.
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.
This project tends to bring out "interesting" toolchain issues...
Thanks for the continued work!