[PATCH] gold/s390: Fix compilation on gcc 4.4
Marcin Kościelnicki
koriakin@0x04.net
Thu May 19 22:42:00 GMT 2016
On 20/05/16 00:32, Cary Coutant wrote:
>> 2016-05-06 Marcin KoÅcielnicki <koriakin@0x04.net>
>>
>> PR/19960
>> * s390.cc (Target_s390::ss_code_st_r14): Removed.
>> (Target_s390::ss_code_l_r14): Removed.
>> (Target_s390::ss_code_ear): Removed.
>> (Target_s390::ss_code_c): Removed.
>> (Target_s390::ss_match_st_r14): New function.
>> (Target_s390::ss_match_l_r14): New function.
>> (Target_s390::ss_match_mcount): Call ss_match_{l,st}_r14 instead
>> of matching code directly.
>> (Target_s390::ss_match_ear): New function.
>> (Target_s390::ss_match_c): New function.
>> (Target_s390::do_calls_non_split): Call ss_match_{ear,c} instead
>> of matching code directly.
>
> This is OK. I don't necessarily want to go to a lot of trouble to get
> things to work with such an old compiler, but this patch seems
> straightforward enough, and shouldn't ultimately affect performance.
>
> Thanks!
>
>> Btw, while this fixes the compile failure on gcc 4.4 (and was tested with newer
>> gcc as well), I also see an unrelated link failure in gold:
>>
>> dwp.o: In function `gold::Sized_relobj_dwo<64, true>::setup()':
>> /home/mwk/binutils-gdb/gold/dwp.cc:803: undefined reference to `std::map<unsigned int, gold::Compressed_section_info, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, gold::Compressed_section_info> > >* gold::build_compressed_section_map<64, true>(unsigned char const*, unsigned int, char const*, unsigned long, gold::Object*, bool)'
>> dwp.o: In function `gold::Sized_relobj_dwo<64, false>::setup()':
>> /home/mwk/binutils-gdb/gold/dwp.cc:803: undefined reference to `std::map<unsigned int, gold::Compressed_section_info, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, gold::Compressed_section_info> > >* gold::build_compressed_section_map<64, false>(unsigned char const*, unsigned int, char const*, unsigned long, gold::Object*, bool)'
>> dwp.o: In function `gold::Sized_relobj_dwo<32, true>::setup()':
>> /home/mwk/binutils-gdb/gold/dwp.cc:803: undefined reference to `std::map<unsigned int, gold::Compressed_section_info, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, gold::Compressed_section_info> > >* gold::build_compressed_section_map<32, true>(unsigned char const*, unsigned int, char const*, unsigned long, gold::Object*, bool)'
>> dwp.o: In function `gold::Sized_relobj_dwo<32, false>::setup()':
>> /home/mwk/binutils-gdb/gold/dwp.cc:803: undefined reference to `std::map<unsigned int, gold::Compressed_section_info, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, gold::Compressed_section_info> > >* gold::build_compressed_section_map<32, false>(unsigned char const*, unsigned int, char const*, unsigned long, gold::Object*, bool)'
>>
>> (repeated à lots)
>
> By "repeated", do you mean the same function with the same reference,
> or are there many other sets of undefined reference errors?
I don't remember anymore, but I think it was all to the same function.
> I'm not
> sure what to do about this -- it seems like a bug in GCC where it
> incorrectly assumes that the referenced function is instantiated
> elsewhere. Anyway, I'll build a copy of GCC 4.4 and try to see what's
> up here when I get a chance.
If you have access to the GCC compile farm, gcc10 has it as the default
compiler (it's where I tested this patch).
>
> -cary
>
More information about the Binutils
mailing list