depot/third_party/nixpkgs/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch

30 lines
1.1 KiB
Diff
Raw Normal View History

diff -Naur fluent-bit.old/cmake/luajit.cmake fluent-bit.new/cmake/luajit.cmake
--- fluent-bit.old/cmake/luajit.cmake
+++ fluent-bit.new/cmake/luajit.cmake
@@ -12,15 +12,7 @@
set(LUAJIT_DEST ${CMAKE_CURRENT_BINARY_DIR})
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
- set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check")
- if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20
- AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 21)
- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0")
- else()
- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15")
- endif()
-else()
- set(DEPLOYMENT_TARGET "")
+ set(CFLAGS "${CFLAGS} -fno-stack-check")
endif()
# luajit (UNIX)
@@ -30,7 +22,7 @@
EXCLUDE_FROM_ALL TRUE
SOURCE_DIR ${LUAJIT_SRC}
CONFIGURE_COMMAND ./configure
- BUILD_COMMAND $(MAKE) CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" ${DEPLOYMENT_TARGET}
+ BUILD_COMMAND $(MAKE) DEFAULT_CC=cc CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC"
INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a")
# luajit (Windows)