-
-
Notifications
You must be signed in to change notification settings - Fork 652
Description
It looks like once again someone decided to do stuff with importC and druntime which imports stdlib.h, and because FreeBSD 14 has some gnu assembly in it, the build fails. FreeBSD 13 (which is what the CI currently tests) does not have that assembly code in stdlib.h, so the druntime tests pass for it, but they fail to build for FreeBSD 14. This is not an immediate problem, since it's just the tests that are failing, and we haven't switched to testing FreeBSD 14 yet, but it's going to need to be sorted out at some point here.
gmake -C test/importc_compare MODEL=64 OS=freebsd DMD=/home/jmdavis/Programming/github/dmd/generated/freebsd/release/64/dmd BUILD=debug \
DRUNTIME=/home/jmdavis/Programming/github/dmd/generated/freebsd/debug/64/libdruntime.a DRUNTIMESO=/home/jmdavis/Programming/github/dmd/generated/freebsd/debug/64/libdruntime.so LINKDL= \
QUIET= TIMELIMIT='' PIC=-fPIC SHARED=1
gmake[2]: Entering directory '/home/jmdavis/Programming/github/dmd/druntime/test/importc_compare'
/home/jmdavis/Programming/github/dmd/generated/freebsd/release/64/dmd -fPIC -I../../src -I../../import -Isrc -preview=dip1000 -check=assert -d -g -debug -w -defaultlib= -m64 src/importc_compare.d -L/home/jmdavis/Programming/github/dmd/generated/freebsd/debug/64/libdruntime.a -L-lpthread -L-lm -of=generated/freebsd/debug/64/importc_compare
/usr/include/stdlib.h(352): Error: Gnu Asm not supported - compile this file with gcc or clang
src/importc_compare.d(201): Error: template instance `importc_compare.collectTypes!"importc_includes"` error instantiating
gmake[2]: *** [../common.mak:117: generated/freebsd/debug/64/importc_compare] Error 1
gmake[2]: Leaving directory '/home/jmdavis/Programming/github/dmd/druntime/test/importc_compare'
gmake[1]: *** [Makefile:501: test/importc_compare/.run] Error 2
gmake[1]: Leaving directory '/home/jmdavis/Programming/github/dmd/druntime'
gmake: *** [Makefile:444: unittest-debug] Error 2
From the looks of it, I think that what's happening is that import_compare.d is comparing the manual bindings in druntime with what importC reports, and stdlib.h is one of the headers that it's testing. So, either it needs to not test stdlib.h on FreeBSD (or at least not on FreeBSD 14), or we need to make it work with FreeBSD 14. However, the latter would presumably require making it so that importC and dmd can handle gnu assembly, which probably isn't going to happen, so we probably need to make it so that import_compare.d skips stdlib.h on FreeBSD 14 - though I would love it if we could actually fix it so that dmd doesn't choke on gnu assembly whenever it sees it. I expect that this issue will continue to come up with importC regardless of the exact situation with stdlib.h and FreeBSD at the moment.