fix: dev: Add -Wno-psabi to CFLAGS for x86 (32-bit) builds

GCC 11.1+ emits a note during compilation when there are 64-bit
atomic fields in a structure, because it fixed a compiler bug
by changing the alignment of such fields, which caused ABI change.

Add -Wno-psabi to CFLAGS for such builds in order to silence the
warning. That shouldn't be a problem since we don't expose our
structures to the outside.

Closes #4841

Merge branch '4841-alignment-of-_Atomic-long-long-unsigned-int' into 'main'

Closes #4841

See merge request isc-projects/bind9!9319
This commit is contained in:
Arаm Sаrgsyаn
2024-08-15 12:51:03 +00:00

View File

@@ -133,6 +133,9 @@ AC_COMPILE_IFELSE(
[],
[STD_CFLAGS="$STD_CFLAGS -Wno-stringop-overread"])
# Silence GCC 11.1+ note about the changed alignment, see GL #4841
AS_CASE([$target_cpu],[i?86],[STD_CFLAGS="$STD_CFLAGS -Wno-psabi"])
STD_LDFLAGS=""
# ... except in test code