From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22724 invoked by alias); 15 Aug 2011 04:03:22 -0000 Received: (qmail 22710 invoked by uid 22791); 15 Aug 2011 04:03:20 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yi0-f43.google.com (HELO mail-yi0-f43.google.com) (209.85.218.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Aug 2011 04:03:05 +0000 Received: by yia27 with SMTP id 27so3690460yia.2 for ; Sun, 14 Aug 2011 21:03:04 -0700 (PDT) Received: by 10.236.125.196 with SMTP id z44mr10296487yhh.232.1313380984436; Sun, 14 Aug 2011 21:03:04 -0700 (PDT) Received: from [192.168.0.100] (S0106000cf16f58b1.wp.shawcable.net [174.5.115.130]) by mx.google.com with ESMTPS id j45sm5804873yhe.8.2011.08.14.21.03.02 (version=SSLv3 cipher=OTHER); Sun, 14 Aug 2011 21:03:03 -0700 (PDT) Subject: Re: GCC dependencies (attn David Billinghurst) From: "Yaakov (Cygwin/X)" To: cygwin-apps Date: Mon, 15 Aug 2011 04:03:00 -0000 In-Reply-To: <1313350188.3232.20.camel@YAAKOV04> References: <1311736317.5672.85.camel@YAAKOV04> <4E41804B.9060806@gmail.com> <1313150949.7828.18.camel@YAAKOV04> <1313152852.7828.40.camel@YAAKOV04> <20110813141124.GE4098@calimero.vinschen.de> <1313350188.3232.20.camel@YAAKOV04> Content-Type: multipart/mixed; boundary="=-Pt16blwXW+3/SzI/7dbX" Message-ID: <1313380984.3232.37.camel@YAAKOV04> Mime-Version: 1.0 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2011-08/txt/msg00171.txt.bz2 --=-Pt16blwXW+3/SzI/7dbX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 1994 On Sun, 2011-08-14 at 14:29 -0500, Yaakov (Cygwin/X) wrote: > 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. cygwin-gcc 4.5.3-4 is now available for both releases on both arches. I still need to test my patch (for trunk, attached) in other configurations, but AFAICS it fixes the issue you reported. Yaakov --=-Pt16blwXW+3/SzI/7dbX Content-Disposition: attachment; filename="cross-target-exe-suffix.patch" Content-Type: text/x-patch; name="cross-target-exe-suffix.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-length: 628 2011-08-14 Yaakov Selkowitz * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Do not make dependent on HOST_EXECUTABLE_SUFFIX. Index: gcc/gcc.c =================================================================== --- gcc/gcc.c (revision 177751) +++ gcc/gcc.c (working copy) @@ -48,8 +48,7 @@ #include "filenames.h" /* 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) +#if defined(TARGET_EXECUTABLE_SUFFIX) #define HAVE_TARGET_EXECUTABLE_SUFFIX #endif --=-Pt16blwXW+3/SzI/7dbX--