From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-045.btinternet.com (mailomta18-sa.btinternet.com [213.120.69.24]) by sourceware.org (Postfix) with ESMTPS id 3934B385840F for ; Sun, 17 Sep 2023 14:01:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3934B385840F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-002.btmx-prd.synchronoss.net ([10.2.38.5]) by sa-prd-fep-045.btinternet.com with ESMTP id <20230917140118.FZPD29451.sa-prd-fep-045.btinternet.com@sa-prd-rgout-002.btmx-prd.synchronoss.net>; Sun, 17 Sep 2023 15:01:18 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 64CAD6A504A005AF X-Originating-IP: [81.129.146.151] X-OWM-Source-IP: 81.129.146.151 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedviedrudejiedgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeugfdvheelieelkeetlefhgeekgffghfeluedtjeefveegtedvleetfeefieelfeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeekuddruddvledrudegiedrudehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtiegnpdhinhgvthepkedurdduvdelrddugeeirdduhedupdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeevhhhrihhsthhirghnrdfhrhgrnhhkvgesthdqohhnlhhinhgvrdguvgdprhgtphhtthhopegthihgfihinhdqrghpphhssegthihgfihinhdrtghomhdprhgvvhfkrfephhhoshhtkeduqdduvdelqddugeeiqdduhedurdhrrghnghgvkeduqdduvdelrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgruhht hhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfepifeupdfovfetjfhoshhtpehsrgdqphhrugdqrhhgohhuthdqtddtvd X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.106] (81.129.146.151) by sa-prd-rgout-002.btmx-prd.synchronoss.net (5.8.814.02) (authenticated as jonturney@btinternet.com) id 64CAD6A504A005AF; Sun, 17 Sep 2023 15:01:18 +0100 Message-ID: Date: Sun, 17 Sep 2023 15:01:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: cygport may not create debug info if top directory contains a symlink To: Christian Franke , "cygwin-apps@cygwin.com" References: <9bc07a5f-86d9-76ee-f45d-e1956c9035f8@t-online.de> Content-Language: en-GB From: Jon Turney In-Reply-To: <9bc07a5f-86d9-76ee-f45d-e1956c9035f8@t-online.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 16/09/2023 15:17, Christian Franke via Cygwin wrote: > Found during tests of busybox package: > If the path of the top build directory contains a symlink and the > project's build scripts normalize pathnames, no debug info is created by > cygport. > > This is because options like >  -fdebug-prefix-map=${B}=/usr/src/debug/${PF} > have no effect because ${B} contains a symlink but the compiler is run > with the real source path. I think that there was some historical bug with gcc where a relative path for the old path in this mapping wasn't correctly handled, which is why were using an absolute path here at all. So changing it to something like [1] (if that works), might be better. [1] https://github.com/jon-turney/cygport/commit/4175d456a9184c5cdebd8bfb4b5ba30583cedd66 Sidenote: we should probably also be using file-prefix-map, now we're on a gcc which supports it. > The postinstall code then does not find any line number info with source > path /usr/src/debug/${PF}/... > > Could be fixed easily in line 414 of /bin/cygport: > > -declare -r top=$(cd ${_topdir}; pwd); > +declare -r top=$(cd ${_topdir}; /bin/pwd); Can you explain why this makes a difference? > No patch provided because I'm not sure whether this has other negative > side effects. > > If this is the case, it possibly makes sense to print a warning if > "$(pwd)" != "$(/bin/pwd)". This is not unreasonable, and I would take a patch doing this, as there have been places in cygport where there are bugs handling that in the past (and probably still are some, since it's not something that gets tested often).