summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2015-05-12 13:52:22 -0400
committerPeter Jones <pjones@redhat.com>2015-05-12 13:52:22 -0400
commit80bcb5782352a44fdda0d431e463f977db33d4fb (patch)
treef2a8485628148065f602584b2fce72008b702797
parentf3653b08a475372a0849cd9a3387a5997ce121c9 (diff)
downloadefi-boot-shim-80bcb5782352a44fdda0d431e463f977db33d4fb.tar.gz
efi-boot-shim-80bcb5782352a44fdda0d431e463f977db33d4fb.zip
Make the build failed with objcopy < 2.24
The wildcard support was introduced in objcopy since binutils 2.24. However, objcopy < 2.24 never issues any warning message with the wildcard and a faulty binary will be generated. This commit makes the build failed as a notification for the usage of binutils < 2.24. Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index dee3a858..83cf374a 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
ARCH = $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
+OBJCOPY_GTE224 = $(shell expr `$(OBJCOPY) --version |grep ^"GNU objcopy" | sed 's/^.* //g' | cut -f1-2 -d.` \>= 2.24)
SUBDIRS = Cryptlib lib
@@ -127,6 +128,9 @@ endif
FORMAT ?= --target efi-app-$(ARCH)
%.efi: %.so
+ifneq ($(OBJCOPY_GTE224),1)
+ $(error objcopy >= 2.24 is required)
+endif
$(OBJCOPY) -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel* \
-j .rela* -j .reloc -j .eh_frame \