From patchwork Thu Jun 10 10:35:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 55196 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]) by ozlabs.org (Postfix) with SMTP id DD8E21007D1 for ; Thu, 10 Jun 2010 20:35:23 +1000 (EST) Received: (qmail 854 invoked by alias); 10 Jun 2010 10:35:22 -0000 Received: (qmail 843 invoked by uid 22791); 10 Jun 2010 10:35:21 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Jun 2010 10:35:16 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5AAZEYM030237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Jun 2010 06:35:14 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5AAZCKU009328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 10 Jun 2010 06:35:14 -0400 Received: from livre.localdomain (livre.oliva.athome.lsd.ic.unicamp.br [172.31.160.2]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id o5AAZCIa020621 for ; Thu, 10 Jun 2010 07:35:12 -0300 Received: from livre.localdomain (aoliva@localhost [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o5AAZB1e031905; Thu, 10 Jun 2010 07:35:11 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id o5AAZBZq031904; Thu, 10 Jun 2010 07:35:11 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: Fix in-tree libelf parallel build Date: Thu, 10 Jun 2010 07:35:10 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 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 The test for libelf featuers in gcc/configure.ac doesn't take into acount the possibility that the libelf to be used might be the one in the build tree. The toplevel one does. This results in a problem if you're running a parallel build that configures gcc before building libelf: toplevel will assume libelf is fine, but GCC will misdetect HAVE_ELF_GETSHDRSTRNDX if you have an old version of libelf installed, and then lto-elf.c will fail to compile in stage2, at the elf_getshstrndx call, because the declaration is marked as deprecated in the new libelf headers. This patch arranges for us to build the build-tree libelf before configuring the gcc subdir, so that we don't depend on lucky chance to have it already in place by the time of the gcc configure tests. I'm checking it in shortly. for ChangeLog from Alexandre Oliva * Makefile.def (configure-gcc): Depend on all-libelf. * Makefile.in: Rebuild. Index: Makefile.def =================================================================== --- Makefile.def.orig 2010-06-09 05:32:52.000000000 -0300 +++ Makefile.def 2010-06-09 05:33:18.000000000 -0300 @@ -322,6 +322,7 @@ dependencies = { module=configure-gcc; o dependencies = { module=configure-gcc; on=all-gas; }; dependencies = { module=configure-gcc; on=all-ld; }; dependencies = { module=configure-gcc; on=all-gold; }; +dependencies = { module=configure-gcc; on=all-libelf; }; dependencies = { module=all-gcc; on=all-libiberty; hard=true; }; dependencies = { module=all-gcc; on=all-gmp; }; dependencies = { module=all-gcc; on=all-intl; }; @@ -329,7 +330,6 @@ dependencies = { module=all-gcc; on=all- dependencies = { module=all-gcc; on=all-mpc; }; dependencies = { module=all-gcc; on=all-ppl; }; dependencies = { module=all-gcc; on=all-cloog; }; -dependencies = { module=all-gcc; on=all-libelf; }; dependencies = { module=all-gcc; on=all-build-texinfo; }; dependencies = { module=all-gcc; on=all-build-bison; }; dependencies = { module=all-gcc; on=all-build-byacc; }; Index: Makefile.in =================================================================== --- Makefile.in.orig 2010-06-09 05:32:53.000000000 -0300 +++ Makefile.in 2010-06-09 05:33:39.000000000 -0300 @@ -57763,6 +57763,14 @@ configure-stage3-gcc: maybe-all-stage3-g configure-stage4-gcc: maybe-all-stage4-gold configure-stageprofile-gcc: maybe-all-stageprofile-gold configure-stagefeedback-gcc: maybe-all-stagefeedback-gold +configure-gcc: maybe-all-libelf + +configure-stage1-gcc: maybe-all-stage1-libelf +configure-stage2-gcc: maybe-all-stage2-libelf +configure-stage3-gcc: maybe-all-stage3-libelf +configure-stage4-gcc: maybe-all-stage4-libelf +configure-stageprofile-gcc: maybe-all-stageprofile-libelf +configure-stagefeedback-gcc: maybe-all-stagefeedback-libelf all-gcc: all-libiberty all-stage1-gcc: all-stage1-libiberty @@ -57819,14 +57827,6 @@ all-stage3-gcc: maybe-all-stage3-cloog all-stage4-gcc: maybe-all-stage4-cloog all-stageprofile-gcc: maybe-all-stageprofile-cloog all-stagefeedback-gcc: maybe-all-stagefeedback-cloog -all-gcc: maybe-all-libelf - -all-stage1-gcc: maybe-all-stage1-libelf -all-stage2-gcc: maybe-all-stage2-libelf -all-stage3-gcc: maybe-all-stage3-libelf -all-stage4-gcc: maybe-all-stage4-libelf -all-stageprofile-gcc: maybe-all-stageprofile-libelf -all-stagefeedback-gcc: maybe-all-stagefeedback-libelf all-gcc: maybe-all-build-texinfo all-stage1-gcc: maybe-all-build-texinfo