From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 5FE143858D39 for ; Thu, 19 Jan 2023 13:06:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FE143858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674133616; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=uXzqKt2oaVUjw6In+YyGXyeCm88Bv28q/5mJIoo8YUo=; b=YmUKEYdBzvkWKn9VMpMlG4zFIbJ0L3xoEhEnkzZxmgOKBAojHhI53crYPgX1r4+ahaEe84 WF9Xw7fasBDKgKCRYpD38qPLwEfOOncaEY0aBS8y5yyvDfOI9H64gezdqGpJfeMM2uI8cq IHOCGHxlu2K4bOYnTPKO3KPb7vDg4b0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-341-oVQO4J_POIukt6m6k2kcMQ-1; Thu, 19 Jan 2023 08:06:54 -0500 X-MC-Unique: oVQO4J_POIukt6m6k2kcMQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 540BD80D0EC; Thu, 19 Jan 2023 13:06:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0972F40C2064; Thu, 19 Jan 2023 13:06:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 30JD6onV1242375 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 19 Jan 2023 14:06:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 30JD6odh1242374; Thu, 19 Jan 2023 14:06:50 +0100 Date: Thu, 19 Jan 2023 14:06:49 +0100 From: Jakub Jelinek To: Jeff Law Cc: Richard Purdie , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths Message-ID: Reply-To: Jakub Jelinek References: <20220817121534.1825108-1-richard.purdie@linuxfoundation.org> <40aa90ef-2d06-9c02-be8c-be6b6e2e9b1c@gmail.com> MIME-Version: 1.0 In-Reply-To: <40aa90ef-2d06-9c02-be8c-be6b6e2e9b1c@gmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham 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 Tue, Nov 01, 2022 at 01:46:20PM -0600, Jeff Law via Gcc-patches wrote: > > On 8/17/22 06:15, Richard Purdie via Gcc-patches wrote: > > Relative paths currently aren't remapped by -ffile-prefix-map and friends. > > When cross compiling with separate 'source' and 'build' directories, the same > > relative paths between directories may not be available on target as compared > > to build time. > > > > In order to be able to remap these relative build paths to paths that would > > work on target, resolve paths within the file-prefix-map function using > > realpath(). > > Understood. > > > > > > This does cause a change of behaviour if users were previously relying upon > > symlinks or absolute paths not being resolved. > > I'm not too worried about this scenario. This breaks ccache testsuite and -fdebug-prefix-map behavior in directories which are symlinks, see PR108464/ I can't see how the new behavior would be correct in that case, user is asking to remap say /home/jakub/foobar2 to some other path, but exactly /home/jakub/foobar2 appears in the debug info, rather than the other path. Jakub