From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9438 invoked by alias); 14 Aug 2011 19:30:06 -0000 Received: (qmail 9424 invoked by uid 22791); 14 Aug 2011 19:30:04 -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-yx0-f171.google.com (HELO mail-yx0-f171.google.com) (209.85.213.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 14 Aug 2011 19:29:50 +0000 Received: by yxk38 with SMTP id 38so3548189yxk.2 for ; Sun, 14 Aug 2011 12:29:50 -0700 (PDT) Received: by 10.150.214.9 with SMTP id m9mr4012508ybg.345.1313350190033; Sun, 14 Aug 2011 12:29:50 -0700 (PDT) Received: from [192.168.0.100] (S0106000cf16f58b1.wp.shawcable.net [174.5.115.130]) by mx.google.com with ESMTPS id k4sm1833232ybd.26.2011.08.14.12.29.47 (version=SSLv3 cipher=OTHER); Sun, 14 Aug 2011 12:29:48 -0700 (PDT) Subject: Re: GCC dependencies (attn David Billinghurst) From: "Yaakov (Cygwin/X)" To: cygwin-apps Date: Sun, 14 Aug 2011 19:30:00 -0000 In-Reply-To: <20110813141124.GE4098@calimero.vinschen.de> 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Message-ID: <1313350188.3232.20.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/msg00169.txt.bz2 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