Gentoo Archives: gentoo-amd64

From: Kirby Walborn <kirby@×××××××××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] gcc 4.1 + CFLAGS
Date: Fri, 09 Jun 2006 11:39:09
Message-Id: 44895C73.7090207@walborncattle.com
In Reply to: Re: [gentoo-amd64] gcc 4.1 + CFLAGS by Samir Mishra
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Samir Mishra wrote:
5 > Fernando Boaglio wrote:
6 >> Hi there!
7 >>
8 >> I was told with gcc 4.1 you can't play with some CFLAGS because you
9 >> will really break your system (more dangerous than gcc 3.x ! ).
10 >>
11 >> Have you tried "emerge -e system" with GCC + some uncommon flag?
12 >>
13 >> Can you share your CFLAGS with us ?
14 >>
15 >> TIA!
16 >> []'s
17 >> boaglio@×××××.com
18 >
19 > These are the flag settings I have. My WS has >2GB RAM so I'm using
20 > -mcmodel=medium. But as you can see, they are hardly "safe".
21 >
22 > Of the list below, the LDFLAGS -Wl,-Bdirect -Wl,-hashvals is supposed to
23 > make the biggest difference. I have no means of comparison.
24 >
25 > A few applications fail to compile, but so far from the >500 packages I
26 > currently have on my system, only the following have failed to compile
27 > -- glibc-2.4, gcc, sandbox, strace, transcode, libmpeg3. A few other
28 > applications, mainly noticed with audio applications, are behaving
29 > "strange". But I haven't had the opportunity to track all these problems
30 > down.
31 >
32 > # For GCC 4+
33 > CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer
34 > -frename-registers -mno-tls-direct-seg-refs -mcmodel=medium"
35 > CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
36 > LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-Bdirect
37 > -Wl,-hashvals -Wl,-zdynsort -s"
38 >
39 > # For GCC -- 3.4.5
40 > #CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -fforce-addr -ftracer
41 > -frename-registers"
42 > #CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
43 > #LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags -Wl,-zdynsort
44 > -s"
45 >
46 > # For minimal variable definitions
47 > #CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
48 > #CXXFLAGS="${CFLAGS}"
49 > #LDFLAGS="-Wl,-O1"
50 >
51 >
52 > Samir
53 I see you have some ldflags listed. Where can a person find information
54 on these. I've tried to google around about them and haven't had much
55 luck trying to figure it out.
56
57 BTW my cflags are:
58
59 CFLAGS="-march=k8 -Os -pipe -fomit-frame-pointer -frename-registers
60 - -funit-at-a-time -fweb -freorder-blocks -freorder-blocks-and-partition
61 - -ftree-pre -fmerge-all-constants"
62 CXXFLAGS="-march=k8 -Os -pipe -fomit-frame-pointer -frename-registers
63 - -funit-at-a-time -fweb -freorder-blocks -ftree-pre -fmerge-all-constants"
64
65 Duncan mentioned these a while ago and I used them with no problems.
66 But I was curious about ldflags if anybody has pointers.
67
68
69 - --
70
71 Kirby Walborn
72 -----BEGIN PGP SIGNATURE-----
73 Version: GnuPG v1.4.3 (GNU/Linux)
74 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
75
76 iD8DBQFEiVxz5HAWgdRxRvURAmjEAJwPvXs5+G7TlRzlHfSX5CMonr2dnACgliCM
77 PYyHNTxLDEhZUzpMBiNPcXw=
78 =Wx6x
79 -----END PGP SIGNATURE-----
80 --
81 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] gcc 4.1 + CFLAGS Simon Stelling <blubb@g.o>
[gentoo-amd64] Re: gcc 4.1 + CFLAGS Duncan <1i5t5.duncan@×××.net>