From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19875 invoked by alias); 16 Apr 2012 10:58:01 -0000 Received: (qmail 19856 invoked by uid 22791); 16 Apr 2012 10:58:00 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD 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; Mon, 16 Apr 2012 10:57:47 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3GAvhcr000474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Apr 2012 06:57:43 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3GAvf6k009947; Mon, 16 Apr 2012 06:57:42 -0400 Message-ID: <4F8BFB25.5030808@redhat.com> Date: Mon, 16 Apr 2012 11:32:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Jan Kratochvil CC: Yao Qi , gdb-patches@sourceware.org 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: 7bit 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/msg00411.txt.bz2 On 04/15/2012 05:49 PM, 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/ . > > I also tried to force some phony dependency for libgnu.a in gdbserver/gnulib/ > to force its rebuild there but it had other disadvantages. Also one could not > do make -C gdb/gdbserver/gnulib as the command-line variables overrides would > not apply, as was stated here. > > * Using libgnu.a from gdb/gnulib/ for gdbserver is not good as they may have > different compilation options, also gdb/ may not be compilable for that host > etc. > * Copyting gdb/gnulib/ into gdbserver/gnulib/ in the CVS repository itself > would be possible but it would be just too much work to maintain etc. > > 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. > > Tested the combinations by the script below. As the gnulib/*.h files are not > yet in use in gdbserver/ it may not be well tested but I hope > GNULIB_INCLUDE_CFLAGS is right there. Let me give a different approach a try. Will post it in a bit. -- Pedro Alves