Page MenuHomeFreeBSD

stand/i386: quiet gcc -Warray-bounds
ClosedPublic

Authored by rlibby on Fri, Oct 10, 11:34 PM.
Tags
None
Referenced Files
F135374807: D53036.diff
Sun, Nov 9, 6:05 AM
Unknown Object (File)
Tue, Nov 4, 7:42 PM
Unknown Object (File)
Sat, Nov 1, 9:09 AM
Unknown Object (File)
Sat, Nov 1, 4:18 AM
Unknown Object (File)
Thu, Oct 30, 2:37 PM
Unknown Object (File)
Tue, Oct 28, 3:47 PM
Unknown Object (File)
Mon, Oct 27, 3:22 PM
Unknown Object (File)
Sat, Oct 25, 4:58 PM
Subscribers

Details

Summary

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.

Test Plan

env CROSS_TOOLCHAIN=amd64-gcc14 make buildworld

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rlibby added reviewers: jhb, imp.
This revision is now accepted and ready to land.Sat, Oct 11, 1:33 AM

So, I realized that --param min-pagesize was introduced in gcc 11.3 and this will cause an error for older gcc. @imp is it still gcc 9 that's the minimum? I can either wrap this with something like

.if ${COMPILER_TYPE} == "gcc" and ${COMPILER_VERSION} >= 110300
CFLAGS.gcc+= --param min-pagesize=1024
.endif

or just drop this as not worth the ugliness.

We have gcc12 in Jenkins as the oldest. And it doesn't work most of the time. Anything older is completely unsupported, so you don't need to do the gymnastics you describe here.

https://docs.freebsd.org/en/articles/committers-guide/#_current_compiler_versions

Kinda documents this.

Great, thanks. I'll push as is.

This revision was automatically updated to reflect the committed changes.