Gentoo Archives: gentoo-doc

From: Marc Blumentritt <M.Blumentritt@×××××××××××××××.de>
To: gentoo-doc@l.g.o
Subject: [gentoo-doc] Re: Toolchain guide?
Date: Fri, 28 Jul 2006 11:34:40
Message-Id: 44C9F5FE.2060401@tu-braunschweig.de
In Reply to: Re: [gentoo-doc] Re: Toolchain guide? by Mike Frysinger
1 Mike Frysinger schrieb:
2 > On Friday 28 July 2006 04:30, Marc Blumentritt wrote:
3 >> I suspected this, but you confirmed it
4 >> and for me this is one more reason for a guide to the toolchain! Perhaps
5 >> it should be part of the Gentoo Handbook, since this is already arch
6 >> specific?
7 >
8 > i dont really understand what it is you're trying to document or what you
9 > think you're trying to document
10
11 I suggest to document the toolchain in two steps:
12 1.) Some general information about the toolchain. I switched to Gentoo,
13 because just from using it I learn a lot about Linux. The fisrt section
14 should be for learning. Before Gentoo I never heard about the toolchain,
15 because I just downloaded binaries and used them. Now I download the
16 source and build them, so I would like to now more about this process,
17 because I want to learn. I know a little bit about programming (mostly
18 scripting), but the first time I used a compiler was during my studies
19 on a windows machine, not really knowing, what this thing is doing (was
20 during my study). So this is not really a Gentoo topic, but Gentoo
21 provides very good docs and I hope to get the toolchain explained in one
22 of these wonderful Gentoo docs.
23
24 2.) After general information I put the Gentoo related stuff... (of
25 course, for learning, too, but in a more Gentooish way.)
26
27 >
28 >> 0) Introduction
29 >> Binaries vs. scripts? Why binaries?
30 >
31 > this question is answered in other Gentoo documents ... normally referred to
32 > as "why from source" or "source vs binaries"
33 I wanted to say here: A script is a list of commands, which can be
34 executed in some kind of runtime environment (like bash or python).
35 Syntax errors are found during runtime. Binaries are checked during
36 compilation, which translates lists of commands in computer language, so
37 that the computer can execute them much faster...
38
39 something like this. I did not want to compare source vs binary, yet.
40 >
41 >> What are libs and what is dynamic
42 >> linking vs. static linking (this is important for rebuilding your
43 >> system)?
44 >
45 > static vs dynamic libs is not related to Gentoo at all ... all operating
46 > systems deal with this question
47
48 I added this point, because of this scenario: I build a package foo,
49 which depends on lib bar dynamically. I rebuild foo with a newer version
50 of gcc but I do not rebuild lib bar. Does this break linkage? What with
51 a static build lib? Just wanted to point out a source of problems, which
52 I want to learn more about. You are of course right, that this is agian
53 general stuff.
54 >
55 >> Why is Gentoo source based? Why is this so cool compared to
56 >> binary based?
57 >
58 > same questions as what you posted first in this section
59 This is the part, where I wanted to compare source vs binary and you are
60 right, that this is already addressed in other docs, but since this is
61 closly connected to the toolchain, I thought to add it here. If it is
62 already written, than it is just copy/paste or a link to a doc.
63 >
64 >> 1) What is the toolchain aka how to build binaries?
65 >> <snip>
66 >> Put these programs in the correct order for the build process. If you
67 >> <snip>
68 >
69 > again, not Gentoo specific ... but might be useful i think
70
71 Yes, again learning part 1. And more important, which programs are
72 included in the toolchain? This is the heart of a source based distro
73 (in case of Gentoo Portage is the brain ;) ).
74
75 >
76 >> Helper programs
77 >> Why are they needed
78 >
79 > a better question: *what* helper programs ?
80
81 gcc depends on some programs (e.g. sed). This is what I termed helper
82 program. Which programs are required by the toolchain and why?
83
84 >
85 >> Arch-Specific
86 >> Why is the toolchain different from arch to arch?
87 >
88 > i dont understand this at all ... of course the toolchain will be different as
89 > no cpu is the same so generating code for a powerpc cpu will not work on an
90 > amd64
91 >
92 >> List of arch specific programs
93 >
94 > there are none
95 OK, so the toolchain packages (sources) of all arches are the same, but
96 of course the binaries are not.
97 >
98 >> 2) How does Gentoo handle the Toolchain?
99 >> Short discription of portage (ebuild (the script), emerge, ebuilds (the
100 >> build instructions), eclasses, USE-flags, ...). Perhaps something about
101 >> the new alternatives to emerge (or was it portage)?
102 >
103 > a high level view might be useful, but getting into the ebuild guts would not
104 > cater to the general user at all ... plus we toolchain guys like to rewrite
105 > things all the time and updating the docs for people outside of the toolchain
106 > herd would be a waste of our time ... if someone felt like just doing that
107 > though, that would be useful
108
109 Yes, I wanted a high level view here and not a replacement for the dev
110 handbook. Just telling the people: "Good news everybody! While handling
111 the toolchain on your own is quite complex, we give you this tool called
112 emerge, which is doing everything for you. It uses [...] And you can
113 configure all builds with these neat USE-flags!" This is of course
114 written about, but this is now the toolchain guide, so you have to write
115 about this.
116
117 There are also some USE-flags like "nptl", which are perhaps more
118 special than "gnome". They could be addressed here (or perhaps they
119 should be addressed in the knowledge base?).
120
121 >
122 >> What about compilation options (CHOST, CFLAGS and CXXFLAGS)? What to do,
123 >> if you want to change these? Not a complete list of options (that's
124 >> gnu.org for), but the general way, how Gentoo handles these, sane
125 >> compilation options. What to do, if you change these and why could this
126 >> be critical for your system? How to rebuild your system (twice? world?)?
127 >
128 > i think we already have a section touching on these topics
129
130 Um, yes, but the handbook just says "edit these and be carefull", while
131 the x86 Quick Install guide says "edit these, be carefull, and rebuild
132 your system twice to get full merrit (even if small) from these
133 changes". I'm looking for something final.
134
135 >
136 >> 3) How does Portage handle updates of Toolchain packages?
137 >
138 > people shouldnt care ... it should always "just work"
139
140 Yes, should, but I broke my system switching from gcc3.3 to gcc3.4. Of
141 course there is the gcc upgrade guide, which I should have read, but I
142 did not realize at that time, how problematic a toolchain upgrade can
143 be. Does this only concern gcc? Are there other packages, which could
144 break your system with major updates? I'm a little bit touchy (me cry
145 baby ;) ) since this and beside the wish to learn more about the
146 toolchain this topic is my most important reason for asking for a
147 toolchain guide: how to address correctly toolchain updates? Should I
148 rebuild the system? If yes, why and how (twice, ...?)? If no, why not?
149 Gain vs loss?
150
151 Regards
152 Marc
153 --
154 gentoo-doc@g.o mailing list

Replies

Subject Author
Re: [gentoo-doc] Re: Toolchain guide? Mike Frysinger <vapier@g.o>