With gcc --version ``` $ gcc --version gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2) Copyright (C) 2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ``` this avoids a warning, that gcc is too old. Before: ``` $ rm src/config.mak $ make config make -C src/ config make[1]: Entering directory '/git/voip/kamailio/src' target architecture <x86_64>, host architecture <x86_64> Makefile.defs:1065: You are using an old and unsupported gcc version (15.0+), compile at your own risk! making config... rm -f modules.lst make --no-print-directory modules.lst saving modules list... make[1]: Leaving directory '/git/voip/kamailio/src' ``` after: ``` $ rm src/config.mak $ make config make -C src/ config make[1]: Entering directory '/git/voip/kamailio/src' target architecture <x86_64>, host architecture <x86_64> making config... rm -f modules.lst make --no-print-directory modules.lst saving modules list... make[1]: Leaving directory '/git/voip/kamailio/src' ``` You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/4318
-- Commit Summary --
* src/Makefile.defs: Avoid warning for gcc 15
-- File Changes --
M src/Makefile.defs (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/4318.patch https://github.com/kamailio/kamailio/pull/4318.diff
dilyanpalauzov left a comment (kamailio/kamailio#4318)
I give up: ``` Run /home/runner/work/kamailio/kamailio/actions/.github/scripts/check-commit.sh From https://github.com/kamailio/kamailio * branch master -> FETCH_HEAD * [new branch] master -> origin/master Checking 1 commits since revision 55f849f3192540698a0bdabc9b2bc4d9a7f5bc8f *** [90b308d66eab741f3a034b2949ef758e4f6bd297] unknown prefix:'Makefile.defs' *** Result: 1 Error: Process completed with exit code 1. ```
@miconda commented on this pull request.
@@ -1017,7 +1017,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff CFLAGS+=$(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
This should not be needed, since the replacement above turns `1[0-5]....` to `9.0+`.
@dilyanpalauzov commented on this pull request.
@@ -1017,7 +1017,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff CFLAGS+=$(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
Without it I get: ``` $ rm src/config.mak ; make config make -C src/ config make[1]: Entering directory '/git/voip/kamailio/src' target architecture <x86_64>, host architecture <x86_64> Makefile.defs:1062: You are using an old and unsupported gcc version (15.0+), compile at your own risk! making config... rm -f modules.lst make --no-print-directory modules.lst saving modules list... make[1]: Leaving directory '/git/voip/kamailio/src' ``` If you cannot reproduce this, where should I look at?
@dilyanpalauzov commented on this pull request.
@@ -1017,7 +1017,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff CFLAGS+=$(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
With just this change: ```diff index d66a99bd9e..726fc0e311 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -309,6 +309,7 @@ ifneq (,$(findstring gcc, $(CC_LONGVER))) -e 's/9.[0-9]$$/9.0+/' \ -e 's/1[0-5].[0-9]..*/9.0+/' \ -e 's/1[0-5].[0-9]$$/9.0+/') +$(warning UU $(CC_SHORTVER)) ifeq (,$(strip $(filter-out 3.0 3.4 4.x 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER)))) # dependencies can be generated on-the-fly while compiling *.c CC_MKDEP_OPTS=-MMD -MP ``` I get `Makefile.defs:312: UU 15.0+`.
@dilyanpalauzov commented on this pull request.
@@ -1017,7 +1017,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff CFLAGS+=$(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
``` sed -e 's/5.[0-9]..*/5.0+/' -e 's/5.[0-9]$$/5.0+/' ``` converts 15.1.1 to 15.0+, and `-e 's/1[0-5].[0-9]..*/9.0+/' -e 's/1[0-5].[0-9]$$/9.0+/` does not apply. Adding ^ in `/^5` does result `9.0+`.
@dilyanpalauzov pushed 1 commit.
fcb46c02845bed364237b5dc1fa5846e7dfe36c1 Makefile.defs: Avoid warning for gcc 15
@dilyanpalauzov commented on this pull request.
@@ -1017,7 +1017,7 @@ ifeq ($(CC_NAME), gcc)
#common stuff CFLAGS+=$(CC_OPT) -funroll-loops -Wcast-align $(PROFILE) #if gcc 4.5+ -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
I added `^` to all the sed expressions.
miconda left a comment (kamailio/kamailio#4318)
Is the last change in the patch still needed?
``` diff -ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+)) ```
@dilyanpalauzov pushed 1 commit.
5343020cad11b54a67786e0cee60f4383ab256f0 Makefile.defs: Avoid warning for gcc 15
dilyanpalauzov left a comment (kamailio/kamailio#4318)
Is the last change in the patch still needed?
-ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+)) +ifeq ($(CC_SHORTVER),$(filter $(CC_SHORTVER),4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+ 15.0+))
No, it is not needed. I just removed it.
Merged #4318 into master.