From patchwork Wed Mar 19 07:24:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 331641 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 70FDE2C007A for ; Wed, 19 Mar 2014 18:24:52 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=px6reKzZ9FUUDRg5VZnXiqdK+PMi26X3aSmuYhjfE2t wprC2h4cidgRCvXohSq6c2kLfl3oQPjJOUG7u/YXkStiZJXY7/pZgHGAcSHjJ6Na 2H7Rzu30iEfl4IbYwoQiYifYyL7kaJz3gOz87d8WB38Ig4+V7ytX+VNKSxTAu05k = 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:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=Yng43FWiICdzW4x24ZseiaOIaso=; b=ubc6DgC06Ni+YQYoB X8iihSJMtacBnNrAlme1rnWwwE5CoovW2xXvdnVUILFTxS9NphWZBmp8h/+XcyBZ 5DQyAqNesMLJTRUUo58yWXNWcd+lijY+F4nMdNYz4ltTHM8SIYf7CU0DhqIKibRO Cj3Weszfz0JnAgVSMEtRr+FPVg= Received: (qmail 16443 invoked by alias); 19 Mar 2014 07:24:42 -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 16422 invoked by uid 89); 19 Mar 2014 07:24:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Mar 2014 07:24:40 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2J7ObUu014884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 19 Mar 2014 03:24:37 -0400 Received: from tucnak.zalov.cz (ovpn-116-35.ams2.redhat.com [10.36.116.35]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2J7OZrd000504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 19 Mar 2014 03:24:36 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.8/8.14.7) with ESMTP id s2J7OXWw007703 for ; Wed, 19 Mar 2014 08:24:33 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.8/8.14.8/Submit) id s2J7OWLJ007702 for gcc-patches@gcc.gnu.org; Wed, 19 Mar 2014 08:24:32 +0100 Date: Wed, 19 Mar 2014 08:24:32 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix lto build if WCONTINUED is not defined (PR lto/60571) Message-ID: <20140319072432.GB22862@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi! WCONTINUED is (recent) Linux specific, so it doesn't have to be defined on other hosts, or could be missing even on older Linux distros (e.g. glibc 2.3.2 doesn't have it). Fixed thusly, committed as obvious. 2014-03-19 Jakub Jelinek PR lto/60571 * lto.c (wait_for_child): Define WCONTINUED if not defined to 0. Fix formatting. Jakub --- gcc/lto/lto.c.jj 2014-03-03 08:24:32.000000000 +0100 +++ gcc/lto/lto.c 2014-03-19 08:12:39.235144361 +0100 @@ -2476,7 +2476,10 @@ wait_for_child () int status; do { - int w = waitpid(0, &status, WUNTRACED | WCONTINUED); +#ifndef WCONTINUED +#define WCONTINUED 0 +#endif + int w = waitpid (0, &status, WUNTRACED | WCONTINUED); if (w == -1) fatal_error ("waitpid failed"); @@ -2485,7 +2488,7 @@ wait_for_child () else if (WIFSIGNALED (status)) fatal_error ("streaming subprocess was killed by signal"); } - while (!WIFEXITED(status) && !WIFSIGNALED(status)); + while (!WIFEXITED (status) && !WIFSIGNALED (status)); } #endif