This libgo patch casts SIGSTKSZ to uintptr before comparing it to a
uintptr value.  This fixes build failures with newer versions of glibc
in which SIGSTKSZ has changed such that the type is now long.  The
build failure is a signed-unsigned comparison warning that turns into
an error due to -Werror.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline and GCC 9 and 10 branches.

Ian
d03d1688cebc0985aac189bcf6f46089044056ad
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 5c9fc7db4e1..5b45f03a26e 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-2c5188b5ad6143e791f2ba42f02a4ea7887d87b6
+93380a9126e76b71fa208e62c31c7914084c0e37
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index c037df645b9..38bf7a6b255 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -802,8 +802,8 @@ runtime_malg(bool allocatestack, bool signalstack, byte** 
ret_stack, uintptr* re
                if(signalstack) {
                        stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux 
>= 2K
 #ifdef SIGSTKSZ
-                       if(stacksize < SIGSTKSZ)
-                               stacksize = SIGSTKSZ;
+                       if(stacksize < (uintptr)(SIGSTKSZ))
+                               stacksize = (uintptr)(SIGSTKSZ);
 #endif
                }
 

Reply via email to