Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to properly change CFLAGS ?
Date: Tue, 22 Aug 2006 07:28:02
Message-Id: 44EAB0E4.2020802@xunil.at
In Reply to: Re: [gentoo-user] How to properly change CFLAGS ? by Richard Fish
1 Richard Fish schrieb:
2 > On 8/21/06, Stefan G. Weichinger <lists@×××××.at> wrote:
3 >> Richard Fish schrieb:
4 >> > or "emerge -e world" to complete. I would be tempted to just change
5 >> > the flags and hold off on recompiling everything until the next
6 >> > version of gcc comes out.
7 >>
8 >> ( ... "next version" in terms of minor- or major-version?)
9 >
10 > Gcc version numbers are in the form of X.Y.Z, so at a change in X or
11 > Y. The .Z changes should be just bug-fixes. The sad thing is that,
12 > due to changes in the C++ library, it is commonly to recompile all C++
13 > applications when a new version of gcc comes out.
14
15 How do I know which they are? Certain USE-flags?
16
17 > And even if it
18 > isn't strictly /necessary/, an emerge -e world is considered the safe
19 > way to handle a gcc upgrade.
20
21 Ok.
22
23
24 >> I see the point in this. (AFAIK there is no way to break up "emerge -e
25 >> xy" into smaller pieces, something to do in several separated steps.
26 >
27 > Actually there is. You can find all packages not compiled with -Os
28 > and rebuild them with something like:
29 >
30 > cd /var/db/pkg
31 > for pkg in */* ; do
32 > grep -v -- "-Os" $pkg/CFLAGS >/dev/null
33 > test $? -eq 0 && emerge --oneshot =$pkg
34 > done
35
36 Threw me an error immediately with zsh, in bash it starts off fine ...
37 thanks!
38
39 This way I am able to run this step by step while I am working on other
40 machines, satisfying my need for constant changes ;-)
41
42 >> From your posting I conclude that it also won't do any harm to re-emerge
43 >> selected parts with new CFLAGS?)
44 >
45 > Correct.
46
47 Good to know.
48
49 >> Apart from this I have enough computer-related experience to know that I
50 >> simply should be happy with the
51 >> luks-encrypted/cpufreq'ed/hibernating/etc. gentoo-system I now have at
52 >> hand, instead of spending numerous hours to gain minimal speedups.
53 >
54 > Hrm, I also have the experience, but apparently not the good sense.... :-P
55
56 I also don't have that all the time, not at all. At least I get better
57 in preparing my steps with proper backups etc. so the loss of time
58 and/or data is drastically reduced compared to earlier times. So in a
59 way it gets even more interesting to try things.
60
61 Thanks, Stefan.
62
63 --
64 gentoo-user@g.o mailing list