This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Go 1.3 update broke Solaris bootstrap


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]