From 16df1c179d6d3861042e182346b9ca6d75a64c51 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 21 Feb 2020 10:01:49 +0100 Subject: [PATCH] build/autotools: fix passing AM_CFLAGS when building libnm-core With `./configure --enable-more-asserts`, we add extra -W flags to AM_CFLAGS. This variable is only used, if the per-library override libnm_core_libnm_core_la_CFLAGS is unspecified ([1]). Usually we avoid this problem be never specifying library_CFLAGS, but placing all our per-library flags to library_CPPFLAGS. While that is a bit of a hack and misuse of CPPFLAGS, it works well (enough). This was broken recently. The effect was, that libnm-core was not build with AM_CFLAGS flags. Fix it. [1] https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html Fixes: d2d6a6869755 ('build: use -fcommon when building libnm-core') --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index b9813f3aba..84a4589292 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1084,7 +1084,7 @@ libnm_core_libnm_core_la_CPPFLAGS = \ if WITH_JSON_VALIDATION libnm_core_libnm_core_la_CPPFLAGS += $(JANSSON_CFLAGS) -libnm_core_libnm_core_la_CFLAGS = -fcommon +libnm_core_libnm_core_la_CPPFLAGS += -fcommon endif libnm_core_libnm_core_la_SOURCES = \