mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -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 -->
|
||||
|
||||
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user