User account creation filtered due to spam.

Bug 49228 - gcc fails to compile on darwin (with lto)
Summary: gcc fails to compile on darwin (with lto)
Status: RESOLVED DUPLICATE of bug 48086
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2011-05-30 08:39 UTC by vincenzo Innocente
Modified: 2011-05-30 09:28 UTC (History)
0 users

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description vincenzo Innocente 2011-05-30 08:39:02 UTC
compiling gcc on darwin stops at
/Users/innocent/RealStuff/gcc-4.7-20110528/host-x86_64-apple-darwin10.7.0/prev-gcc/xgcc -B/Users/innocent/RealStuff/gcc-4.7-20110528/host-x86_64-apple-darwin10.7.0/prev-gcc/ -B/usr/local/x86_64-apple-darwin10.7.0/bin/ -B/usr/local/x86_64-apple-darwin10.7.0/bin/ -B/usr/local/x86_64-apple-darwin10.7.0/lib/ -isystem /usr/local/x86_64-apple-darwin10.7.0/include -isystem /usr/local/x86_64-apple-darwin10.7.0/sys-include    -c  -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -mdynamic-no-pic -flto=jobserver -frandom-seed=1 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes  -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -Ic-family -I../.././gcc -I../.././gcc/c-family -I../.././gcc/../include -I./../intl -I../.././gcc/../libcpp/include  -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd -I../libdecnumber    ../.././gcc/c-family/c-common.c -o c-family/c-common.o
/var/folders/Ur/UrR7agy72RWuJU+BYnMxQU+++TQ/-Tmp-//ccISnqXM.s:287338:FATAL:too many sections (maximum 255)

/Users/innocent/RealStuff/gcc-4.7-20110528/host-x86_64-apple-darwin10.7.0/prev-gcc/xgcc -v
Using built-in specs.
Target: x86_64-apple-darwin10.7.0
Configured with: ./configure --enable-languages=c,c++,fortran --enable-lto --with-build-config=bootstrap-lto CFLAGS='-O2 -ftree-vectorize -fPIC' CXXFLAGS='-O2 -fPIC -ftree-vectorize -fvisibility-inlines-hidden'
Thread model: posix
gcc version 4.7.0 20110528 (experimental) (GCC) 

it is the first time I try lto on MAC 
removing -flto compile
Comment 1 Dominique d'Humieres 2011-05-30 09:11:59 UTC
This is a duplicate of pr48086. If you want to use lto on darwin, you have to revert to Xcode 3.2.5 or try the patch in (see pr48108).

*** This bug has been marked as a duplicate of bug 48086 ***
Comment 2 Dominique d'Humieres 2011-05-30 09:28:50 UTC
If you want to keep most of Xcode 3.2.6, but live dangerously with lto, you can also do what I have done: i.e., replace

Apple Inc version cctools-795~45, GNU assembler version 1.38

of 3.2.6 with

Apple Inc version cctools-782~33, GNU assembler version 1.38

 from 3.2.5. The relevant beasts are in /usr/libexec/gcc/darwin/x86_64 and /usr/libexec/gcc/darwin/i386/. Use at your own risk!-)