File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -476,7 +476,16 @@ else()
476476 # Don't set _FORTIFY_SOURCE in debug builds.
477477 endif ()
478478
479- try_c_cxx_flag (FPIC "-fPIC" )
479+ if (NOT NACL)
480+ # Saigo reports weird errors when building some cgame and sgame arm nexe with PIC:
481+ # > error: Cannot represent a difference across sections
482+ # > error: expected relocatable expression
483+ # Google-built Saigo crashes when building amd64 cgame with PIC:
484+ # > UNREACHABLE executed at llvm/lib/Target/X86/X86ISelLowering.cpp
485+ # Self-built Saigo doesn't crash, maybe because assertions are disabled.
486+ # PIC is not useful with NaCl under any circumstances, so we don't use PIC with NaCl.
487+ try_c_cxx_flag (FPIC "-fPIC" )
488+ endif ()
480489
481490 if (USE_HARDENING)
482491 # PNaCl accepts the flags but does not define __stack_chk_guard and __stack_chk_fail.
You can’t perform that action at this time.
0 commit comments