[PATCH] Fix the --enable-shared build
Will Schmidt
will_schmidt at vnet.ibm.com
Wed Aug 20 09:32:22 PDT 2014
On Tue, 2014-08-19 at 18:39 -0400, Rafael Avila de Espindola wrote:
> > I've tried several testcases, both the snippet from
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61659#c0 and the
> > testcase/attachment at
> > https://gcc.gnu.org/bugzilla/attachment.cgi?id=33036
> >
> > ~> head -n 1 simple.cpp
> > struct generic_parser_base {
> >
> > ~> /home/willschm/install/gcc-4.9-20140806/bin/c++ ~/simple.cpp
> > /lib/../lib64/crt1.o:(.rodata+0x8): undefined reference to `main'
> > /tmp/ccrlSpMV.o: In function `list::list()':
> > simple.cpp:(.text._ZN4listC2Ev[_ZN4listC5Ev]+0x34): undefined reference to `PassNameParser::PassNameParser()'
> > collect2: error: ld returned 1 exit status
> >
> > ~> head -n 1 foo.cpp
> > template <typename _Tp> _Tp *__addressof (_Tp &);
> > ~> /home/willschm/install/gcc-4.9-20140806/bin/c++ ~/foo.cpp -std=c++11
> > /lib/../lib64/crt1.o:(.rodata+0x8): undefined reference to `main'
> > collect2: error: ld returned 1 exit status
> >
>
>
> Note that the bug is in the optimizer and the the reduced testcase is not a full program, so you should probably test with g++ -c -O3.
Ok, the -O3 is what I was missing. :-)
gcc-4.7.4 is OK
gcc-4.8.3 is OK.
gcc-5-20140817 is OK.
The gcc-4.9 snapshots that I've tried still show the error. (that is
against the simple.cpp testcase referenced above, with
gcc versions including:
gcc-4.9.0
gcc-4.9-20140528
gcc-4.9-20140625
gcc-4.9-20140702
gcc-4.9-20140806
So.. the fix is in Trunk, but not (yet?) backported to 4.9 ?
Thanks,
-Will
>
> Cheers,
> Rafael
>
More information about the llvm-commits
mailing list