This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

trunk gold not building unoptimized, powerpc.cc refs to invalid_address and pltresolve_size


I've been unable to compile the trunk version of gold for a while now.
There are lots of these kinds of link errors:

gold/powerpc.cc:3103: undefined reference to `(anonymous
namespace)::Stub_table<32, false>::invalid_address'
gold/powerpc.cc:3310: undefined reference to `(anonymous
namespace)::Output_data_glink<64, true>::pltresolve_size'

This is on the Google-modified version of Ubuntu 12.04.1,
gcc -v says "gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)".

This is with CXXFLAGS=-g in the configure line, so unoptimized.
There is no link error with CXXFLAGS='-g -O2'.

My guess is that optimized code folds these 'static const' class members as
constants but unoptimized code doesn't, and that powerpc.cc ought to be
doing something to explicitly instantiate its templates.  But I don't know
all the details of C++ template instantiation rules, so the fix is not
obvious to me.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]