public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
To: cygwin-apps <cygwin-apps@cygwin.com>
Subject: Re: GCC dependencies (attn David Billinghurst)
Date: Sun, 14 Aug 2011 19:30:00 -0000	[thread overview]
Message-ID: <1313350188.3232.20.camel@YAAKOV04> (raw)
In-Reply-To: <20110813141124.GE4098@calimero.vinschen.de>

On Sat, 2011-08-13 at 16:11 +0200, Corinna Vinschen wrote:
> > BTW, for those interested, I'm already working on updating the Fedora
> > Cygwin toolchain to match the recent binutils/gdb releases and add the
> > --large-address-aware patch, along with restoring cygwin-gcc-java for
> > F15.

FYI, this has been pushed to the servers now.

> There's a small glitch in the cross toolchain:
> 
>   $ i686-pc-cygwin-gcc foo.c -o foo
>   $ ls foo*
>   foo  foo.c

Confirmed, and now I see that the same happens with Fedora's
mingw32-gcc.

> Since foo is a Cygwin executable, shouldn't gcc append .exe?

This would make sense.  Since mingw32-gcc does the same thing, I'll
guess that the .exe magic was only implemented for a native compiler.

Looking at the code, the .exe handling is added in gcc/gcc.c.  There are
two macros: HOST_EXECUTABLE_SUFFIX (which adds .exe to the commands it
calls (cc1/as/collect2/ld), and TARGET_EXECUTABLE_SUFFIX, which is used
only for and in convert_filename() to change the output filename.  But
the latter is only used if:

/* By default there is no special suffix for target executables.  */
/* FIXME: when autoconf is fixed, remove the host check - dj */
#if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX)
#define HAVE_TARGET_EXECUTABLE_SUFFIX
#endif

I may be new to the GCC code, but that just looks bogus.  On Linux,
HOST_EXECUTABLE_SUFFIX is obviously empty, but why should that control
HAVE_TARGET_EXECUTABLE_SUFFIX?

I've made a patch to change that, and am rebuilding cygwin-gcc with that
now.  If it works (and I don't see why it won't), I'll go ahead and
respin releases with the patch.

Dave, anything to add here?


Yaakov


  reply	other threads:[~2011-08-14 19:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-27  3:12 Yaakov (Cygwin/X)
2011-07-28 11:56 ` David Billinghurst
2011-07-29 23:37   ` Yaakov (Cygwin/X)
2011-07-30  0:26 ` Yaakov (Cygwin/X)
2011-08-09 18:45 ` Dave Korn
2011-08-09 21:46   ` David Billinghurst
2011-08-12 12:09   ` Yaakov (Cygwin/X)
2011-08-12 12:41     ` Yaakov (Cygwin/X)
2011-08-13 14:12       ` Corinna Vinschen
2011-08-14 19:30         ` Yaakov (Cygwin/X) [this message]
2011-08-15  4:03           ` Yaakov (Cygwin/X)
2011-08-15  7:42             ` Corinna Vinschen
2011-08-16 12:33           ` Dave Korn
2011-08-12 15:49     ` Dave Korn
2011-08-12 16:21       ` Yaakov (Cygwin/X)
2011-08-13 11:28         ` Corinna Vinschen
2011-08-13 16:20           ` Peter Rosin
2011-08-14 11:20             ` Corinna Vinschen
2011-08-14 23:01               ` Peter Rosin
2011-08-15  7:47                 ` Corinna Vinschen
2011-10-16 21:19           ` Yaakov (Cygwin/X)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313350188.3232.20.camel@YAAKOV04 \
    --to=yselkowitz@users.sourceforge.net \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).