From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52B48C433F5 for ; Mon, 11 Oct 2021 12:44:22 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B09D60F23 for ; Mon, 11 Oct 2021 12:44:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5B09D60F23 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DA65B82DD7; Mon, 11 Oct 2021 14:44:18 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="QnZuCghg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7F1388314C; Mon, 11 Oct 2021 14:44:17 +0200 (CEST) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9DFE582DA1 for ; Mon, 11 Oct 2021 14:44:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x734.google.com with SMTP id az39so2630349qkb.5 for ; Mon, 11 Oct 2021 05:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wWxM+/o0MLXTDIHID67huFhPipfyiy13SFATRSD1eZs=; b=QnZuCghgCaRSh0AO9SRDRAMe5BjXR5VETDb1Lc5hCT7DsKc/5R4zettv+1tu2TsVTg QusBL4hi1t/lZ2wDwoUfJ/Zy6RpzU7lSK8I+AlTt2ktOIRPy2qyQOgsbQmSEf4yDKbcl nowe7aODVFpnuriNavGR7OvFey0I1PjiXoT+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wWxM+/o0MLXTDIHID67huFhPipfyiy13SFATRSD1eZs=; b=ikxurmXDo3LxRgz3esXIT2X4v5fzNolwHp6Dg3jBw6+hXzSspb+1FbsFe4rU7uEmmB v3rxSsjJ6cS9506l6J3PwhyUgg615wjgR9eoUvOw2TAfDCw1P0nYUmqsp8zLPG7QC+LV /0oZ1VFlfaDlHoTIplhB8iVPQF3nSYVgAthxOU4J8bIISvfSGxT9XloVyj4JMC7qDcnU zT4TTAySQpbPkHNQmMKLYt6oycvKZdqo9N01uQ2+h084FEW16UDbjAfCT0epHI5DzSoD ZS8TqwYPvjoSow0b2snT/nwtWwBTWPbJBzEqomRXx2Nipui7Q77TMOA1EKFdb8qUgYjq 80Vg== X-Gm-Message-State: AOAM531rab4z22Oa0RhXUUfiRw2yJiJ5DYDPLp6sVwiFIeci4CTmRD+N sd0kObMoKgw9ndCLD5+3HqMDng== X-Google-Smtp-Source: ABdhPJyj4TCNejcLKH0Qx/F4cTCnXOtBNBKq9Bd+w58dDk2ByeXVKtv7BJzMBASDxmhjEDCW43TQig== X-Received: by 2002:a37:6309:: with SMTP id x9mr12325978qkb.414.1633956252332; Mon, 11 Oct 2021 05:44:12 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-7461-ba79-88cf-55cd.res6.spectrum.com. [2603:6081:7b01:cbda:7461:ba79:88cf:55cd]) by smtp.gmail.com with ESMTPSA id c16sm4104138qkk.113.2021.10.11.05.44.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 05:44:11 -0700 (PDT) Date: Mon, 11 Oct 2021 08:44:09 -0400 From: Tom Rini To: Bin Meng Cc: U-Boot Mailing List Subject: Re: [PATCH] tools: Stop re-defining -std= when building tools Message-ID: <20211011124409.GT7964@bill-the-cat> References: <20211010192332.3929646-1-trini@konsulko.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TBFeK8oU8Jij/i72" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --TBFeK8oU8Jij/i72 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 11, 2021 at 11:21:49AM +0800, Bin Meng wrote: > On Mon, Oct 11, 2021 at 3:23 AM Tom Rini wrote: > > > > While we intentionally set -std=3Dgnu11 for building host tools, and ha= ve > > for quite some time, we never dropped -std=3Dgnu99 from tools/Makefile. > > This resulted in passing -std=3Dgnu11 ... -std=3Dgnu99 when building, a= nd > > gnu99 would win. This in turn would result now in warnings such as: > > tools/mkeficapsule.c:25:15: warning: redefinition of typedef 'u32' is a= C11 feature [-Wtypedef-redefinition] > > typedef __u32 u32; > > ^ > > > > Signed-off-by: Tom Rini > > --- > > tools/Makefile | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/tools/Makefile b/tools/Makefile > > index 999fd4653166..b45219e2c30c 100644 > > --- a/tools/Makefile > > +++ b/tools/Makefile > > @@ -295,8 +295,7 @@ HOST_EXTRACFLAGS +=3D -include $(srctree)/include/c= ompiler.h \ > > -I$(srctree)/tools \ > > -DUSE_HOSTCC \ > > -D__KERNEL_STRICT_NAMES \ > > - -D_GNU_SOURCE \ > > - -std=3Dgnu99 > > + -D_GNU_SOURCE >=20 > It looks like std=3Dgnu11 is only added for Linux host. >=20 > KBUILD_HOSTCFLAGS +=3D $(CSTD_FLAG) >=20 > Should we still keep it for other hosts? Good question. Looking at the Linux kernel, we're of course vastly diverged again at this point, but it always passes -std=3Dgnu89 (because hey, we demand a newer minimum than the kernel) unless it's a tool/test that spells out something else. Given that Azure builds macOS and cygwin for us, I'll see what happens when we tell everyone to use -std=3Dgnu11 and report back. --=20 Tom --TBFeK8oU8Jij/i72 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFkMZYACgkQFHw5/5Y0 tyz8GAv+OBCMqhJE4x9hROixuQTyAfD6Z+EhOOotHlPi43Pz9bVFiisNCndMki2s PwptJjx6bqJAYW7zK6BKQkpe/JWRitXHvI7eepqpOwR2PgVaeXKa1SC/HN8oJP/t 3hul93t/z5AGcFdaxKcD5AIn+h3kjEXYzACV+l9QT2Ka3S+EBga8wbWTqj4v7T+i w/f1m3OFv7o9upeyDdKil8nodL/arAOA808fOVYGiPGqmJ9hGp+j7DwchK6R6cyN 19vt00rjs7FrM/qNpPyAUhA2pOPkgfnGSj6gdZtCOTYL+ea6cEhcUhv3x7BHwAjW oNRkLfy82fDJXqz3FIUEiuIf5u0UD13p9//keNJlDoFuvjL40cN8SU7EY7sgUfkC 0H5amNfLEZoZfJaayz0vZt3izXbdTXjBI6El35PJMpepsTEIj17dbdUBKY5KCQWE okLPw81xJLASuFznVRVrVn/i4JqwvfpHCiTzWkvwmfGyRi7tKaDP2vgcEQH7WN6x hvaVNVdw =Np3c -----END PGP SIGNATURE----- --TBFeK8oU8Jij/i72--