diff options
| -rw-r--r-- | Documentation/kbuild/makefiles.txt | 15 | ||||
| -rw-r--r-- | scripts/Kbuild.include | 4 |
2 files changed, 0 insertions, 19 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 7b6a2b2bdc98..8da26c6dd886 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt | |||
| @@ -537,21 +537,6 @@ more details, with real examples. | |||
| 537 | The third parameter may be a text as in this example, but it may also | 537 | The third parameter may be a text as in this example, but it may also |
| 538 | be an expanded variable or a macro. | 538 | be an expanded variable or a macro. |
| 539 | 539 | ||
| 540 | cc-fullversion | ||
| 541 | cc-fullversion is useful when the exact version of gcc is needed. | ||
| 542 | One typical use-case is when a specific GCC version is broken. | ||
| 543 | cc-fullversion points out a more specific version than cc-version does. | ||
| 544 | |||
| 545 | Example: | ||
| 546 | #arch/powerpc/Makefile | ||
| 547 | $(Q)if test "$(cc-fullversion)" = "040200" ; then \ | ||
| 548 | echo -n '*** GCC-4.2.0 cannot compile the 64-bit powerpc ' ; \ | ||
| 549 | false ; \ | ||
| 550 | fi | ||
| 551 | |||
| 552 | In this example for a specific GCC version the build will error out | ||
| 553 | explaining to the user why it stops. | ||
| 554 | |||
| 555 | cc-cross-prefix | 540 | cc-cross-prefix |
| 556 | cc-cross-prefix is used to check if there exists a $(CC) in path with | 541 | cc-cross-prefix is used to check if there exists a $(CC) in path with |
| 557 | one of the listed prefixes. The first prefix where there exist a | 542 | one of the listed prefixes. The first prefix where there exist a |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index ca21a35fa244..19a63db62fb9 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -147,10 +147,6 @@ cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo | |||
| 147 | # cc-version | 147 | # cc-version |
| 148 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 148 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
| 149 | 149 | ||
| 150 | # cc-fullversion | ||
| 151 | cc-fullversion = $(shell $(CONFIG_SHELL) \ | ||
| 152 | $(srctree)/scripts/gcc-version.sh -p $(CC)) | ||
| 153 | |||
| 154 | # cc-ifversion | 150 | # cc-ifversion |
| 155 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) | 151 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
| 156 | cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) | 152 | cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) |
