public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Rabin Vincent <rabin.vincent@axis.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	"jolsa@kernel.org" <jolsa@kernel.org>,
	"namhyung@kernel.org" <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs
Date: Fri, 27 Nov 2015 12:35:55 +0100	[thread overview]
Message-ID: <20151127113555.GA15376@gmail.com> (raw)
In-Reply-To: <20151106080917.GA12203@axis.com>


* Rabin Vincent <rabin.vincent@axis.com> wrote:

> On Thu, Oct 29, 2015 at 10:46:49AM +0100, Ingo Molnar wrote:
> > Would it be possible to add a gcc and glibc building portion as well? That would 
> > make it entirely self-hosting.
> 
> Yes, but:
> 
> - Those that intend to run the built binary on a target would presumably
>   already have a cross-compiler lying around which they use to build the
>   rest of userspace.
> 
> - Those that don't have a cross-compiler or need a newer one can already
>   very easily create one using other specialized tools such as
>   crosstool-ng (see below).



> 
> > 
> > Something like:
> > 
> >     make ARCH=arm BOOTSTRAP=1
> > 
> > ... would magically fetch everything needed, and (given enough Internet bandwidth 
> > and a fast enough machine) build a whole cross-environment from scratch.
> 
> This is already possible using crosstool-ng.  Getting an ARM GCC 5.2
> cross-compiler is as simple as:
> 
>  $ git clone git://crosstool-ng.org/crosstool-ng
>  $ cd crosstool-ng
>  $ ./bootstrap && ./configure --enable-local && make
> 
>  $ ./ct-ng arm-unknown-linux-gnueabi
>  $ ./ct-ng build

My point is, that's 5 non-trivial steps harder than just typing:

     make ARCH=arm BOOTSTRAP=1

> This is also possible with crosstool-ng. You just need to build the
> x86_64-unknown-linux-gnu config to get GCC 5.2 + glibc 2.22 toolchain
> for an x86-64 host.

It's also possibly by directly cloning the repos of those tools and building them 
- they are reasonably easy to build.

My point is that if we add automation, we might as well walk to whole mile.

Thanks,

	Ingo

  reply	other threads:[~2015-11-27 11:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  7:49 [PATCHv2 1/3] perf: unwind: pass symbol source to libunwind Rabin Vincent
2015-10-29  7:49 ` [PATCHv2 2/3] tools: build: fix libiberty feature detection Rabin Vincent
2015-10-29 20:45   ` Jiri Olsa
2015-10-30  9:14   ` [tip:perf/core] tools build: Fix " tip-bot for Rabin Vincent
2015-10-29  7:49 ` [PATCHv2 3/3] perf: add helper makefile for cross compiling libs Rabin Vincent
2015-10-29  9:46   ` Ingo Molnar
2015-11-06  8:09     ` Rabin Vincent
2015-11-27 11:35       ` Ingo Molnar [this message]
2015-10-30  9:15 ` [tip:perf/core] perf unwind: Pass symbol source to libunwind tip-bot for Rabin Vincent

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=20151127113555.GA15376@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rabin.vincent@axis.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