From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20359 invoked by alias); 19 Jul 2002 14:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20302 invoked by uid 71); 19 Jul 2002 14:16:01 -0000 Resent-Date: 19 Jul 2002 14:16:01 -0000 Resent-Message-ID: <20020719141601.20300.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, PickinA@logica.com Received: (qmail 20075 invoked by uid 61); 19 Jul 2002 14:15:44 -0000 Message-Id: <20020719141544.20073.qmail@sources.redhat.com> Date: Fri, 19 Jul 2002 07:16:00 -0000 From: PickinA@logica.com Reply-To: PickinA@logica.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: preprocessor/7358: Changes to Sun's make Dependencies X-SW-Source: 2002-07/txt/msg00565.txt.bz2 List-Id: >Number: 7358 >Category: preprocessor >Synopsis: Changes to Sun's make Dependencies >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Jul 19 07:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Andrew Pickin >Release: 3.0.4+ >Organization: >Environment: Solaris >Description: Sun Dependencies make object files dependent on C source even thought this may be a temporary file. This can make builds fail when using Sun's make. >How-To-Repeat: If we consider the make file dependency .c.o: @cp $(@:.o=.c) /tmp/tmp.c gcc -c /tmp/tmp.c -o $@ @rm /tmp/tmp.c [ Don't ask why I'm doing this, I'm not, but it demonstrates the point ] and we have a single source file main.c Version 2.9.5 produced dependency main.o: ... ..... cp main.c /tmp/tmp.c gcc -g -O2 -c /tmp/tmp.c -o main.o rm /tmp/tmp.c Whereas 3.0.4 produces: main.o: /tmp/tmp.c ... ..... cp main.c /tmp/tmp.c gcc -c /tmp/tmp.c -o main.o rm /tmp/tmp.c Whereas 3.1.0 produces: main.o: /tmp/tmp.c cp main.c /tmp/tmp.c gcc -g -O2 -c /tmp/tmp.c -o main.o rm /tmp/tmp.c I have raised the problem with the System Headers previously [7357] but GCC 3 has introduced a new dependency of object file on the source. This means that in the best case everything will be compiles twice the first time around, as Sun's make re-reads the dependency list again and identifies a new dependency. In the worst case builds fail as temporary files may nolonger be present. This is indeed what happens if one uses ccache (see ccache.samba.org). >Fix: >Release-Note: >Audit-Trail: >Unformatted: