From patchwork Sat Aug 25 15:58:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 179979 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 23C1E2C00FD for ; Sun, 26 Aug 2012 01:58:32 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346515113; h=Comment: DomainKey-Signature:Received:Received:Received:Received: MIME-Version:Received:Received:Date:Message-ID:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=nP7HhFG ALOXu0hVs0nLAu4Qx7+E=; b=trpfhKuKl3Nd/e75QOXfSK3KvQMrsCmEP2RFgOQ 3dXF+MRIyyH+8r2dwwjQ1CiTE9uwhhXzF1s39RnkMHM4g8wxYTSb2C9b2G3OOJEj 4WG0Ki3RLSVTSg33oqqGZwqAjQPOhoB6fuppkHLT7gXZe7691TyvGr3/gXoRwzdI b07A= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:MIME-Version:Received:Received:Date:Message-ID:Subject:From:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=KRfg7B6EInPsMynh82peJGaFxDMzYeav/JGXFVobv2EQIelsieBXSqiTTyoTV4 OlKDk88IZqMUgQ5cCZMZT1fmRnVAQfaRTBS1mY1cyd3icmYb0GOJUO8Xh6gH1PHj WlhL+rgzBxHJFhbaMn5qBns3H/Yz6dvLA5lXaKObN9vmI=; Received: (qmail 6578 invoked by alias); 25 Aug 2012 15:58:25 -0000 Received: (qmail 6554 invoked by uid 22791); 25 Aug 2012 15:58:24 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-vc0-f175.google.com (HELO mail-vc0-f175.google.com) (209.85.220.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Aug 2012 15:58:09 +0000 Received: by vcbfy27 with SMTP id fy27so3468382vcb.20 for ; Sat, 25 Aug 2012 08:58:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.68.110 with SMTP id v14mr6335176vdt.14.1345910288741; Sat, 25 Aug 2012 08:58:08 -0700 (PDT) Received: by 10.58.234.39 with HTTP; Sat, 25 Aug 2012 08:58:08 -0700 (PDT) Date: Sat, 25 Aug 2012 08:58:08 -0700 Message-ID: Subject: PATCH: Don't set HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes From: "H.J. Lu" To: Binutils , GCC Development , GCC Patches Cc: Paolo Bonzini X-IsSubscribed: yes 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 On Sat, Aug 25, 2012 at 8:31 AM, H.J. Lu wrote: > Hi, > > Setting HOST_LIB_PATH_bfd/HOST_LIB_PATH_opcodes causes: > > as: error while loading shared libraries: > /builddir/build/BUILD/binutils/./opcodes/.libs/libopcodes-2.23.51.0.2-0.1.fc17.so: > file too short > make[4]: *** [gold-threads.o] Error 2 > > when compiling gold using binutils linked with the same versions of libbfd > and libopcodes. As far as I can tell, one can run the newly built binutils > without setting them since libtool already sets up proper DT_RPATH. > The change was introduced by http://gcc.gnu.org/ml/gcc-cvs/2005-03/msg01452.html Paolo, do you remember the reason for this? I tested this patch and works fine with --enable-shared for binutils. I tested both separate build directory and in-source build. OK to install? Thanks. diff --git a/Makefile.def b/Makefile.def index 9e41ff5..220c720 100644 --- a/Makefile.def +++ b/Makefile.def @@ -32,8 +32,8 @@ build_modules= { module= m4; }; build_modules= { module= texinfo; }; build_modules= { module= fixincludes; }; -host_modules= { module= bfd; lib_path=.libs; bootstrap=true; }; -host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; }; +host_modules= { module= bfd; bootstrap=true; }; +host_modules= { module= opcodes; bootstrap=true; }; host_modules= { module= binutils; bootstrap=true; }; host_modules= { module= bison; no_check_cross= true; }; host_modules= { module= cgen; }; diff --git a/Makefile.in b/Makefile.in index 038f801..4fc4d36 100644 --- a/Makefile.in +++ b/Makefile.in @@ -621,7 +621,7 @@ TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs: # This is the list of directories that may be needed in RPATH_ENVVAR # so that programs built for the host machine work. -HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf) +HOST_LIB_PATH = $(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)$(HOST_LIB_PATH_mpc)$(HOST_LIB_PATH_ppl)$(HOST_LIB_PATH_cloog)$(HOST_LIB_PATH_libelf)