File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -515,7 +515,7 @@ endif()
515515include (DaemonNacl)
516516if (NACL)
517517 add_library (srclibs-nacl-module EXCLUDE_FROM_ALL ${NACLLIST_MODULE} )
518- set_target_properties (srclibs-nacl-module PROPERTIES POSITION_INDEPENDENT_CODE 1 FOLDER "libs" )
518+ set_target_properties (srclibs-nacl-module PROPERTIES POSITION_INDEPENDENT_CODE ${GAME_PIE} FOLDER "libs" )
519519 set (LIBS_BASE ${LIBS_BASE} srclibs-nacl-module)
520520else ()
521521 add_library (srclibs-nacl-native EXCLUDE_FROM_ALL ${NACLLIST_NATIVE} )
@@ -643,7 +643,7 @@ if (BUILD_CLIENT OR BUILD_TTY_CLIENT OR BUILD_SERVER OR BUILD_DUMMY_APP OR NACL)
643643 find_package (ZLIB REQUIRED)
644644 else ()
645645 add_library (srclibs-zlib EXCLUDE_FROM_ALL ${ZLIBLIST} )
646- set_target_properties (srclibs-zlib PROPERTIES POSITION_INDEPENDENT_CODE 1 FOLDER "libs" )
646+ set_target_properties (srclibs-zlib PROPERTIES POSITION_INDEPENDENT_CODE ${GAME_PIE} FOLDER "libs" )
647647 set (ZLIB_INCLUDE_DIRS ${LIB_DIR} /zlib)
648648 set (ZLIB_LIBRARIES srclibs-zlib)
649649 endif ()
Original file line number Diff line number Diff line change @@ -40,4 +40,17 @@ else()
4040 message ( FATAL_ERROR "Platform not supported" )
4141endif ()
4242
43+ if (USE_NACL_SAIGO)
44+ # Saigo clang reports weird errors when building some cgame and sgame arm nexe with PIE.
45+ # Saigo clang crashes when building amd64 cgame with PIE, sgame builds properly though.
46+ if (NACL_TARGET STREQUAL "armhf" OR NACL_TARGET STREQUAL "amd64" )
47+ set (GAME_PIE 0)
48+ else ()
49+ set (GAME_PIE 1)
50+ endif ()
51+ else ()
52+ set (GAME_PIE 1)
53+ endif ()
54+
55+
4356include (DaemonArchitecture)
You can’t perform that action at this time.
0 commit comments