qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH for-6.1] configure: Fix endianess test with LTO


From: Richard Henderson
Subject: Re: [PATCH for-6.1] configure: Fix endianess test with LTO
Date: Thu, 15 Jul 2021 08:40:23 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 7/15/21 1:39 AM, Thomas Huth wrote:
If a user is trying to compile QEMU with link-time optimization
enabled by running the configure script like this:

  .../configure --extra-cflags="-flto"

then the endianess test is failing since the magic values do not
show up in the intermediate object files there. If the host is
a big endian machine (like s390x), the QEMU binary is then unusable
since the corresponding variable "bigendian" is pre-initialized
with "no".

To fix this issue, we should rather create a full binary and look
for the magic strings there instead.
And we really should not continue the build if the endianess check
failed, to make it clear right from the start that something went
wrong here, thus let's also add some "exit 1" statements here
after emitting the error message.

Signed-off-by: Thomas Huth<thuth@redhat.com>
---
  configure | 15 +++++++++------
  1 file changed, 9 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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