From patchwork Tue Dec 2 00:31:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Drepper X-Patchwork-Id: 416634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1E3F014011D for ; Tue, 2 Dec 2014 11:31:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=i8sD2gFLf3nyO5GE2mErDvalqMT2gdNH32+m3OjDk6VsCdkRtcM7D 9V98SEIzkW3SWaL4Q3f7bjY47iMJe3ztNYm5hQXmeBWJceCM6tB/+wfq5Yne27AZ RoEb2XZY9h9kd3mVmAbaEz4Aqz1ln07kItoFvDdIPjBJE3JhNQd8tE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=CV9DAQqagZ0NDmsDYSscUTIAe6U=; b=dzVeG2FPHFxk8j7Q1GCE XysUsedMexXFp5nx3M1AShMwtdgJMtZjitTMHQHWo9yBwY9ESkvH5xbRnxq+0hZw WvV+4M/tSmG71OCR0R/rj179/Wpi3AfJ0Fkh0nkVLMMHica+8UlsbpY2/ZYPH4l1 QVAtf1vm53GDa5t9pRYXqdk= Received: (qmail 21607 invoked by alias); 2 Dec 2014 00:31:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21595 invoked by uid 89); 2 Dec 2014 00:31:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f47.google.com Received: from mail-qg0-f47.google.com (HELO mail-qg0-f47.google.com) (209.85.192.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 02 Dec 2014 00:31:43 +0000 Received: by mail-qg0-f47.google.com with SMTP id z60so8561874qgd.34 for ; Mon, 01 Dec 2014 16:31:41 -0800 (PST) X-Received: by 10.140.34.78 with SMTP id k72mr745617qgk.21.1417480301112; Mon, 01 Dec 2014 16:31:41 -0800 (PST) Received: from x240.local (pool-100-37-161-222.nycmny.fios.verizon.net. [100.37.161.222]) by mx.google.com with ESMTPSA id i1sm18894128qaz.28.2014.12.01.16.31.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Dec 2014 16:31:40 -0800 (PST) Received: from x240.local (localhost.localdomain [127.0.0.1]) by x240.local (8.14.8/8.14.8) with ESMTP id sB20VcX7017117 for ; Mon, 1 Dec 2014 19:31:38 -0500 Received: (from drepper@localhost) by x240.local (8.14.8/8.14.8/Submit) id sB20Vc9B017116; Mon, 1 Dec 2014 19:31:38 -0500 From: Ulrich Drepper To: gcc-patches@gcc.gnu.org Subject: re-build problem with ln -s Date: Mon, 01 Dec 2014 19:31:38 -0500 Message-ID: <87vbluq4d1.fsf@x240.local.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 I think the jit patches introduced a problem when you rebuild within a directory that contains an old build (i.e., no brand new build directory). The gcc/Makefile creates a symlink for xgcc with the full driver name without first removing the symlink. The right procedure (gathered from other Makefiles) seems to be to just use rm first. This is what the patch below does. In addition I took the liberty of changing the Makefile to us $(LN_S) instead on $(LN) -s. OK? diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c42c2e4..eaf3ee8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-12-01 Ulrich Drepper + + * Makefile.in: Use LN_S instead of ln -s and remove file first + if it exists. + 2014-12-01 Segher Boessenkool * combine.c (try_combine): Use is_parallel_of_n_reg_sets some more. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 204bd85..60cfa54 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1545,7 +1545,8 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ # from within the *build* directory, for use when running the JIT library # from there (e.g. when running its testsuite). $(FULL_DRIVER_NAME): ./xgcc - $(LN) -s $< $@ + rm -f $@ + $(LN_S) $< $@ # # Language makefile fragments.