|
|
3b9dfa |
From f99c72fe642e7ccc00012f01b8fc2adf8f93a79c Mon Sep 17 00:00:00 2001
|
|
|
3b9dfa |
From: Nigel Croxon <ncroxon@redhat.com>
|
|
|
3b9dfa |
Date: Tue, 25 Jun 2013 08:47:03 -0400
|
|
|
3b9dfa |
Subject: [PATCH 2/3] be more pedantic when linking
|
|
|
3b9dfa |
|
|
|
3b9dfa |
Don't allow duplicate symbols, abort upon first error.
|
|
|
3b9dfa |
also make sure the linker script comes last for apps.
|
|
|
3b9dfa |
|
|
|
3b9dfa |
Signed-off-by: David Decotigny <decot@googlers.com>
|
|
|
3b9dfa |
---
|
|
|
3b9dfa |
Make.defaults | 2 +-
|
|
|
3b9dfa |
apps/Makefile | 8 ++++++--
|
|
|
3b9dfa |
2 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
3b9dfa |
|
|
|
3b9dfa |
diff --git a/Make.defaults b/Make.defaults
|
|
|
3b9dfa |
index a22a1b4..6b4b6de 100644
|
|
|
3b9dfa |
--- a/Make.defaults
|
|
|
3b9dfa |
+++ b/Make.defaults
|
|
|
3b9dfa |
@@ -114,4 +114,4 @@ CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \
|
|
|
3b9dfa |
-fno-merge-constants -ffreestanding -fno-stack-protector \
|
|
|
3b9dfa |
-fno-stack-check
|
|
|
3b9dfa |
ASFLAGS += $(ARCH3264)
|
|
|
3b9dfa |
-LDFLAGS += -nostdlib --no-undefined
|
|
|
3b9dfa |
+LDFLAGS += -nostdlib --warn-common --no-undefined --fatal-warnings
|
|
|
3b9dfa |
diff --git a/apps/Makefile b/apps/Makefile
|
|
|
3b9dfa |
index 773bc08..6834e14 100644
|
|
|
3b9dfa |
--- a/apps/Makefile
|
|
|
3b9dfa |
+++ b/apps/Makefile
|
|
|
3b9dfa |
@@ -52,8 +52,12 @@ ifneq (,$(findstring FreeBSD,$(OS)))
|
|
|
3b9dfa |
LDSCRIPT = $(TOPDIR)/gnuefi/elf_$(ARCH)_fbsd_efi.lds
|
|
|
3b9dfa |
endif
|
|
|
3b9dfa |
|
|
|
3b9dfa |
-LDFLAGS += -T $(LDSCRIPT) -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
|
|
|
3b9dfa |
-LOADLIBES = -lefi -lgnuefi $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
|
|
|
3b9dfa |
+LDFLAGS += -shared -Bsymbolic -L../lib -L../gnuefi $(CRTOBJS)
|
|
|
3b9dfa |
+
|
|
|
3b9dfa |
+LOADLIBES += -lefi -lgnuefi
|
|
|
3b9dfa |
+LOADLIBES += $(shell $(CC) $(ARCH3264) -print-libgcc-file-name)
|
|
|
3b9dfa |
+LOADLIBES += -T $(LDSCRIPT)
|
|
|
3b9dfa |
+
|
|
|
3b9dfa |
FORMAT = efi-app-$(ARCH)
|
|
|
3b9dfa |
|
|
|
3b9dfa |
TARGETS = t.efi t2.efi t3.efi t4.efi t5.efi t6.efi printenv.efi t7.efi tcc.efi modelist.efi route80h.efi
|
|
|
3b9dfa |
--
|
|
|
3b9dfa |
1.8.3.1
|
|
|
3b9dfa |
|