Commit a241b4b0 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files
parent c24fdb36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -584,6 +584,7 @@ endmenu
menu "Hardware handling"
source "package/ccid/Config.in"
source "package/dtc/Config.in"
source "package/gnu-efi/Config.in"
source "package/lcdapi/Config.in"
source "package/libaio/Config.in"
source "package/libatasmart/Config.in"
+9 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_GNU_EFI
	bool "gnu-efi"
	depends on BR2_i386 || BR2_x86_64
	help
	  Develop EFI applications for IA-64 (IPF), IA-32 (x86), and
	  x86_64 platforms using the GNU toolchain and the EFI
	  development environment.

	  http://gnu-efi.sourceforge.net/
+53 −0
Original line number Diff line number Diff line
Allow CFLAGS/CPPFLAGS to be completed from the environment

Buildroot passes its own CPPFLAGS and CFLAGS in the environment, so
the CFLAGS += and CPPFLAGS += statements in gnu-efi Makefile have no
effect. Change these to override <VARIABLE> += so that they extend the
flags passed by Buildroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Index: b/Make.defaults
===================================================================
--- a/Make.defaults
+++ b/Make.defaults
@@ -83,25 +83,25 @@
                                && [ $(GCCMINOR) -ge "7" ] ) ) \
                         && echo 1)
 ifeq ($(GCCNEWENOUGH),1)
-  CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
+  override CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11
 endif
 
 # Arch-specific compilation flags
-CPPFLAGS += -DCONFIG_$(ARCH)
+override CPPFLAGS += -DCONFIG_$(ARCH)
 
 ifeq ($(ARCH),ia64)
-  CFLAGS += -mfixed-range=f32-f127
+  override CFLAGS += -mfixed-range=f32-f127
 endif
 
 ifeq ($(ARCH),ia32)
-  CFLAGS += -mno-mmx -mno-sse
+  override CFLAGS += -mno-mmx -mno-sse
   ifeq ($(HOSTARCH),x86_64)
     ARCH3264 = -m32
   endif
 endif
 
 ifeq ($(ARCH),x86_64)
-  CFLAGS += -mno-red-zone -mno-mmx -mno-sse
+  override CFLAGS += -mno-red-zone -mno-mmx -mno-sse
   ifeq ($(HOSTARCH),ia32)
     ARCH3264 = -m64
   endif
@@ -110,7 +110,7 @@
 # Generic compilation flags
 INCDIR  += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
            -I$(TOPDIR)/inc/protocol
-CFLAGS  += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
+override CFLAGS  += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
            -fno-merge-constants -ffreestanding -fno-stack-protector       \
            -fno-stack-check
 ASFLAGS += $(ARCH3264)
+48 −0
Original line number Diff line number Diff line
Fix parallel make failure for archives

Upstream-Status: Pending

The lib and gnuefi makefiles were using the lib.a() form which compiles
and ar's as a pair instead of compiling all and then ar'ing which can
parallelize better. This was resulting in build failures on larger values
of -j.

See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
for details.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
---
 gnuefi/Makefile |    3 ++-
 lib/Makefile    |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Index: gnu-efi-3.0/lib/Makefile
===================================================================
--- gnu-efi-3.0.orig/lib/Makefile
+++ gnu-efi-3.0/lib/Makefile
@@ -66,7 +66,8 @@ all: libsubdirs libefi.a
 libsubdirs:
 	for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
 
-libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
+libefi.a: $(OBJS)
+	$(AR) rv $@ $(OBJS)
 
 clean:
 	rm -f libefi.a *~ $(OBJS) */*.o
Index: gnu-efi-3.0/gnuefi/Makefile
===================================================================
--- gnu-efi-3.0.orig/gnuefi/Makefile
+++ gnu-efi-3.0/gnuefi/Makefile
@@ -51,7 +51,8 @@ TARGETS	= crt0-efi-$(ARCH).o libgnuefi.a
 
 all:	$(TARGETS)
 
-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
+libgnuefi.a: $(OBJS)
+	$(AR) rv $@ $(OBJS)
 
 clean:
 	rm -f $(TARGETS) *~ *.o $(OBJS)
+22 −0
Original line number Diff line number Diff line
Fix parallel make failure

Upstream-Status: Submitted [Maintainer directly]

Add a missing dependency which resulted in a race leading to failure
on larger values of -j.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>

Index: gnu-efi-3.0/Makefile
===================================================================
--- gnu-efi-3.0.orig/Makefile
+++ gnu-efi-3.0/Makefile
@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults
 
 SUBDIRS = lib gnuefi inc apps
 
+gnuefi: lib
+
 all:	check_gcc $(SUBDIRS)
 
 $(SUBDIRS):
Loading