Skip to content
Snippets Groups Projects
Commit 7c532ef9 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

FreeBSD port: review comments.

parent c62a9838
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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)
......
......@@ -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 moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment