Commit a63bd548235e75b590ec15a1b7a7a907105fb56a

Stefan Reinauer 2010-05-24T13:31:15

drop -ansi because opensolaris has some odd implications like breaking getopt if it's there. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/openbios/trunk/fcode-utils-devel@775 f158a5a8-5612-0410-a976-696ce0be7e32

diff --git a/detok/Makefile b/detok/Makefile
index 2626098..0b730dc 100644
--- a/detok/Makefile
+++ b/detok/Makefile
@@ -29,7 +29,7 @@ STRIP	= strip
 INCLUDES = -I../shared
 
 # Normal Flags:
-CFLAGS  = -O2 -Wall -ansi #-Wextra
+CFLAGS  = -O2 -Wall #-Wextra
 LDFLAGS = 
 
 # Coverage:
diff --git a/romheaders/Makefile b/romheaders/Makefile
index a63edf2..7d47a21 100644
--- a/romheaders/Makefile
+++ b/romheaders/Makefile
@@ -24,7 +24,7 @@
 
 CC	 ?= gcc
 STRIP    = strip
-CFLAGS   = -O2 -Wall -Wextra -ansi
+CFLAGS   = -O2 -Wall -Wextra
 INCLUDES = -I../shared
 
 SOURCES = romheaders.c ../shared/classcodes.c
diff --git a/toke/Makefile b/toke/Makefile
index 9fbb6c0..a3d81b1 100644
--- a/toke/Makefile
+++ b/toke/Makefile
@@ -29,7 +29,7 @@ STRIP	= strip
 INCLUDES = -I../shared
 
 # Normal flags
-CFLAGS  = -O2 -Wall -ansi -Wno-pointer-sign #-Wextra 
+CFLAGS  = -O2 -Wall #-Wextra 
 LDFLAGS =
 
 # Coverage:
@@ -39,6 +39,12 @@ LDFLAGS =
 # Debugging:
 # CFLAGS  := $(CFLAGS) -g
 
+# for gcc 4. remove if you fixed the code.
+_GCC4_CFLAGS=$(shell echo 'main(int argc, char **argv){return 0;}' > .test.c;   \
+		$(CC) -Wno-pointer-sign -c .test.c -o .test.o > /dev/null 2>&1 \
+		&& echo -Wno-pointer-sign; rm .test.c .test.o )
+CFLAGS  := $(CFLAGS) $(_GCC4_CFLAGS)
+
 OBJS  = clflags.o conditl.o devnode.o dictionary.o emit.o errhandler.o     \
         flowcontrol.o macros.o nextfcode.o parselocals.o scanner.o stack.o \
 	stream.o strsubvocab.o ticvocab.o toke.o tokzesc.o tracesyms.o     \