[Bf-blender-cvs] [84032fd1108] master: GMP/macOS: silence "PIE disabled" linker warning.
Ankit
noreply at git.blender.org
Tue Sep 15 22:35:56 CEST 2020
Commit: 84032fd1108b29d270e51d890f0303f78b6962c2
Author: Ankit
Date: Wed Sep 16 02:02:45 2020 +0530
Branches: master
https://developer.blender.org/rB84032fd1108b29d270e51d890f0303f78b6962c2
GMP/macOS: silence "PIE disabled" linker warning.
The change builds GMP with `--with-pic` flag on non-arm architecture.
The warning:
ld: warning: PIE disabled. Absolute addressing
(perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in
___gmpn_divexact_1 from lib/darwin/gmp/lib/libgmp.a(dive_1.o). To fix
this warning, don't compile with -mdynamic-no-pic or link with
-Wl,-no_pie
Reviewed By: sebbas
Differential Revision: https://developer.blender.org/D8823
===================================================================
M build_files/build_environment/cmake/gmp.cmake
===================================================================
diff --git a/build_files/build_environment/cmake/gmp.cmake b/build_files/build_environment/cmake/gmp.cmake
index 16d2611ee12..f34ee95c6e3 100644
--- a/build_files/build_environment/cmake/gmp.cmake
+++ b/build_files/build_environment/cmake/gmp.cmake
@@ -25,11 +25,18 @@ else()
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
-if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64"))
- set(GMP_OPTIONS
- ${GMP_OPTIONS}
- --disable-assembly
- )
+if(APPLE)
+ if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
+ set(GMP_OPTIONS
+ ${GMP_OPTIONS}
+ --disable-assembly
+ )
+ else()
+ set(GMP_OPTIONS
+ ${GMP_OPTIONS}
+ --with-pic
+ )
+ endif()
endif()
ExternalProject_Add(external_gmp
More information about the Bf-blender-cvs
mailing list