commit | 4d3887e18ceab5aeef5a68312a45bc81fcf0a3d3 | [log] [tgz] |
---|---|---|
author | erifan01 <eric.fang@arm.com> | Wed Jul 01 14:15:30 2020 +0800 |
committer | Than McIntosh <thanm@google.com> | Wed Jul 01 11:49:14 2020 +0000 |
tree | 653a32b2cd00551debacb08d718b36f2404e9195 | |
parent | 2ded6bda488a60445d1962f579baba03985b7a31 [diff] |
gollvm: add the missing setting of -fcf-protection=none CL 232742 added a workaround for the upstream bug https://sourceware.org/bugzilla/show_bug.cgi?id=25921 by adding -fcf-protection=none c/cxx flag. But this setting seems to have been omitted. This CL adds it. Fixes golang/go#38728. Change-Id: Iabfd4c245fddbf34e2a0c424105c79563d1c0a27 Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/240637 Reviewed-by: Than McIntosh <thanm@google.com>
diff --git a/cmake/modules/AddGollvm.cmake b/cmake/modules/AddGollvm.cmake index 16c6e4f..9539ee0 100644 --- a/cmake/modules/AddGollvm.cmake +++ b/cmake/modules/AddGollvm.cmake
@@ -56,6 +56,7 @@ check_c_source_compiles("#include<stdio.h>\nint main(){printf(\"hello\");\nreturn 0;}" SPLIT_STACK_WORKAROUND) if(SPLIT_STACK_WORKAROUND) message(STATUS "applying -fcf-protection=none workaround") + add_compile_options(-fcf-protection=none) set(C_SUPPORTS_SPLIT_STACK 1) endif() endif()