* libgo patch committed: Cast SIGSTKSZ to uintptr
@ 2021-03-09 0:24 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2021-03-09 0:24 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
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
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 920 bytes --]
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
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-09 0:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 0:24 libgo patch committed: Cast SIGSTKSZ to uintptr Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).