Permalink
Browse files

FreeBSD port: review comments.

  • Loading branch information...
1 parent c62a983 commit 7c532ef94c67cb607da91493c83ff6c0fbee3b7e @kostja kostja committed May 21, 2012
Showing with 16 additions and 7 deletions.
  1. +2 −0 CMakeLists.txt
  2. +5 −0 src/cpu_feature.m
  3. +9 −7 third_party/CMakeLists.txt
  4. 0 third_party/{luajit → compat}/unwind.h
View
@@ -83,6 +83,8 @@ endif()
check_symbol_exists(MAP_ANON sys/mman.h HAVE_MAP_ANON)
check_symbol_exists(MAP_ANONYMOUS sys/mman.h HAVE_MAP_ANONYMOUS)
check_include_file(sys/time.h HAVE_SYS_TIME_H)
+check_include_file(unwind.h HAVE_UNWIND_H)
+check_include_file(cpuid.h HAVE_CPUID_H)
check_symbol_exists(O_DSYNC fcntl.h HAVE_O_DSYNC)
check_function_exists(fdatasync HAVE_FDATASYNC)
View
@@ -23,6 +23,7 @@
* SUCH DAMAGE.
*/
+#include <config.h>
#include <sys/types.h>
#include <errno.h>
#include <stdlib.h>
@@ -31,7 +32,11 @@
#error "Only x86 and x86_64 architectures supported"
#endif
+#ifdef HAVE_CPUID_H
+#include <cpuid.h>
+#else
#include <third_party/compat/sys/cpuid.h>
+#endif
#include "cpu_feature.h"
#define SCALE_F sizeof(unsigned long)
View
@@ -9,10 +9,10 @@ endif()
add_library (misc STATIC crc32.c proctitle.c qsort_arg.c ${misc_opt_sources})
if (NOT TARGET_OS_DEBIAN_FREEBSD)
- if (TARGET_OS_FREEBSD)
- set_source_files_properties(proctitle.c PROPERTIES
- COMPILE_FLAGS "-DHAVE_SETPROCTITLE")
- endif()
+ if (TARGET_OS_FREEBSD)
+ set_source_files_properties(proctitle.c PROPERTIES
+ COMPILE_FLAGS "-DHAVE_SETPROCTITLE")
+ endif()
endif()
add_subdirectory(coro)
@@ -23,12 +23,14 @@ macro (luajit_build)
set (luajit_copt ${CCOPT})
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set (luajit_buildoptions ${luajit_buildoptions} CCDEBUG=-ggdb)
- set (luajit_copt ${luajit_copt} -O1)
+ set (luajit_copt ${luajit_copt} -O1)
set (luajit_buildoptions ${luajit_buildoptions} XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT')
else ()
- set (luajit_copt ${luajit_copt} -O2)
+ set (luajit_copt ${luajit_copt} -O2)
+ endif()
+ if (NOT ${HAVE_UNWIND_H})
+ set (luajit_copt ${luajit_copt} -I${PROJECT_SOURCE_DIR}/third_party/compat)
endif()
- set (luajit_copt ${luajit_copt} -I.. )
set (luajit_buildoptions ${luajit_buildoptions} CCOPT="${luajit_copt}")
set (luajit_buildoptions ${luajit_buildoptions} Q='')
if (${PROJECT_BINARY_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
File renamed without changes.

0 comments on commit 7c532ef

Please sign in to comment.