Swift on FreeBSD

Ok, I've tried out the utils/build-script as described in documentation and it started ok, but failed at one stage with _Float16 not being defined - even though the compiler switch explicitly seems to have use it:

[4252/4802][ 88%][6776.302s] Performing build step for 'compiler-rt'
[395/1097][ 36%][25.977s] Building C object lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/extendhfsf2.c.o
FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/extendhfsf2.c.o
/root/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-freebsd-x86_64/./bin/clang -DVISIBILITY_HIDDEN  -Wall -Wno-unused-parameter -O2 -g -DNDEBUG -m32 -fno-lto -DCOMPILER_RT_HAS_FLOAT16 -std=c11 -fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer -MD -MT lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/extendhfsf2.c.o -MF lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/extendhfsf2.c.o.d -o lib/builtins/CMakeFiles/clang_rt.builtins-i386.dir/extendhfsf2.c.o -c /root/swift-project/llvm-project/compiler-rt/lib/builtins/extendhfsf2.c
In file included from /root/swift-project/llvm-project/compiler-rt/lib/builtins/extendhfsf2.c:11:
In file included from /root/swift-project/llvm-project/compiler-rt/lib/builtins/fp_extend_impl.inc:38:
/root/swift-project/llvm-project/compiler-rt/lib/builtins/fp_extend.h:44:9: error: _Float16 is not supported on this target
typedef _Float16 src_t;
        ^
1 error generated.

question would now be why -DCOMPILER_RT_HAS_FLOAT16 is used if though it has not ?
I'm not proficient in these things (I have stopped using manual build systems in the early 90's for a reason).
And it seems to takes ages before anything gets built ( 2 hours before that error happend) and just using /utils/update and building again this morning takes more than 20 minutes before it gets to that error again. Seems my freebsd server is too slow to for fixing this issue, neither have I any idea on how to proceed and where to look for - should one define float16 or fix the compiler define ?
I really hope that @mhjacobson gets to fixing these issues.

1 Like