Skip to content

Commit

Permalink
[CMAKE] Update build on recent Haiku
Browse files Browse the repository at this point in the history
This patch updates cmake build scripts to build on Haiku. It adds Haiku x86_64 to config.guess.
Please consider reviewing.

Pathc by Jérôme Duval.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262038 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rengolin committed Feb 26, 2016
1 parent 3d8c62e commit 59e23fa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include(TestBigEndian)

include(HandleLLVMStdlib)

if( UNIX AND NOT BEOS )
if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
set(CMAKE_REQUIRED_LIBRARIES m)
endif()
Expand Down
3 changes: 3 additions & 0 deletions cmake/config.guess
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*) # Haiku running on x86_64.
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
Expand Down
2 changes: 1 addition & 1 deletion include/llvm/Support/Host.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include "llvm/ADT/StringMap.h"

#if defined(__linux__) || defined(__GNU__)
#if defined(__linux__) || defined(__GNU__) || defined(__HAIKU__)
#include <endian.h>
#else
#if !defined(BYTE_ORDER) && !defined(LLVM_ON_WIN32)
Expand Down
4 changes: 3 additions & 1 deletion lib/Support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ elseif( CMAKE_HOST_UNIX )
if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
set(system_libs ${system_libs} z)
endif()
set(system_libs ${system_libs} m)
if( UNIX AND NOT (BEOS OR HAIKU) )
set(system_libs ${system_libs} m)
endif()
endif( MSVC OR MINGW )

add_llvm_library(LLVMSupport
Expand Down

0 comments on commit 59e23fa

Please sign in to comment.