diff options
-rw-r--r-- | build_files/build_environment/CMakeLists.txt | 3 | ||||
-rw-r--r-- | build_files/build_environment/cmake/flex.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/cmake/ispc.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/patches/flex.diff | 15 |
4 files changed, 20 insertions, 2 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index a9ff48b2a9b..e0350901cd0 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -29,8 +29,9 @@ cmake_minimum_required(VERSION 3.5) include(ExternalProject) include(cmake/check_software.cmake) -include(cmake/versions.cmake) include(cmake/options.cmake) +# versions.cmake needs to be included after options.cmake due to the BLENDER_PLATFORM_ARM variable being needed. +include(cmake/versions.cmake) include(cmake/boost_build_options.cmake) include(cmake/download.cmake) include(cmake/macros.cmake) diff --git a/build_files/build_environment/cmake/flex.cmake b/build_files/build_environment/cmake/flex.cmake index 2b04c8d5d68..99233adbcdc 100644 --- a/build_files/build_environment/cmake/flex.cmake +++ b/build_files/build_environment/cmake/flex.cmake @@ -5,6 +5,8 @@ ExternalProject_Add(external_flex URL_HASH ${FLEX_HASH_TYPE}=${FLEX_HASH} DOWNLOAD_DIR ${DOWNLOAD_DIR} PREFIX ${BUILD_DIR}/flex + # This patch fixes build with some versions of glibc (https://github.com/westes/flex/commit/24fd0551333e7eded87b64dd36062da3df2f6380) + PATCH_COMMAND ${PATCH_CMD} -d ${BUILD_DIR}/flex/src/external_flex < ${PATCH_DIR}/flex.diff CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flex BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make -j${MAKE_THREADS} INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flex/src/external_flex/ && make install diff --git a/build_files/build_environment/cmake/ispc.cmake b/build_files/build_environment/cmake/ispc.cmake index 86dc1d9efa8..c2dbedca55f 100644 --- a/build_files/build_environment/cmake/ispc.cmake +++ b/build_files/build_environment/cmake/ispc.cmake @@ -28,7 +28,7 @@ elseif(UNIX) set(ISPC_EXTRA_ARGS_UNIX -DCMAKE_C_COMPILER=${LIBDIR}/llvm/bin/clang -DCMAKE_CXX_COMPILER=${LIBDIR}/llvm/bin/clang++ - -DARM_ENABLED=Off + -DARM_ENABLED=${BLENDER_PLATFORM_ARM} -DFLEX_EXECUTABLE=${LIBDIR}/flex/bin/flex ) endif() diff --git a/build_files/build_environment/patches/flex.diff b/build_files/build_environment/patches/flex.diff new file mode 100644 index 00000000000..d3f9e8b0a66 --- /dev/null +++ b/build_files/build_environment/patches/flex.diff @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index c6f12d644..3c977a4e3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,8 +25,10 @@ + # autoconf requirements and initialization + + AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex]) ++AC_PREREQ([2.60]) + AC_CONFIG_SRCDIR([src/scan.l]) + AC_CONFIG_AUX_DIR([build-aux]) ++AC_USE_SYSTEM_EXTENSIONS + LT_INIT + AM_INIT_AUTOMAKE([1.15 -Wno-portability foreign std-options dist-lzip parallel-tests subdir-objects]) + AC_CONFIG_HEADER([src/config.h]) |