Re: Build from 9.3-RELEASE to 11.0-CURRENT fails for i386 (-Wsign-compare issues with gcc)

From: Garrett Cooper <yaneurabeya_at_gmail.com>
Date: Tue, 22 Dec 2015 10:27:40 -0800
> On Dec 22, 2015, at 08:23, John Baldwin <jhb_at_freebsd.org> wrote:
> 
>> On Monday, December 21, 2015 11:01:36 AM John Baldwin wrote:
>>> On Saturday, December 19, 2015 01:05:36 PM NGie Cooper wrote:
>>> Hi John,
>>>    I tried bootstrapping 9.3-RELEASE to 11.0-CURRENT with i386 and ran into the -Wsign-compare issue below when running make libraries with buildworld, because itfs building libkvm with gcc 4.2.1 :/c Ifve tried bootstrapping with clang/clang37, but havenft been able to yet. Ifll try installing 10.2-RELEASE via freebsd-update so I can use clang instead of gcc.
>>> Thanks!
>>> -NGie
>> 
>> We don't actually support going from 9 to 11.  However, these constants
>> should probably be explicitly unsigned anyway.  I haven't tested this at
>> all, but something like this:
>> 
>> Index: head/lib/libkvm/kvm_i386.h
>> ===================================================================
>> --- head/lib/libkvm/kvm_i386.h  (revision 292553)
>> +++ head/lib/libkvm/kvm_i386.h  (working copy)
>> _at__at_ -57,8 +57,8 _at__at_
>> #define        I386_PG_PS              0x080
>> #define        I386_PG_FRAME_PAE       (0x000ffffffffff000ull)
>> #define        I386_PG_PS_FRAME_PAE    (0x000fffffffe00000ull)
>> -#define        I386_PG_FRAME           (0xfffff000)
>> -#define        I386_PG_PS_FRAME        (0xffc00000)
>> +#define        I386_PG_FRAME           (0xfffff000u)
>> +#define        I386_PG_PS_FRAME        (0xffc00000u)
>> 
>> #ifdef __i386__
>> _Static_assert(PAGE_SHIFT == I386_PAGE_SHIFT, "PAGE_SHIFT mismatch");
> 
> This passed a universe build on HEAD.  If you can test that it fixes the 9.3 -> 11.0
> bootstrap I will commit it.

I'll fire up a 9.3 VM and give it a shot.
Thanks :)!!
-NGie
Received on Tue Dec 22 2015 - 17:27:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC