From: Geert Uytterhoeven <geert@linux-m68k.org> To: Masahiro Yamada <masahiroy@kernel.org> Cc: linux-kbuild <linux-kbuild@vger.kernel.org>, Helge Deller <deller@gmx.de>, "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>, Rich Felker <dalias@libc.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Vineet Gupta <vgupta@synopsys.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-m68k <linux-m68k@lists.linux-m68k.org>, "open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>, Parisc List <linux-parisc@vger.kernel.org>, Linux-sh list <linux-sh@vger.kernel.org>, arcml <linux-snps-arc@lists.infradead.org>, "moderated list:H8/300 ARCHITECTURE" <uclinux-h8-devel@lists.sourceforge.jp> Subject: Re: [PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile Date: Mon, 12 Apr 2021 09:44:29 +0200 [thread overview] Message-ID: <CAMuHMdUtqSv6PUfLtuGoBSgqqM4CkwSkT3nKstXRKN1tuXrQ_g@mail.gmail.com> (raw) In-Reply-To: <20210411135532.219797-1-masahiroy@kernel.org> Hi Yamada-san, On Sun, Apr 11, 2021 at 3:56 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > Use ?= operator to let arch/*/Makefile to assign CROSS_COMPILE only > when CROSS_COMPILE is undefined. > > This allows arch-Makefiles to drop the ifeq ($(CROSS_COMPILE),) > conditional. > > This slightly changes the behavior; the arch-Makefile previously > overrode CROSS_COMPILE when CROSS_COMPILE has already been made empty > via an environment variable as in 'export CROSS_COMPILE='. > > With this commit, arch-Makefle will respect the user's environment > set-up, which seems to be a more correct behavior. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Thanks for your patch! > --- > > arch/arc/Makefile | 4 +--- > arch/h8300/Makefile | 4 +--- > arch/m68k/Makefile | 4 +--- > arch/mips/Makefile | 4 +--- > arch/parisc/Makefile | 6 ++---- > arch/sh/Makefile | 4 +--- What about arch/xtensa/Makefile? > --- a/arch/m68k/Makefile > +++ b/arch/m68k/Makefile > @@ -17,10 +17,8 @@ > KBUILD_DEFCONFIG := multi_defconfig > > ifneq ($(SUBARCH),$(ARCH)) > - ifeq ($(CROSS_COMPILE),) > - CROSS_COMPILE := $(call cc-cross-prefix, \ > + CROSS_COMPILE ?= $(call cc-cross-prefix, \ > m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) > - endif > endif This does not seem to work as expected: my standard build scripts (using "make ARCH=m68k") no longer pick up the cross-compiler, but fall back to the native compiler, thus breaking the build. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org> To: Masahiro Yamada <masahiroy@kernel.org> Cc: linux-kbuild <linux-kbuild@vger.kernel.org>, Helge Deller <deller@gmx.de>, "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>, Rich Felker <dalias@libc.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Vineet Gupta <vgupta@synopsys.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, linux-m68k <linux-m68k@lists.linux-m68k.org>, "open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>, Parisc List <linux-parisc@vger.kernel.org>, Linux-sh list <linux-sh@vger.kernel.org>, arcml <linux-snps-arc@lists.infradead.org>, "moderated list:H8/300 ARCHITECTURE" <uclinux-h8-devel@lists.sourceforge.jp> Subject: Re: [PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile Date: Mon, 12 Apr 2021 09:44:29 +0200 [thread overview] Message-ID: <CAMuHMdUtqSv6PUfLtuGoBSgqqM4CkwSkT3nKstXRKN1tuXrQ_g@mail.gmail.com> (raw) In-Reply-To: <20210411135532.219797-1-masahiroy@kernel.org> Hi Yamada-san, On Sun, Apr 11, 2021 at 3:56 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > Use ?= operator to let arch/*/Makefile to assign CROSS_COMPILE only > when CROSS_COMPILE is undefined. > > This allows arch-Makefiles to drop the ifeq ($(CROSS_COMPILE),) > conditional. > > This slightly changes the behavior; the arch-Makefile previously > overrode CROSS_COMPILE when CROSS_COMPILE has already been made empty > via an environment variable as in 'export CROSS_COMPILE='. > > With this commit, arch-Makefle will respect the user's environment > set-up, which seems to be a more correct behavior. > > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Thanks for your patch! > --- > > arch/arc/Makefile | 4 +--- > arch/h8300/Makefile | 4 +--- > arch/m68k/Makefile | 4 +--- > arch/mips/Makefile | 4 +--- > arch/parisc/Makefile | 6 ++---- > arch/sh/Makefile | 4 +--- What about arch/xtensa/Makefile? > --- a/arch/m68k/Makefile > +++ b/arch/m68k/Makefile > @@ -17,10 +17,8 @@ > KBUILD_DEFCONFIG := multi_defconfig > > ifneq ($(SUBARCH),$(ARCH)) > - ifeq ($(CROSS_COMPILE),) > - CROSS_COMPILE := $(call cc-cross-prefix, \ > + CROSS_COMPILE ?= $(call cc-cross-prefix, \ > m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) > - endif > endif This does not seem to work as expected: my standard build scripts (using "make ARCH=m68k") no longer pick up the cross-compiler, but fall back to the native compiler, thus breaking the build. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
next prev parent reply other threads:[~2021-04-12 7:44 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-11 13:55 [PATCH] kbuild: use ?= to assign CROSS_COMPILE by arch-Makefile Masahiro Yamada 2021-04-11 13:55 ` Masahiro Yamada 2021-04-12 7:44 ` Geert Uytterhoeven [this message] 2021-04-12 7:44 ` Geert Uytterhoeven 2021-04-12 8:15 ` Masahiro Yamada 2021-04-12 8:15 ` Masahiro Yamada 2021-04-12 8:27 ` Masahiro Yamada 2021-04-12 8:27 ` Masahiro Yamada
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAMuHMdUtqSv6PUfLtuGoBSgqqM4CkwSkT3nKstXRKN1tuXrQ_g@mail.gmail.com \ --to=geert@linux-m68k.org \ --cc=James.Bottomley@hansenpartnership.com \ --cc=dalias@libc.org \ --cc=deller@gmx.de \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-m68k@lists.linux-m68k.org \ --cc=linux-mips@vger.kernel.org \ --cc=linux-parisc@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=linux-snps-arc@lists.infradead.org \ --cc=masahiroy@kernel.org \ --cc=tsbogend@alpha.franken.de \ --cc=uclinux-h8-devel@lists.sourceforge.jp \ --cc=vgupta@synopsys.com \ --cc=ysato@users.sourceforge.jp \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.