path: root/mk
diff options
authorMatt Fleming <matt.fleming@intel.com>2013-05-16 10:16:17 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-05-16 11:01:55 +0100
commit2bd94fb6ed5f7f7472319cd6adaa25ccf9819230 (patch)
tree243d4733e1d319b5b0536eb4fc7a1383028c5219 /mk
parent34eeaa3d747284fea6eb44ebc971cb513816cb5e (diff)
ldlinux: use platform filename extension
Users are starting to package all Syslinux versions on one boot medium and are running into problems because all versions of ldlinux have the same filename, ldlinux.c32. The version of ldlinux.c32 compiled for bios will not work with efi32 or efi64, and vice versa. What we need is a way for the Syslinux core to know exactly which filename to load. Use the following extensions for the corresponding platforms, .c32 - bios .e32 - efi32 .e64 - efi64 Now all ldlinux variants can be kept in the same directory without causing any conflicts. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'mk')
2 files changed, 2 insertions, 2 deletions
diff --git a/mk/efi.mk b/mk/efi.mk
index 24cca8c1..3c134450 100644
--- a/mk/efi.mk
+++ b/mk/efi.mk
@@ -40,7 +40,7 @@ CFLAGS = -I$(EFIINC) -I$(EFIINC)/$(EFI_SUBARCH) \
-I$(core)/include -I$(core)/ $(CARCHOPT) \
-I$(com32)/lib/ -I$(com32)/libutil/include -std=gnu99 \
- $(GCCWARN) -D__COM32__ -mno-red-zone
+ $(GCCWARN) -D__COM32__ -mno-red-zone -DLDLINUX=\"$(LDLINUX)\"
# gnuefi sometimes installs these under a gnuefi/ directory, and sometimes not
CRT0 := $(shell find $(LIBDIR) -name crt0-efi-$(EFI_SUBARCH).o 2>/dev/null | tail -n1)
diff --git a/mk/elf.mk b/mk/elf.mk
index bd8775cf..faca4e1a 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -59,7 +59,7 @@ CFLAGS = $(GCCOPT) -W -Wall \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE) -I$(core)/include \
- -I$(objdir)
+ -I$(objdir) -DLDLINUX=\"$(LDLINUX)\"
LDFLAGS = -m elf_$(ARCH) -shared --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld --as-needed
LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc)