diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2007-05-19 12:49:07 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2007-07-16 15:15:47 -0400 |
commit | 0ab2a272e6b55e5d58168d6983da99e2dc09b8b2 (patch) | |
tree | 16db20cec448da4816e4c3f24f6ecf7b445e02a4 /scripts/Kbuild.include | |
parent | f241182b51c0f26b29af40c3777f84e6033d0401 (diff) |
kbuild: New 'cc-fullversion' macro
Prints a six-digit string including the GCC patchlevel. Also fix
the 'usage' comment for cc-version.
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 06c1a377c4c5..677bc6c175cb 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -100,9 +100,14 @@ cc-option-align = $(subst -functions=0,,\ | |||
100 | $(call cc-option,-falign-functions=0,-malign-functions=0)) | 100 | $(call cc-option,-falign-functions=0,-malign-functions=0)) |
101 | 101 | ||
102 | # cc-version | 102 | # cc-version |
103 | # Usage gcc-ver := $(call cc-version,$(CC)) | 103 | # Usage gcc-ver := $(call cc-version) |
104 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 104 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
105 | 105 | ||
106 | # cc-fullversion | ||
107 | # Usage gcc-ver := $(call cc-fullversion) | ||
108 | cc-fullversion = $(shell $(CONFIG_SHELL) \ | ||
109 | $(srctree)/scripts/gcc-version.sh -p $(CC)) | ||
110 | |||
106 | # cc-ifversion | 111 | # cc-ifversion |
107 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) | 112 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
108 | cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) | 113 | cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) |