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]

Re: [patch bfd]: Add further support for x86_64 mingw


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


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