From c6a592a0ef8e8448deb59c8d87a515dd0ba2ac8c Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Mon, 31 Aug 2026 15:54:23 +0200 Subject: [PATCH] Bundled pjproject: Do not discard the ambient CFLAGS Commit f82393da0dbf125bd96e3c4a0dc080f88d6a90e4 ("Bundled pjproject: Make it easier to override options in config_site.h") added PJPROJECT_CONFIG_OPTS += CFLAGS="$(PJPROJECT_CFLAGS)" Previously CFLAGS was never passed on the aconfigure command line, so the bundled pjproject inherited the exported CFLAGS from the environment. Passing it explicitly overrides that, and PJPROJECT_CFLAGS contains only the options this file adds (-DPJ_HAS_LINUX_EPOLL=1), so every distribution flag is lost. Appending to the ambient CFLAGS rather than replacing them keeps the new PJPROJECT_CFLAGS override working while restoring inheritance. Resolves: #2132 Signed-off-by: Peter Lemenkov --- third-party/pjproject/Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/pjproject/Makefile.rules b/third-party/pjproject/Makefile.rules index f6790bd216..d09da39817 100644 --- a/third-party/pjproject/Makefile.rules +++ b/third-party/pjproject/Makefile.rules @@ -50,4 +50,4 @@ ifeq ($(shell uname -s),Linux) PJPROJECT_CFLAGS += -DPJ_HAS_LINUX_EPOLL=1 endif -PJPROJECT_CONFIG_OPTS += CFLAGS="$(PJPROJECT_CFLAGS)" +PJPROJECT_CONFIG_OPTS += CFLAGS="$(CFLAGS) $(PJPROJECT_CFLAGS)"