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 208AAC433F5 for ; Mon, 11 Oct 2021 15:11:53 +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 7D71C60F3A for ; Mon, 11 Oct 2021 15:11:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7D71C60F3A 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 F2070836FD; Mon, 11 Oct 2021 17:11:50 +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 Received: by phobos.denx.de (Postfix, from userid 109) id B93CA836FE; Mon, 11 Oct 2021 17:11:49 +0200 (CEST) Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (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 9012983531 for ; Mon, 11 Oct 2021 17:11:46 +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=tom.rini@gmail.com Received: by mail-qt1-f177.google.com with SMTP id w2so8425949qtn.0 for ; Mon, 11 Oct 2021 08:11:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UPAvo6o7GMLLehdymvr4CansBCfMy79aZiuqa8dFO80=; b=uypefU4j6K7dCEbHwzOl5SlYH/qQXmzdwTHLZyBjT7sjoMYQOxAZjRiaWywfMkiexX 6F4YsbmppEKMaUIGTHwalwv43nPe4C9OwXWz9ft+pOk5m4VX5+L87XiAmdvAotonJsIb izpKu3J4TMrvGYVMtqf1TNv7iAneeCsKSd9aj5scNROPgTnr1yRGic+i3v3xkxPtJmID uehPwnysUJDhBBEZ+YroNz25ZR9SFHYbSiYN0wvsjXpvSeZB6qXMXT4y3ZMT4tIAdLbZ A5P+uEd7RMRZW9PZQ0lLF8UQKp0qDj/3jb3vd1qyrC3jeka3zTE6C/mjTe0NoXHVjeWr jn5Q== X-Gm-Message-State: AOAM531tpbOODVDy1ePRFW3zeZHmcpVBCP35JtP2++ZUP6zKRGrQDcOT 1NSfidYmQGINv/+Br72TRp2DvaEQZA== X-Google-Smtp-Source: ABdhPJzUPdLbZHxdql8LupjmajQe7g+HwZA38vCckApI5DpEXptHWecZNmB1Sy/qV2vmZIITXmeq1w== X-Received: by 2002:ac8:3b5a:: with SMTP id r26mr15291921qtf.171.1633965104984; Mon, 11 Oct 2021 08:11:44 -0700 (PDT) Received: from bill-the-cat.lan (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 v80sm727339qkb.45.2021.10.11.08.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 08:11:44 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCHv2] tools: Stop re-defining -std= when building tools Date: Mon, 11 Oct 2021 11:11:41 -0400 Message-Id: <20211011151141.4068987-1-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 While we intentionally set -std=gnu11 for building host tools, and have for quite some time, we never dropped -std=gnu99 from tools/Makefile. This resulted in passing -std=gnu11 ... -std=gnu99 when building, and 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 --- Changes in v2: - Always use -std=gnu11 after Bin pointed out that we have only been enforcing this for Linux hosts. --- Makefile | 2 -- tools/Makefile | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f911f7034430..723f80e34459 100644 --- a/Makefile +++ b/Makefile @@ -299,9 +299,7 @@ KBUILD_HOSTLDLIBS := $(HOST_LFS_LIBS) $(HOSTLDLIBS) # have older compilers as their default, so we make it explicit for # these that our host tools are GNU11 (i.e. C11 w/ GNU extensions). CSTD_FLAG := -std=gnu11 -ifeq ($(HOSTOS),linux) KBUILD_HOSTCFLAGS += $(CSTD_FLAG) -endif ifeq ($(HOSTOS),cygwin) KBUILD_HOSTCFLAGS += -ansi diff --git a/tools/Makefile b/tools/Makefile index 999fd4653166..b45219e2c30c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -295,8 +295,7 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ -I$(srctree)/tools \ -DUSE_HOSTCC \ -D__KERNEL_STRICT_NAMES \ - -D_GNU_SOURCE \ - -std=gnu99 + -D_GNU_SOURCE __build: $(LOGO-y) -- 2.25.1