mirror of
https://github.com/ipxe/ipxe
synced 2026-01-23 20:49:40 +03:00
[build] Allow for 32-bit and 64-bit versions of util/zbin
Parsing ELF data is simpler if we don't have to build a single binary to handle both 32-bit and 64-bit ELF formats. Allow for separate 32-bit and 64-bit binaries built from util/zbin.c (as is already done for util/elf2efi.c). Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -45,7 +45,8 @@ SORTOBJDUMP := ./util/sortobjdump.pl
|
||||
PADIMG := ./util/padimg.pl
|
||||
LICENCE := ./util/licence.pl
|
||||
NRV2B := ./util/nrv2b
|
||||
ZBIN := ./util/zbin
|
||||
ZBIN32 := ./util/zbin32
|
||||
ZBIN64 := ./util/zbin64
|
||||
ELF2EFI32 := ./util/elf2efi32
|
||||
ELF2EFI64 := ./util/elf2efi64
|
||||
EFIROM := ./util/efirom
|
||||
|
||||
@@ -1449,10 +1449,15 @@ endif # defined(BIN)
|
||||
|
||||
ZBIN_LDFLAGS := -llzma
|
||||
|
||||
$(ZBIN) : util/zbin.c $(MAKEDEPS)
|
||||
$(ZBIN32) : util/zbin.c $(MAKEDEPS)
|
||||
$(QM)$(ECHO) " [HOSTCC] $@"
|
||||
$(Q)$(HOST_CC) $(HOST_CFLAGS) $< $(ZBIN_LDFLAGS) -o $@
|
||||
CLEANUP += $(ZBIN)
|
||||
$(Q)$(HOST_CC) $(HOST_CFLAGS) $< $(ZBIN_LDFLAGS) -DELF32 -o $@
|
||||
CLEANUP += $(ZBIN32)
|
||||
|
||||
$(ZBIN64) : util/zbin.c $(MAKEDEPS)
|
||||
$(QM)$(ECHO) " [HOSTCC] $@"
|
||||
$(Q)$(HOST_CC) $(HOST_CFLAGS) $< $(ZBIN_LDFLAGS) -DELF64 -o $@
|
||||
CLEANUP += $(ZBIN64)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN32)
|
||||
|
||||
# ARM32-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/arm32/core
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN64)
|
||||
|
||||
# ARM64-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/arm64/core
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN32)
|
||||
|
||||
# Force i386-only instructions
|
||||
#
|
||||
CFLAGS += -march=i386
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN64)
|
||||
|
||||
# Assembler section type character
|
||||
#
|
||||
ASM_TCHAR := @
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN32)
|
||||
|
||||
# RISCV32-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/riscv32/core
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN64)
|
||||
|
||||
# RISCV64-specific directories containing source files
|
||||
#
|
||||
SRCDIRS += arch/riscv64/core
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
# Specify compressor
|
||||
#
|
||||
ZBIN = $(ZBIN64)
|
||||
|
||||
# Code size reduction.
|
||||
#
|
||||
CFLAGS += -fstrength-reduce -fomit-frame-pointer
|
||||
|
||||
3
src/util/.gitignore
vendored
3
src/util/.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
nrv2b
|
||||
zbin
|
||||
zbin32
|
||||
zbin64
|
||||
hijack
|
||||
prototester
|
||||
elf2efi32
|
||||
|
||||
Reference in New Issue
Block a user