Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black

2013-08-09 Thread Adam Carter
 I already tried do set new CFLAGS via /etc/portage/env/nolto.conf:

 beagleboneblack:portage/package.envcat simh
 app-emulation/simh no-lto.conf

 and and an according file in /etc/porttage/package.env:

 beagleboneblack:portage/package.envcat simh
 app-emulation/simh no-lto.conf

 but this does not have any effect.


What's the contents of no-lto.conf ? Was the missing - a typo?

FWIW - i have a lot of build failures with lto and gcc-4.7.3, but many of
these work with lto and gcc-4.6.3


Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black

2013-08-09 Thread meino . cramer
Adam Carter adamcart...@gmail.com [13-08-09 17:27]:
  I already tried do set new CFLAGS via /etc/portage/env/nolto.conf:
 
  beagleboneblack:portage/package.envcat simh
  app-emulation/simh no-lto.conf
 
  and and an according file in /etc/porttage/package.env:
 
  beagleboneblack:portage/package.envcat simh
  app-emulation/simh no-lto.conf
 
  but this does not have any effect.
 
 
 What's the contents of no-lto.conf ? Was the missing - a typo?
 
 FWIW - i have a lot of build failures with lto and gcc-4.7.3, but many of
 these work with lto and gcc-4.6.3

Hi Adam,

Here is the contents of both files:

beagleboneblack:portage/package.envcat simh 
app-emulation/simh no-lto.conf
beagleboneblack:portage/envcat no-lto.conf 
CFLAGS=${CFLAGS} -fno-lto -fno-use-linker-plugin
CXXFLAGS=${CXXFLAGS} -fno-lto -fno-use-linker-plugin
LDFLAGS=${LDFLAGS} -fno-lto -fno-use-linker-plugin

The (only) gcc installed on my beaglebone black is:

beagleboneblack:portage/envgcc-config -l
[1] armv7a-hardfloat-linux-gnueabi-4.6.3 *

The USE-flag configuration of the gcc is:
[I] sys-devel/gcc
Available versions:  
(2.95)  [M]~*2.95.3-r10^s
(3.1)   [M]*3.1.1-r2
(3.2)   **3.2.2^s *3.2.3-r4
(3.3)   ~*3.3.6-r1^s
(3.4)   3.4.6-r2^s
(4.0)   ~*4.0.4^s
(4.1)   4.1.2^s
(4.2)   ~4.2.4-r1^s
(4.3)   ~4.3.3-r2^s 4.3.4^s ~4.3.5^s 4.3.6-r1^s
(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
(4.5)   ~4.5.1-r1^s ~4.5.2^s 4.5.3-r2^s 4.5.4^s
(4.6)   ~4.6.0^s ~4.6.1-r1^s ~4.6.2^s 4.6.3^s ~4.6.4^s
(4.7)   ~4.7.0^s ~4.7.1^s ~4.7.2-r1^s ~4.7.3^s
(4.8)   [M]**4.8.0^s [M]**4.8.1^s
{{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}}
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)
Homepage:http://gcc.gnu.org/
Description: The GNU Compiler Collection

That is, there is no LTO-support compiled in the gcc (as mentioned in
previous mail). As I think to have understood from searching and
reading the web, LTO on the ARM platform is possible. But I am no
gcc guru and therefore it is really possible that I have misunderstand
what has been written... ;)

Best regards,
mcc






Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black

2013-08-09 Thread meino . cramer
meino.cra...@gmx.de meino.cra...@gmx.de [13-08-09 18:32]:
 Adam Carter adamcart...@gmail.com [13-08-09 17:27]:
   I already tried do set new CFLAGS via /etc/portage/env/nolto.conf:
  
   beagleboneblack:portage/package.envcat simh
   app-emulation/simh no-lto.conf
  
   and and an according file in /etc/porttage/package.env:
  
   beagleboneblack:portage/package.envcat simh
   app-emulation/simh no-lto.conf
  
   but this does not have any effect.
  
  
  What's the contents of no-lto.conf ? Was the missing - a typo?
  
  FWIW - i have a lot of build failures with lto and gcc-4.7.3, but many of
  these work with lto and gcc-4.6.3
 
 Hi Adam,
 
 Here is the contents of both files:
 
 beagleboneblack:portage/package.envcat simh 
 app-emulation/simh no-lto.conf
 beagleboneblack:portage/envcat no-lto.conf 
 CFLAGS=${CFLAGS} -fno-lto -fno-use-linker-plugin
 CXXFLAGS=${CXXFLAGS} -fno-lto -fno-use-linker-plugin
 LDFLAGS=${LDFLAGS} -fno-lto -fno-use-linker-plugin
 
 The (only) gcc installed on my beaglebone black is:
 
 beagleboneblack:portage/envgcc-config -l
 [1] armv7a-hardfloat-linux-gnueabi-4.6.3 *
 
 The USE-flag configuration of the gcc is:
 [I] sys-devel/gcc
 Available versions:  
 (2.95)[M]~*2.95.3-r10^s
 (3.1) [M]*3.1.1-r2
 (3.2) **3.2.2^s *3.2.3-r4
 (3.3) ~*3.3.6-r1^s
 (3.4) 3.4.6-r2^s
 (4.0) ~*4.0.4^s
 (4.1) 4.1.2^s
 (4.2) ~4.2.4-r1^s
 (4.3) ~4.3.3-r2^s 4.3.4^s ~4.3.5^s 4.3.6-r1^s
 (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
 (4.5) ~4.5.1-r1^s ~4.5.2^s 4.5.3-r2^s 4.5.4^s
 (4.6) ~4.6.0^s ~4.6.1-r1^s ~4.6.2^s 4.6.3^s ~4.6.4^s
 (4.7) ~4.7.0^s ~4.7.1^s ~4.7.2-r1^s ~4.7.3^s
 (4.8) [M]**4.8.0^s [M]**4.8.1^s
 {{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}}
 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)
 Homepage:http://gcc.gnu.org/
 Description: The GNU Compiler Collection
 
 That is, there is no LTO-support compiled in the gcc (as mentioned in
 previous mail). As I think to have understood from searching and
 reading the web, LTO on the ARM platform is possible. But I am no
 gcc guru and therefore it is really possible that I have misunderstand
 what has been written... ;)
 
 Best regards,
 mcc
 
 
 
 


I have digged a little deeper...

The gcc which comes with the prepared stage3 image for the Gentoo on
Beaglebone/Black includes gcc 4.6.3.
As shown above the USE flag lto is disabled.

Nonetheless gcc reports -flto when called with

gcc --help=optimizers


reports:
-flto-reportReport various link-time optimization statistics

This output i grepped by simh's own makefile to detect whether gcc
can be called with -flto or not.
It decides to use -flto while compiling and therefore the process
breaks with 

cc1: error: LTO support has not been enabled in this configuration

The previous version of simh - which does not seem to use this feature at all --
compiels fine on the beaglebone.

For me I need to know, whether it is safe to recompile gcc natively on
the beaglebone with lto support enabled via USE flag.
This compilation will take about eight hours.
So it would be fine to decide on a little bit more than try and error. ;)

Or how can I circumvent the described problems?

Best regards,
mcc






Re: [gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black

2013-08-09 Thread Adam Carter

 For me I need to know, whether it is safe to recompile gcc natively on
 the beaglebone with lto support enabled via USE flag.
 This compilation will take about eight hours.
 So it would be fine to decide on a little bit more than try and error. ;)

 Or how can I circumvent the described problems?


There's not much risk to just try the recompile, since you can always
revert to the gcc from the tarball, right? (or quickpkg) Or is it the 8
hours that you're concerned about? If so, sounds like an overnight job.

When looking at this on my system I found that lto use flag was not in gcc
- so i have broken my config at some stage. (im whilelisting packages for
lto, not blacklisting, so the config is a little different). Rebuilding
4.7.3 now to try it out.


[gentoo-user] -flto set for simh-3.9.0-r1 let gcc fail on my Beaglebone Black

2013-08-08 Thread meino . cramer
Hi,

for app-emulation/sim-3.9.0-r1 (in opposite to the previous version)
-flto was set.
But there is no LOT-support in gcc, which is delivered with the stage3
build of gentoo for ARMv7 (Beaglebone/black).

I already tried do set new CFLAGS via /etc/portage/env/nolto.conf:

beagleboneblack:portage/package.envcat simh 
app-emulation/simh no-lto.conf

and and an according file in /etc/porttage/package.env:

beagleboneblack:portage/package.envcat simh 
app-emulation/simh no-lto.conf

but this does not have any effect.

What is the least intrusive, most compatible way for me to disable the
use of -flto in this ebuild?

Thank you very much in advance for any help!
Best regards,
mcc