Message ID | 20250314154904.3946484-5-jean-philippe@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arm64: Change the default QEMU CPU type to "max" | expand |
On 3/14/25 4:49 PM, Jean-Philippe Brucker wrote: > From: Alexandru Elisei <alexandru.elisei@arm.com> > > The help text for the ./configure --processor option says: > > --processor=PROCESSOR processor to compile for (cortex-a57) > > but, unlike arm, the build system does not pass a -mcpu argument to the > compiler. Fix it, and bring arm64 at parity with arm. > > Note that this introduces a regression, which is also present on arm: if > the --processor argument is something that the compiler doesn't understand, > but qemu does (like 'max'), then compilation fails. This will be fixed in a > following patch; another fix is to specify a CPU model that gcc implements > by using --cflags=-mcpu=<cpu>. > > Reviewed-by: Andrew Jones <andrew.jones@linux.dev> > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Eric > --- > arm/Makefile.arm | 1 - > arm/Makefile.common | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arm/Makefile.arm b/arm/Makefile.arm > index 7fd39f3a..d6250b7f 100644 > --- a/arm/Makefile.arm > +++ b/arm/Makefile.arm > @@ -12,7 +12,6 @@ $(error Cannot build arm32 tests as EFI apps) > endif > > CFLAGS += $(machine) > -CFLAGS += -mcpu=$(PROCESSOR) > CFLAGS += -mno-unaligned-access > > ifeq ($(TARGET),qemu) > diff --git a/arm/Makefile.common b/arm/Makefile.common > index f828dbe0..a5d97bcf 100644 > --- a/arm/Makefile.common > +++ b/arm/Makefile.common > @@ -25,6 +25,7 @@ AUXFLAGS ?= 0x0 > # stack.o relies on frame pointers. > KEEP_FRAME_POINTER := y > > +CFLAGS += -mcpu=$(PROCESSOR) > CFLAGS += -std=gnu99 > CFLAGS += -ffreestanding > CFLAGS += -O2
diff --git a/arm/Makefile.arm b/arm/Makefile.arm index 7fd39f3a..d6250b7f 100644 --- a/arm/Makefile.arm +++ b/arm/Makefile.arm @@ -12,7 +12,6 @@ $(error Cannot build arm32 tests as EFI apps) endif CFLAGS += $(machine) -CFLAGS += -mcpu=$(PROCESSOR) CFLAGS += -mno-unaligned-access ifeq ($(TARGET),qemu) diff --git a/arm/Makefile.common b/arm/Makefile.common index f828dbe0..a5d97bcf 100644 --- a/arm/Makefile.common +++ b/arm/Makefile.common @@ -25,6 +25,7 @@ AUXFLAGS ?= 0x0 # stack.o relies on frame pointers. KEEP_FRAME_POINTER := y +CFLAGS += -mcpu=$(PROCESSOR) CFLAGS += -std=gnu99 CFLAGS += -ffreestanding CFLAGS += -O2