@@ -682,22 +682,27 @@ more details, with real examples.
682682 In the above example, -Wno-unused-but-set-variable will be added to
683683 KBUILD_CFLAGS only if gcc really accepts it.
684684
685- cc-ifversion
686- cc-ifversion tests the version of $(CC) and equals the fourth parameter
687- if version expression is true, or the fifth (if given) if the version
688- expression is false.
685+ gcc-min-version
686+ gcc-min-version tests if the value of $(CONFIG_GCC_VERSION) is greater than
687+ or equal to the provided value and evaluates to y if so.
689688
690689 Example::
691690
692- #fs/reiserfs/Makefile
693- ccflags-y := $(call cc-ifversion, -lt, 0402, -O1)
691+ cflags-$(call gcc-min-version, 70100) := -foo
694692
695- In this example, ccflags-y will be assigned the value -O1 if the
696- $(CC) version is less than 4.2.
697- cc-ifversion takes all the shell operators:
698- -eq, -ne, -lt, -le, -gt, and -ge
699- The third parameter may be a text as in this example, but it may also
700- be an expanded variable or a macro.
693+ In this example, cflags-y will be assigned the value -foo if $(CC) is gcc and
694+ $(CONFIG_GCC_VERSION) is >= 7.1.
695+
696+ clang-min-version
697+ clang-min-version tests if the value of $(CONFIG_CLANG_VERSION) is greater
698+ than or equal to the provided value and evaluates to y if so.
699+
700+ Example::
701+
702+ cflags-$(call clang-min-version, 110000) := -foo
703+
704+ In this example, cflags-y will be assigned the value -foo if $(CC) is clang
705+ and $(CONFIG_CLANG_VERSION) is >= 11.0.0.
701706
702707 cc-cross-prefix
703708 cc-cross-prefix is used to check if there exists a $(CC) in path with
0 commit comments