Re: [kvm-unit-tests PATCH 1/7] x86: Makefile: Allow division on x86_64-elf binutils

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/08/2020 19.30, Roman Bolshakov wrote:
> On Fri, Aug 28, 2020 at 07:00:19AM +0200, Thomas Huth wrote:
>> On 10/08/2020 15.06, Roman Bolshakov wrote:
>>> +
>>> +COMMON_CFLAGS += -Wa,--divide
>>
>> Some weeks ago, I also played with an elf cross compiler and came to the
>> same conclusion, that we need this option there. Unfortunately, it does
>> not work with clang:
>>
>>  https://gitlab.com/huth/kvm-unit-tests/-/jobs/707986800#L1629
>>
>> You could try to wrap it with "cc-option" instead ... or use a proper
>> check in the configure script to detect whether it's needed or not.
>>
> 
> Hi Thomas,
> 
> I've wrapped it but clang can't deal with another option:
> -Woverride-init
> 
> Even if I wrap it with cc-option and add wrapped clang's
> -Winitializer-overrides, the build fails with:
> 
> x86/vmexit.c:577:5: error: no previous prototype for function 'main'
>       [-Werror,-Wmissing-prototypes]
> int main(int ac, char **av)
>     ^
> 1 error generated.
> <builtin>: recipe for target 'x86/vmexit.o' failed
> 
> I'm puzzled with this one.
> 
> CI log (ubuntu focal + clang 10):
> https://travis-ci.com/github/roolebo/kvm-unit-tests/jobs/379561410
> 
> Now I wonder if wrong clang is used... Perhaps I should try
> --cc=clang-10 in .travis.yml instead of --cc=clang.

 Hi Roman,

yes, if you see the "no previous prototype for function 'main'" warning,
your Clang is too old, you really need the latest and greatest version
for the kvm-unit-tests. IIRC version 10 should be fine.

 Thomas




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux