Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp127499rwl; Tue, 28 Mar 2023 22:26:38 -0700 (PDT) X-Google-Smtp-Source: AKy350Y2JOhpqbne9QravKohiUZOjCzOKh5M0J5J1S9WLRPE3igakiC8UqV0g/8bfaI6+nyz8K9/ X-Received: by 2002:aa7:cc09:0:b0:4fa:e8f3:968b with SMTP id q9-20020aa7cc09000000b004fae8f3968bmr16775035edt.19.1680067598090; Tue, 28 Mar 2023 22:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680067598; cv=none; d=google.com; s=arc-20160816; b=X5DpWAqahyOO+oufknz6MJD9t9beZaRvakugr7SYlM40s6ChxD+fYy/vEvRCbPf1zG oepFx2YCqkorsdHN5A+fqL3a/E9AJ7a8UEgMBiJMPGef0gXuf2gtwdBMJVN8SwP7qq/X lGnBmJgAooGaGEQHr41Fsx44SThPi6KqEaFWK00abbGL74FGFsq1LJf7s9ajvV5ybFP2 dEIp2xNWOuZ7lcv9fBnhJRunS/1oUjI1DqDTGuo9N7T+kBT9tTI/9pu29jtlmg8cMGbW cFhyNB/HgviSVdYGfLma+g1H2RfnOjeNBSGIjyGHzUCfdOQKbNjwMPeDgI508p8xqkyj lHiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5lQ5MUtxKRF9SiHFk/zB+1VgSSFB6spw6/8g4qQklyI=; b=SZG2DtkP22M5MD03JDj3PDQbcrWG4JWcv+R7rrJvEexLQixX8UJ0Tpte835b9xWPac 7GpjXXr3NeWq8bDPpS2VzYDDYrfdB4MC187iDTrT50lu57y22UJ5ThPfW00uDp+xEtsF E50Dq/6LGajEQE+kV800+JAezh5Sp2nS340L8g9CPYJyGshDyM3UXJKwXPe/nIhquMAO 4Jb6v9svrJDqZRWnuCkZVuO+P0WGksF9Dzq9izjg6U8jjKPKoNQrOOULRUmqVwYo/0/y yFXdowOMXn/aMPT+WByCouIm/mekBwrHpMHH1uCHOG32lYr6r7vUJ4m/jC/PTFjeFjX1 FRvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020aa7da11000000b004bf6ddc13d8si35586390eds.439.2023.03.28.22.26.11; Tue, 28 Mar 2023 22:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbjC2FQ3 (ORCPT + 99 others); Wed, 29 Mar 2023 01:16:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjC2FQ2 (ORCPT ); Wed, 29 Mar 2023 01:16:28 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7601A171B; Tue, 28 Mar 2023 22:16:26 -0700 (PDT) Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 32T5GBvQ009134; Wed, 29 Mar 2023 07:16:11 +0200 Date: Wed, 29 Mar 2023 07:16:11 +0200 From: Willy Tarreau To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] tools/nolibc: validate C99 compatibility Message-ID: References: <20230328-nolibc-c99-v1-1-a8302fb19f19@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230328-nolibc-c99-v1-1-a8302fb19f19@weissschuh.net> X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On Tue, Mar 28, 2023 at 09:07:35PM +0000, Thomas Wei?schuh wrote: > Most of the code was migrated to C99-conformant __asm__ statements > before. It seems string.h was missed. > > Fix string.h and also validate during build that nolibc stays within > C99. I'm all for improving portability, however I have a concern with building the test case with -std=c99 which is that it might hide some c99-only stuff that we'd introduce by accident in the nolibc's code, and I'd rather not do that because it will mean changing build options for some external programs using it if it happens. However I totally agree with you that we need to make sure that there's no build issues with c99 compilers. Modern compilers are c99-compatible but generally come with GNU extensions and I understand why you're interested in switching to std=c99 in order to drop some of these like "asm". Should we have two build targets, the default one and a c99 one ? Maybe. The build is so small and quick that nobody will care, so we could definitely imagine building the two versions. Maybe you have a better idea ? Thanks, Willy