From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A9665423B5; Thu, 12 Jan 2023 12:36:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EE9842D2E; Thu, 12 Jan 2023 12:36:19 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 329AE40E25 for ; Thu, 12 Jan 2023 12:36:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673523378; x=1705059378; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gN+R28btwZti9m0Bh9D7U5SwaJ+kJVE9HGMrj5MXqfk=; b=YuGPe5TpvZOP+WY60Dau/J1LBJmWwDG85UHFqV8PWLxoOBDBHFvS5fF2 WFTq+xV5gUSgmSElLuwJx1RRGykii4mO/nYWIHto85BMh7fkhc/LA01Ra MLeO+UvQ+bslaQJGYemdE2AG6WzE/JUvaQ4Ndohsc7FEILXLZBAWdKV8R RD19hEkqjp9TPuCzhOv8+g3IU1LEcqpluuFjYfbhxKSz10aF8o/m95jAN Oh1zR1IvZ9bzw9901Jb09r8yd79LEquGM88GXlqNgfbRurKbJ5024hGFf Hm4r1YcOxvAiZd/ZazrQnsL7NamMyv4C3gb1NfdN2JJ9EzAfcgRrPWFMf A==; X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="323742545" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="323742545" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 03:36:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10586"; a="690102053" X-IronPort-AV: E=Sophos;i="5.96,319,1665471600"; d="scan'208";a="690102053" Received: from silpixa00401385.ir.intel.com ([10.237.214.166]) by orsmga001.jf.intel.com with ESMTP; 12 Jan 2023 03:36:15 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, david.marchand@redhat.com, mb@smartsharesystems.com, roretzla@linux.microsoft.com, Bruce Richardson Subject: [RFC PATCH 1/1] build: increase minimum C standard for DPDK builds Date: Thu, 12 Jan 2023 11:35:56 +0000 Message-Id: <20230112113556.47485-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230112113556.47485-1-bruce.richardson@intel.com> References: <20230112113556.47485-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Set the default C language standard to be used for DPDK builds to C99. This requires no actual code changes to build successfully. To ensure compatibility is kept for external apps using DPDK headers, we explicitly set the build parameters for the chkincs binary to the old minimum standard of "gnu89". [NOTE: DPDK code does not compile and has previously not compiled for pure c89 standard, so that stricter requirement need not be checked.] By adding this additional check, we can separately manage C standards used internally in DPDK builds and that required in the build flags for external apps using DPDK. Signed-off-by: Bruce Richardson --- buildtools/chkincs/meson.build | 1 + meson.build | 1 + 2 files changed, 2 insertions(+) diff --git a/buildtools/chkincs/meson.build b/buildtools/chkincs/meson.build index 378c2f19ef..322ac775ce 100644 --- a/buildtools/chkincs/meson.build +++ b/buildtools/chkincs/meson.build @@ -30,6 +30,7 @@ executable('chkincs', sources, c_args: cflags, include_directories: includes, dependencies: deps, + override_options: 'c_std=gnu89', install: false) # run tests for c++ builds also diff --git a/meson.build b/meson.build index f91d652bc5..9a2963cc16 100644 --- a/meson.build +++ b/meson.build @@ -9,6 +9,7 @@ project('DPDK', 'C', license: 'BSD', default_options: [ 'buildtype=release', + 'c_std=c99', 'default_library=static', 'warning_level=2', ], -- 2.37.2