mirror of
https://github.com/xcat2/xNBA.git
synced 2025-01-20 06:23:14 +00:00
[efi] Allow building with non-system libbfd
On Mac OS X, it is necessary to build binutils manually; the system does not provide bfd.h or the libbfd or libiberty libraries. Originally-fixed-by: Joshua Oreman <oremanj@rwcr.net>
This commit is contained in:
parent
7266aceb39
commit
3dd7ce1c26
@ -42,6 +42,8 @@ ELF2EFI64 := ./util/elf2efi64
|
||||
EFIROM := ./util/efirom
|
||||
ICCFIX := ./util/iccfix
|
||||
DOXYGEN := doxygen
|
||||
BINUTILS_DIR := /usr
|
||||
BFD_DIR := $(BINUTILS_DIR)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -793,16 +793,18 @@ CLEANUP += $(ZBIN)
|
||||
#
|
||||
# The EFI image converter
|
||||
#
|
||||
ELF2EFI_CFLAGS := -I$(BINUTILS_DIR)/include -I$(BFD_DIR)/include \
|
||||
-idirafter include -L$(BINUTILS_DIR)/lib -L$(BFD_DIR)/lib \
|
||||
-lbfd -liberty -lz
|
||||
|
||||
$(ELF2EFI32) : util/elf2efi.c $(MAKEDEPS)
|
||||
$(QM)$(ECHO) " [HOSTCC] $@"
|
||||
$(Q)$(HOST_CC) -DMDE_CPU_IA32 -idirafter include -O2 \
|
||||
-o $@ $< -lbfd -liberty
|
||||
$(Q)$(HOST_CC) $(ELF2EFI_CFLAGS) -DMDE_CPU_IA32 -O2 -o $@ $<
|
||||
CLEANUP += $(ELF2EFI32)
|
||||
|
||||
$(ELF2EFI64) : util/elf2efi.c $(MAKEDEPS)
|
||||
$(QM)$(ECHO) " [HOSTCC] $@"
|
||||
$(Q)$(HOST_CC) -DMDE_CPU_X64 -idirafter include -O2 \
|
||||
-o $@ $< -lbfd -liberty
|
||||
$(Q)$(HOST_CC) $(ELF2EFI_CFLAGS) -DMDE_CPU_X64 -O2 -o $@ $<
|
||||
CLEANUP += $(ELF2EFI64)
|
||||
|
||||
$(EFIROM) : util/efirom.c $(MAKEDEPS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user