Gentoo Archives: gentoo-dev

From: Geert Bevin <gbevin@××××.com>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Gcc 3.0.4 installed system
Date: Sun, 07 Apr 2002 07:50:27
Message-Id: 1018183822.23268.17.camel@oak.uwyn.office
In Reply to: Re: [gentoo-dev] Gcc 3.0.4 installed system by Christian Hergl
1 The second bootstrap will certainly work, you could also just have done
2 'emerge gcc' which would first install gcc3 and then start the bootstrap
3 itself. Saving quite some time normally.
4
5 On Sun, 2002-04-07 at 14:38, Christian Hergl wrote:
6 > Hello all, Hello Preston,
7 >
8 > just adding my 2 cents. I'm in the process to emerge a system based on
9 > the gcc 3.0.4 as discussed earlier in this threat.
10 > Having the glibc and gcc3 compiled with the gcc 2.95 of the stage1 iso
11 > image made me worried after your post.
12 > And indeed, the mini compiler of the iso refused to accept the
13 > march=athlon flag for the bootstrap.
14 > So, I did the bootstrap with march=i686, and right now am
15 > re-bootstrapping again with the gcc3.0 and march=athlon, which hopefully
16 > now compiles a decent optimized gcc and glibc. And should savely give a
17 > full gcc3 system later.
18 >
19 > Could you confirm that the second bootstrap would be a working interim
20 > solution till a gentoo 1.1 (which, to my suprise seems to be
21 > downloadable from the gentoo ftp site. Anyone from IRC know what it
22 > does?) is released?
23 >
24 > Greetings,
25 > Christian
26 >
27 > Preston A. Elder wrote:
28 > > I'm sure it does ...
29 > >
30 > > But unless I'm missing something here, changing the profile does NOTHING
31 > > to change the utilities (read: tar, bzip2, cp, mv, ls, etc) that are
32 > > installed WITH the system.
33 > >
34 > > Read my email again carefully. I manually made my own
35 > > 'default-1.0-gcc3' profile by changing the packages file to use gcc3
36 > > instead of 2.95 and then bootstrapped with it -- and it worked fine
37 > > right up until it installed glibc.
38 > >
39 > > Just incase your not a coder. GLIBC supplies both C and C++ libraries
40 > > and symbols for other programs to use. All C++ symbols are 'mangled',
41 > > which is a method the compiler uses to differentiate different functions
42 > > with the same name but different types (read up on C++ function
43 > > overloading and name mangling).
44 > >
45 > > 3.0 changed the mangling scheme used to mangle C++ names from what was
46 > > used with 2.x -- which means, quite simply, if you have an application
47 > > thats been compiled against libraries built with gcc 2.x, and then you
48 > > compile the libraries with 3.x, the application will cease to work,
49 > > because it will not be able to find the symbols it needs to run.
50 > > Usually, this will result in a core dump. This only affects programs
51 > > written in C++.
52 > >
53 > > This is exactly what happens with utilities such as tar, which is
54 > > written in C++ (which surprised me). Which is why, your
55 > > default-1.0-gcc3 profile will *NOT* enable someone to bootstrap with gcc
56 > > 3.0, unless you happen to have a stage1 ISO that has statically linked
57 > > binaries in it (theoretically, if you have statically linked binaries on
58 > > the whole system, you dont even NEED a /lib or /usr/lib directory,
59 > > because its all statically linked).
60 > >
61 > > This was the point I was trying to make. Dont get me wrong, I'm glad
62 > > the gcc3 profile is there, and I'm using it, because I use gcc3
63 > > exclusively -- however gcc3 (for now), is only available as a
64 > > POST-bootstrap (ie. stage2) compilation, until we get a 1.0 ISO with
65 > > statically linked binaries -- or binaries that are still dynamically
66 > > linked, but all compiled with gcc3.0 against a glibc compiled with
67 > > gcc3.0. Which brings in the chicken and the egg problem.
68 > >
69 > > This is also why you will have to lock people into a specific glibc
70 > > version in your gcc3 profile (which I've noticed you dont do right
71 > > now). Say someone bootstraps as normal, then installs gcc3, then
72 > > switches to your gcc3 profile, and continues to build the system. If,
73 > > at some later point, a new revision or version of glibc comes out, and
74 > > is put into the portage tree, and the user then does a world upgrade,
75 > > they will attempt to re-compile glibc. It will compile, but as soon as
76 > > it installs, a good proportion of the rest of their system will stop
77 > > working for exactly the reason I described. I've manually locked my
78 > > glibc version because of this fact, because I know I cant re-compile it
79 > > with gcc3 without breaking my system.
80 > >
81 > > If I get time, I'll sit down and think about how to actually create a
82 > > stage1 (the thing you tar -xvbjf onto your hard disk) system that is
83 > > totally gcc3 based, or see if I can create a stage1 with all statically
84 > > linked binaries in it. For now, thats not high on my priority list.
85 >
86 > _______________________________________________
87 > gentoo-dev mailing list
88 > gentoo-dev@g.o
89 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev
90 >
91 --
92 Geert Bevin Uwyn
93 "Use what you need" Lambermontlaan 148
94 http://www.uwyn.com 1030 Brussels
95 gbevin@××××.com Tel & Fax +32 2 245 41 06