[x86_64] Add support for compilation as an x86_64 binary
Currently the only supported platform for x86_64 is EFI. Building an EFI64 gPXE requires a version of gcc that supports __attribute__((ms_abi)). This currently means a development build of gcc; the feature should be present when gcc 4.4 is released. In the meantime; you can grab a suitable gcc tree from git://git.etherboot.org/scm/people/mcb30/gcc/.git
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||
|
||||
# EFI probably doesn't guarantee us a red zone, so let's not rely on it.
|
||||
#
|
||||
CFLAGS += -mno-red-zone
|
||||
|
||||
# The EFI linker script
|
||||
#
|
||||
LDSCRIPT = arch/x86_64/scripts/efi.lds
|
||||
|
||||
# Use a relocatable link; we perform final relocations in the efilink utility.
|
||||
#
|
||||
LDFLAGS += -r -d -S
|
||||
|
||||
# Media types.
|
||||
#
|
||||
NON_AUTO_MEDIA += efi
|
||||
|
||||
# Rule for building EFI files
|
||||
#
|
||||
$(BIN)/%.efi.tmp-reloc : $(BIN)/%.efi.tmp $(EFILINK)
|
||||
$(QM)$(ECHO) " [EFILINK] $@"
|
||||
$(Q)$(LD) -e 0 -o /dev/null $< # Check for unresolved symbols
|
||||
$(Q)$(EFILINK) $< $@
|
||||
|
||||
$(BIN)/%.efi : $(BIN)/%.efi.tmp-reloc
|
||||
$(QM)$(ECHO) " [FINISH] $@"
|
||||
$(Q)$(OBJCOPY) -Obinary $< $@
|
||||
Reference in New Issue
Block a user