[PATCH] Fix the --enable-shared build

Will Schmidt will_schmidt at vnet.ibm.com
Tue Aug 19 15:27:21 PDT 2014


On Tue, 2014-08-19 at 13:24 -0400, Rafael EspĂ­ndola wrote:
> > That is problematic -- I was counting on the fact that the issue is
> > fixed on newer gcc versions (and so the problem would just go away as
> > we upgrade our gcc).
> >
> > Is it possible the issue here is not the same as the issue filed on
> > gcc's bug tracker?
> 
> I just noticed the bug is still marked as open and pinged jason on IR.
> The particular issue we were  having was fixed in r212174, they are
> keeping the bug open to track followup problems.
> 
> I just checked that the reduced testcase included in
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61659#c0 is still fixed
> on trunk, but not in the 4.9 branch. Can you test it with the compiler
> you are using?

I'm definitely not seeing the undefined reference to getoption() sort of
messages that I expected to see with the testcases...    I had wiped my
build trees earlier, so don't expect there is a stale object in my
directories here, but I'll continue poking this tomorrow to try to make
sense of whats going on... 

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




> Cheers,
> Rafael
> 





More information about the llvm-commits mailing list