Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black
Date: Fri, 09 Aug 2013 18:28:31
Message-Id: 20130809182823.GC3115@solfire
In Reply to: Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black by meino.cramer@gmx.de
1 meino.cramer@×××.de <meino.cramer@×××.de> [13-08-09 18:32]:
2 > Adam Carter <adamcarter3@×××××.com> [13-08-09 17:27]:
3 > > > I already tried do set new CFLAGS via /etc/portage/env/nolto.conf:
4 > > >
5 > > > beagleboneblack:portage/package.env>cat simh
6 > > > app-emulation/simh no-lto.conf
7 > > >
8 > > > and and an according file in /etc/porttage/package.env:
9 > > >
10 > > > beagleboneblack:portage/package.env>cat simh
11 > > > app-emulation/simh no-lto.conf
12 > > >
13 > > > but this does not have any effect.
14 > > >
15 > >
16 > > What's the contents of no-lto.conf ? Was the missing - a typo?
17 > >
18 > > FWIW - i have a lot of build failures with lto and gcc-4.7.3, but many of
19 > > these work with lto and gcc-4.6.3
20 >
21 > Hi Adam,
22 >
23 > Here is the contents of both files:
24 >
25 > beagleboneblack:portage/package.env>cat simh
26 > app-emulation/simh no-lto.conf
27 > beagleboneblack:portage/env>cat no-lto.conf
28 > CFLAGS="${CFLAGS} -fno-lto -fno-use-linker-plugin"
29 > CXXFLAGS="${CXXFLAGS} -fno-lto -fno-use-linker-plugin"
30 > LDFLAGS="${LDFLAGS} -fno-lto -fno-use-linker-plugin"
31 >
32 > The (only) gcc installed on my beaglebone black is:
33 >
34 > beagleboneblack:portage/env>gcc-config -l
35 > [1] armv7a-hardfloat-linux-gnueabi-4.6.3 *
36 >
37 > The USE-flag configuration of the gcc is:
38 > [I] sys-devel/gcc
39 > Available versions:
40 > (2.95) [M]~*2.95.3-r10^s
41 > (3.1) [M]*3.1.1-r2
42 > (3.2) **3.2.2^s *3.2.3-r4
43 > (3.3) ~*3.3.6-r1^s
44 > (3.4) 3.4.6-r2^s
45 > (4.0) ~*4.0.4^s
46 > (4.1) 4.1.2^s
47 > (4.2) ~4.2.4-r1^s
48 > (4.3) ~4.3.3-r2^s 4.3.4^s ~4.3.5^s 4.3.6-r1^s
49 > (4.4) ~4.4.2^s 4.4.3-r3^s 4.4.4-r2^s 4.4.5^s 4.4.6-r1^s 4.4.7^s
50 > (4.5) ~4.5.1-r1^s ~4.5.2^s 4.5.3-r2^s 4.5.4^s
51 > (4.6) ~4.6.0^s ~4.6.1-r1^s ~4.6.2^s 4.6.3^s ~4.6.4^s
52 > (4.7) ~4.7.0^s ~4.7.1^s ~4.7.2-r1^s ~4.7.3^s
53 > (4.8) [M]**4.8.0^s [M]**4.8.1^s
54 > {{altivec bootstrap boundschecking build cxx d doc fixed-point fortran gcj go graphite gtk hardened ip28 ip32r10k java libssp lto mudflap multilib multislot n32 n64 nls nopie nossp nptl objc objc++ objc-gc openmp regression-test static vanilla}}
55 > Installed versions: 4.6.3(4.6)^s(05:38:07 08/03/13)(cxx fortran mudflap nls nptl openmp -altivec -doc -fixed-point -gcj -graphite -gtk -hardened -libssp -lto -multilib -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla)
56 > Homepage: http://gcc.gnu.org/
57 > Description: The GNU Compiler Collection
58 >
59 > That is, there is no LTO-support compiled in the gcc (as mentioned in
60 > previous mail). As I think to have understood from searching and
61 > reading the web, LTO on the ARM platform is possible. But I am no
62 > gcc guru and therefore it is really possible that I have misunderstand
63 > what has been written... ;)
64 >
65 > Best regards,
66 > mcc
67 >
68 >
69 >
70 >
71
72
73 I have digged a little deeper...
74
75 The gcc which comes with the prepared stage3 image for the Gentoo on
76 Beaglebone/Black includes gcc 4.6.3.
77 As shown above the USE flag "lto" is disabled.
78
79 Nonetheless gcc reports "-flto" when called with
80
81 gcc --help=optimizers
82
83
84 reports:
85 -flto-report Report various link-time optimization statistics
86
87 This output i "grepped" by simh's own makefile to detect whether gcc
88 can be called with "-flto" or not.
89 It decides to use -flto while compiling and therefore the process
90 breaks with
91
92 cc1: error: LTO support has not been enabled in this configuration
93
94 The previous version of simh - which does not seem to use this feature at all --
95 compiels fine on the beaglebone.
96
97 For me I need to know, whether it is safe to recompile gcc natively on
98 the beaglebone with lto support enabled via USE flag.
99 This compilation will take about eight hours.
100 So it would be fine to decide on a little bit more than try and error. ;)
101
102 Or how can I circumvent the described problems?
103
104 Best regards,
105 mcc

Replies

Subject Author
Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black Adam Carter <adamcarter3@×××××.com>