aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Libby <rlibby@FreeBSD.org>2025-10-17 06:49:22 +0000
committerRyan Libby <rlibby@FreeBSD.org>2025-10-17 06:49:22 +0000
commitc2fa94ad0868378c420237d842308156d9133519 (patch)
treee376986e6f971be5b68d910689a8e3522595bb9e
parent97388e7215e080f2cb9fd446f4be4e46a9aeb114 (diff)
stand/i386: quiet gcc -Warray-bounds
GCC has started to warn about memory accesses under address 0x1000. Tweak it to 0x400 for stand/i386 to avoid warnings for access to BIOS data area memory and above but still retain most of the warning value. Reviewed by: dab, imp Differential Revision: https://reviews.freebsd.org/D53036
-rw-r--r--stand/i386/boot2/Makefile3
-rw-r--r--stand/i386/gptboot/Makefile3
-rw-r--r--stand/i386/gptzfsboot/Makefile3
-rw-r--r--stand/i386/isoboot/Makefile3
4 files changed, 8 insertions, 4 deletions
diff --git a/stand/i386/boot2/Makefile b/stand/i386/boot2/Makefile
index 313bb8030f3e..94dbd7af29d6 100644
--- a/stand/i386/boot2/Makefile
+++ b/stand/i386/boot2/Makefile
@@ -33,7 +33,8 @@ CFLAGS+=-fomit-frame-pointer \
CFLAGS.gcc+= -Os \
-fno-asynchronous-unwind-tables \
- --param max-inline-insns-single=100
+ --param max-inline-insns-single=100 \
+ --param min-pagesize=1024
CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
diff --git a/stand/i386/gptboot/Makefile b/stand/i386/gptboot/Makefile
index a829be6c745d..366d82497819 100644
--- a/stand/i386/gptboot/Makefile
+++ b/stand/i386/gptboot/Makefile
@@ -34,7 +34,8 @@ CFLAGS+=-DBOOTPROG=\"gptboot\" \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
-Wno-pointer-sign
-CFLAGS.gcc+= --param max-inline-insns-single=100
+CFLAGS.gcc+= --param max-inline-insns-single=100 \
+ --param min-pagesize=1024
LD_FLAGS+=${LD_FLAGS_BIN}
diff --git a/stand/i386/gptzfsboot/Makefile b/stand/i386/gptzfsboot/Makefile
index 0b67ff8cdaf4..ebdd4958c5f2 100644
--- a/stand/i386/gptzfsboot/Makefile
+++ b/stand/i386/gptzfsboot/Makefile
@@ -46,7 +46,8 @@ CFLAGS.clang+= -Wno-tentative-definition-incomplete-type
NO_WCAST_ALIGN=
-CFLAGS.gcc+= --param max-inline-insns-single=100
+CFLAGS.gcc+= --param max-inline-insns-single=100 \
+ --param min-pagesize=1024
LD_FLAGS+=${LD_FLAGS_BIN}
diff --git a/stand/i386/isoboot/Makefile b/stand/i386/isoboot/Makefile
index 0049e7fd3e0a..bf22e0f21d59 100644
--- a/stand/i386/isoboot/Makefile
+++ b/stand/i386/isoboot/Makefile
@@ -29,7 +29,8 @@ CFLAGS+=-DBOOTPROG=\"isoboot\" \
-Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
-Wno-pointer-sign
-CFLAGS.gcc+= --param max-inline-insns-single=100
+CFLAGS.gcc+= --param max-inline-insns-single=100 \
+ --param min-pagesize=1024
CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
LD_FLAGS+=${LD_FLAGS_BIN}