gnu-efi/0002-Make-command-lines-work-with-FreeBSD-s-objcopy-versi.patch
Peter Jones ac3f311f01 Fix the paths in the patches.
God, I hate that gnu-efi-3.0/ is in the git repo.

Signed-off-by: Peter Jones <pjones@redhat.com>
2014-11-20 15:02:59 -05:00

55 lines
1.8 KiB
Diff

From 079c0b997c8011657e3baed6658fb77b969675b3 Mon Sep 17 00:00:00 2001
From: Bill Paul <wpaul@windriver.com>
Date: Thu, 20 Nov 2014 14:29:29 -0500
Subject: [PATCH 2/5] Make command lines work with FreeBSD's objcopy version.
FreeBSD's binutils doesn't have "-j <glob>" support, so we need to
include non-globbed versions of .rel/.rela individually.
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-Off-By: Bill Paul <wpaul@windriver.com>
---
Make.defaults | 7 +++++++
Make.rules | 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Make.defaults b/Make.defaults
index 807205d..169273d 100644
--- a/Make.defaults
+++ b/Make.defaults
@@ -133,8 +133,15 @@ endif
# Generic compilation flags
INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \
-I$(TOPDIR)/inc/protocol
+
+ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
+CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
+ -ffreestanding -fno-stack-protector
+else
CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
-fno-merge-constants -ffreestanding -fno-stack-protector \
-fno-stack-check
+endif
+
ASFLAGS += $(ARCH3264)
LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings
diff --git a/Make.rules b/Make.rules
index 7113b3e..02c7088 100644
--- a/Make.rules
+++ b/Make.rules
@@ -35,8 +35,9 @@
#
%.efi: %.so
- $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel* \
- -j .rela* -j .reloc $(FORMAT) $*.so $@
+ $(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel \
+ -j .rela -j .rel.* -j .rela.* -j .rel* -j .rela* \
+ -j .reloc $(FORMAT) $*.so $@
%.so: %.o
$(LD) $(LDFLAGS) $^ -o $@ $(LOADLIBES)
--
2.1.0