Skip to content

Commit

Permalink
Haiku: add support for building on Haiku
Browse files Browse the repository at this point in the history
* Hand rebased from Niels original work on 1.9.0
  • Loading branch information
nielx authored and kallisti5 committed Sep 25, 2016
1 parent 328743a commit 01fecb9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down Expand Up @@ -532,6 +536,10 @@ case $CFG_CPUTYPE in
CFG_CPUTYPE=x86_64
;;

BePC)
CFG_CPUTYPE=i686
;;

*)
err "unknown CPU type: $CFG_CPUTYPE"
esac
Expand Down
4 changes: 4 additions & 0 deletions mk/main.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/etc/local_stage0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down

0 comments on commit 01fecb9

Please sign in to comment.