diff mbox

manual: Add Section on using Buildroot's Toolchain Externally

Message ID 1395273466-19365-1-git-send-email-alan@signal11.us
State Rejected
Headers show

Commit Message

Alan Ott March 19, 2014, 11:57 p.m. UTC
Signed-off-by: Alan Ott <alan@signal11.us>
---
 docs/manual/customize-toolchain.txt | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

Thomas Petazzoni March 20, 2014, 1:58 a.m. UTC | #1
Dear Alan Ott,

On Wed, 19 Mar 2014 19:57:46 -0400, Alan Ott wrote:
> Signed-off-by: Alan Ott <alan@signal11.us>
> ---
>  docs/manual/customize-toolchain.txt | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt
> index 31c9140..71687d3 100644
> --- a/docs/manual/customize-toolchain.txt
> +++ b/docs/manual/customize-toolchain.txt
> @@ -49,3 +49,33 @@ It allows to tune major settings, such as:
>  
>  These settings are available after selecting the +Buildroot toolchain+ type in
>  the menu +Toolchain+.
> +
> +Using a Buildroot Toolchain from Outside Buildroot
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thanks a lot for this contribution. However, the manual already has a
section about this topic, see:

  http://buildroot.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot

Maybe it should be extended to contain more details, but at least it
would be nice to not duplicate the information in the manual.

Thanks a lot!

Thomas
Alan Ott March 20, 2014, 2:07 a.m. UTC | #2
On 03/19/2014 09:58 PM, Thomas Petazzoni wrote:
> Dear Alan Ott,
>
> On Wed, 19 Mar 2014 19:57:46 -0400, Alan Ott wrote:
>> Signed-off-by: Alan Ott <alan@signal11.us>
>> ---
>>   docs/manual/customize-toolchain.txt | 30 ++++++++++++++++++++++++++++++
>>   1 file changed, 30 insertions(+)
>>
>> diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt
>> index 31c9140..71687d3 100644
>> --- a/docs/manual/customize-toolchain.txt
>> +++ b/docs/manual/customize-toolchain.txt
>> @@ -49,3 +49,33 @@ It allows to tune major settings, such as:
>>   
>>   These settings are available after selecting the +Buildroot toolchain+ type in
>>   the menu +Toolchain+.
>> +
>> +Using a Buildroot Toolchain from Outside Buildroot
>> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Thanks a lot for this contribution. However, the manual already has a
> section about this topic, see:
>
>    http://buildroot.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot

Oh no! So it does.

I was talking with Yann about this on the IRC earlier, and he suggested 
I add it to the manual. I should have looked a bit closer.
Or maybe I misunderstood, and maybe he meant I should extend the part 
that was already there to add what we talked about on the IRC (wrapper, 
etc).

> Maybe it should be extended to contain more details, but at least it
> would be nice to not duplicate the information in the manual.

What's there is pretty good. I wish I had found it before I had the 
problems I was having (which ultimately stemmed from not using --sysroot).

Thanks for all you do for buildroot. It's a great tool. Sorry for the 
noise....

Alan.
Yann E. MORIN March 20, 2014, 5:56 p.m. UTC | #3
Thomas, Alan, All,

On 2014-03-20 02:58 +0100, Thomas Petazzoni spake thusly:
> On Wed, 19 Mar 2014 19:57:46 -0400, Alan Ott wrote:
> > Signed-off-by: Alan Ott <alan@signal11.us>
> > ---
> >  docs/manual/customize-toolchain.txt | 30 ++++++++++++++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> > 
> > diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt
> > index 31c9140..71687d3 100644
> > --- a/docs/manual/customize-toolchain.txt
> > +++ b/docs/manual/customize-toolchain.txt
> > @@ -49,3 +49,33 @@ It allows to tune major settings, such as:
> >  
> >  These settings are available after selecting the +Buildroot toolchain+ type in
> >  the menu +Toolchain+.
> > +
> > +Using a Buildroot Toolchain from Outside Buildroot
> > +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Thanks a lot for this contribution. However, the manual already has a
> section about this topic, see:
> 
>   http://buildroot.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot

Doh, I missed it when looking at the manual. :-/

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt
index 31c9140..71687d3 100644
--- a/docs/manual/customize-toolchain.txt
+++ b/docs/manual/customize-toolchain.txt
@@ -49,3 +49,33 @@  It allows to tune major settings, such as:
 
 These settings are available after selecting the +Buildroot toolchain+ type in
 the menu +Toolchain+.
+
+Using a Buildroot Toolchain from Outside Buildroot
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Buildroot toolchain (either internal or external) can be used to build
+packages from outside of Buildroot's build system.
+
+The preferred way of using Buildroot's toolchain is to use the toolchain
+wrappers (described above in this section), which are located in the
++output/host/usr/bin/+ directory.  Using the wrappers will ensure that the
+appropriate options are passed to the compiler.  This directory contains two
+sets of binaries, one set with short names (eg: +gcc+) and one set with
+the full host tuple names (eg: +i686-pc-linux-gnu+).  The full host tuple
+binaries should be used.
+
+For example, if Buildroot is configured for i686, use the following to build
+autotools-based packages using Buildroot's toolchain:
+
+-----------------------------------------------------------
+export PATH=$PATH:/path/to/buildroot/output/host/usr/bin/
+./configure --host=i686-pc-linux-gnu
+make
+-----------------------------------------------------------
+
+Some build systems (eg: kbuild) use the CROSS_COMPILE environment variable
+and can be built as follows:
+------------------------------------------------------------------------------
+export CROSS_COMPILE=/path/to/buildroot/output/host/usr/bin/i686-pc-linux-gnu-
+make
+------------------------------------------------------------------------------