From patchwork Thu Jul 13 18:52:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 13312581 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DDE1C0015E for ; Thu, 13 Jul 2023 18:52:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231627AbjGMSwf (ORCPT ); Thu, 13 Jul 2023 14:52:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbjGMSwe (ORCPT ); Thu, 13 Jul 2023 14:52:34 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6186106; Thu, 13 Jul 2023 11:52:32 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-992b27e1c55so147024566b.2; Thu, 13 Jul 2023 11:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689274351; x=1691866351; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Sl0k0wYjl3hwJsFNeGh8bb0d9ZjKonMo+8kUL+KQzvg=; b=UBpllUJ3BxDsNMj+bBPaYGhpjiOyMrQmX1paFEo4geKQVFKE5LvI/M/hYhSCoX1e4I PBP+/zQfzlPEhDcskeChtfb3yImCw0FiomXFN0+2DsuoSkwKC5dTZmt9QohTq9UHsmYr i0WzOAeG+x6UCBD1Y4kNnAOKrQ3SVCxI+GTmFMm5vGWAIYYrTrivn+S7WaLAZU27kKba 2WhqmLMn0wJAz/8OdDJWspOA6bmkYDuMR8qvAKNVmJ9Ox+WjoP3IJJkDBKFjug2RZLjL Za515Ipvu39QLXVtFCxAteTrEG46CcL/HzgsbpH8kbAUT8JGb1uYOb9YDPzaL8p0cGEL GM1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689274351; x=1691866351; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Sl0k0wYjl3hwJsFNeGh8bb0d9ZjKonMo+8kUL+KQzvg=; b=Qee10YmIGGmgh8xRjJBNu94s5FaWg0mFKft9/SfsyCyEqIbZJNGtWpckV229wFRR8m lvWe5g3gULzmbPFim57Whjhb+QVAIKeVc1768+Q4uwKCSfJ94tVptGeE2GwrFo2gYQfk LAFlMGmu8wKIdYVRDERzeeyoKugMzKVi6ne9X/X38Ui8jkyOhQ6AOH0MA13dM6uEl+Ec nzivVgKADjGUAnvJyiVsuK2hPYFYid7/yAOnAKhJfWvG93wmxn3eVcQN2wkEDnwx8BzX c3qQRyHOUOUh7JfjFHGFqiUfoKnWiZO7uvpwzPe0/nJ7tb5vARN6MoAm5ah3aIiZd4rq AwQw== X-Gm-Message-State: ABy/qLbsKaMlVwHz1jKvDQxikmmEjTdiwgGounzvUmc1RfhVdoZNG3wA 2g2oX1b7Oh9vR6BWrHPL5AzSI0AkvA== X-Google-Smtp-Source: APBJJlHQxgOEKJ5YQIngpD9uNx7NfD+JRH9Y1qEVbmYZf6w6i6XfkdyT2z0IQ96vgH1UQzkg9Qr2vA== X-Received: by 2002:a17:906:d965:b0:992:b020:ce4 with SMTP id rp5-20020a170906d96500b00992b0200ce4mr1974119ejb.51.1689274350804; Thu, 13 Jul 2023 11:52:30 -0700 (PDT) Received: from p183 ([46.53.251.182]) by smtp.gmail.com with ESMTPSA id x8-20020a170906298800b0098df7d0e096sm4336800eje.54.2023.07.13.11.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 11:52:30 -0700 (PDT) Date: Thu, 13 Jul 2023 21:52:28 +0300 From: Alexey Dobriyan To: akpm@linux-foundation.org, masahiroy@kernel.org, nathan@kernel.org, ndesaulniers@google.com, nicolas@fjasle.eu Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: [PATCH] kbuild: flatten KBUILD_CFLAGS Message-ID: <4f414a87-0c54-44bd-b218-f6f0b22c57ef@p183> MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org Make it slightly easier to see which compiler options are added and removed (and not worry about column limit too!). Signed-off-by: Alexey Dobriyan Reviewed-by: Nicolas Schier --- Makefile | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) --- a/Makefile +++ b/Makefile @@ -555,11 +555,23 @@ LINUXINCLUDE := \ $(USERINCLUDE) KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE -KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \ - -Werror=implicit-function-declaration -Werror=implicit-int \ - -Werror=return-type -Wno-format-security -funsigned-char \ - -std=gnu11 + +KBUILD_CFLAGS := +KBUILD_CFLAGS += -std=gnu11 +KBUILD_CFLAGS += -fshort-wchar +KBUILD_CFLAGS += -funsigned-char +KBUILD_CFLAGS += -fno-common +KBUILD_CFLAGS += -fno-PIE +KBUILD_CFLAGS += -fno-strict-aliasing +KBUILD_CFLAGS += -Wall +KBUILD_CFLAGS += -Wundef +KBUILD_CFLAGS += -Werror=implicit-function-declaration +KBUILD_CFLAGS += -Werror=implicit-int +KBUILD_CFLAGS += -Werror=return-type +KBUILD_CFLAGS += -Werror=strict-prototypes +KBUILD_CFLAGS += -Wno-format-security +KBUILD_CFLAGS += -Wno-trigraphs + KBUILD_CPPFLAGS := -D__KERNEL__ KBUILD_RUSTFLAGS := $(rust_common_flags) \ --target=$(objtree)/scripts/target.json \