Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't build on Haiku after November 2020 #1

Open
iDevPro opened this issue Jan 9, 2021 · 1 comment
Open

Doesn't build on Haiku after November 2020 #1

iDevPro opened this issue Jan 9, 2021 · 1 comment

Comments

@iDevPro
Copy link

iDevPro commented Jan 9, 2021

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
Copy link
Author

iDevPro commented Jan 11, 2021

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 $@

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant