From patchwork Tue Dec 5 09:36:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 1871910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SkwQb5QRtz23mf for ; Tue, 5 Dec 2023 20:36:23 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 61E5C3858C52 for ; Tue, 5 Dec 2023 09:36:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id 702DC3858C50 for ; Tue, 5 Dec 2023 09:36:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 702DC3858C50 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 702DC3858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.252 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701768971; cv=none; b=B8wkSQwgP4UrgFLIPzya3d5lfTaaV8DBkzx7GfkxWy6Si3cYdwNvdRkGXzrGn8m0eNNgc0E9wZ2RgXjER/pmsSBVzHVoQ0tAo32jHyPSWaCbdZq6Y8rqK9dXNQw1Frr6Hp3gxbo9L7pztGKJt7xgVH8mNfGjPx/2A9jGSGQB5cU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701768971; c=relaxed/simple; bh=xRzBaZekipCTcmwcwBcnqcQ8HghfBibLQXmuso+EhA4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=BMJh0eD/EfuRac/la5xmassVMb5YihI0oso/MmU+uqiIpetoo1PlYlbvcTBBmpiKhqU0UQ5eXYvs6Q3SQhnLGf2g2EL1NuDV/O++z3UGNAl9VbMRqc1btAmW42olblU6ovATX/LWLwzFTMw3Dm2OQ1mEy861j1krhx9z5lsUMA0= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: yupYcVVYQx6s4ZNb5Jay9g== X-CSE-MsgGUID: fgnxjQFCRnKm2XuW16itsg== X-IronPort-AV: E=Sophos;i="6.04,251,1695715200"; d="scan'208,223";a="24479812" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 05 Dec 2023 01:36:07 -0800 IronPort-SDR: /QpB5rLMPYPml5U3ir05JDUQbK8sgtM39NIV5IcVaub2qhpucfy22l3KZgoY3dMAHL1gC5dkSs w1Rba6tUed2o+vWJw2Q3055HLN8eiAx0X1qwvZtX+QzFh6XwDTTp3g0bVIOZiogz+MHCs/ojy3 KCgbomoLmgNxND2mP+6pjy+9FuTHrE72LoVNi7wnqlfXdye0H3DrA8vcSi4Gj18dg01QE13HXd Ae5SZRRGeXK5BCG6AD9d4ix1cg2TFYdQcEJjBMW6eYnYFY3Vxr2Y2jCPQB1pW0UyD8toyANPzW P5U= From: Thomas Schwinge To: , Gaius Mulley Subject: Modula-2: Support '-isysroot [...]' User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Tue, 5 Dec 2023 10:36:01 +0100 Message-ID: <87wmtt3sam.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! OK to push the attached "Modula-2: Support '-isysroot [...]'"? This greatly improves test results for the cross configurations I've tested, but I don't know if any real handling needs to be implemented, or this should be done differently altogether? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 0bd30fd25138497df5320e5f63fd04e1b5756cc5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 5 Dec 2023 09:54:54 +0100 Subject: [PATCH] Modula-2: Support '-isysroot [...]' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In GCC cross configurations (tested '--target=amdgcn-amdhsa' and '--target=nvptx-none') with a sysroot configured, the 'gm2' driver invocations are passed '--sysroot=[...]', which is translated into '-isysroot [...]' for the 'cc1gm2' compiler invocation. The latter, however gets complained about: cc1gm2: warning: command-line option ‘-isysroot [...]’ is valid for C/C++/D/Fortran/ObjC/ObjC++ but not for Modula-2 ..., and therefore a ton of FAILs. Reproducer (also for non-cross, native configurations): $ build-gcc/gcc/gm2 -Bbuild-gcc/gcc -v --sysroot=/tmp -x modula-2 /dev/null [...] build-gcc/gcc/cc1gm2 [...] -isysroot [...]/tmp [...] cc1gm2: warning: command-line option ‘-isysroot /tmp’ is valid for C/C++/D/Fortran/ObjC/ObjC++ but not for Modula-2 [...] gcc/m2/ * lang.opt (-isysroot): New. --- gcc/m2/lang.opt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/m2/lang.opt b/gcc/m2/lang.opt index 24f3c6594b9..a60c03e69d4 100644 --- a/gcc/m2/lang.opt +++ b/gcc/m2/lang.opt @@ -405,6 +405,10 @@ iquote Modula-2 ; Documented in c.opt +isysroot +Modula-2 +; Documented in c.opt + isystem Modula-2 ; Documented in c.opt -- 2.34.1