x86: correct usage of CFLAGS_NON_EFI
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>
This commit is contained in:
parent
1b8897c63e
commit
1598c83ece
|
@ -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 \
|
OBJCOPYFLAGS_EFI := -j .text -j .sdata -j .data -j .dynamic -j .dynsym \
|
||||||
-j .rel -j .rela -j .reloc
|
-j .rel -j .rela -j .reloc
|
||||||
|
|
||||||
ifeq ($(IS_32BIT),y)
|
# Compiler flags to be added when building UEFI applications
|
||||||
CFLAGS_NON_EFI := -mregparm=3
|
|
||||||
endif
|
|
||||||
CFLAGS_EFI := -fpic -fshort-wchar
|
CFLAGS_EFI := -fpic -fshort-wchar
|
||||||
|
# Compiler flags to be removed when building UEFI applications
|
||||||
|
CFLAGS_NON_EFI := -mregparm=3
|
||||||
|
|
||||||
ifeq ($(CONFIG_EFI_STUB_64BIT),)
|
ifeq ($(CONFIG_EFI_STUB_64BIT),)
|
||||||
CFLAGS_EFI += $(call cc-option, -mno-red-zone)
|
CFLAGS_EFI += $(call cc-option, -mno-red-zone)
|
||||||
|
@ -70,7 +70,9 @@ LDSCRIPT := $(LDSCRIPT_EFI)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
PLATFORM_CPPFLAGS += $(CFLAGS_NON_EFI)
|
ifeq ($(IS_32BIT),y)
|
||||||
|
PLATFORM_CPPFLAGS += -mregparm=3
|
||||||
|
endif
|
||||||
KBUILD_LDFLAGS += --emit-relocs
|
KBUILD_LDFLAGS += --emit-relocs
|
||||||
LDFLAGS_FINAL += --gc-sections $(if $(CONFIG_SPL_BUILD),,-pie)
|
LDFLAGS_FINAL += --gc-sections $(if $(CONFIG_SPL_BUILD),,-pie)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue