* [nft PATCH] Makefile: Fix for 'make CFLAGS=...'
@ 2025-09-08 22:19 Phil Sutter
2025-09-09 9:57 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2025-09-08 22:19 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
Appending to CFLAGS from configure.ac like this was too naive, passing
custom CFLAGS in make arguments overwrites it. Extend AM_CFLAGS instead.
Fixes: 64c07e38f0494 ("table: Embed creating nft version into userdata")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
Makefile.am | 2 ++
configure.ac | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 5190a49ae69f1..3e3f1e61092bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,6 +156,8 @@ AM_CFLAGS = \
\
$(GCC_FVISIBILITY_HIDDEN) \
\
+ -DMAKE_STAMP=$(MAKE_STAMP) \
+ \
$(NULL)
AM_YFLAGS = -d -Wno-yacc
diff --git a/configure.ac b/configure.ac
index da16a6e257c91..3517ea041f7ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,6 @@ AC_CONFIG_COMMANDS([nftversion.h], [
# Current date should be fetched exactly once per build,
# so have 'make' call date and pass the value to every 'gcc' call
AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
-CFLAGS="${CFLAGS} -DMAKE_STAMP=\${MAKE_STAMP}"
AC_CONFIG_FILES([ \
Makefile \
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [nft PATCH] Makefile: Fix for 'make CFLAGS=...'
2025-09-08 22:19 [nft PATCH] Makefile: Fix for 'make CFLAGS=...' Phil Sutter
@ 2025-09-09 9:57 ` Pablo Neira Ayuso
2025-09-09 10:19 ` Phil Sutter
0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2025-09-09 9:57 UTC (permalink / raw)
To: Phil Sutter; +Cc: netfilter-devel
On Tue, Sep 09, 2025 at 12:19:09AM +0200, Phil Sutter wrote:
> Appending to CFLAGS from configure.ac like this was too naive, passing
> custom CFLAGS in make arguments overwrites it. Extend AM_CFLAGS instead.
>
> Fixes: 64c07e38f0494 ("table: Embed creating nft version into userdata")
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Thanks for fixing this.
> ---
> Makefile.am | 2 ++
> configure.ac | 1 -
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile.am b/Makefile.am
> index 5190a49ae69f1..3e3f1e61092bb 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -156,6 +156,8 @@ AM_CFLAGS = \
> \
> $(GCC_FVISIBILITY_HIDDEN) \
> \
> + -DMAKE_STAMP=$(MAKE_STAMP) \
> + \
> $(NULL)
>
> AM_YFLAGS = -d -Wno-yacc
> diff --git a/configure.ac b/configure.ac
> index da16a6e257c91..3517ea041f7ea 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -153,7 +153,6 @@ AC_CONFIG_COMMANDS([nftversion.h], [
> # Current date should be fetched exactly once per build,
> # so have 'make' call date and pass the value to every 'gcc' call
> AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
> -CFLAGS="${CFLAGS} -DMAKE_STAMP=\${MAKE_STAMP}"
>
> AC_CONFIG_FILES([ \
> Makefile \
> --
> 2.51.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [nft PATCH] Makefile: Fix for 'make CFLAGS=...'
2025-09-09 9:57 ` Pablo Neira Ayuso
@ 2025-09-09 10:19 ` Phil Sutter
0 siblings, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2025-09-09 10:19 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
On Tue, Sep 09, 2025 at 11:57:14AM +0200, Pablo Neira Ayuso wrote:
> On Tue, Sep 09, 2025 at 12:19:09AM +0200, Phil Sutter wrote:
> > Appending to CFLAGS from configure.ac like this was too naive, passing
> > custom CFLAGS in make arguments overwrites it. Extend AM_CFLAGS instead.
> >
> > Fixes: 64c07e38f0494 ("table: Embed creating nft version into userdata")
> > Signed-off-by: Phil Sutter <phil@nwl.cc>
>
> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> Thanks for fixing this.
Patch applied, sorry for breaking your use-case in the first place!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-09 10:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-08 22:19 [nft PATCH] Makefile: Fix for 'make CFLAGS=...' Phil Sutter
2025-09-09 9:57 ` Pablo Neira Ayuso
2025-09-09 10:19 ` Phil Sutter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox