From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23263 invoked by alias); 19 Jul 2005 20:14:12 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 22921 invoked by uid 22791); 19 Jul 2005 20:14:06 -0000 Received: from c-24-61-23-223.hsd1.ma.comcast.net (HELO cgf.cx) (24.61.23.223) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 19 Jul 2005 20:14:06 +0000 Received: by cgf.cx (Postfix, from userid 201) id B86A413C261; Tue, 19 Jul 2005 16:14:04 -0400 (EDT) Date: Tue, 19 Jul 2005 20:14:00 -0000 From: Christopher Faylor To: gcc@gcc.gnu.org, dannysmith@users.sourceforge.net, FX Coudert , patch , ian@airs.com Subject: Re: PING [4.1 regression, patch] build i686-pc-mingw32 Message-ID: <20050719201404.GA26817@trixie.casa.cgf.cx> Mail-Followup-To: gcc@gcc.gnu.org, dannysmith@users.sourceforge.net, FX Coudert , patch , ian@airs.com References: <42DCC2D5.5010900@gmail.com> <20050719195238.GB23513@trixie.casa.cgf.cx> <42DD5C82.4040502@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42DD5C82.4040502@gmail.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-07/txt/msg00846.txt.bz2 On Tue, Jul 19, 2005 at 10:03:14PM +0200, FX Coudert wrote: >>I'd prefer that Danny review this but neither of us has the right to >>approve this patch. > >Well, then, who has the right to approve such a patch? > >>However, it seems like you're adding extra stuff to the Makefile where >>it is already trying to do the right thing if $(LN) fails. Couldn't LN >>just be declared as "cp" for mingw or, alternatively, couldn't it be >>defined as some failing command so that the cp in the failing condition >>would be invoked? > >Well, perhaps I wasn't clear enough on what is the problem: > >- case "$<" in \ >- ./*) ;; \ >- ../*) \ >- echo $(LN) $< as$(exeext); \ >- $(LN) $< as$(exeext) || cp $< as$(exeext) ;; \ >- *) echo '#!$(SHELL)' > as; echo 'exec $< "$$@"' >> as ; \ >- chmod +x as ;; \ >+ case "$(build)" in \ >+ *mingw32*) \ >+ cp $< as$(exeext) ;; \ >+ *) \ >+ case "$<" in \ >+ ./*) ;; \ >+ ../*) \ >+ echo $(LN) $< as$(exeext); \ >+ $(LN) $< as$(exeext) || cp $< as$(exeext) ;; \ >+ *) echo '#!$(SHELL)' > as; echo 'exec $< "$$@"' >> as ; \ >+ chmod +x as ;; \ >+ esac \ > >The cases with ./*) and ../*) already well handled, and just kept "as >is" when $(build) is mingw32. The $(LN) command succeeds, that's not the >problem. > >Only the remaining case, which creates a shell script, fails on mingw32. >The shell script is spawned to call the assembler, which fails. Only >real win32 executables can be spawned. Ok. Given that 'cp' was an acceptable fallback in the original version of the above script, I wonder why 'cp' wasn't used instead of creating a shell script wrapper. cgf