Skip to content

Commit 0706f74

Browse files
masahir0ytsbogend
authored andcommitted
MIPS: fix *-pkg builds for loongson2ef platform
Since commit 805b2e1 ("kbuild: include Makefile.compiler only when compiler is needed"), package builds for the loongson2f platform fail. $ make ARCH=mips CROSS_COMPILE=mips64-linux- lemote2f_defconfig bindeb-pkg [ snip ] sh ./scripts/package/builddeb arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. cp: cannot stat '': No such file or directory make[5]: *** [scripts/Makefile.package:87: intdeb-pkg] Error 1 make[4]: *** [Makefile:1558: intdeb-pkg] Error 2 make[3]: *** [debian/rules:13: binary-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 make[2]: *** [scripts/Makefile.package:83: bindeb-pkg] Error 2 make[1]: *** [Makefile:1558: bindeb-pkg] Error 2 make: *** [Makefile:350: __build_one_by_one] Error 2 The reason is because "make image_name" fails. $ make ARCH=mips CROSS_COMPILE=mips64-linux- image_name arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop. In general, adding $(error ...) in the parse stage is troublesome, and it is pointless to check toolchains even if we are not building anything. Do not include Kbuild.platform in such cases. Fixes: 805b2e1 ("kbuild: include Makefile.compiler only when compiler is needed") Reported-by: Jason Self <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 70060ee commit 0706f74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/mips/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ endif
254254
#
255255
# Board-dependent options and extra files
256256
#
257+
ifdef need-compiler
257258
include $(srctree)/arch/mips/Kbuild.platforms
259+
endif
258260

259261
ifdef CONFIG_PHYSICAL_START
260262
load-y = $(CONFIG_PHYSICAL_START)

0 commit comments

Comments
 (0)