[Bf-blender-cvs] [aaaa0a43af1] master: Build: use -no-pie for portable builds on Linux
Brecht Van Lommel
noreply at git.blender.org
Tue Apr 7 13:33:51 CEST 2020
Commit: aaaa0a43af1b40b9de31a737a055b3d2f62b6458
Author: Brecht Van Lommel
Date: Tue Apr 7 03:52:46 2020 +0200
Branches: master
https://developer.blender.org/rBaaaa0a43af1b40b9de31a737a055b3d2f62b6458
Build: use -no-pie for portable builds on Linux
Otherwise file browsers do not recognize the Blender executable. This is
already done for official releases.
We leave it off for non-portable builds, since that's how Linux distribution
packages will typically build Blender and we can continue to follow the OS
default there. Using a file browser to launch executables from e.g. /usr/bin
would be rare as wel.
Differential Revision: https://developer.blender.org/D7363
===================================================================
M build_files/cmake/platform/platform_unix.cmake
===================================================================
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index cd304d65eac..050ab8f3ba1 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -606,3 +606,10 @@ endif()
set(PLATFORM_LINKFLAGS
"${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'"
)
+
+# Don't use position independent executable for portable install since file
+# browsers can't properly detect blender as an executable then. Still enabled
+# for non-portable installs as typically used by Linux distributions.
+if(WITH_INSTALL_PORTABLE)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
+endif()
More information about the Bf-blender-cvs
mailing list