* [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform
@ 2021-11-09 15:01 Masahiro Yamada
2021-11-09 15:01 ` [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path Masahiro Yamada
2021-11-09 15:32 ` [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Thomas Bogendoerfer
0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-11-09 15:01 UTC (permalink / raw)
To: Thomas Bogendoerfer, linux-mips; +Cc: Masahiro Yamada, Jason Self, linux-kernel
Since commit 805b2e1d427a ("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: 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed")
Reported-by: Jason Self <jason@bluehome.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/mips/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index e036fc025ccc..ace7f033de07 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -253,7 +253,9 @@ endif
#
# Board-dependent options and extra files
#
+ifdef need-compiler
include $(srctree)/arch/mips/Kbuild.platforms
+endif
ifdef CONFIG_PHYSICAL_START
load-y = $(CONFIG_PHYSICAL_START)
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path
2021-11-09 15:01 [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Masahiro Yamada
@ 2021-11-09 15:01 ` Masahiro Yamada
2021-11-09 15:32 ` Thomas Bogendoerfer
2021-11-09 15:32 ` [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Thomas Bogendoerfer
1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2021-11-09 15:01 UTC (permalink / raw)
To: Thomas Bogendoerfer, linux-mips; +Cc: Masahiro Yamada, linux-kernel
platform-y accumulates platform names with a slash appended.
The current $(patsubst ...) ends up with doubling slashes.
GNU Make still include Platform files, but in case of an error,
a clumsy file path is displayed:
arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/mips/Kbuild.platforms | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
index 2c57994b5217..30193bcf9caa 100644
--- a/arch/mips/Kbuild.platforms
+++ b/arch/mips/Kbuild.platforms
@@ -37,4 +37,4 @@ platform-$(CONFIG_MACH_TX49XX) += txx9/
platform-$(CONFIG_MACH_VR41XX) += vr41xx/
# include the platform specific files
-include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platform-y))
+include $(patsubst %/, $(srctree)/arch/mips/%/Platform, $(platform-y))
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform
2021-11-09 15:01 [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Masahiro Yamada
2021-11-09 15:01 ` [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path Masahiro Yamada
@ 2021-11-09 15:32 ` Thomas Bogendoerfer
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-11-09 15:32 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-mips, Jason Self, linux-kernel
On Wed, Nov 10, 2021 at 12:01:45AM +0900, Masahiro Yamada wrote:
> Since commit 805b2e1d427a ("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: 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed")
> Reported-by: Jason Self <jason@bluehome.net>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/mips/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index e036fc025ccc..ace7f033de07 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -253,7 +253,9 @@ endif
> #
> # Board-dependent options and extra files
> #
> +ifdef need-compiler
> include $(srctree)/arch/mips/Kbuild.platforms
> +endif
>
> ifdef CONFIG_PHYSICAL_START
> load-y = $(CONFIG_PHYSICAL_START)
> --
> 2.30.2
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path
2021-11-09 15:01 ` [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path Masahiro Yamada
@ 2021-11-09 15:32 ` Thomas Bogendoerfer
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-11-09 15:32 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-mips, linux-kernel
On Wed, Nov 10, 2021 at 12:01:46AM +0900, Masahiro Yamada wrote:
> platform-y accumulates platform names with a slash appended.
> The current $(patsubst ...) ends up with doubling slashes.
>
> GNU Make still include Platform files, but in case of an error,
> a clumsy file path is displayed:
>
> arch/mips/loongson2ef//Platform:36: *** only binutils >= 2.20.2 have needed option -mfix-loongson2f-nop. Stop.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> arch/mips/Kbuild.platforms | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/Kbuild.platforms b/arch/mips/Kbuild.platforms
> index 2c57994b5217..30193bcf9caa 100644
> --- a/arch/mips/Kbuild.platforms
> +++ b/arch/mips/Kbuild.platforms
> @@ -37,4 +37,4 @@ platform-$(CONFIG_MACH_TX49XX) += txx9/
> platform-$(CONFIG_MACH_VR41XX) += vr41xx/
>
> # include the platform specific files
> -include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platform-y))
> +include $(patsubst %/, $(srctree)/arch/mips/%/Platform, $(platform-y))
> --
> 2.30.2
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-09 15:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09 15:01 [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Masahiro Yamada
2021-11-09 15:01 ` [PATCH 2/2] MIPS: fix duplicated slashes for Platform file path Masahiro Yamada
2021-11-09 15:32 ` Thomas Bogendoerfer
2021-11-09 15:32 ` [PATCH 1/2] MIPS: fix *-pkg builds for loongson2ef platform Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).