From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65414 invoked by alias); 20 Sep 2017 08:17:23 -0000 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 Received: (qmail 65396 invoked by uid 89); 20 Sep 2017 08:17:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1859, management X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Sep 2017 08:17:19 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id v8K8HDgg028022 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Sep 2017 04:17:17 -0400 Received: by simark.ca (Postfix, from userid 112) id F1AD51ED03; Wed, 20 Sep 2017 04:17:12 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id F0E6A1EA1D; Wed, 20 Sep 2017 04:17:04 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Sep 2017 08:17:00 -0000 From: Simon Marchi To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Replicate src dir in build dir In-Reply-To: <867ewtbxwb.fsf@gmail.com> References: <1505832159-23038-1-git-send-email-yao.qi@linaro.org> <867ewtbxwb.fsf@gmail.com> Message-ID: X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 20 Sep 2017 08:17:13 +0000 X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00480.txt.bz2 On 2017-09-20 10:02, Yao Qi wrote: >>> @@ -2941,9 +2949,9 @@ ifeq ($(DEPMODE),depmode=gcc3) >>> # into place if the compile succeeds. We need this because gcc does >>> # not atomically write the dependency output file. >>> override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \ >>> - -MF $(DEPDIR)/$(basename $(@F)).Tpo >>> -override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \ >>> - $(DEPDIR)/$(basename $(@F)).Po >>> + -MF $(@D)/$(DEPDIR)/$(@F).Tpo >>> +override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(@F).Tpo \ >>> + $(@D)/$(DEPDIR)/$(@F).Po >>> else >>> override COMPILE.pre = source='$<' object='$@' libtool=no \ >>> DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) >> >> I have never tested it, but I assume the "depcomp" mode of dependency >> management will have to be updated too. > > I don't understand this comment. The only change in on dependency > tracking is that .Po file is moved to a new place (.deps/amd64.Po -> > ./arch/.deps/amd64.o.Po). The file contents don't change. > > $ diff -u .deps/amd64.Po ./arch/.deps/amd64.o.Po > --- .deps/amd64.Po 2017-09-20 07:57:04.903381133 +0000 > +++ ./arch/.deps/amd64.o.Po 2017-09-20 07:40:35.995718460 +0000 > @@ -1,4 +1,4 @@ > -amd64.o: ../../binutils-gdb/gdb/arch/amd64.c \ > +arch/amd64.o: ../../binutils-gdb/gdb/arch/amd64.c \ > ../../binutils-gdb/gdb/arch/amd64.h > ../../binutils-gdb/gdb/arch/tdesc.h \ > build-gnulib/import/stdint.h > ../../binutils-gdb/gdb/common/x86-xstate.h \ > build-gnulib/import/stdlib.h \ I was wondering if this line needed changing override COMPILE.pre = source='$<' object='$@' libtool=no \ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) In particular, is DEPDIR treated as relative to the created object file or relative to the current working directory by depcomp. I honestly don't even know when this actually used. Simon