From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Guenter Roeck <groeck@google.com>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
Michal Marek <mmarek@suse.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Guenter Roeck <groeck@chromium.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Matthias Kaehlcke <mka@chromium.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [RFC PATCH 1/2] kbuild: Pass HOSTCC and similar to tools Makefiles
Date: Wed, 4 Oct 2017 11:22:35 -0500 [thread overview]
Message-ID: <20171004162235.kjung56zx7povpe4@treble> (raw)
In-Reply-To: <CAD=FV=Xr3Ah8BoNkzoHbYD8ovhrRJbf6+2e3ucOa93Q6w+rvbA@mail.gmail.com>
On Wed, Oct 04, 2017 at 09:09:51AM -0700, Doug Anderson wrote:
> Hi,
>
> On Tue, Oct 3, 2017 at 9:07 PM, Guenter Roeck <groeck@google.com> wrote:
> > On Tue, Oct 3, 2017 at 8:20 PM, Masahiro Yamada
> >> CC: for building tools that run on the target machine
> >> HOSTCC: for building tools that run on the build machine
> >>
> >>
> >> IMHO, this should be consistent to avoid confusion.
> >>
> >>
> >> Grepping CROSS_COMPILE under tools/ directory,
> >> I see many Makefile expect CC for the target system.
> >>
> >> For ex, tools/croup/Makefile
> >>
> >> CC = $(CROSS_COMPILE)gcc
> >>
> >>
> >>
> >> Why don't you fix tools/objtool/Makefile ?
> >>
> >>
> >
> > Interesting question. You are right, most tools are target tools, not
> > host tools. Maybe it _would_ make sense to use HOSTCC/HOSTCFLAGS to
> > build it. Copying Josh for input.
Yes, converting objtool to use HOSTCC/HOSTCFLAGS etc would be a good
improvement. It has a dependency on libsubcmd, so
tools/lib/subcmd/Makefile will also need to be changed (and be careful
not to break perf in the process).
> Ah, good point. I'm not terribly familiar with the things under
> tools, so when I saw "objtool" I assumed it was following a standard
> pattern for tools.
>
> I can submit a patch for objtool's Makefile. ...or, if it makes more
> sense, I can submit a patch to move "objtool" to the scripts
> directory. ...or I can butt out of it. :) Which would folks prefer?
In some ways objtool would be a more natural fit in the scripts dir.
However, we decided to put it in tools because it might be useful
outside of the kernel and it's much easier to extract it from the kernel
that way. Also, it has a shared dependency on libsubcmd with perf,
which is also in tools.
--
Josh
next prev parent reply other threads:[~2017-10-04 16:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-03 20:48 [RFC PATCH 0/2] build: Pass CC, CFLAGS, ... to tools build from main Makefile Douglas Anderson
2017-10-03 20:48 ` [RFC PATCH 1/2] kbuild: Pass HOSTCC and similar to tools Makefiles Douglas Anderson
2017-10-04 3:05 ` Guenter Roeck
2017-10-04 3:20 ` Masahiro Yamada
2017-10-04 4:07 ` Guenter Roeck
2017-10-04 16:09 ` Doug Anderson
2017-10-04 16:22 ` Josh Poimboeuf [this message]
2017-10-03 20:48 ` [RFC PATCH 2/2] tools build: Take CC, AS, and LD from the command line Douglas Anderson
2017-10-04 3:06 ` Guenter Roeck
2017-10-04 15:54 ` Doug Anderson
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=20171004162235.kjung56zx7povpe4@treble \
--to=jpoimboe@redhat.com \
--cc=acme@redhat.com \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=groeck@chromium.org \
--cc=groeck@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mka@chromium.org \
--cc=mmarek@suse.com \
--cc=yamada.masahiro@socionext.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®