Skip to content

Commit 29c623d

Browse files
tpimhRussell King
authored andcommitted
ARM: 8939/1: kbuild: use correct nm executable
Since $(NM) variable can be easily overridden for the whole build, it's better to use it instead of $(CROSS_COMPILE)nm. The use of $(CROSS_COMPILE) prefixed variables where their calculated equivalents can be used is incorrect. This fixes issues with builds where $(NM) is set to llvm-nm. Link: ClangBuiltLinux#766 Signed-off-by: Dmitry Golovin <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Cc: Matthias Maennich <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 022eb8a commit 29c623d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin -I$(obj)
121121
asflags-y := -DZIMAGE
122122

123123
# Supply kernel BSS size to the decompressor via a linker symbol.
124-
KBSS_SZ = $(shell echo $$(($$($(CROSS_COMPILE)nm $(obj)/../../../../vmlinux | \
124+
KBSS_SZ = $(shell echo $$(($$($(NM) $(obj)/../../../../vmlinux | \
125125
sed -n -e 's/^\([^ ]*\) [AB] __bss_start$$/-0x\1/p' \
126126
-e 's/^\([^ ]*\) [AB] __bss_stop$$/+0x\1/p') )) )
127127
LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
@@ -165,7 +165,7 @@ $(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
165165
# The .data section is already discarded by the linker script so no need
166166
# to bother about it here.
167167
check_for_bad_syms = \
168-
bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
168+
bad_syms=$$($(NM) $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \
169169
[ -z "$$bad_syms" ] || \
170170
( echo "following symbols must have non local/private scope:" >&2; \
171171
echo "$$bad_syms" >&2; false )

0 commit comments

Comments
 (0)