All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware
Date: Wed, 25 Mar 2020 18:05:58 +0900	[thread overview]
Message-ID: <CAK7LNAST-ygeLAAneKRhr-uMdSW0V_V1s9AvN6VJSqfWfN4Otg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXeOUu_zxKHXnNoLwyExy1GTp6N5UP2Neqyc8M3w2B8KQ@mail.gmail.com>

Hi Geert,

On Wed, Mar 25, 2020 at 4:53 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Yamada-san,
>
> On Wed, Mar 25, 2020 at 4:50 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > On Wed, Mar 25, 2020 at 2:47 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Tue, Mar 24, 2020 at 5:17 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > > As far as I understood from the Kconfig help text, this build rule is
> > > > used to rebuild the driver firmware, which runs on the QUICC, m68k-based
> > > > Motorola 68360.
> > > >
> > > > The firmware source, wanxlfw.S, is currently compiled by the combo of
> > > > $(CPP) and $(AS68K). This is not what we usually do for compiling *.S
> > > > files. In fact, this is the only user of $(AS) in the kernel build.
> > > >
> > > > Moreover, $(CPP) is not likely to be a m68k tool because wanxl.c is a
> > > > PCI driver, but CONFIG_M68K does not select CONFIG_HAVE_PCI.
> > > > Instead of combining $(CPP) and (AS) from different tool sets, using
> > > > single $(CC68K) seems simpler, and saner.
> > > >
> > > > After this commit, the firmware rebuild will require cc68k instead of
> > > > as68k. I do not know how many people care about this, though.
> > > >
> > > > I do not have cc68k/ld68k in hand, but I was able to build it by using
> > > > the kernel.org m68k toolchain. [1]
> > >
> > > Would this work with a "standard" m68k-linux-gnu-gcc toolchain, like
> > > provided by Debian/Ubuntu, too?
> > >
> >
> > Yes, I did 'sudo apt install gcc-8-m68k-linux-gnu'
> > It successfully compiled this firmware.
>
> Thanks for checking!
>
> > In my understanding, the difference is that
> > the kernel.org ones lack libc,
> > so cannot link userspace programs.
> >
> > They do not make much difference for this case.
>
> Indeed.
>
> So perhaps it makes sense to replace cc68k and ld68k in the Makefile by
> m68k-linux-gnu-gcc and m68k-linux-gnu-ld, as these are easier to get hold
> of on a modern system?
>
> What do you think?
> Thanks!
>


If desired, I can do like this:


ifeq ($(ARCH),m68k)
  CC_M68K = $(CC)
  LD_M68K = $(LD)
else
  CC_M68K = $(CROSS_COMPILE_M68K)gcc
  LD_M68K = $(CROSS_COMPILE_M68K)ld
endif



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-03-25  9:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 16:15 [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware Masahiro Yamada
2020-03-24 16:15 ` [PATCH 2/3] net: wan: wanxl: refactor the firmware rebuild rule Masahiro Yamada
2020-03-24 16:15 ` [PATCH 3/3] kbuild: remove AS variable Masahiro Yamada
2020-03-24 19:38   ` Nick Desaulniers
2020-03-24 19:58     ` Nick Desaulniers
2020-03-26  6:13       ` Masahiro Yamada
2020-03-24 19:43   ` Nathan Chancellor
2020-03-25 21:59   ` kbuild test robot
2020-03-25 21:59     ` kbuild test robot
2020-03-25 21:59     ` kbuild test robot
2020-03-24 17:46 ` [PATCH 1/3] net: wan: wanxl: use $(CC68K) instead of $(AS68K) for rebuilding firmware Geert Uytterhoeven
2020-03-25  3:49   ` Masahiro Yamada
2020-03-25  7:52     ` Geert Uytterhoeven
2020-03-25  9:05       ` Masahiro Yamada [this message]
2020-03-25  9:12         ` Geert Uytterhoeven

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=CAK7LNAST-ygeLAAneKRhr-uMdSW0V_V1s9AvN6VJSqfWfN4Otg@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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: link
Be 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.