From 0e6cc4f86a8803cd5293a8da6e1d9a952e3b51e5 Mon Sep 17 00:00:00 2001 From: Shane Ambler Date: Wed, 22 Mar 2023 14:15:46 +0100 Subject: [PATCH] Build: changes needed to build on FreeBSD * Fix SDL not finding Xlib.h * Link to clangSupport library for newer LLVM versions * Add FreeBSD essential symbols to symbols_unix.map Pull Request: https://projects.blender.org/blender/blender/pulls/105892 --- build_files/cmake/Modules/FindClang.cmake | 5 ++++- extern/sdlew/CMakeLists.txt | 2 +- source/creator/symbols_unix.map | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build_files/cmake/Modules/FindClang.cmake b/build_files/cmake/Modules/FindClang.cmake index c60f254eb2a..9f9c0a31bdc 100644 --- a/build_files/cmake/Modules/FindClang.cmake +++ b/build_files/cmake/Modules/FindClang.cmake @@ -80,6 +80,7 @@ set(_CLANG_FIND_COMPONENTS clangAST clangLex clangBasic + clangSupport ) set(_CLANG_LIBRARIES) @@ -94,7 +95,9 @@ foreach(COMPONENT ${_CLANG_FIND_COMPONENTS}) PATH_SUFFIXES lib64 lib ) - list(APPEND _CLANG_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}") + if(CLANG_${UPPERCOMPONENT}_LIBRARY) + list(APPEND _CLANG_LIBRARIES "${CLANG_${UPPERCOMPONENT}_LIBRARY}") + endif() endforeach() diff --git a/extern/sdlew/CMakeLists.txt b/extern/sdlew/CMakeLists.txt index 7f8300909a7..8d2a8c59496 100644 --- a/extern/sdlew/CMakeLists.txt +++ b/extern/sdlew/CMakeLists.txt @@ -7,7 +7,7 @@ set(INC ) set(INC_SYS - + ${X11_X11_INCLUDE_PATH} ) set(SRC diff --git a/source/creator/symbols_unix.map b/source/creator/symbols_unix.map index 673c402022d..8500c9fcd34 100644 --- a/source/creator/symbols_unix.map +++ b/source/creator/symbols_unix.map @@ -39,6 +39,9 @@ global: realpath; sched_*; valloc; + /* needed on FreeBSD */ + __progname; + environ; local: *; };