return / swift-haiku-build

Google Summer of Code repository for building Swift 4, 5 and higher for Haiku.
5 stars 1 forks source link

Doesn't build on Haiku after November 2020 #1

Open iDevPro opened 3 years ago

iDevPro commented 3 years ago

After November 2020 llvm doesn't build in haiku. Reason is:

korli also added _SC_TTY_NAME_MAX to the supported sysconf parameters, added tcgetsid, fixed the definition of in6_addr, improved strace output for termios ioctls, and relaxed some checks in handling of network ioctls to fix incompatibilities with old OpenJDK versions. He also fixed handling of O_APPEND, added aligned_alloc (as specified in C11), made fsync() return EINVAL on fifos, and moved ***asprintf and vasprintf*** to BSD extensions as they are not part of POSIX.

Also has some trouble with swift-cmark git pull over the script. I tried by hand, build started but not success on vasprintf in debug.h inside swift-llvm.

Full discussion here: https://discuss.haiku-os.org/t/gsoc-2017-porting-swift-to-haiku-final-report-haiku-project/6095/21

iDevPro commented 3 years ago

diff --git a/build-script.sh b/build-script.sh index 4e2afce..153b154 100755 --- a/build-script.sh +++ b/build-script.sh @@ -1,4 +1,4 @@ ./swift/utils/build-script -R --extra-cmake-options='-DLLVM_ENABLE_ASSERTIONS=TRUE \ -DCMAKE_SKIP_RPATH=FALSE -DLLVM_ENABLE_RTTI=ON -DLLVM_TARGETS_TO_BUILD=X86 \ --DLLVM_ENABLE_THREADS=ON -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC' \ +-DLLVM_ENABLE_THREADS=ON -DCMAKE_C_FLAGS="-D_DEFAULT_SOURCE -fPIC" -DCMAKE_CXX_FLAGS="-fPIC -D_DEFAULT_SOURCE" -DCMAKE_EXE_LINKER_FLAGS=-lbsd ' \ --stdlib-deployment-targets=haiku-x86_64 $@