gollvm: restore __sync_bool_compare_and_swap_4 cmake setup

Restore the code that checks for __sync_bool_compare_and_swap_4 at
config time (this was incorrectly removed in CL 160838). While
this function isn't used in libgo now, it is still needed for
libbacktrace.

Change-Id: I5e12c32561cc80a6ab24fe441d255114632d31c5
Reviewed-on: https://go-review.googlesource.com/c/161660
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/cmake/modules/ConfigSetup.cmake b/cmake/modules/ConfigSetup.cmake
index b6171ca..259cf86 100644
--- a/cmake/modules/ConfigSetup.cmake
+++ b/cmake/modules/ConfigSetup.cmake
@@ -127,6 +127,7 @@
 check_function_exists(alloca HAVE_ALLOCA)
 check_function_exists(memcpy HAVE_MEMCPY)
 
+check_c_source_compiles("int main(int argc, char **argv) { return __sync_bool_compare_and_swap(&argc, argc, -argc) ? 1 : 0; }\n" HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4)
 check_c_source_compiles("#include <stdint.h>\nstatic uint64_t s;\nint main(int argc, char **argv) { return __sync_bool_compare_and_swap(&s, argc, -argc) ? 0 : 1; }\n" HAVE_SYNC_BOOL_COMPARE_AND_SWAP_8)
 
 check_c_source_compiles("int main() { __asm__(\"aesenc %xmm0, %xmm1\"); return 0; }\n" HAVE_AS_X86_AES)