From: Laurent Vivier <lvivier@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, thuth@redhat.com,
dgibson@redhat.com, agraf@suse.de, pbonzini@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 2/2] powerpc: select endianness
Date: Mon, 29 Feb 2016 17:53:13 +0000 [thread overview]
Message-ID: <56D48589.3080202@redhat.com> (raw)
In-Reply-To: <20160226184502.35oadt5jw2ck46la@hawk.localdomain>
On 26/02/2016 19:45, Andrew Jones wrote:
...
>> diff --git a/powerpc/Makefile.common b/powerpc/Makefile.common
>> > index cc27ac8..b088af6 100644
>> > --- a/powerpc/Makefile.common
>> > +++ b/powerpc/Makefile.common
>> > @@ -11,14 +11,15 @@ all: $(TEST_DIR)/boot_rom.bin test_cases
>> >
>> > ##################################################################
>> >
>> > -CFLAGS += $(arch_CFLAGS)
>> > -CFLAGS += -std=gnu99
>> > -CFLAGS += -ffreestanding
>> > -CFLAGS += -Wextra
>> > -CFLAGS += -O2
>> > -CFLAGS += -I lib -I lib/libfdt
>> > -CFLAGS += -Wa,-mregnames
>> > -CFLAGS += -fpie
>> > +common_CFLAGS = -std=gnu99
>> > +common_CFLAGS += -ffreestanding
>> > +common_CFLAGS += -Wextra
>> > +common_CFLAGS += -O2
>> > +common_CFLAGS += -I lib -I lib/libfdt
>> > +common_CFLAGS += -Wa,-mregnames
>> > +common_CFLAGS += -fpie
>> > +
>> > +CFLAGS += $(arch_CFLAGS) $(common_CFLAGS)
> I'm not sure what we gain by renaming to common_CFLAGS. Doesn't just
>
> %.elf: CFLAGS += $(arch_CFLAGS)
>
> work?
>
>> >
>> > asm-offsets = lib/$(ARCH)/asm-offsets.h
>> > include scripts/asm-offsets.mak
>> > @@ -48,6 +49,7 @@ $(TEST_DIR)/boot_rom.bin: $(TEST_DIR)/boot_rom.elf
>> > dd if=/dev/zero of=$@ bs%6 count=1
>> > $(OBJCOPY) -O binary $^ >(cat - >>$@)
>> >
>> > +$(TEST_DIR)/boot_rom.elf: CFLAGS = -mbig-endian $(common_CFLAGS) $(main_CFLAGS)
> And just
> $(TEST_DIR)/boot_rom.elf: CFLAGS += -mbig-endian
>
We can't do that because boot_rom.elf is also a .elf, so the both rules
apply and we end up with in the case of boot_rom.elf (and --endian=little):
CFLAGS += -mlittle-endian -mbig-endian
and it doesn't work. We must overwrite CFLAGS in the case of boot_rom.elf.
But boot_rom.S is a one line of assembly language, we don't need the
other flags, in fact...
Laurent
prev parent reply other threads:[~2016-02-29 17:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 17:08 [kvm-unit-tests PATCH v2 0/2] powerpc: add little-endian support Laurent Vivier
2016-02-26 17:08 ` [kvm-unit-tests PATCH v2 1/2] powerpc: allow to build big-endian binaries on little-endian host Laurent Vivier
2016-02-26 17:41 ` Andrew Jones
2016-02-26 17:42 ` Andrew Jones
2019-05-15 0:28 ` [kvm-unit-tests PATCH v2 1/2] powerpc: Allow for a custom decr value to be specified to load on decr Suraj Jitindar Singh
2019-05-15 0:28 ` [kvm-unit-tests PATCH v2 2/2] powerpc: Make h_cede_tm test run by default Suraj Jitindar Singh
2019-05-15 16:25 ` Laurent Vivier
2019-05-17 10:13 ` Thomas Huth
2019-05-15 16:22 ` [kvm-unit-tests PATCH v2 1/2] powerpc: Allow for a custom decr value to be specified to load on Laurent Vivier
2019-05-15 23:27 ` Suraj Jitindar Singh
2019-05-17 10:20 ` Thomas Huth
2016-02-26 17:08 ` [kvm-unit-tests PATCH v2 2/2] powerpc: select endianness Laurent Vivier
2016-02-26 18:45 ` Andrew Jones
2016-02-29 13:24 ` Laurent Vivier
2016-02-29 16:06 ` Paolo Bonzini
2016-02-29 16:44 ` Laurent Vivier
2016-02-29 17:53 ` Laurent Vivier [this message]
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=56D48589.3080202@redhat.com \
--to=lvivier@redhat.com \
--cc=agraf@suse.de \
--cc=dgibson@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=thuth@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