From frerich@frerich.ath.cx  Sun Aug 25 19:25:43 2002
Return-Path: <frerich@frerich.ath.cx>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A39BD37B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 25 Aug 2002 19:25:43 -0700 (PDT)
Received: from mail1.ewetel.de (mail1.ewetel.de [212.6.122.16])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D6DA143E6A
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 25 Aug 2002 19:25:42 -0700 (PDT)
	(envelope-from frerich@frerich.ath.cx)
Received: from daedalus.lan (dialin-ol-213-170-184-234.ewetel.net [213.170.184.234])
	by mail1.ewetel.de (8.12.1/8.12.1) with ESMTP id g7Q2PXxJ028774
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Aug 2002 04:25:35 +0200 (MEST)
Received: by daedalus.lan (Postfix, from userid 1001)
	id 4A3D71064; Mon, 26 Aug 2002 04:26:25 +0200 (CEST)
Message-Id: <20020826022625.4A3D71064@daedalus.lan>
Date: Mon, 26 Aug 2002 04:26:25 +0200 (CEST)
From: Frerich Raabe <frerich.raabe@gmx.de>
Reply-To: Frerich Raabe <frerich.raabe@gmx.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update port: devel/distcc fix for various configure scripts
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         42019
>Category:       ports
>Synopsis:       Update port: devel/distcc fix for various configure scripts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 25 19:30:01 PDT 2002
>Closed-Date:    Sun Aug 25 19:39:23 PDT 2002
>Last-Modified:  Sun Aug 25 19:39:23 PDT 2002
>Originator:     Frerich Raabe
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD daedalus.lan 4.6-STABLE FreeBSD 4.6-STABLE #18: Tue Aug 20 22:09:12 CEST 2002 root@daedalus.lan:/usr/obj/usr/src/sys/SWIFT i386
>Description:
libstdc++-v3's configure script (and others) execute commands such as
.../xgcc -B.../ conftest.C -c -S. Assuming that xgcc invokes the distcc client,
this makes the distcc client write the assembly output to conftest.o even
though it should go into conftest.s. The cause of this is that distcc currently
does not honour the fact that -S supersedes -c.
Interestingly, if you add "-o conftest.s" to the command line, it's the distcc
server that fails, claiming it couldn't find conftest.C.
The attached patch (courtesy of Alexandre Oliva <aoliva@redhat.com>
fixes this behaviour.
>How-To-Repeat:
Try to compile any program with both the "-c" and the "-S" parameters specified.
>Fix:
--- src/arg.c.S-beats-c	2002-08-15 10:52:41.000000000 -0300
+++ src/arg.c	2002-08-24 20:09:31.000000000 -0300
@@ -200,12 +200,13 @@
         /* FIXME: This doesn't handle a.out, but that doesn't matter.
          */
         char *ofile;
-        if (seen_opt_c) {
-            if (dcc_output_from_source(*input_file, ".o", &ofile))
-                return -1;
-        } else if (seen_opt_s) {
+        /* -S takes precedence over -c.  */
+        if (seen_opt_s) {
             if (dcc_output_from_source(*input_file, ".s", &ofile))
                 return -1; 
+        } else if (seen_opt_c) {
+            if (dcc_output_from_source(*input_file, ".o", &ofile))
+                return -1;
         } else {
             rs_log_crit("this can't be happening(%d)!", __LINE__);
             return -1;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: lioux 
State-Changed-When: Sun Aug 25 19:39:22 PDT 2002 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=42019 
>Unformatted:
