From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH v10 2/3] x86: correct usage of CFLAGS_NON_EFI
Date: Sun, 11 Apr 2021 11:21:57 +0200 [thread overview]
Message-ID: <20210411092158.5244-3-xypron.glpk@gmx.de> (raw)
In-Reply-To: <20210411092158.5244-1-xypron.glpk@gmx.de>
The current usage of the variable CFLAGS_NON_EFI on the x86 architecture
deviates from other architectures.
Variable CFLAGS_NON_EFI is the list of compiler flags to be removed when
building UEFI applications. It is not a list of flags to be added anywhere.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
v10:
new patch
---
arch/x86/config.mk | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 27d8412661..3067702858 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -39,10 +39,10 @@ LDFLAGS_EFI_PAYLOAD := -Bsymbolic -Bsymbolic-functions -shared --no-undefined -s
OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
-j .rel -j .rela -j .reloc
-ifeq ($(IS_32BIT),y)
-CFLAGS_NON_EFI := -mregparm=3
-endif
+# Compiler flags to be added when building UEFI applications
CFLAGS_EFI := -fpic -fshort-wchar
+# Compiler flags to be removed when building UEFI applications
+CFLAGS_NON_EFI := -mregparm=3
ifeq ($(CONFIG_EFI_STUB_64BIT),)
CFLAGS_EFI += $(call cc-option, -mno-red-zone)
@@ -70,7 +70,9 @@ LDSCRIPT := $(LDSCRIPT_EFI)
else
-PLATFORM_CPPFLAGS += $(CFLAGS_NON_EFI)
+ifeq ($(IS_32BIT),y)
+PLATFORM_CPPFLAGS += -mregparm=3
+endif
KBUILD_LDFLAGS += --emit-relocs
LDFLAGS_FINAL += --gc-sections $(if $(CONFIG_SPL_BUILD),,-pie)
--
2.30.2
next prev parent reply other threads:[~2021-04-11 9:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-11 9:21 [PATCH v10 0/3] Add support for stack-protector Heinrich Schuchardt
2021-04-11 9:21 ` [PATCH v10 1/3] test: fix test/dm/regmap.c Heinrich Schuchardt
2021-04-14 19:38 ` Simon Glass
2021-04-20 14:21 ` Tom Rini
2021-04-11 9:21 ` Heinrich Schuchardt [this message]
2021-04-14 19:38 ` [PATCH v10 2/3] x86: correct usage of CFLAGS_NON_EFI Simon Glass
2021-04-20 14:21 ` Tom Rini
2021-04-11 9:21 ` [PATCH v10 3/3] Add support for stack-protector Heinrich Schuchardt
2021-04-20 14:22 ` Tom Rini
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=20210411092158.5244-3-xypron.glpk@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.