From patchwork Sun Apr 12 18:11:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 460537 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 42B4514027F for ; Mon, 13 Apr 2015 04:11:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=p23/U1wk; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=WT3DH59wxqwl2GXCg8kV19vttGnrTwWB3yg4LyvpkXHwte Q9lUXHUs0C/IRin8NuZA4H2dCk9z6sVxCzqUwkbcyJa7mUdA7DHPiY0k4/7MXpqJ 1ENb+vxr9Wl7aZ7yZEFVJhi0yjUGRQsUdX1WNzfkkDv5qx4TJPNNhmDFCIdbw= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=vS7j53ON6oXqgZ71lZ1+GzTQmfA=; b=p23/U1wkJ22598+46kcx Ojif51gcV6WwWCWL+t9dhis0OED+xc7biCYxSMk/yXTCUyrdD9H4T35oYkgQ4XV8 R0Vdl4EFtrojm/haHixFQ6E+bovULNI1p3NGpds9UMmGMSg9Ia+CeqoJ1bHpOBu1 13YW26Dndx9HWRYp6xA8Tb8= Received: (qmail 119256 invoked by alias); 12 Apr 2015 18:11:46 -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 119245 invoked by uid 89); 12 Apr 2015 18:11:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vn0-f54.google.com Received: from mail-vn0-f54.google.com (HELO mail-vn0-f54.google.com) (209.85.216.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 12 Apr 2015 18:11:43 +0000 Received: by vnbf62 with SMTP id f62so14080221vnb.13 for ; Sun, 12 Apr 2015 11:11:41 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.201.3 with SMTP id z3mr5009630oif.130.1428862301596; Sun, 12 Apr 2015 11:11:41 -0700 (PDT) Received: by 10.76.173.162 with HTTP; Sun, 12 Apr 2015 11:11:41 -0700 (PDT) Date: Sun, 12 Apr 2015 14:11:41 -0400 Message-ID: Subject: [PATCH] PR debug/61352 back port from mainline From: Jack Howarth To: GCC Patches , Mike Stump X-IsSubscribed: yes The attached patch is a back port of the change from https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=211067 for gcc-4_9-branch. Bootstrap and regression tested on x86_64-apple-darwin14 with Xcode 6.3. Okay for gcc-4_9-branch? Jack 2015-04-12 Jack Howarth Backport from mainline 2014-05-29 Mike Stump PR debug/61352 * collect2.c (maybe_run_lto_and_relink): Be sure to always run post ld passes when lto is used. Index: gcc/collect2.c =================================================================== --- gcc/collect2.c (revision 222021) +++ gcc/collect2.c (working copy) @@ -848,6 +848,8 @@ maybe_run_lto_and_relink (char **lto_ld_ fork_execute ("ld", lto_ld_argv); post_ld_pass (false); } + else + post_ld_pass (true); } /* Main program. */