Skip to contentSkip to conversation

fix cc-version breakage

PATCH In review Jesse Barnes 2 participants 4 messages Aug 24, 2004 – Aug 25, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix cc-version breakage

Looks like someone forgot to use $(shell ...) on the cc-version function?

Jesse

===== Makefile 1.522 vs edited =====

Makefile +2 -2
@@ -279,8 +279,8 @@
 
 # cc-version
 # Usage gcc-ver := $(call cc-version $(CC))
-cc-version = $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
-              $(if $(1), $(1), $(CC))
+cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
+              $(if $(1), $(1), $(CC)))
 
 
 # Look for make include files relative to root of kernel src
#1 lore raw
Quoted 1 line · Jesse Barnes

Looks like someone forgot to use $(shell ...) on the cc-version function?

Actually, this is a little nicer (look ma, no linewraps!) if we can make gcc-version.sh executable.

Jesse

===== Makefile 1.522 vs edited =====

Makefile +1 -2
@@ -279,8 +279,7 @@
 
 # cc-version
 # Usage gcc-ver := $(call cc-version $(CC))
-cc-version = $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
-              $(if $(1), $(1), $(CC))
+cc-version = $(shell $(srctree)/scripts/gcc-version.sh $(if $(1), $(1), $(CC)))
 
 
 # Look for make include files relative to root of kernel src
#2 lore raw
Quoted 3 lines · Jesse Barnes

Actually, this is a little nicer (look ma, no linewraps!) if we can make gcc-version.sh executable.

It is no possible for all users to guarantee this, therefore the rule of thumb for the kernel is to always use CONFIG_SHELL.

Btw - patch already sent to Linus and lkml.

Sam

#3 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 2 lines · Jesse Barnes

Actually, this is a little nicer (look ma, no linewraps!) if we can make gcc-version.sh executable.

It is no possible for all users to guarantee this, therefore the rule of thumb for the kernel is to always use CONFIG_SHELL.

Btw - patch already sent to Linus and lkml.

Ok, I thought the problem seemed familiar, and now I see the fix in the BK tree. Thanks.

Jesse