gollvm: add a check for the existence of strsignal()

Signame() checks for HAVE_STRSIGNAL but the current
implementation never defines it. This change adds a
check for strsignal() existence to cmake rules.

Updates golang/go#51648

Change-Id: I404e6e6903ae31fdcceafecfae77ac5993549c03
Reviewed-on: https://go-review.googlesource.com/c/gollvm/+/394474
Reviewed-by: Than McIntosh <thanm@google.com>
Trust: Martin Möhrmann <martin@golang.org>
diff --git a/cmake/modules/ConfigSetup.cmake b/cmake/modules/ConfigSetup.cmake
index 0c220e2..266e3a3 100644
--- a/cmake/modules/ConfigSetup.cmake
+++ b/cmake/modules/ConfigSetup.cmake
@@ -61,6 +61,7 @@
 check_symbol_exists(mknodat "sys/types.h;sys/stat.h;fcntl.h;unistd.h" HAVE_MKNODAT)
 check_symbol_exists(pipe2 "unistd.h" HAVE_PIPE2)
 check_symbol_exists(memmem "string.h" HAVE_MEMMEM)
+check_symbol_exists(strsignal "string.h" HAVE_STRSIGNAL)
 
 # Checks for include files
 check_include_file(dlfcn.h HAVE_DLFCN_H)
diff --git a/libgo/config.h.cmake b/libgo/config.h.cmake
index 354c5e3..150937e 100644
--- a/libgo/config.h.cmake
+++ b/libgo/config.h.cmake
@@ -159,4 +159,7 @@
 /* Define to 1 if _Unwind_GetIPInfo is available. */
 #cmakedefine HAVE_GETIPINFO 1
 
+/* Define to 1 if you have the `strsignal' function. */
+#cmakedefine HAVE_STRSIGNAL 1
+
 #endif