Fix x86 warnings, enable more warnings

git-svn-id: svn://coreboot.org/openbios/openbios-devel@359 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-01-06 18:46:22 +00:00
parent 251d1101ca
commit 1b47a7ee96
13 changed files with 60 additions and 27 deletions

View File

@@ -10,6 +10,8 @@ ARCH := x86
ODIR := obj-$(ARCH)
HOSTCC := gcc
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
#TARGET=i386-elf-
@@ -21,13 +23,12 @@ LD := $(TARGET)ld
NM := $(TARGET)nm
STRIP := $(TARGET)strip
RANLIB := $(TARGET)ranlib
ifeq ($(shell uname), Linux)
LIBDL_LDFLAGS=-ldl
endif
CFLAGS := -m32 -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin
CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
CFLAGS+= -m32
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
AS_FLAGS := -Wa,-32 -g
#
# pre rules
@@ -37,15 +38,20 @@ all: versions dictionaries host-libraries target-libraries host-executables targ
VERSION := "1.0RC1"
versions: $(ODIR)/forth/version.fs
versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs:
@test -d $(dir $@) || $(INSTALL) -d $(dir $@)
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo ": builddate \" $$DATE\" ; " ; \
echo ": version \" $(VERSION)\" ; " ; ) \
> $(dir $@)/version.fs
$(ODIR)/target/include/openbios-version.h:
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \
echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \
echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \
> $(dir $@)/openbios-version.h
]]></pre>
<!-- host compiler build rules -->

View File

@@ -10,6 +10,8 @@ ARCH := x86
ODIR := obj-$(ARCH)
HOSTCC := gcc
HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
CC := gcc
@@ -23,8 +25,12 @@ ifeq ($(shell uname), Linux)
LIBDL_LDFLAGS=-ldl
endif
CFLAGS := -m32 -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin
CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g
CFLAGS+= -m32
CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include
AS_FLAGS := -Wa,-32 -g
#
# pre rules
@@ -34,15 +40,20 @@ all: versions dictionaries host-libraries target-libraries host-executables targ
VERSION := "1.0RC1"
versions: $(ODIR)/forth/version.fs
versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs:
@test -d $(dir $@) || $(INSTALL) -d $(dir $@)
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo ": builddate \" $$DATE\" ; " ; \
echo ": version \" $(VERSION)\" ; " ; ) \
> $(dir $@)/version.fs
$(ODIR)/target/include/openbios-version.h:
@DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \
echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; \
echo "#define OPENBIOS_RELEASE \"$(VERSION)\"" ; ) \
> $(dir $@)/openbios-version.h
]]></pre>
<!-- host compiler build rules -->