From patchwork Fri Jan 6 10:25:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YunQiang Su X-Patchwork-Id: 40073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp749136wrt; Fri, 6 Jan 2023 02:26:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXurfsacIUM5msKWaWYTmQ/NuGRvNsKeVOOahgowGSFlyyanrJl5qu6oGUO8Q5My3HjTZK33 X-Received: by 2002:a05:6402:e0a:b0:46c:b25a:6d7f with SMTP id h10-20020a0564020e0a00b0046cb25a6d7fmr55848324edh.8.1673000816678; Fri, 06 Jan 2023 02:26:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673000816; cv=pass; d=google.com; s=arc-20160816; b=MEUBoihaQWrbV6cfXT1Mjx7/YbzppnyY9I3daQjRAoai1yZ6BijEfgi1j100IzB3Yv 53EHWZ6gLvf/r/bYtv5/OlONPpXN2M9caycOXhUg/Y8akpyb2mU2zRL1a8oG1agwjjCR 7O6XyqdfqVpgIc/N5fIQg9F1WCF7LEw9LNkfmNXBWxyrLSGm903eiHvxyleepyvtrBNl 5h0QkMrzQ+eNZnb/ecGh6/CPOo8BoegB7zvYq+AxHV+2xPU172Goibpsw3bNfoatVuRf kLDJzrwv+U3/tX6GzMsjLWbooeB+GWy5xjiUllvryPqonej8Bl0o6Ce2bA4YqFxdrDKd XiZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:message-id:date:subject:cc:to:from :dkim-signature:dmarc-filter:delivered-to; bh=nJ/5PGBnvLOKhNs3pL7Wh5kObiaJMf5P7gIuQomHJ4Q=; b=sk+JNJwZdpVkJfVYtsuMMcbwDJLWUws3AVlSWHtDDa7tAWkWhhkN2vgYcFHMuW6Oje ciSgxf+JyGSB2BTu7py2ugjcIGgJhXe6j6AlyV2vSnl6ynQwALIqgZ4s38Koqcnxr6SZ PESCpd58bYhfn9SOwNtSvbxL9jrRbTXkIi2gRBrrmtjqrbviPFj+FgNGKnIxiT9Ka46d xcXMH3iFk3qTugjqdCA41LA0FqjMo0jy/zm+AM1jxXRv+sgbNjR7aIC1DAZCoMbJN5eG ISQHRcYaHr4LMr9lbqn2cBM5pkfncahY/GiBy/kfug3EuryEMjVAg0Zzr0YzzuOhZUX0 Atow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=GNG0sdeY; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h8-20020a05640250c800b0046b4b49d33fsi1360671edb.184.2023.01.06.02.26.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 02:26:56 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@cipunited.onmicrosoft.com header.s=selector1-cipunited-onmicrosoft-com header.b=GNG0sdeY; arc=pass (i=1 spf=pass spfdomain=cipunited.com dkim=pass dkdomain=cipunited.com dmarc=pass fromdomain=cipunited.com); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D332F38432E3 for ; Fri, 6 Jan 2023 10:26:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2092.outbound.protection.outlook.com [40.107.117.92]) by sourceware.org (Postfix) with ESMTPS id 7BA3B3858416 for ; Fri, 6 Jan 2023 10:25:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7BA3B3858416 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cipunited.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cipunited.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mdg9Nx9at44f7ejhFpyRVSk3VclqqJoAvRv+07GvpTzQsyM663UCZAx91IHaU0Uvkrq0Urcuc1eXKFohFEdflW5eBJLxTHDG6b+C894us6XlKpBVTZfsFyr1jJ60zNGEXbT12IQW/5l8mGHxSLSu6X2z1BQ1sYls4jP/HG/bOfTmOMbIpoorcOYn2D79dgOtnz8tqk/eJ3GvS+7SrLAkIYg87VBf+7A0n5HgxqGzQUNlQxIok7caAjgjWHiYEm09/HutAj1xIZYmP6bi6x4vvYqN9awOhqppGjVOl/lQz+ZT5tMNQ13uIYa+HkhWXxUwKSoQw9osrJLivKHECgENdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nJ/5PGBnvLOKhNs3pL7Wh5kObiaJMf5P7gIuQomHJ4Q=; b=jfqXIo8PH0S34b3YbFNzZxFDPwwHniBELJf4/gPT3ALKPfyZA8vB/dyuJBNwSPq5zfIlDkkA8bWfZBa4VSTY3P6IBm42HnlatJqm8EWFfCJVauXw9cQmdu2hAH+tkq8NACzF8iu2M826eEwu8dYJ1qaq9Go4ga9MxciFeZzi1fP3VtdA2hSt0b6scRdTn2AN3E9PRKSuGBQpO1JRM7wcYgjqfeH3PZvulog9QWlPFf7lwEiqhMTh5phAoXeZouWHiwXFB4tNp6E5vJQofh0Bovh5d05HmC+xqWid3hiYFODCH10nWkZ81N+D9vS5d+LxTw8lpacIJ5jXjE4uoFjhbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cipunited.com; dmarc=pass action=none header.from=cipunited.com; dkim=pass header.d=cipunited.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cipunited.onmicrosoft.com; s=selector1-cipunited-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJ/5PGBnvLOKhNs3pL7Wh5kObiaJMf5P7gIuQomHJ4Q=; b=GNG0sdeY4VK00aL6KyqTXuLt+ZakQToVKWnfeXxGPG9SE4ewxIsL5jWePXUam9NlN0uBAO1X1dZTLZlOsmFs+1oFlfUXFAspn+Hx8DQCXWwzDMOC4cgz6eMjwGN6z7H8OVrShaBrRqDdAIJkrhXCmtzlnkyVMf6cYAsWD0uirgY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cipunited.com; Received: from TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) by SEZPR04MB6971.apcprd04.prod.outlook.com (2603:1096:101:e7::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.14; Fri, 6 Jan 2023 10:25:49 +0000 Received: from TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::cfd9:452b:141a:1794]) by TYZPR04MB6117.apcprd04.prod.outlook.com ([fe80::cfd9:452b:141a:1794%5]) with mapi id 15.20.5986.014; Fri, 6 Jan 2023 10:25:49 +0000 From: YunQiang Su To: gcc-patches@gcc.gnu.org Cc: aurelien@aurel32.net, adhemerval.zanella@linaro.org, jiaxun.yang@flygoat.com, macro@orcam.me.uk, syq@debian.org, YunQiang Su Subject: [PATCH] Set CROSS_SYSTEM_HEADER_DIR according includedir Date: Fri, 6 Jan 2023 18:25:20 +0800 Message-Id: <20230106102520.3949796-1-yunqiang.su@cipunited.com> X-Mailer: git-send-email 2.30.2 X-ClientProxiedBy: TYCPR01CA0149.jpnprd01.prod.outlook.com (2603:1096:400:2b7::9) To TYZPR04MB6117.apcprd04.prod.outlook.com (2603:1096:400:25a::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR04MB6117:EE_|SEZPR04MB6971:EE_ X-MS-Office365-Filtering-Correlation-Id: aabe5961-038b-48c1-863a-08daefd0613e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2vDDG+6CUut25WP/rKU0Up8LCkxFV5GB1YuDA+ZRMa+9ryhV7wDZER9aaMbpQPrR3cnQaO2Gw+nnSl3XT3iZubxhvXzDluFcN35zkJuHeQ3dp6LjEOFGNWQ+PzSbfJaLnJCZ1hUZBmxDq79mx4aloMfIfziM/z3DWC+jblcOfVf11eN+uLhUAGxu2tTcdVol33ZpmOvZ/XBk4zxKQC9tNfNX0cKp7q+VBryDjJleMWitAxXqh0DBSCH0A0bYAwajEJa27n8tB+xq5SJaTy9zXGXlyzfebUikMIuQP8aeI9TnOu8eei0sda5pIEWfXya4mBnJRfmwBV2yNCNrIF6xUaZbCuaf6S4pqpQDAgOizdQIYt4Ah/sGebKkXOTlUXp4fQVQ3tAsXpPZGxjk7EkhFOolClkb4zMEv/xlsOSvQjnifukykdSLHSyneDfh+3eQFgeqm+aw2Q6GZrorfk3fKLGt/cWUUGWJJXitWswaXa2BjRi1p+qJyn7WzUcVylxh4wF9q3Opd9TdX8l/kw+XyMReCzZkCmjE5FbR5p/zk/1k40Ks7hdO7khMFKEBTGptwk5r7ga1EQ5fM+3IvYPv9s17TkGL5zp15NpTOieyqne9tiAsoyLzH/L+S2r7uuMdmse95SZJAULvZcKij+hUeC4SjvNVcfxlam141gjx3NyMYejT4DvAuVuTXGw9YL9uiuvCpmYgP35Se38fpFvqtQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR04MB6117.apcprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(346002)(39830400003)(136003)(376002)(366004)(396003)(451199015)(2906002)(38350700002)(6486002)(38100700002)(6506007)(52116002)(478600001)(66556008)(86362001)(26005)(4326008)(66476007)(6512007)(66946007)(6666004)(316002)(5660300002)(83380400001)(1076003)(6916009)(186003)(8936002)(41300700001)(36756003)(107886003)(2616005)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: fXtjy0M6YGZqPLREof61AdyDtyVWFuJBcEgDGsEbwTHTG1N1I1K7Nip68zuHv5xrZGIrC4mj2K4MwlgACKQMYixy9KPAqy0Q8UKYXpcGWC3YAqfhAVpEFM0+BRHHrDzk7/NhLUiT0JmgVYF9os2L1UQaj7eZKq0iq3UVzCeXkUojpjPfiiDaf48RFO8/tlt1wA4j0k8KMH4HzO2XEsO4aFy7BIZg2LDAaRsYvu/s01Wtk+9Lw22IRruBzS3EtNSSpbNXj23hvxeH+Aq7cSwAFT8qKt+K+d8usxo4kChRIKG6tf2K39p/+vlDsHybp8igo/A2VTFx7PKbWkAkzU/yx4CSsXBey+Zgq5EKaTvhhuHhE1BZfR8Okx82tjkvbeo15r7xJiULySDMPCikfUFAUlP7Rgr30Y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UmXpmbdxoIhIIHF3xRuHJBflE5GrR57EqW+Y6YP2fmD89NLBMlEd1AXImO1lEfkVollBiAQezNHbhru6J3icLiembLWmiRUlVZT77q0uBOG+IZYBHyQRLTqDT7lUjg== X-OriginatorOrg: cipunited.com X-MS-Exchange-CrossTenant-Network-Message-Id: aabe5961-038b-48c1-863a-08daefd0613e X-MS-Exchange-CrossTenant-AuthSource: TYZPR04MB6117.apcprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2023 10:25:49.2547 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e31cf5b5-ee69-4d5f-9c69-edeeda2458c0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tjhYAlmT+wahA101gsZUHXYEi026G4wThR5MbZeeiOkI6ViwS8ejFYUNCQZW0EryID1nGxY050dHJrg+i1DufBuAEKydtxUfHwWLdkRrxFA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR04MB6971 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754268504673983471?= X-GMAIL-MSGID: =?utf-8?q?1754268504673983471?= For cross building with option: --sysroot=/ --prefix=/usr --includedir=/usr/ just like Debian does, fixinc.sh will use the wrong header files from /usr/include. gcc/ * Makefile.in (CROSS_SYSTEM_HEADER_DIR): set according the value of includedir. --- gcc/Makefile.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6aed2cda3ca..6001c9e3b55 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -532,7 +532,11 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h # Default native SYSTEM_HEADER_DIR, to be overridden by targets. NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. -CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ +ifeq (@includedir@,$(prefix)/include) + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ +else + CROSS_SYSTEM_HEADER_DIR = @includedir@ +endif # autoconf sets SYSTEM_HEADER_DIR to one of the above. # Purge it of unnecessary internal relative paths