From: Thomas Huth <thuth@redhat.com>
To: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <drjones@redhat.com>
Cc: dgilbert@redhat.com
Subject: Re: [kvm-unit-tests PATCH] Always compile the kvm-unit-tests with -fno-common
Date: Wed, 13 May 2020 12:11:39 +0200 [thread overview]
Message-ID: <d1fa1aae-f648-f734-e7e4-82deb8a60db6@redhat.com> (raw)
In-Reply-To: <a87824f4-354a-3fb8-f91d-501e2fc5ece4@redhat.com>
On 13/05/2020 12.05, Thomas Huth wrote:
> On 12/05/2020 11.55, Thomas Huth wrote:
>> The new GCC v10 uses -fno-common by default. To avoid that we commit
>> code that declares global variables twice and thus fails to link with
>> the latest version, we should also compile with -fno-common when using
>> older versions of the compiler.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 754ed65..3ff2f91 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -49,7 +49,7 @@ include $(SRCDIR)/$(TEST_DIR)/Makefile
>> cc-option = $(shell if $(CC) -Werror $(1) -S -o /dev/null -xc /dev/null \
>> > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
>>
>> -COMMON_CFLAGS += -g $(autodepend-flags) -fno-strict-aliasing
>> +COMMON_CFLAGS += -g $(autodepend-flags) -fno-strict-aliasing -fno-common
>
> Oh, wait, this breaks the non-x86 builds due to "extern-less" struct
> auxinfo auxinfo in libauxinfo.h !
> Drew, why isn't this declared in auxinfo.c instead?
Oh well, it's there ... so we're playing tricks with the linker here? I
guess adding a "__attribute__((common, weak))" to auxinfo.h will be ok
to fix this issue?
Thomas
next prev parent reply other threads:[~2020-05-13 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 9:55 [kvm-unit-tests PATCH] Always compile the kvm-unit-tests with -fno-common Thomas Huth
2020-05-13 10:05 ` Thomas Huth
2020-05-13 10:11 ` Thomas Huth [this message]
2020-05-14 7:33 ` Andrew Jones
2020-05-14 7:37 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d1fa1aae-f648-f734-e7e4-82deb8a60db6@redhat.com \
--to=thuth@redhat.com \
--cc=dgilbert@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).