]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
BuildSystem: Really do not pass unknown-warning options to the compiler.
authorAlexander Traud <pabstraud@compuserve.com>
Fri, 12 Jan 2018 09:17:04 +0000 (10:17 +0100)
committerAlexander Traud <pabstraud@compuserve.com>
Fri, 12 Jan 2018 13:21:49 +0000 (07:21 -0600)
When an older GCC version is called with a too new warning option, GCC exited
with an error and Asterisk was not built. Therefore, the configure script tests
the installed compiler whether it supports that warning option. If not, Asterisk
does not pass it to the installed compiler. However, some compilers (like clang)
do not exit (error) but give just a warning in such a case. Because the compiler
did not exit, Asterisk passed the unknown-warning option.

ASTERISK-27560

Change-Id: Ia9d148e689c173df4e91699113605dab2de36038

third-party/pjproject/patches/user.mak

index dafb259198077bc33b01b2bee49052e428857ebf..b7eab5270921e35d49188176c06ae40493040633 100644 (file)
@@ -1,4 +1,4 @@
 
-NUBSV := $(shell gcc -Wno-unused-but-set-variable -o /dev/null -xc -c - </dev/null 2>/dev/null && echo -Wno-unused-but-set-variable)
+NUBSV := $(shell ${CC} -Wno-unused-but-set-variable -Werror -o /dev/null -xc -c - </dev/null 2>/dev/null && echo -Wno-unused-but-set-variable)
 
 CFLAGS += -fPIC $(NUBSV) -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-strict-aliasing