Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit <ankitm>2020-09-15 23:32:45 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-09-15 23:35:51 +0300
commit84032fd1108b29d270e51d890f0303f78b6962c2 (patch)
tree28ff08f33996839c49ad878401c34e0799450239 /build_files
parent8aab26b3b3761108bb21b872738f8d324c2f860f (diff)
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
Diffstat (limited to 'build_files')
-rw-r--r--build_files/build_environment/cmake/gmp.cmake17
1 files changed, 12 insertions, 5 deletions
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