Skip to content

Commit 29fdd29

Browse files
committed
DaemonFlags: disable -fPIC on armhf with Saigo
1 parent a6e96b5 commit 29fdd29

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmake/DaemonFlags.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,12 @@ else()
476476
# Don't set _FORTIFY_SOURCE in debug builds.
477477
endif()
478478

479-
try_c_cxx_flag(FPIC "-fPIC")
479+
if (USE_NACL_SAIGO AND "${NACL_TARGET}" STREQUAL "armhf")
480+
# We hit a Saigo bug if we use -fPIC when building an arm nexe:
481+
# > error: Cannot represent a difference across sections
482+
else()
483+
try_c_cxx_flag(FPIC "-fPIC")
484+
endif()
480485

481486
if (USE_HARDENING)
482487
# PNaCl accepts the flags but does not define __stack_chk_guard and __stack_chk_fail.

0 commit comments

Comments
 (0)