Skip to content

Commit c353acb

Browse files
saschahauertorvalds
authored andcommitted
kbuild: make: fix if_changed when command contains backslashes
The call if_changed mechanism does not work when the command contains backslashes. This basically is an issue with lzo and bzip2 compressed kernels. The compressed binaries do not contain the uncompressed image size, so these use size_append to append the size. This results in backslashes in the executed command. With this if_changed always detects a change in the command and rebuilds the compressed image even if nothing has changed. Fix this by escaping backslashes in make-cmd Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Bernhard Walle <bernhard@bwalle.de> Cc: Michal Marek <mmarek@suse.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0eb5a35 commit c353acb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/Kbuild.include‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ endif
209209
# >$< substitution to preserve $ when reloading .cmd file
210210
# note: when using inline perl scripts [perl -e '...$$t=1;...']
211211
# in $(cmd_xxx) double $$ your perl vars
212-
make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))
212+
make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))))
213213

214214
# Find any prerequisites that is newer than target or that does not exist.
215215
# PHONY targets skipped in both cases.

0 commit comments

Comments
 (0)