From: Michael Ellerman <mpe@ellerman.id.au>
To: Tim Bird <tim.bird@sonymobile.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: [PATCH v5] selftest: size: Add size test for Linux kernel
Date: Thu, 04 Dec 2014 11:08:27 +1100 [thread overview]
Message-ID: <1417651707.9123.1.camel@concordia> (raw)
In-Reply-To: <547F3A57.7000106@sonymobile.com>
On Wed, 2014-12-03 at 08:29 -0800, Tim Bird wrote:
>
> On 12/02/2014 07:43 PM, Michael Ellerman wrote:
> > On Tue, 2014-12-02 at 19:36 -0800, Tim Bird wrote:
> >> This test shows the amount of memory used by the system.
> >> Note that this is dependent on the user-space that is loaded
> >> when this program runs. Optimally, this program would be
> >> run as the init program itself.
> >
> > Sorry to only chime in at v5.
> >
> >> diff --git a/tools/testing/selftests/size/Makefile b/tools/testing/selftests/size/Makefile
> >> new file mode 100644
> >> index 0000000..47f8e9c
> >> --- /dev/null
> >> +++ b/tools/testing/selftests/size/Makefile
> >> @@ -0,0 +1,15 @@
> >> +#ifndef CC
> >> + CC = $(CROSS_COMPILE)gcc
> >> +#endif
> >
> > I think the following is preferable:
> >
> > CC := $(CROSS_COMPILE)$(CC)
> >
> >
> > It allows optionally setting a custom CC, as well as optionally CROSS_COMPILE.
>
> I'm not sure I follow this.
>
> If CC is unset, you get only the CROSS_COMPILE prefix.
CC is never unset. The default value is 'cc'.
> If CC is set to e.g. 'gcc', then you get a nicely formatted toolchain string.
Right.
> But if CC already has the prefix applied, then this will result in
> having it duplicated, which surely won't work correctly.
That's just PEBKAC. Don't specify CROSS_COMPILE and also a fully specified CC.
Try it with the kernel Makefile and see how well it works.
> CROSS_COMPILE prefix usage looks a bit uncoordinated in the tools directory, but most
> tests seem to be favoring $(CROSS_COMPILE)gcc.
That doesn't make it right :)
>
> $ cd tools ; mgrep CROSS
...
> ./testing/selftests/powerpc/Makefile:CC := $(CROSS_COMPILE)$(CC)
You can run git blame on that one if you like ;)
> I agree it's desirable not to hardcode gcc, but we seem to be doing it all over
> the place already.
If everyone jumped off a bridge ... :)
cheers
next prev parent reply other threads:[~2014-12-04 0:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 3:36 Tim Bird
2014-12-03 3:43 ` Michael Ellerman
2014-12-03 13:01 ` Thomas Petazzoni
2014-12-03 16:13 ` Tim Bird
2014-12-03 16:29 ` Tim Bird
2014-12-03 18:00 ` Geert Uytterhoeven
2014-12-03 18:25 ` Tim Bird
2014-12-04 0:08 ` Michael Ellerman [this message]
2014-12-04 16:39 ` Tim Bird
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=1417651707.9123.1.camel@concordia \
--to=mpe@ellerman.id.au \
--cc=josh@joshtriplett.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=tim.bird@sonymobile.com \
/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®