From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NOR01-SV0-obe.outbound.protection.outlook.com (mail-sv0nor01on2042.outbound.protection.outlook.com [40.107.225.42]) by sourceware.org (Postfix) with ESMTPS id E4D553858D38 for ; Fri, 23 Sep 2022 17:14:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4D553858D38 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=westcontrol.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=westcontrol.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wjls2+SqfvQtA2bpxw8rcjIgWYKzrmbNh4yPQuWvznQApsGl0AvjDYt/vefe7IZncCBHnlpDd2/BoVUHqZUYGd+6/g4uVfFl6E3st3pL9u66egNF27qeoEJJRasVPzQOIBRdvXtGjO4kV4N5zcBdNyBlbfXRzZ+Ci1Q+fzDc2Caege9s/xc0FGymt9HDlbW/xjH3yaRneEq6SeZB+SXRC+EiSAs5y8jVCpxbN0rW6RL+n4q/GfhZI7UqBjNuUphIWtPL2GagQ1kzWUFApRqiEw+VPDAPOnGlB+KBn98+FrBeSKf2ZDr9+C3U4yXNK/Yk52V6dmUv7IPOPAeRbJcl7g== 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=w8FwwTnO+IZD6eBDKHl+2ig9tmeImVuEqIgnwJi85gg=; b=ESnDaJDqnBMMNudsDePprBvn516ZAfKwY+B0m7UKgXWWVEgh81IW6TAxjuE7QKKb0DCw3DkSjfe/Ce59WbF30nEBRC8i692yO9xULZwquME4kBZZ9KrMl41muqaurNYr3x7AMr9tlWmSp97bMy1nq9j2BbXeqCe8vuoJ2Y+XpSiTuXdxGaWVnzx5Ys7a9U74tthOI6tfkz5ngBPN5hrPBJHxcdTmfs91z3IsgkvQv/jhAc2AYLx995/xYUeCM8wYVS4vXIY7BaDOlhQil2DqI7yAq3kMOoD8db5y66uw4Eyhb+F5vcdAaguw8Tvufrg/SEi38nlCi8RkJcfrbrqUcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=westcontrol.com; dmarc=pass action=none header.from=westcontrol.com; dkim=pass header.d=westcontrol.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=westcontrol.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w8FwwTnO+IZD6eBDKHl+2ig9tmeImVuEqIgnwJi85gg=; b=CYmJysJytobq7HgFmBiMBnyIcY68txdmb3hUyaPRuSaM3yf2Eyq4vguoDSjSm/Xy1Rh4ijcZ8wXkiS0s4YimzSsWeU/74M9B+VdpUfKWz3d8U+AEDHwzi99MXIBqmwOT29MUEjVOU5vvQASkKwc50kR0uOiZg0zvC3ohAbHDFI/KSPr3HYDtGqUU4QLiMmXlEvO2dYczOAvHbfzZBA+qOKfoTKoF7j4pN23VtGvlF+utf4fijZRSm3o3NxfQ1y8mLmihU9FbfLCLhkRzrJzdiRMkJGpEZ1dSPNWkoOqiZUHK0y0vN+BfEMq8bsqE3ePaMNdsfP+JBRWZjbsfmYh7JQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=westcontrol.com; Received: from SV0P279MB0233.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:b::13) by SV0P279MB0532.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:21::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14; Fri, 23 Sep 2022 17:14:04 +0000 Received: from SV0P279MB0233.NORP279.PROD.OUTLOOK.COM ([fe80::b5a6:8db4:7441:fce3]) by SV0P279MB0233.NORP279.PROD.OUTLOOK.COM ([fe80::b5a6:8db4:7441:fce3%6]) with mapi id 15.20.5654.020; Fri, 23 Sep 2022 17:14:03 +0000 Message-ID: <857a3e13-c5df-8c38-f3d6-c512c96033c8@westcontrol.com> Date: Fri, 23 Sep 2022 19:14:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: CreateProcess No such file or directory Content-Language: en-GB To: mizo 91 , LIU Hao Cc: gcc-help@gcc.gnu.org References: From: David Brown In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SV0P279CA0070.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:14::21) To SV0P279MB0233.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:b::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SV0P279MB0233:EE_|SV0P279MB0532:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c166099-87f9-47c6-9ada-08da9d8703f0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KreT8rQOs3vh0oDYprlhzAeZVe4RJj5oBSRiDpx/4rWvQB69bT2ex0lhkds34kn9tWdKeW94HRUNM6YE29yg/FfXIWClk85nOwWUt7yKo0FXcU06AHtswJ+u9luCiUtNqJzQKZIY9pZ3qTTZhZ43ierGJEbdtZGbkjCxebbus7v+PGrktQdmiK8mGkZPkQbjP8QD4SqxHUS6dG0DGBg870uvDPyrxfQ8FUZGTP8VA2O4ABJxIGpaer9aOzfY8qp+pGb6hlcglJvyDuHWebmE38x96RB2JrtJUe+DEsXsmoBnmebknU2buKxZwgT/P8a3z6LGPM3Pyyizh0V/B7WGk1sgc6hMi7Nlned89e2jHTDbyEyxNnVV4Pslf9qfru8Gf7bCq+3dkdGcMTv1L+Yd/SEJ22+pp/dDS3zz7PY5O0GUD8pq6J18LZRBCQMH/bIv8UEWZGVAeqqwrrvkk63HXSoEnZV4mIpaz5qYaoKm7DTkiN5o//HtbtDlkgChLTio6XBiUtcHxlBUBGgLbYqVOuBsJEimLlIZrHyIWb90cWcyG9q6fwh7vds8VW+KwXSt2r6jr5NEaTVFzfHA8oH8L4qZBVCqdhFVHloamrs41C1M+/m990GuylI7jPklOTsgDLsVEO3hCqlhmvh3hPWPu8eCi66Au4SwDAqfl27/um2Vo3LGSx4T7AfPnq33XTeRfz10jtOs0xmH8HcbgpdhtSEPkabGOqam3YkrvZdTgMTUXpsHUNTIMM9nCWlg1RYF21VVP2nJ2QxgVS7N8xA2Mm8RzyvU2jbXQ7X1pr1bXADQTMmnboE+rcaDRON0NgVoxcQgBa9KsQ9oqZx4NLRMrg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SV0P279MB0233.NORP279.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(346002)(136003)(39840400004)(366004)(451199015)(66476007)(8936002)(38350700002)(4326008)(66946007)(66556008)(38100700002)(36756003)(86362001)(31696002)(5660300002)(2906002)(83380400001)(53546011)(6506007)(186003)(6486002)(26005)(2616005)(52116002)(6512007)(41300700001)(8676002)(478600001)(110136005)(316002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Y3JZMWxkaE04ZXo4TXMvcWROdGFac2dyaWxZNXk5ckpha3ZoRHhXa05Wci9S?= =?utf-8?B?SG9weG5BeVVVNXpSaUNoNWVKblZhQzFJR2RKSExKZHZwMi8rV3VrTEdxOVVX?= =?utf-8?B?QTlOV2x2SnhLNjJZaWxZR05KOVJLZTJ3K1BRcGt4WXB3YWtmbmM3UklDaG9M?=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FrWmhUWmZvZk41MThSU0JVNGsvNkdI?= =?utf-8?B?NGpvb1NmOFFJZHJJRGVlVjBybXFCWGl4SmFJdUNmZlBpTVdnanRFUWlDek1u?= =?utf-8?B?by9KOWlnbHNEcjlFVmIzR2pqdkhqL3JTaUpLV0pRZURnbzZnMVJUZmJUeUY0?= =?utf-8?B?TGtlSVhhOEJCUEEzMm51SVRGbFR5R01vWWVUNGJvbGlweUEvZnBzN2VFM0JX?= =?utf-8?B?QkE9PQ==?= X-OriginatorOrg: westcontrol.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c166099-87f9-47c6-9ada-08da9d8703f0 X-MS-Exchange-CrossTenant-AuthSource: SV0P279MB0233.NORP279.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 17:14:03.9374 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: c75fbd3c-42ad-4db0-9cff-972faf83ae45 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hsIM/59NnYePtYi//Wf9E0hCUkwyEvTac6kI5n+4mllggvXkOhH2v691rh0pxkz44UKse18IbKM6vyIiXcDtpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SV0P279MB0532 X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 List-Id: On 22/09/2022 16:55, mizo 91 via Gcc-help wrote: > Hi LIU Hao, > > Following that logic, let's just get rid of response file feature while we > are at it. Why encourage bad programming practices? Why maintain something > that doesn't even work properly? > > I think this topic is very underrated and many people working with large > codebases have problems because of it. > > For example, let's say I have a project structure of over 100+ modules. > Each module uses internal headers from other modules. It's much easier to > maintain a single global "include directories" list than to do it on a > per-module basis. Because if something changes in one module I would have > to rewrite configuraiton for all 100 modules as well. If I'm not mistaken > Eclise CDT is using this kind of project configuration approach. > > Additionaly projects may rely on macro definitions to provide configuration > values through the command line. And for large codebases, there could be > hundreds of such macros. This alone can easily bring the length of compile > command closer to this limit. Of course, you can define these macros in the > header and add them as another dependency, but this is just a workaround, > not a solution. > > I'm sure there are many different kinds of codebase configurations that > will rely on this feature. And the people adopting these codebases would > hit a brick wall. > > So yeah this is definitely a 'BUG'. Big one in my opinion. > > Kind Regards, > Filip > This all sounds like a very questionable way to organise your project. (I hesitate to say "wrong", because people have good reasons for organising projects in different ways, and sometimes it's just down to personal preferences. But if I were given charge of this project as you describe it, I'd say it's wrong and must be changed.) I would say that if you are listing a large number of include directories in the include search path, you are doing things wrong. This is especially true when you have code from different places and different modules - you are just asking for trouble when there are filename clashes between parts. It is much better to put the directory explicitly in the #include statements. Alternatively, you can have indirect inclusions - have a single directory "modules_includes" that has an include file for each module. Those include files have nothing but an include directive with the real module public include file, including the directory. This "modules_include" might then go on your compiler include path, but I'd not do that either. That way you can easily include the files you want, and not accidentally include private headers that are internal to modules. It is much easier to find what you want, and much easier to read the source code. When you see "#include "modules_include/foo.h" ", or "foo/public.h" (depending on which solution you use) in the source code, you know it is the public interface for the module "foo". You don't have to wonder which of the hundred directories it might be in or what module it is. Yes, Eclipse CDT likes to make huge include paths. (At least, that is my experience using many embedded toolchain packages based on Eclipse.) It is a PITA. It also has a painfully inefficient build system by default. It's okay for tiny test projects - for anything serious, you want a different project organisation and a different build system (make, or whatever you like). This has the extra advantage of making Eclipse CDT much faster and more convenient when you use it as an editor and IDE. Regarding the #define macros, put them all in a single header. If it makes life easier, use the gcc option "-imacros " to include it for all compilations. A file of defines is simpler to read, edit, comment, change and maintain than a list of "-D..." options passed to the compiler. It also gives you more flexibility, such as using conditional compilation to allow some macros to depend on others. Of course I don't know your project at all, and don't know how realistic these suggestions are, but hopefully you'll find them helpful. David