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: Peter Maydell
Subject: Re: [PATCH v1 6/6] tests/i386/test-i386: try and correct constrain 16 bit call (WIP)
Date: Tue, 30 Mar 2021 20:46:17 +0000

On Tue, 30 Mar 2021 at 21:27, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 3/30/21 12:20 PM, Alex Bennée wrote:
> > 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.
>
> The difference, I'm sure, is a local distro patch enabling -fpie by default.
>
> I'm hoping that we can just use
>
> --- a/tests/tcg/i386/Makefile.target
> +++ b/tests/tcg/i386/Makefile.target
> @@ -10,6 +10,9 @@ ALL_X86_TESTS=$(I386_SRCS:.c=)
>   SKIP_I386_TESTS=test-i386-ssse3
>   X86_64_TESTS:=$(filter test-i386-ssse3, $(ALL_X86_TESTS))
>
> +# test-i386 has non-pic calls into 16-bit mode
> +test-i386: CFLAGS += -fno-pie
> +
>   test-i386-sse-exceptions: CFLAGS += -msse4.1 -mfpmath=sse
>   run-test-i386-sse-exceptions: QEMU_OPTS += -cpu max
>   run-plugin-test-i386-sse-exceptions-%: QEMU_OPTS += -cpu max

configure will set CFLAGS_NOPIE in config-host.mak, but I don't know
if you have access to that here. (It does suggest that there are cases
where -fno-pie isn't available, though I guess they might be non-x86.)

-- PMM



reply via email to

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