This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch bfd]: Add further support for x86_64 mingw
- From: "Kai Tietz" <ktietz70 at googlemail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: NightStrike <nightstrike at gmail dot com>, "Nick Clifton" <nickc at redhat dot com>, "Kai Tietz" <Kai dot Tietz at onevision dot com>, "Brian Dessent" <brian at dessent dot net>, Binutils <binutils at sourceware dot org>
- Date: Sat, 2 Feb 2008 23:09:27 +0100
- Subject: Re: [patch bfd]: Add further support for x86_64 mingw
- References: <OFD44C141F.CC8314BC-ONC12573D8.00594C37-C12573D8.00596882@onevision.de> <479A0C7D.9040809@redhat.com> <6dc9ffc80802020827t682627f3n7fae4805553db56b@mail.gmail.com> <b609cb3b0802020852m31a52268lb1302087b8bb0f4f@mail.gmail.com> <90baa01f0802020902k38eec834j6925c403781269c2@mail.gmail.com> <20080202202245.GA21023@lucon.org>
2008/2/2, H.J. Lu <hjl.tools@gmail.com>:
> On Sat, Feb 02, 2008 at 06:02:11PM +0100, Kai Tietz wrote:
> > 2008/2/2, NightStrike <nightstrike@gmail.com>:
> > >
> > > On 2/2/08, H.J. Lu <hjl.tools@gmail.com> wrote:
> > > > On Jan 25, 2008 8:21 AM, Nick Clifton <nickc@redhat.com> wrote:
> > > > > Hi Kai,
> > > > >
> > > > > > I attached the updated patch files.
> > > > >
> > > > > Approved and applied.
> > > > >
> > > > > I think that in the long run it would be better to move these print
> > > format
> > > > > strings into a header but for now the patch is OK.
> > > > >
> > > > > Cheers
> > > > > Nick
> > > > >
> > > > >
> > > > >
> > > >
> > > > FYI, those x86_64 mingw patches have broken 32bit mingw host for 64bit
> > > > target: when compiling
> > > > with gcc 4.1:
> > > >
> > > > http://sourceware.org/bugzilla/show_bug.cgi?id=5715
> > > >
> > > >
> > > > H.J.
> > >
> > >
> > > I think that the problem was always there to begin with, and Kai's
> > > patch just exposed it and stopped it from being compiled silently. In
> > > this case, Win32 mingw may be wrong.
> > >
> >
> > Indeed, this patch is not related to 64-bit only. May the header is a bit
> > misleading. 64-bit and 32-bit ms printf formatter are not supporting a
> > working length specifier 'll'. It is for both platforms 'I64' and nothing
> > else. Otherwise the binutils applications are compiling silently, but do not
> > work as demanded.
> > May we should disable for mingw the error about warnings for formatters.
>
> Or we can use things like
>
> #define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
> #define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
> #define fprintf_vma(s,x) \
> fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
> #define sprintf_vma(s,x) \
> sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
H.J.,
This would be a partial solution for bfd. But the 'll' is used on some
places in binutils and gas, too. So we have to change them too. A
positive side effect of this approach is, that we won't need target
specific '#if' clauses.
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination