qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 6/6] tests/i386/test-i386: try and correct constrain 16 bi


From: Alex Bennée
Subject: Re: [PATCH v1 6/6] tests/i386/test-i386: try and correct constrain 16 bit call (WIP)
Date: Tue, 30 Mar 2021 18:20:49 +0000

Hmm actually the fedora-i386-cross image is:

  gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9)

with CROSS_CC_GUEST_CFLAGS=-m32 so I wonder what the difference is
between that and:

  i686-linux-gnu-gcc -m32

i686-linux-gnu-gcc --version
i686-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

They are both pretty new.

On Tue, 30 Mar 2021 at 16:58, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 3/29/21 5:03 AM, Alex Bennée wrote:
> > Newer compilers complain about non-matching constraints:
> >
> >    test-i386.c:1393:5: error: asm operand 2 probably doesn’t match 
> > constraints [-Werror]
> >     1393 |     asm volatile ("lcall %1, %2"
> >          |     ^~~
>
> The problem is that the newer compiler is defaulting to -fpie, so 
> &code16_func1
> is not a constant.
>
> Need to add -fno-pie to compile this.  Which of course adds the confusion of
> old compilers that don't support that.  We have CFLAGS_NOPIE in configure, but
> that doesn't directly help cross-compile.
>
>
> r~



-- 
Alex Bennée
KVM/QEMU Hacker for Linaro



reply via email to

[Prev in Thread] Current Thread [Next in Thread]