[Gc] Boehm GC + musl follow-up
dalias at aerifal.cx
Tue Jan 8 13:20:01 PST 2013
John Spencer forwarded me the thread about issues building Boehm GC
against musl libc. I'm the primary author and maintainer of musl and
would like to help with this process from the standpoints of:
1. Figuring out what extensions potentially should be added to musl to
meet the needs of GC, and whether the current usage of such extensions
is sufficiently abstract that things would automatically work if the
functions were added to musl, or whether it's making further
non-portable assumptions about implementation internals, that may
require additional work to resolve.
2. Improving the portability of Boehm GC, both things like header
conflict issues and better fallback methods for doing nonportable
things like determining stack bounds when one of the methods currently
being used isn't available.
Have the header issues been addressed yet? Basically, the issue seems
to be that some kernel headers are being included which define the
same types as userspace headers. I suspect on glibc, the userspace
headers are including the kernel headers for the types (so including
the kernel header is unnecessary but not harmful) whereas musl does
not use kernel headers whatsoever, resulting in a conflict when the
kernel header is included. For issues like this, I think the most
portable approach would be to test whether everything that's needed is
present without including the kernel headers, and only attempt to
include the kernel header if something is missing. But I'm doubtful
that there are _any_ systems where including these kernel headers is
the right thing to do, so just unconditionally removing the include
directives might be the cleanest fix.
I'm not sure what the other issues JS was encountering with GC not
working are. Anyone have some ideas?
More information about the Gc