From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-048.btinternet.com (mailomta2-re.btinternet.com [213.120.69.95]) by sourceware.org (Postfix) with ESMTPS id 09CB1385276F for ; Sun, 29 Oct 2023 16:06:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09CB1385276F 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 09CB1385276F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=213.120.69.95 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698595564; cv=none; b=ET0mWaisejdXrkg5x53qZa4ivyuwyXbzEJhZfbcPAztmUkm+nLvVmS7QaAhhy5VY1/J49BbLWdmeXfZcFkYTR0DOnNUApNw1c5Vp89vwV/kovsgBPJqb4hh1wvN+/cbOeAk0NrOi0HZVSQip2tVhWwx4GgO6brn5gJX4lhH5Ge4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698595564; c=relaxed/simple; bh=qnjfCi+vuHkbjGlIRCEtYbDoNb5PzJ1MtSRnUM4fGGY=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=gE8KzS+wgIj59GYJJoEnuaXOBZBZXFc5+gR4IbiOewFTkKtDOYA+jzkUpnLdvaSrFwH0B8so9GwOv1qedXMFbIM5gvKe7jhpD0EMvkPDXQAjVZ/F1H9RnrlxcLbnAbesfKVUAxBCvvz7vHD+cp2NQTAhXJXI227gT/eUipceDFQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from re-prd-rgout-003.btmx-prd.synchronoss.net ([10.2.54.6]) by re-prd-fep-048.btinternet.com with ESMTP id <20231029160602.JDFJ17945.re-prd-fep-048.btinternet.com@re-prd-rgout-003.btmx-prd.synchronoss.net>; Sun, 29 Oct 2023 16:06:02 +0000 Authentication-Results: btinternet.com; none X-SNCR-Rigid: 64D171FB0831FF47 X-Originating-IP: [86.144.41.31] X-OWM-Source-IP: 86.144.41.31 (GB) X-OWM-Env-Sender: jon.turney@dronecode.org.uk X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvkedrleekgdekfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepuefgvdehleeileekteelhfegkefggffhleeutdejfeevgeetvdelteeffeeileefnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepkeeirddugeegrdeguddrfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurddutdejngdpihhnvghtpeekiedrudeggedrgedurdefuddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepvehhrhhishhtihgrnhdrhfhrrghnkhgvsehtqdhonhhlihhnvgdruggvpdhrtghpthhtoheptgihghifihhnqdgrphhpshestgihghifihhnrdgtohhmpdhrvghvkffrpehhohhsthekiedqudeggedqgeduqdefuddrrhgrnhhgvgekiedqudeggedrsghttggvnhhtrhgrlhhplhhushdrtghomhdprghuthhhpghushgvrhep jhhonhhtuhhrnhgvhiessghtihhnthgvrhhnvghtrdgtohhmpdhgvghokffrpefiuedpoffvtefjohhstheprhgvqdhprhguqdhrghhouhhtqddttdef X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.107] (86.144.41.31) by re-prd-rgout-003.btmx-prd.synchronoss.net (5.8.814.02) (authenticated as jonturney@btinternet.com) id 64D171FB0831FF47; Sun, 29 Oct 2023 16:06:01 +0000 Message-ID: <7cecd318-a2ca-49cd-978d-5a27e0072e72@dronecode.org.uk> Date: Sun, 29 Oct 2023 16:05:59 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: cygport may not create debug info if top directory contains a symlink Content-Language: en-GB To: Christian Franke , "cygwin-apps@cygwin.com" References: <9bc07a5f-86d9-76ee-f45d-e1956c9035f8@t-online.de> <8f480c7f-e2d0-c2b2-f6fb-24a1e54c2b19@t-online.de> <86ec734a-4277-f9be-81bb-75a4bbae6e76@Shaw.ca> <6ecfe72d-1f77-af76-9430-8594b8f13384@t-online.de> From: Jon Turney In-Reply-To: <6ecfe72d-1f77-af76-9430-8594b8f13384@t-online.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,BODY_8BITS,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 20/09/2023 11:58, Christian Franke via Cygwin-apps wrote: > Brian Inglis wrote: >> On 2023-09-18 04:41, Christian Franke via Cygwin-apps wrote: >>> Brian Inglis wrote: >>>> On 2023-09-17 08:01, Jon Turney via Cygwin-apps wrote: >>>>> 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 >> >> Should bin/cygport.in:534: not have $B between the == as in line 531: >> >>     declare ${flags}+=" -fdebug-prefix-map=${B}=/usr/src/debug/${PF}" >>     ... >>     declare ${flags}+=" -fdebug-prefix-map==/usr/src/debug/${PF}" >> >> or be hoist above the condition if identical, unless that is some >> undocumented default for cwd? > > I guess the == without ${B} is intentional because it makes the debug > source path relative to ${B} as lines 535-536 also do. Yeah, I think that "==" is shorthand for "=.=", i.e. relative to cwd. Does using relative paths in the prefix-map resolve the original issue seen with busybox? (It's unclear to me how gcc compares paths to apply this mapping. If it's a literal string prefix, rather than on some (semi-)canonicalized path, then we're maybe going to lose here sometimes, depending on the vagaries of the build-system, unless we list all of relative, absolute, and canonical absolute paths?) (But then maybe we can push dealing with or indicating which of those is correct off onto the individual cygport?)