This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Fix build of gold/mips.cc with GCC 4.3
- From: Richard Biener <rguenther at suse dot de>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Cary Coutant <ccoutant at gmail dot com>, Binutils <binutils at sourceware dot org>
- Date: Wed, 26 Jul 2017 13:37:20 +0200 (CEST)
- Subject: Re: [PATCH] Fix build of gold/mips.cc with GCC 4.3
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1707261249410.10808@zhemvz.fhfr.qr> <CAMe9rOrZa=i4hre4BML3gzxj_mjx=TbsiMFnVKvK+_uGyBRUhw@mail.gmail.com>
On Wed, 26 Jul 2017, H.J. Lu wrote:
> On Wed, Jul 26, 2017 at 3:55 AM, Richard Biener <rguenther@suse.de> wrote:
> >
> > I need the following to fix build with GCC 4.3 which with -m32 complains
> > about 0x800080008000 being too large for 'long' type. GCC 4.8
> > doesn't complain so not sure whether it just silently discards extra
> > precision or if the standard mandates a long-long literal here.
> >
> > Richard.
> >
> > --- gold/mips.cc.orig 2017-07-26 12:42:53.595075930 +0200
> > +++ gold/mips.cc 2017-07-26 12:43:15.859443263 +0200
> > @@ -5664,7 +5664,7 @@
> > : addend_a);
> >
> > Valtype x = psymval->value(object, addend);
> > - x = ((x + (uint64_t) 0x800080008000) >> 48) & 0xffff;
> > + x = ((x + (uint64_t) 0x800080008000ULL) >> 48) & 0xffff;
> > val = Bits<32>::bit_select32(val, x, 0xffff);
> >
> > if (calculate_only)
>
> See:
>
> https://sourceware.org/ml/binutils/2017-05/msg00013.html
I see. Ran into this with the 2.29 release though, so please update
the branch as well if the patch gets ok-ed.
Thanks,
Richard.