EFI: Remove SHARED=false usage by enforcing -no-undefined

We've been using SHARED=false to capture unported stuff. However it can be
captured using -no-undefined. This patch removes SHARED option and adds
-no-undefined. Original by Marcelo Ferreira <joamarcelo@gmail.com>,
Improved by Lv Zheng <lv.zheng@intel.com>

Signed-off-by: Marcelo Ferreira <joamarcelo@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
Marcelo Ferreira 2016-07-22 23:48:12 +08:00 committed by Lv Zheng
parent 37131916c8
commit 80a01a2af2

View File

@ -27,15 +27,6 @@
# OPT_CFLAGS Optimization CFLAGS can be overridden on the make command
# line by adding the followings to the invocation:
# OPT_CFLAGS="..."
# SHARED Testing build to check if symbols are not implemented.
# GCC won't complain missing of symbols as our programs are
# compiled with -shared. This can be overridden on the make
# command line by adding the followings to the invocation:
# SHARED=false
# Link failures should only be seen for the _start and
# DivU64x32. They are the only 2 GNU EFI functions we are
# using in order not to introduce architecture specific code
# into ACPICA.
#
# Notes:
# gcc should be version 4 or greater, otherwise some of the options
@ -50,7 +41,6 @@
PROGS = acpidump
HOST = $(shell uname -m | sed s,i[3456789]86,ia32,)
TARGET = $(shell uname -m | sed s,i[3456789]86,ia32,)
SHARED ?= true
OBJDIR = obj
BINDIR = bin
@ -108,13 +98,9 @@ CFLAGS = \
LDFLAGS = \
-nostdlib\
-znocombreloc\
-Bsymbolic
ifeq ($(strip $(SHARED)), true)
LDFLAGS += \
-shared
endif
LIBS = \
$(shell $(CC) -print-libgcc-file-name)
-Bsymbolic\
-shared\
-no-undefined
OBJCOPYFLAGS = \
-j .text\
-j .sdata\
@ -219,9 +205,10 @@ LDFLAGS += \
-T $(EFILIB)/elf_$(TARGET)_efi.lds\
-L$(EFILIB)\
$(EFILIB)/crt0-efi-$(TARGET).o
LIBS += \
LIBS = \
-lefi\
-lgnuefi\
$(shell $(CC) -print-libgcc-file-name)
#
# Bison/Flex configuration