xcompile: Use Walloc-size GCC option
Warn about allocation function calls with insufficient size for the target type of the pointer. commit6ab188ee6c("Makefile.mk: Use Walloc-size GCC option") introduced this GCC option, then commitd05fe9fd3c("Revert "Makefile.mk:Use Localiser GCC option"") reverted it because older GCC versions did not support it. This change re-enables it for GCC version equal or greater than 14.1.0. Change-Id: If5d36b073bb5b4cccb0cf2b67b43edb3f97f168c Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84074 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
parent
074dd4f6f5
commit
aebef78622
1 changed files with 3 additions and 0 deletions
|
|
@ -208,6 +208,9 @@ detect_special_flags() {
|
|||
testcc "$GCC" "$CFLAGS_GCC -Wcalloc-transposed-args" &&
|
||||
CFLAGS_GCC="$CFLAGS_GCC -Wcalloc-transposed-args"
|
||||
|
||||
testcc "$GCC" "$CFLAGS_GCC -Walloc-size" &&
|
||||
CFLAGS_GCC="$CFLAGS_GCC -Walloc-size"
|
||||
|
||||
testcc "$GCC" "$CFLAGS_GCC -Wno-unused-parameter" &&
|
||||
CFLAGS_GCC="$CFLAGS_GCC -Wno-unused-parameter"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue