From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27444 invoked by alias); 16 Apr 2012 07:56:32 -0000 Received: (qmail 27423 invoked by uid 22791); 16 Apr 2012 07:56:29 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_BJ X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 Apr 2012 07:56:11 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SJgnC-0003hg-Dd from Yao_Qi@mentor.com ; Mon, 16 Apr 2012 00:56:10 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 16 Apr 2012 00:55:36 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Mon, 16 Apr 2012 00:56:09 -0700 Message-ID: <4F8BD09A.8030307@codesourcery.com> Date: Mon, 16 Apr 2012 09:42:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Jan Kratochvil CC: , Pedro Alves Subject: Re: [patch] Fix in-src-tree builds by gdbserver/gnulib/ copy [Re: [PATCH] Link gnulib in gdbserver.] References: <1334127046-27627-1-git-send-email-yao@codesourcery.com> <20120413212559.GA5867@host2.jankratochvil.net> <4F88F188.1050401@codesourcery.com> <20120415164917.GA2861@host2.jankratochvil.net> In-Reply-To: <20120415164917.GA2861@host2.jankratochvil.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00403.txt.bz2 On 04/16/2012 12:49 AM, Jan Kratochvil wrote: > On Sat, 14 Apr 2012 05:39:52 +0200, Yao Qi wrote: >> On 04/14/2012 05:25 AM, Jan Kratochvil wrote: > This broke in-src-tree build: > [...] >>> gcc: error: gnulib/libgnu.a: No such file or directory >>> make[4]: *** [gdbserver] Error 1 >>> make[4]: Leaving directory `/home/jkratoch/redhat/gdb-clean/gdb/gdbserver' >> >> It is wired. I don't see such failure in in-source-tree (CVS trunk) build. > > I do, on {x86_64,i686}-fedora{15,16,17,rawhide}-linux-gnu, not sure why it is > not reproducible for you - I also see it logical why it fails - using VPATH > make finds gnulib/libgnu.a in the gnulib source directory (gdb/gnulib/) and > therefore it does not rebuild libgnu.a in gdbserver/gnulib/ . > Because I did an "in-gdbserver-source-tree" build. I can reproduce this failure now in a "in-gdb-source-tree" build. > > AFAIK the GNU tools do not provide good enough support for the exact problem > here, therefore for building in-source-tree and having another build directory > of the source directory already containing pre-build binaries. > > Therefore proposing to: > * Have single copy gdb/gnulib/ in CVS repository. > * Have two copies in the .tar distribution, it does not cost much: > 225280 uncompressed > 40970 gzip > 32676 xz > * For direct build from repository in-source-tree do a clean binaries-less > copy from gdb/gnulib/ into gdbserver/gnulib/ . > * For direct build from repository out-of-source-tree do a clean binaries-less > copy from srcdir-gdb/gnulib/ into objdir-gdbserver/gnulib/ patching there > @*srcdir*@ variables so that it does not try > to access srcdir-gdbserver/gnulib/ which does not exist and where we must > not write anything. I am afraid your patch doesn't work for gdbserver-only build, because target `diststuff' is not invoked at all. I tried to fix it, but finally I give up, because I have to differentiate gdb+gdbserver build and gdbserver-only build when setting some dirs. -- Yao (齐尧)