All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] MIPS: fix *-pkg builds for loongson2ef platform" failed to apply to 5.14-stable tree
@ 2021-11-15 12:39 gregkh
  2021-11-16  2:34 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2021-11-15 12:39 UTC (permalink / raw)
  To: masahiroy, jason, tsbogend; +Cc: stable


The patch below does not apply to the 5.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 0706f74f719e6e72c3a862ab2990796578fa73cc Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <masahiroy@kernel.org>
Date: Wed, 10 Nov 2021 00:01:45 +0900
Subject: [PATCH] MIPS: fix *-pkg builds for loongson2ef platform

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>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index ea3cd080a1c7..f7b58da2f388 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -254,7 +254,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)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: FAILED: patch "[PATCH] MIPS: fix *-pkg builds for loongson2ef platform" failed to apply to 5.14-stable tree
  2021-11-15 12:39 FAILED: patch "[PATCH] MIPS: fix *-pkg builds for loongson2ef platform" failed to apply to 5.14-stable tree gregkh
@ 2021-11-16  2:34 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2021-11-16  2:34 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Jason Self, Thomas Bogendoerfer, stable

Hi,

On Mon, Nov 15, 2021 at 9:40 PM <gregkh@linuxfoundation.org> wrote:
>
>
> The patch below does not apply to the 5.14-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.


I fixed the conflict, and just submitted it as:

   [PATCH stable 5.14.y] MIPS: fix *-pkg builds for loongson2ef platform

Thanks.




> thanks,
>
> greg k-h
>
> ------------------ original commit in Linus's tree ------------------
>
> From 0706f74f719e6e72c3a862ab2990796578fa73cc Mon Sep 17 00:00:00 2001
> From: Masahiro Yamada <masahiroy@kernel.org>
> Date: Wed, 10 Nov 2021 00:01:45 +0900
> Subject: [PATCH] MIPS: fix *-pkg builds for loongson2ef platform
>
> 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>
> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
>
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index ea3cd080a1c7..f7b58da2f388 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -254,7 +254,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)
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-16  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 12:39 FAILED: patch "[PATCH] MIPS: fix *-pkg builds for loongson2ef platform" failed to apply to 5.14-stable tree gregkh
2021-11-16  2:34 ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.