aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-12 11:18:28 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-12 11:18:28 -0700
commit83a94f669e1aa6c035e81374225bfaab9796d39e (patch)
tree89d90debb131ad5f5d14a9bff757189a425bf3c4
parenta68a68735a637206baf1f6f5cd221b5fb697e370 (diff)
downloadsyslinux-elf-83a94f669e1aa6c035e81374225bfaab9796d39e.tar.gz
syslinux-elf-83a94f669e1aa6c035e81374225bfaab9796d39e.tar.xz
syslinux-elf-83a94f669e1aa6c035e81374225bfaab9796d39e.zip
com32: compile with -std=gnu99
Compile with -std=gnu99, this allows us to define initializers inside for() loops, which makes certain kinds of ugly macros easier to write. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/lib/MCONFIG4
-rw-r--r--com32/libutil/Makefile6
-rw-r--r--com32/menu/Makefile6
-rw-r--r--com32/modules/Makefile6
-rw-r--r--com32/samples/Makefile6
5 files changed, 19 insertions, 9 deletions
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG
index b569abff..e40cf83c 100644
--- a/com32/lib/MCONFIG
+++ b/com32/lib/MCONFIG
@@ -3,7 +3,9 @@
topdir = ../..
include $(topdir)/MCONFIG
-GCCOPT := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
+GCCOPT := $(call gcc_ok,-std=gnu99,) \
+ $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-fno-stack-protector,) \
INCLUDE = -I.
STRIP = strip --strip-all -R .comment -R .note
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index 01fefac3..64d78b98 100644
--- a/com32/libutil/Makefile
+++ b/com32/libutil/Makefile
@@ -35,14 +35,16 @@ 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)
-M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
+GCCOPT := $(call gcc_ok,-std=gnu99,) \
+ $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-fno-stack-protector,) \
LD = ld -m elf_i386
AR = ar
NASM = nasm
NASMOPT = -O9999
RANLIB = ranlib
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
+CFLAGS = $(GCCOPT) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
-fomit-frame-pointer -D__COM32__ \
-nostdinc -iwithprefix include \
-I./include -I../include \
diff --git a/com32/menu/Makefile b/com32/menu/Makefile
index f37e479c..5496c6e6 100644
--- a/com32/menu/Makefile
+++ b/com32/menu/Makefile
@@ -20,14 +20,16 @@ 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)
-M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
+GCCOPT := $(call gcc_ok,-std=gnu99,) \
+ $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-fno-stack-protector,) \
LD = ld -m elf_i386
AR = ar
NASM = nasm
NASMOPT = -O9999
RANLIB = ranlib
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
+CFLAGS = $(GCCOPT) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
-fomit-frame-pointer -D__COM32__ \
-nostdinc -iwithprefix include \
-I../libutil/include -I../include \
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 6624a948..506f6edd 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -20,14 +20,16 @@ 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)
-M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
+GCCOPT := $(call gcc_ok,-std=gnu99,) \
+ $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-fno-stack-protector,) \
LD = ld -m elf_i386
AR = ar
NASM = nasm
NASMOPT = -O9999
RANLIB = ranlib
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
+CFLAGS = $(GCCOPT) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
-fomit-frame-pointer -D__COM32__ \
-nostdinc -iwithprefix include \
-I../libutil/include -I../include \
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index 6ea3c776..c06668d9 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -20,14 +20,16 @@ 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)
-M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)
+GCCOPT := $(call gcc_ok,-std=gnu99,) \
+ $(call gcc_ok,-m32,) \
+ $(call gcc_ok,-fno-stack-protector,) \
LD = ld -m elf_i386
AR = ar
NASM = nasm
NASMOPT = -O9999
RANLIB = ranlib
-CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
+CFLAGS = $(GCCOPT) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os \
-fomit-frame-pointer -D__COM32__ \
-nostdinc -iwithprefix include \
-I../libutil/include -I../include \