This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Go 1.3 update broke Solaris bootstrap
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev\ at googlegroups dot com" <gofrontend-dev at googlegroups dot com>
- Date: Tue, 05 Aug 2014 13:39:02 +0200
- Subject: Re: Go 1.3 update broke Solaris bootstrap
- Authentication-results: sourceware.org; auth=none
- References: <yddr41du7x3 dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <CAKOQZ8wqUKuoasn=tGcGPJTahGPuh_t4-uoTGjrYnNSoWZLyJA at mail dot gmail dot com>
Hi Ian,
> On Tue, Jul 22, 2014 at 1:14 AM, Rainer Orth
> <ro@cebitec.uni-bielefeld.de> wrote:
>> The recent Go 1.3 update (which I couldn't find posted to gcc-patches)
>> broke Solaris bootstrap:
>>
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:50:20: error: pointer targets in passing argument 1 of 'mincore' differ in signedness [-Werror=pointer-sign]
>> errval = mincore((int8*)v + off, chunk, vec);
>> ^
>> In file included from /vol/gcc/src/hg/trunk/local/libgo/runtime/runtime.h:22:0,
>> from /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:8:
>> /usr/include/sys/mman.h:232:12: note: expected 'caddr_t' but argument is of type 'int8 *'
>> extern int mincore(caddr_t, size_t, char *);
>> ^
>> /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:50:43: error: pointer targets in passing argument 3 of 'mincore' differ in signedness [-Werror=pointer-sign]
>> errval = mincore((int8*)v + off, chunk, vec);
>> ^
>> In file included from /vol/gcc/src/hg/trunk/local/libgo/runtime/runtime.h:22:0,
>> from /vol/gcc/src/hg/trunk/local/libgo/runtime/mem.c:8:
>> /usr/include/sys/mman.h:232:12: note: expected 'char *' but argument is of type 'byte *'
>> extern int mincore(caddr_t, size_t, char *);
>> ^
>>
>> The following patch restores it, though there are certainly other
>> options (uint8* for the v cast, a void* cast for vec).
>
> Thanks. I had to adjust your patch to work on GNU/Linux, for which
> the third argument to mincore is unsigned char *. This is what I've
> committed to mainline after a bootstrap and testsuite run on
> x86_64-unknown-linux-gnu.
Thanks. This is exactly the patch I had in my local tree once I noticed
the original one broke Linux bootstrap.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University