diff --git a/stand/common/boot.c b/stand/common/boot.c index 20841222630d..2b2a71d59362 100644 --- a/stand/common/boot.c +++ b/stand/common/boot.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" +static int autoboot(int timeout, char *prompt); static char *getbootfile(int try); static int loadakernel(int try, int argc, char* argv[]); @@ -157,7 +158,7 @@ autoboot_maybe() autoboot(-1, NULL); /* try to boot automatically */ } -int +static int autoboot(int timeout, char *prompt) { time_t when, otime, ntime; diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index ae5ab6c84a93..925f8d447cc9 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -61,7 +61,6 @@ char *backslash(const char *str); int parse(int *argc, char ***argv, const char *str); /* boot.c */ -int autoboot(int timeout, char *prompt); void autoboot_maybe(void); int getrootmount(char *rootdev); diff --git a/stand/defs.mk b/stand/defs.mk index 9b41f4a51c81..d62957629f66 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -91,7 +91,7 @@ CFLAGS+= -m32 -mcpu=powerpc # build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here # and activate it when DO32 is explicitly defined to be 1. .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 -CFLAGS+= -m32 -mcpu=i386 +CFLAGS+= -m32 # LD_FLAGS is passed directly to ${LD}, not via ${CC}: LD_FLAGS+= -m elf_i386_fbsd AFLAGS+= --32 diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile index 171a2ed55e8a..fb9bc4997432 100644 --- a/stand/i386/gptboot/Makefile +++ b/stand/i386/gptboot/Makefile @@ -37,7 +37,7 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \ -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline -Wno-pointer-sign + -Wno-pointer-sign CFLAGS.gcc+= --param max-inline-insns-single=100 diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile index 08735c105974..3d8bf1bc1389 100644 --- a/stand/i386/gptzfsboot/Makefile +++ b/stand/i386/gptzfsboot/Makefile @@ -37,7 +37,7 @@ CFLAGS+=-DBOOTPROG=\"gptzfsboot\" \ -Wall -Waggregate-return -Wbad-function-cast \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline -Wno-pointer-sign + -Wno-pointer-sign CFLAGS.clang+= -Wno-tentative-definition-incomplete-type diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile index 744198dac16a..a2cb1447860d 100644 --- a/stand/i386/isoboot/Makefile +++ b/stand/i386/isoboot/Makefile @@ -36,6 +36,9 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \ -Winline -Wno-pointer-sign CFLAGS.gcc+= --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 +CFLAGS.gcc+= -Wno-uninitialized +.endif CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL} LD_FLAGS+=${LD_FLAGS_BIN} diff --git a/stand/i386/zfsboot/Makefile b/stand/i386/zfsboot/Makefile index 35185de6964f..1d2f6d69503f 100644 --- a/stand/i386/zfsboot/Makefile +++ b/stand/i386/zfsboot/Makefile @@ -34,8 +34,7 @@ CFLAGS+=-DBOOTPROG=\"zfsboot\" \ -I${BOOTSRC}/i386/boot2 \ -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ - -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ - -Winline + -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings CFLAGS.gcc+= --param max-inline-insns-single=100 .if ${MACHINE} == "amd64"