Commit 78b7c4e882 for asterisk.org
commit 78b7c4e8822e444f39ef73eea8e21ccc6293ae5d
Author: Peter Lemenkov <lemenkov@gmail.com>
Date: Mon Aug 31 15:54:23 2026 +0200
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 <lemenkov@gmail.com>
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)"