aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorStefan Bucur <stefanb@zytor.com>2008-05-12 21:47:23 +0300
committerStefan Bucur <stefanb@zytor.com>2008-05-12 21:47:23 +0300
commit4561fc3586957f5d745bc9eb3baf8d859897da17 (patch)
tree1789353f8744b40090c74f5ebb924ef0079fb23a /memdisk
parente31a673cc14223db120f363dcd6ecc491125f622 (diff)
downloadsyslinux.git-4561fc3586957f5d745bc9eb3baf8d859897da17.tar.gz
syslinux.git-4561fc3586957f5d745bc9eb3baf8d859897da17.tar.xz
syslinux.git-4561fc3586957f5d745bc9eb3baf8d859897da17.zip
Fixed the various Makefiles so that SYSLINUX compiles on platforms with GCC -fstack-protector flag enabled by default.
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/memdisk/Makefile b/memdisk/Makefile
index d9cc7f9f..3c288ca4 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -14,6 +14,8 @@ VERSION := $(shell cat ../version)
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
+CC = gcc
+
gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) -c -x c /dev/null -o $$tmpf 2>/dev/null; \
then echo $(1); else echo $(2); fi; rm -f $$tmpf)
@@ -21,7 +23,6 @@ M32 := $(call gcc_ok,-m32,)
ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
FREE := $(call gcc_ok,-ffreestanding,) $(call gcc_ok,-fno-stack-protector,)
-CC = gcc
CFLAGS = $(M32) $(FREE) -g -W -Wall -Wno-sign-compare \
-Os -fomit-frame-pointer -march=i386 $(ALIGN) \
-DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'