Bug 99458 - libgo doesn't build against latest glibc
Summary: libgo doesn't build against latest glibc
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-08 09:16 UTC by Jakub Jelinek
Modified: 2021-03-09 00:24 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2021-03-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2021-03-08 09:16:02 UTC
As mentioned already in PR99264 which is now fixed, latest glibc changed the MINSIGSTKSZ and SIGSTKSZ macros so that they are no longer compile time constants.
This seems to break libgo build (got that when building the 32-bit libgo on x86_64 e.g.):
../../../../libgo/runtime/proc.c: In function 'runtime_malg':
../../../../libgo/runtime/proc.c:805:38: error: comparison of integer expressions of different signedness: 'uintptr' {aka 'unsigned int'} and 'long int' [-Werror=sign-compare]
  805 |                         if(stacksize < SIGSTKSZ)
      |                                      ^
Guess SIGSTKSZ should be cast to (uintptr).
Comment 1 CVS Commits 2021-03-09 00:16:28 UTC
The releases/gcc-9 branch has been updated by Ian Lance Taylor <ian@gcc.gnu.org>:

https://gcc.gnu.org/g:1a543ca52392b7aea135f47ac244485fcea0d267

commit r9-9275-g1a543ca52392b7aea135f47ac244485fcea0d267
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Mar 8 15:24:06 2021 -0800

    runtime: cast SIGSTKSZ to uintptr
    
            PR go/99458
            * libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
            In newer versions of glibc it is long, which causes a signed
            comparison warning.
Comment 2 CVS Commits 2021-03-09 00:17:22 UTC
The releases/gcc-10 branch has been updated by Ian Lance Taylor <ian@gcc.gnu.org>:

https://gcc.gnu.org/g:3c8e29c81b789db8a49616e0d36d16f869cf442a

commit r10-9424-g3c8e29c81b789db8a49616e0d36d16f869cf442a
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Mar 8 15:23:40 2021 -0800

    runtime: cast SIGSTKSZ to uintptr
    
            PR go/99458
            * libgo/runtime/proc.c: cast SIGSTKSZ to uintptr
            In newer versions of glibc it is long, which causes a signed
            comparison warning.
Comment 3 CVS Commits 2021-03-09 00:23:50 UTC
The master branch has been updated by Ian Lance Taylor <ian@gcc.gnu.org>:

https://gcc.gnu.org/g:d5d3f15a0e04c30d5dbec09b56c14ad923a3e8da

commit r11-7569-gd5d3f15a0e04c30d5dbec09b56c14ad923a3e8da
Author: Ian Lance Taylor <iant@golang.org>
Date:   Mon Mar 8 13:58:14 2021 -0800

    runtime: cast SIGSTKSZ to uintptr
    
    In newer versions of glibc it is long, which causes a signed
    comparison warning.
    
    Fixes PR go/99458
Comment 4 Ian Lance Taylor 2021-03-09 00:24:25 UTC
Fixed, I hope.