Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1278764 > unrolled thread

Re: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs

Started byIngo Molnar <mingo@kernel.org>
First post2015-11-27 12:40 +0100
Last post2015-11-27 12:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs Ingo Molnar <mingo@kernel.org> - 2015-11-27 12:40 +0100

#1278764 — Re: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs

FromIngo Molnar <mingo@kernel.org>
Date2015-11-27 12:40 +0100
SubjectRe: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs
Message-ID<qzpxD-2dX-9@gated-at.bofh.it>
* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web