summaryrefslogtreecommitdiffstats
path: root/mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 11:50:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-13 11:51:08 +0000
commitaee413961dbfbc5dff84fa511c5f1a43f95087c1 (patch)
tree03ee60129336a201d8b767494be7a22de619e799 /mk
parentReleasing progress-linux version 3:6.03+dfsg1-2~dschinn1. (diff)
downloadsyslinux-aee413961dbfbc5dff84fa511c5f1a43f95087c1.zip
syslinux-aee413961dbfbc5dff84fa511c5f1a43f95087c1.tar.xz
Merging upstream version 3:6.04~git20171011.af7e95c3+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mk')
-rw-r--r--mk/com32.mk15
-rw-r--r--mk/elf.mk6
-rw-r--r--mk/embedded.mk7
-rw-r--r--mk/lib.mk4
-rw-r--r--mk/syslinux.mk4
5 files changed, 21 insertions, 15 deletions
diff --git a/mk/com32.mk b/mk/com32.mk
index 9a3b19d..aeb8a2c 100644
--- a/mk/com32.mk
+++ b/mk/com32.mk
@@ -48,12 +48,13 @@ GCCOPT += $(call gcc_ok,-falign-jumps=0,-malign-jumps=0)
GCCOPT += $(call gcc_ok,-falign-labels=0,-malign-labels=0)
GCCOPT += $(call gcc_ok,-falign-loops=0,-malign-loops=0)
-ifndef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
+GCCOPT += -mno-red-zone
+else
GCCOPT += -mregparm=3 -DREGPARM=3
endif
com32 := $(topdir)/com32
-RELOCS := $(com32)/tools/relocs
ifneq ($(NOGPL),1)
GPLLIB = $(com32)/gpllib/libcom32gpl.a
@@ -67,12 +68,16 @@ CFLAGS = $(GCCOPT) $(GCCWARN) \
-fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
- -I$(com32)/include/sys $(GPLINCLUDE)
+ -I$(com32)/include/sys $(GPLINCLUDE) \
+ -I$(topdir)/core \
+ -I$(topdir)/core/include
SFLAGS = $(GCCOPT) $(GCCWARN) \
-fomit-frame-pointer -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__ \
-nostdinc -iwithprefix include \
-I$(com32)/libutil/include -I$(com32)/include \
- -I$(com32)/include/sys $(GPLINCLUDE)
+ -I$(com32)/include/sys $(GPLINCLUDE) \
+ -I$(topdir)/core \
+ -I$(topdir)/core/include
COM32LD = $(com32)/lib/$(ARCH)/elf.ld
LDFLAGS = -m elf_$(ARCH) -shared --hash-style=gnu -T $(COM32LD)
@@ -114,5 +119,3 @@ C_LNXLIBS = $(com32)/libutil/libutil_lnx.a
%.c32: %.elf
$(OBJCOPY) --strip-debug --strip-unneeded $< $@
- ##$(OBJCOPY) -O binary $< $@
- ##$(RELOCS) $< >> $@ || ( rm -f $@ ; false )
diff --git a/mk/elf.mk b/mk/elf.mk
index 12d1077..b46dbd0 100644
--- a/mk/elf.mk
+++ b/mk/elf.mk
@@ -60,8 +60,10 @@ CFLAGS = $(GCCOPT) $(GCCWARN) -W -Wall \
-I$(com32)/libutil/include -I$(com32)/include \
-I$(com32)/include/sys $(GPLINCLUDE) -I$(core)/include \
-I$(objdir) -DLDLINUX=\"$(LDLINUX)\"
-ifndef EFI_BUILD
-CFLAGS += -mregparm=3 -DREGPARM=3
+ifeq ($(FWCLASS),EFI)
+GCCOPT += -mno-red-zone
+else
+GCCOPT += -mregparm=3 -DREGPARM=3
endif
SFLAGS = $(GCCOPT) -D__COM32__ -D__FIRMWARE_$(FIRMWARE)__
diff --git a/mk/embedded.mk b/mk/embedded.mk
index 1614d8b..488dc0f 100644
--- a/mk/embedded.mk
+++ b/mk/embedded.mk
@@ -38,11 +38,10 @@ GCCOPT += $(call gcc_ok,-ffreestanding,)
GCCOPT += $(call gcc_ok,-fno-stack-protector,)
GCCOPT += $(call gcc_ok,-fwrapv,)
GCCOPT += $(call gcc_ok,-freg-struct-return,)
-ifdef EFI_BUILD
-GCCOPT += -Os -fomit-frame-pointer -msoft-float
+ifeq ($(FWCLASS),EFI)
+GCCOPT += -Os -fomit-frame-pointer -msoft-float -mno-red-zone
else
-GCCOPT += -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 \
- -msoft-float
+GCCOPT += -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 -msoft-float
endif
GCCOPT += $(call gcc_ok,-fno-exceptions,)
GCCOPT += $(call gcc_ok,-fno-asynchronous-unwind-tables,)
diff --git a/mk/lib.mk b/mk/lib.mk
index ceb95bd..54f1fd5 100644
--- a/mk/lib.mk
+++ b/mk/lib.mk
@@ -54,7 +54,9 @@ WARNFLAGS = $(GCCWARN) -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winl
CFLAGS = $(OPTFLAGS) $(REQFLAGS) $(WARNFLAGS) $(LIBFLAGS)
-ifndef EFI_BUILD
+ifeq ($(FWCLASS),EFI)
+CFLAGS += -mno-red-zone
+else
CFLAGS += -mregparm=3 -DREGPARM=3
endif
diff --git a/mk/syslinux.mk b/mk/syslinux.mk
index 337560b..46355c9 100644
--- a/mk/syslinux.mk
+++ b/mk/syslinux.mk
@@ -82,11 +82,11 @@ ARCH ?= $(strip $(SUBARCH))
GCCWARN = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
# Common stanza to make gcc generate .*.d dependency files
-MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
+MAKEDEPS = -MT $@ -MD -MF $(dir $@).$(notdir $@).d
# Dependencies that exclude system headers; use whenever we use
# header files from the platform.
-UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
+UMAKEDEPS = -MT $@ -MMD -MF $(dir $@).$(notdir $@).d
# Items that are only appropriate during development; this file is
# removed when tarballs are generated.