build: use "-Wno-nonnull-compare" for building systemd

systemd uses that too. We cannot enable compiler warnings that
upstream doesn't want to support.

See-also: b59bce308d
This commit is contained in:
Thomas Haller 2024-02-07 14:58:36 +01:00 committed by Íñigo Huguet
parent a500538fb2
commit ad22a96da9
4 changed files with 15 additions and 1 deletions

View file

@ -1157,7 +1157,11 @@ fi
NM_COMPILER_WARNINGS(AM_CFLAGS, ${more_warnings_default})
NM_COMPILER_WARNING_FLAG(LIBSYSTEMD_NM_CFLAGS, "-Wno-gnu-variable-sized-type-not-at-end")
for w in \
-Wno-nonnull-compare \
; do
NM_COMPILER_WARNING_FLAG(LIBSYSTEMD_NM_CFLAGS, "$w")
done
AC_SUBST(LIBSYSTEMD_NM_CFLAGS)
CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\

View file

@ -28,6 +28,7 @@ libnm_systemd_core = static_library(
top_inc,
src_inc,
],
c_args: libnm_systemd_common_cflags,
dependencies: [
libnm_systemd_shared_dep_inc,
glib_dep,

View file

@ -58,6 +58,7 @@ libnm_systemd_shared = static_library(
top_inc,
src_inc,
],
c_args: libnm_systemd_common_cflags,
dependencies: glib_dep,
)

View file

@ -69,6 +69,14 @@ libn_dhcp4 = static_library(
###############################################################################
libnm_systemd_common_cflags = [ ]
libnm_systemd_common_cflags += cc.get_supported_arguments([
'-Wno-nonnull-compare',
])
###############################################################################
subdir('libnm-std-aux')
subdir('libnm-glib-aux')
subdir('libnm-log-null')