From 01fecb9f8fd5701e5a42fc83fe6be878ac02958f Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sat, 24 Sep 2016 23:49:11 -0500 Subject: [PATCH] Haiku: add support for building on Haiku * Hand rebased from Niels original work on 1.9.0 --- configure | 8 ++++++++ mk/main.mk | 4 ++++ src/etc/local_stage0.sh | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 586b29646c59e..fd0397e5f87c5 100755 --- a/configure +++ b/configure @@ -437,6 +437,10 @@ case $CFG_OSTYPE in CFG_CPUTYPE=$(isainfo -n) ;; + Haiku) + CFG_OSTYPE=unknown-haiku + ;; + MINGW*) # msys' `uname` does not print gcc configuration, but prints msys # configuration. so we cannot believe `uname -m`: @@ -532,6 +536,10 @@ case $CFG_CPUTYPE in CFG_CPUTYPE=x86_64 ;; + BePC) + CFG_CPUTYPE=i686 + ;; + *) err "unknown CPU type: $CFG_CPUTYPE" esac diff --git a/mk/main.mk b/mk/main.mk index 7dcf3a7f3acd4..f06f6baa79d0a 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -512,10 +512,14 @@ ifeq ($$(OSTYPE_$(3)),apple-darwin) else ifeq ($$(CFG_WINDOWSY_$(3)),1) LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := PATH +else +ifeq ($$(OSTYPE_$(3)),unknown-haiku) + LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LIBRARY_PATH else LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LD_LIBRARY_PATH endif endif +endif LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \ $$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh index f5f39d264a6b0..645a80ab8b581 100755 --- a/src/etc/local_stage0.sh +++ b/src/etc/local_stage0.sh @@ -18,7 +18,7 @@ LIB_PREFIX=lib OS=`uname -s` case $OS in - ("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS") + ("Linux"|"FreeBSD"|"DragonFly"|"Bitrig"|"OpenBSD"|"SunOS"|"Haiku") BIN_SUF= LIB_SUF=.so ;;