From: Sam Ravnborg <sam@ravnborg.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-kernel@vger.kernel.org
Subject: Re: parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]
Date: Wed, 10 Oct 2007 21:54:06 +0200 [thread overview]
Message-ID: <20071010195406.GB2791@uranus.ravnborg.org> (raw)
In-Reply-To: <20071010191538.GF2730@parisc-linux.org>
> On Wed, Oct 10, 2007 at 08:42:25PM +0200, Sam Ravnborg wrote:
> > parisc arch Makefile needs some love and care...
> >
> > The logic selecting CROSS_COMPILE seems fishy and wrong -
> > the error reported by rday is obvious in this respect.
>
> He doesn't have a compiler installed that can target parisc. It doesn't
> seem obvious to me that this should work.
We have at least the header_install target where it makes sense
to continue with a gcc that is not for the architecture being build.
So plain gcc (aka no CROSS_COMPILE) should be the fallback
solution. This fallback is anyway what most architectures use.
> > The libs-y assignment should learn from the other architectures how to
> > get the gcc lib filename:
> > $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
>
> Actually, this looks utterly unstandardised:
>
> arch/cris/Makefile:LIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)
> arch/h8300/Makefile:LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(CFLAGS) -print-libgcc-file-name)
> arch/m32r/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
> arch/parisc/Makefile:libs-y += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
> arch/sh64/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
> arch/sh/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
> arch/xtensa/Makefile:LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
>
> How about we set it in the main Makefile, or one of the ones in
> scripts/? That way we don't have to learn why $(shell $(CC) $(CFLAGS)
> -print-libgcc-file-name) is superior to `$(CC) -print-libgcc-file-name`
cris lacks a major rehaul - planned in this merge window. Will sync it when done.
h8300 should not use CROSS_COMPILE - a bit confused here.
And the reason why $(shell ) is preferred over backticks is simple.
We almost never use backticks in the kernel Makefile since the $(shell )
syntax is more obvious and I like it this way.
Sam
next prev parent reply other threads:[~2007-10-10 19:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 19:15 [matthew@wil.cx: Re: [parisc-linux] parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures]] Matthew Wilcox
2007-10-10 19:43 ` Robert P. J. Day
2007-10-10 19:54 ` Sam Ravnborg [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-10-10 16:44 cleaning up "make headers_install" for various architectures Robert P. J. Day
2007-10-10 16:59 ` Randy Dunlap
2007-10-10 17:26 ` Robert P. J. Day
2007-10-10 18:38 ` parisc arch makefile clean-up needed [Was: cleaning up "make headers_install" for various architectures] Sam Ravnborg
2007-10-10 19:38 ` Kyle McMartin
2007-10-10 19:58 ` Sam Ravnborg
2007-10-10 20:21 ` Matthew Wilcox
2007-10-10 20:41 ` Sam Ravnborg
2007-10-10 21:33 ` Robert P. J. Day
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=20071010195406.GB2791@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®