qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] configure: Improve alias attribute check


From: Paolo Bonzini
Subject: Re: [PATCH v2] configure: Improve alias attribute check
Date: Sun, 21 Mar 2021 14:37:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 21/03/21 01:17, Gavin Shan wrote:
It's still possible that the wrong value is returned from the alias
of variable even if the program can be compiled without issue. This
improves the check by executing the binary to check the result.

If alias attribute can't be working properly, the @target_page in
exec-vary.c will always return zeroes when we have the following gcc
version and the combination of options "-O2 -flto=auto".

   # gcc --version
   gcc (GCC) 11.0.0 20210210 (Red Hat 11.0.0-0)

This abstracts the code from exec-vary.c and use it as indicator to
enable gcc alias attribute or not. The gcc alias attribute is disabled
for the cross-compiling case as the compiled binary isn't executable.

Signed-off-by: Gavin Shan <gshan@redhat.com>

NACK, let's first try to figure out a way to preserve the optimization without using aliases.

Paolo




reply via email to

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