public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Finding dlltool using gcc
@ 2011-09-21  5:51 Stephen Kitt
  2011-09-21 14:06 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Kitt @ 2011-09-21  5:51 UTC (permalink / raw)
  To: gcc-help; +Cc: 632003, Bin Tian, Bill Allombert

Hi,

I'm the current maintainer of the MinGW-w64-based gcc toolchain in
Debian. I've been asked (see http://bugs.debian.org/632003 for the
full discussion) to provide a method by which users may find the
appropriate dlltool to use, without using autoconf.

Some programs use --print-prog-name to find dlltool and other such
tools; this works in some other Debian packages because they ship the
binaries in /usr/$target/bin. The gcc-mingw-w64 Debian packages
currently don't do this because it goes against Debian policy, and
from what I understand the recommended practice is to use
triplet-prefixed commands anyway (so in this case
/usr/bin/i686-w64-mingw32-dlltool rather than
/usr/i686-w64-mingw32/bin/dlltool). I'm wondering also whether using
gcc debugging information (print-prog-name) to find tools which aren't
strictly related to gcc is something which will be supported in the
future...

Is there a recommended approach to use to find dlltool using only
i686-w64-mingw32-gcc? I am wrong in dropping /usr/$target/bin?

(I have thought of a few approaches but I'd rather not orient the
discussion any more than I have already!)

Thanks in advance,

Stephen

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Finding dlltool using gcc
  2011-09-21  5:51 Finding dlltool using gcc Stephen Kitt
@ 2011-09-21 14:06 ` Ian Lance Taylor
  2011-09-23  2:00   ` Bin Tian
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Lance Taylor @ 2011-09-21 14:06 UTC (permalink / raw)
  To: Stephen Kitt; +Cc: gcc-help, 632003, Bin Tian, Bill Allombert

Stephen Kitt <steve@sk2.org> writes:

> Is there a recommended approach to use to find dlltool using only
> i686-w64-mingw32-gcc?

I don't know of one.  I don't know why avoiding autoconf is desirable.
However, if I were forced to do so, I would probably use gcc -v to get
the target name and look for TARGET-dlltool that way.

> I am wrong in dropping /usr/$target/bin?

No, you are right.  That directory is used to communicate programs from
the binutils to gcc, and there are no promises about what binaries may
be found there.

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Finding dlltool using gcc
  2011-09-21 14:06 ` Ian Lance Taylor
@ 2011-09-23  2:00   ` Bin Tian
  2011-09-23  2:56     ` Bin Tian
  2011-09-23 23:43     ` Bill Allombert
  0 siblings, 2 replies; 6+ messages in thread
From: Bin Tian @ 2011-09-23  2:00 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Stephen Kitt, gcc-help, 632003, Bill Allombert

Hi, all

On 2011年09月21日 22:06, Ian Lance Taylor wrote:
> Stephen Kitt<steve@sk2.org>  writes:
>
>> Is there a recommended approach to use to find dlltool using only
>> i686-w64-mingw32-gcc?
>
> I don't know of one.  I don't know why avoiding autoconf is desirable.
> However, if I were forced to do so, I would probably use gcc -v to get
> the target name and look for TARGET-dlltool that way.
gcc -dumpmachine is more relavant.

autoconf should be the proper way, because it deals with more 
circumstances. Any other attempts will be reinventing the wheel.

If autoconf is not desirable, we should try to find it in autoconf's 
way, try $target-dlltool first and dlltool next.

>
>> I am wrong in dropping /usr/$target/bin?
>
> No, you are right.  That directory is used to communicate programs from
> the binutils to gcc, and there are no promises about what binaries may
> be found there.
>

Despite the fact I submit the bug, I think this isn't a bug.

We could do nothing and just wait multiarch to be ready. There will be 
dlltool in /usr/$target/bin, isn't it?

Bin Tian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Finding dlltool using gcc
  2011-09-23  2:00   ` Bin Tian
@ 2011-09-23  2:56     ` Bin Tian
  2011-09-23 23:43     ` Bill Allombert
  1 sibling, 0 replies; 6+ messages in thread
From: Bin Tian @ 2011-09-23  2:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Stephen Kitt, gcc-help, 632003, Bill Allombert



On 2011年09月23日 10:02, Bin Tian wrote:
> Hi, all
>
> On 2011年09月21日 22:06, Ian Lance Taylor wrote:
>> Stephen Kitt<steve@sk2.org> writes:
>>
>>> Is there a recommended approach to use to find dlltool using only
>>> i686-w64-mingw32-gcc?
>>
>> I don't know of one. I don't know why avoiding autoconf is desirable.
>> However, if I were forced to do so, I would probably use gcc -v to get
>> the target name and look for TARGET-dlltool that way.
> gcc -dumpmachine is more relavant.
>
> autoconf should be the proper way, because it deals with more
> circumstances. Any other attempts will be reinventing the wheel.
>
> If autoconf is not desirable, we should try to find it in autoconf's
> way, try $target-dlltool first and dlltool next.
>
>>
>>> I am wrong in dropping /usr/$target/bin?
>>
>> No, you are right. That directory is used to communicate programs from
>> the binutils to gcc, and there are no promises about what binaries may
>> be found there.
>>
>
> Despite the fact I submit the bug, I think this isn't a bug.
>
> We could do nothing and just wait multiarch to be ready. There will be
> dlltool in /usr/$target/bin, isn't it?
sorry I'm wrong. /usr/$target/bin contains programs running on $target, 
this isn't true for cross-compiling toolchains.
>
> Bin Tian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Finding dlltool using gcc
  2011-09-23  2:00   ` Bin Tian
  2011-09-23  2:56     ` Bin Tian
@ 2011-09-23 23:43     ` Bill Allombert
  2011-09-26  9:07       ` Bug#632003: " Stephen Kitt
  1 sibling, 1 reply; 6+ messages in thread
From: Bill Allombert @ 2011-09-23 23:43 UTC (permalink / raw)
  To: Bin Tian; +Cc: Ian Lance Taylor, Stephen Kitt, gcc-help, 632003

On Fri, Sep 23, 2011 at 10:02:07AM +0800, Bin Tian wrote:
> Hi, all
> 
> On 2011年09月21日 22:06, Ian Lance Taylor wrote:
> >Stephen Kitt<steve@sk2.org>  writes:
> >
> >>Is there a recommended approach to use to find dlltool using only
> >>i686-w64-mingw32-gcc?
> >
> >I don't know of one.  I don't know why avoiding autoconf is desirable.
> >However, if I were forced to do so, I would probably use gcc -v to get
> >the target name and look for TARGET-dlltool that way.
> gcc -dumpmachine is more relavant.

Yes, gcc -dumpmachine reports the right value, thanks a lot for the suggestion.

> autoconf should be the proper way, because it deals with more
> circumstances. Any other attempts will be reinventing the wheel.

The configure system of the software in case predates autoconf by a large margin.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Bug#632003: Finding dlltool using gcc
  2011-09-23 23:43     ` Bill Allombert
@ 2011-09-26  9:07       ` Stephen Kitt
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Kitt @ 2011-09-26  9:07 UTC (permalink / raw)
  To: Bill Allombert, 632003-done; +Cc: Bin Tian, Ian Lance Taylor, gcc-help

Hi,

On Fri, Sep 23, 2011 at 09:03:24PM +0200, Bill Allombert wrote:
> On Fri, Sep 23, 2011 at 10:02:07AM +0800, Bin Tian wrote:
> > On 2011年09月21日 22:06, Ian Lance Taylor wrote:
> > >Stephen Kitt<steve@sk2.org>  writes:
> > >
> > >>Is there a recommended approach to use to find dlltool using only
> > >>i686-w64-mingw32-gcc?
> > >
> > >I don't know of one.  I don't know why avoiding autoconf is desirable.
> > >However, if I were forced to do so, I would probably use gcc -v to get
> > >the target name and look for TARGET-dlltool that way.
> > gcc -dumpmachine is more relavant.
> 
> Yes, gcc -dumpmachine reports the right value, thanks a lot for the suggestion

Thank you all for your input, sine the "-dumpmachine" suggestion seems
acceptable I'm closing this bug.

Best regards,

Stephen

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-25 21:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21  5:51 Finding dlltool using gcc Stephen Kitt
2011-09-21 14:06 ` Ian Lance Taylor
2011-09-23  2:00   ` Bin Tian
2011-09-23  2:56     ` Bin Tian
2011-09-23 23:43     ` Bill Allombert
2011-09-26  9:07       ` Bug#632003: " Stephen Kitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).