This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] gold/s390: Fix compilation on gcc 4.4
- From: Cary Coutant <ccoutant at gmail dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>
- Cc: Binutils <binutils at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Thu, 19 May 2016 15:32:38 -0700
- Subject: Re: [PATCH] gold/s390: Fix compilation on gcc 4.4
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOrYq-owBtOzt9JO_3xnUYykvdNayaP1CnCBUE6pE53tgw at mail dot gmail dot com> <1462569184-28883-1-git-send-email-koriakin at 0x04 dot net>
> 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'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.
-cary