Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 217358 Details for
Bug 302129
Gentoo Embedded Handbook: Chapter 1: General Improvement Patches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Lots of cleanups and additions for cross-compiler.xml
0005-Lots-of-cleanups-and-additions-for-cross-compiler.xm.patch (text/plain), 7.15 KB, created by
Jacob Godserv
on 2010-01-25 03:09:45 UTC
(
hide
)
Description:
Lots of cleanups and additions for cross-compiler.xml
Filename:
MIME Type:
Creator:
Jacob Godserv
Created:
2010-01-25 03:09:45 UTC
Size:
7.15 KB
patch
obsolete
>From 8e14f0a4425ac86f25429ce2c474c5ecf6b61f86 Mon Sep 17 00:00:00 2001 >From: Jacob Godserv <jacobgodserv@gmail.com> >Date: Wed, 20 Jan 2010 21:02:06 -0500 >Subject: [PATCH 5/9] Lots of cleanups and additions for cross-compiler.xml > >--- > .../en/base/embedded/handbook/cross-compiler.xml | 106 +++++++++++++++----- > 1 files changed, 81 insertions(+), 25 deletions(-) > >diff --git a/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml b/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml >index f3ef99a..a3a9a88 100644 >--- a/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml >+++ b/xml/htdocs/proj/en/base/embedded/handbook/cross-compiler.xml >@@ -47,19 +47,43 @@ stage3 chroot. (This is the same chroot you used to install Gentoo.) > </section> > > <section> >-<title>crossdev</title> >+<title>Compiling a Cross-Compiler</title> > > <subsection> >- <title>Intro</title> >+ <title>crossdev</title> > <body> > <p> > Generating a cross-compiler by hand was a long and painful process. This is > why it has been fully integrated into Gentoo! Our frontend called >- <c>crossdev</c> (which you can install with <c>emerge crossdev</c>) will >- run <c>emerge</c> with all of the proper environment variables and install >- all the right packages to generate arbitrary cross-compilers based on your >- needs. >+ <c>crossdev</c> will run <c>emerge</c> with all of the proper environment >+ variables and install all the right packages to generate arbitrary >+ cross-compilers based on your needs. Install crossdev now if you haven't: >+<pre caption="Install crossdev"> >+# <i>emerge crossdev</i> >+</pre> >+<note> >+Be sure to install the ~keyworded version of crossdev for all the latest fixes. >+</note> >+<note> >+If you are upgrading from an older version of crossdev, and have crossdev-wrappers >+installed, please uninstall crossdev-wrappers first. All your existing cross-toolchains >+will remain intact. >+</note> >+ </p> >+ <p> >+ We only cover the basic usage of crossdev here, but crossdev can customize >+ the process fairly well for most needs. Execute the following command to >+ get more information about crossdev usage: >+<pre caption="crossdev Usage"> >+# <i>crossdev --help</i> >+</pre> >+ Here are some examples with some of the most useful options: >+<pre caption="Useful crossdev options"> >+# <i>crossdev --g [gcc version] --l [(g)libc version] --b [binutils version] --k [kernel headers version] -P -v -t [tuple]</i> # use specific versions >+# <i>crossdev -S -P -v -t [tuple]</i> # use stable only >+</pre> > </p> >+ > </body> > </subsection> > >@@ -110,6 +134,42 @@ stage3 chroot. (This is the same chroot you used to install Gentoo.) > temporarily change your profile. > </note> > >+ <p> >+ To find out which tuple you should use, look over the output from the >+ following command: >+ </p> >+<pre caption="crossdev Tuples"> >+# <i>crossdev -t help</i> >+</pre> >+ >+ <p> >+ When you are done (after a few hours), you find a newly compiled cross-compiler >+ in the sysroot at <path>/usr/CTARGET/</path>. We highly recommend you >+ package this up so you don't end up waiting another two to three hours >+ every time you mess up your sysroot and need to reinstall. >+ </p> >+ >+<pre caption="quickpkg that sysroot!"> >+# <i>quickpkg --include-unmodified-config=y cross-sh4-unknown-linux-gnu/gcc</i> >+# <i>quickpkg --include-unmodified-config=y cross-sh4-unknown-linux-gnu/glibc</i> >+# <i>quickpkg --include-unmodified-config=y cross-sh4-unknown-linux-gnu/binutils</i> >+# <i>quickpkg --include-unmodified-config=y cross-sh4-unknown-linux-gnu/linux-headers</i> >+</pre> >+ >+ <note> >+ If quickpkg warns you about excluded files, please follow its prompts >+ to include all files. >+ </note> >+ >+ <p> >+ In the future you can reinstall your sysroot by executing the following >+ simple portage command: >+ </p> >+ >+<pre caption="Emerge that quickpkg!"> >+# <i>emerge -k cross-sh4-unknown-linux-gnu/gcc cross-sh4-unknown-linux-gnu/glibc cross-sh4-unknown-linux-gnu/binutils cross-sh4-unknown-linux-gnu/linux-headers</i> >+</pre> >+ > </body> > </subsection> > <subsection> >@@ -117,23 +177,23 @@ stage3 chroot. (This is the same chroot you used to install Gentoo.) > <body> > <p> > If everything goes as planned, you should have a shiny new compiler on your >- machine. Give it a spin! >+ machine. Give it a spin! > </p> > > <pre caption="Using SH4 cross-compiler"> >-$ <i>sh4-unknown-linux-gnu-gcc --version</i> >+# <i>sh4-unknown-linux-gnu-gcc --version</i> > sh4-unknown-linux-gnu-gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4) > Copyright (C) 2007 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >-$ <i>echo 'int main(){return 0;}' > sh4-test.c</i> >-$ <i>sh4-unknown-linux-gnu-gcc -Wall sh4-test.c -o sh4-test</i> >-$ <i>file sh4-test</i> >+# <i>echo 'int main(){return 0;}' > sh4-test.c</i> >+# <i>sh4-unknown-linux-gnu-gcc -Wall sh4-test.c -o sh4-test</i> >+# <i>file sh4-test</i> > sh4-test: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), not stripped > </pre> > > <p> >- If the crossdev command failed, you have the log file which you can review >+ If the crossdev command failed, you are told the log file which you can review > to see if the problem is local. If you're unable to fix the issue, you're > welcome to file a bug in our bugzilla. See the > <uri link="communication.xml">Communication page</uri> for more information. >@@ -146,8 +206,9 @@ sh4-test: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), for GNU/Linux > <body> > <p> > To uninstall a toolchain, simply use the <c>--clean</c> option. If you >- modified the sysroot by hand, you'll be prompted to delete things inside >- of it, so you may want to pipe <c>yes |</c> into the command. >+ modified the sysroot by hand, you'll be prompted to delete every file >+ inside, so you will want to prepend <c>yes |</c> to this command <b>if</b> >+ you are sure. > </p> > > <pre caption="Uninstalling cross-compiler"> >@@ -162,15 +223,6 @@ sh4-test: ELF 32-bit LSB executable, Renesas SH, version 1 (SYSV), for GNU/Linux > </body> > </subsection> > >- <subsection> >- <title>Options</title> >- <body> >- <p> >- Obviously crossdev can do a lot more, so to find out more, simply run >- <c>crossdev --help</c>. >- </p> >- </body> >- </subsection> > </section> > > <section> >@@ -186,16 +238,20 @@ binutils/(glibc|uclibc)/gcc all by themselves. This section is <b>not</b> > meant to cover/document/whatever the myriad of build failures you are likely > to see along the way. If you need such help, see the > <uri link="the-more-you-know.xml">Beyond section</uri> in the handbook for >-some pointers. You certainly should not bug me or anyone else in Gentoo. >+some pointers. > </warn> > > <warn> >+Let's be very clear: we do <b>not</b> support toolchains which are built by hand! >+</warn> >+ >+<note> > If you're still reading, you should really check out the crosstool project > (refer to the <uri link="the-more-you-know.xml">Beyond section</uri>) as > that provides a distribution independent method for generating cross-compilers. > While it does kind of suck (imo), it is certainly the best (and really only) > option out there for creating cross-compilers. >-</warn> >+</note> > </body> > </subsection> > >-- >1.6.4.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 302129
:
217350
|
217352
|
217354
|
217356
|
217358
|
217359
|
217360
|
217361
|
217363
|
240005