From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from AUS01-SY4-obe.outbound.protection.outlook.com (mail-sy4aus01olkn2179.outbound.protection.outlook.com [40.92.62.179]) by sourceware.org (Postfix) with ESMTPS id 4DA393857020 for ; Tue, 5 Oct 2021 08:23:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DA393857020 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CM00G8LHzjDO+136mlIRh9AL4uyZGJ1mpePHOAt676G7vuIYCj62tuQufpelu7rPMbrJiGQfRnA7jQlPtUtg2X3G2/qZobDMTQxotk5voRJhIc9geQGnbkwoYZpMX6X7KuXnRxRylrl0uTcdYNjyNuyzdr1j1q8T3wsUFakpEuUpGRGAvS73ghTnPsZI0T2St74tLfYFl23sxy6N3ozROEVr38u97pTr7QyJ8JdY7/ISnXNvdNrAY75AL7mx35691XYFsfhGc8NELVylSWB1S0hVmeac0nrPcL7/FJOIyXY7gVpD4Tu8tlEy1QX12xWvVMDIdV46/taGP1K4kGALww== 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=qSGnvfRoYpkumeoaIryqvcEpUhurEKPH0qjh4NQG79o=; b=CLBhKKZq/gRHanji9oZqANPyWDe8GtJcPZX4pvCVpzsFnge9pzweApRYYL5DJg68LTWDSQsuk26K1E40F/ZdDwh8FALRuiFiM6Z1W//XRUAjJfwPlsY/b5eAAmen/jNK8qWiuq9kWbtBK5I1ObsLW4iOhLwWlynerILSgfrerAG/Zws0ziIMGm0eDRsy4Tmri4HBmhH7YtBBmVCpGc4OTftjsYSU2J9Qz2eSgiOkQRe3xnLqcEmY51iN/mEZR3+qAI0adaCaYQ8r/iUYo1k5vx+vlzltJWsrKIG2BPKsD8MDVVD+ATsXwFxCUYQ6ahJ9d9r8InUZs/oKnrt9y+XkEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:71::10) by ME3P282MB1938.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:a2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.17; Tue, 5 Oct 2021 08:23:22 +0000 Received: from MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM ([fe80::b1d5:bf09:16b0:4b2c]) by MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM ([fe80::b1d5:bf09:16b0:4b2c%7]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 08:23:22 +0000 Subject: Re: [PATCH] gdb: Fix build error on macOS To: Simon Marchi , gdb-patches@sourceware.org References: <6d03de6a-0760-2894-3845-dd9dec5c703a@polymtl.ca> From: Enze Li Message-ID: Date: Tue, 5 Oct 2021 16:23:18 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <6d03de6a-0760-2894-3845-dd9dec5c703a@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [65lf4q8hA9yFW35ModhC/HBu5TK62HuR] X-ClientProxiedBy: HKAPR03CA0014.apcprd03.prod.outlook.com (2603:1096:203:c8::19) To MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:71::10) X-Microsoft-Original-Message-ID: <66ca9594-35a2-0b13-03e8-301c566f1230@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.3.105] (61.48.214.232) by HKAPR03CA0014.apcprd03.prod.outlook.com (2603:1096:203:c8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.9 via Frontend Transport; Tue, 5 Oct 2021 08:23:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e8fd821-0c92-4af7-6eeb-08d987d9652a X-MS-TrafficTypeDiagnostic: ME3P282MB1938: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vvLJGWZh2P91M6XnuRypN3Qd8Ts3PaECdg8ki+JZdYDn9lvnrh+DAPzbHiqmKckqEHEfRc5szEZubw9oGTrJIWJgc3NorxvPFxyAyH7PnG1gxfOuAa5wtIRQrQIY5FyeUe3vWOHaWc4/TfA0y5Qrulom6QXsc4P/cfnItNgE/sn8M0O1Hc2zi49HkpawZ/vUaWhztiUGWhhfhgN00XzKivx8pd8UX1OKhecO3d1FLr7yYmk+xQPrWTt4aI6zc11JY0m4ocxl7lINC6dqNefmZtM3HQKTFl6QyOqgrpCBJNHHnNZbwx3VtzNsaGjmOmclkf2Rj4L3zJMafcYPOhkcxQo++2uP/4iLweeIdVr/55u4r+jiG7FtFq6XZlbW3M639Gh4aJNLl/hR80ToCMx9xA0bEb42h/RnXyHrUH1/JeKQXqIMxveXfzZAZDFOLSD4coj8ofUHhdAE7pTMafY8JRI572zrV5hzy5uFjOOAAQI= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: kJjQzi3jZxd/Tb+QOmcLJUGRsE7Q9C88lGsiKjQSeL4E6q4mBGiIlO1Mpb7wqSiCPU3P0KKdjKu6z9wpPGJNoBV93t3xTaMPzyi11EKhguByiuSi+OeWUEENkd3D+KS/bzoc8rp81x4Zh4Skj6e/KA== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-8dac2.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 5e8fd821-0c92-4af7-6eeb-08d987d9652a X-MS-Exchange-CrossTenant-AuthSource: MEAP282MB0293.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 08:23:22.6937 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3P282MB1938 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_MUA_MOZILLA, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Oct 2021 08:23:28 -0000 Thanks for the review. I noticed that the upstream gnulib and the gnulib used in gdb have different directory structures, and it would be confused to forward this patch to them directly. I will soon remake a patch based on the upstream gnulib and send it to the bug-gnulib mailing list. Thanks, Enze On 10/5/21 12:14 AM, Simon Marchi wrote: > > > On 2021-10-04 06:03, Enze Li via Gdb-patches wrote: >> PR build/28413 notes that the gdb master fails to build on macOS. >> >> Based on De Morgan's law, the expression >> !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__) >> is equal to (!defined __GNUC__ || defined __clang__ || !__OPTIMIZE). >> The expression above looks weird, maybe there are some problems with >> this way of judging. When any one of the conditions is established, the >> subsequent judgment will be ignored. >> >> This patch works around the issue by rewriting the expression of >> judgment after referring to the nearby notes. >> >> Tested by building on x86_64-Linux and macOS(Mojave & Catalina). > > Thanks for addressing this. Please send the patch to upstream gnulib, > to the following mailing list: > > https://lists.gnu.org/mailman/listinfo/bug-gnulib > > Then we can pull the updated feedback. > > Otherwise, we can always have a local patch in > binutils-gdb/gnulib/patches, but if the change is correct, I don't see > why it wouldn't be accepted in upstream gnulib. > > Thanks, > > Simon >