From patchwork Fri Feb 11 11:36:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 107367 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE529A00C5; Fri, 11 Feb 2022 12:37:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A4B241144; Fri, 11 Feb 2022 12:37:33 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id C2EF340150 for ; Fri, 11 Feb 2022 12:37:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644579452; x=1676115452; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z74gx3UUQSzy2sxjoB0hIwkHNCs2OpSCn/gzjvOvnsk=; b=IIyL+5a7gAFL8nx3mnsjTHGqO/Fqwf2SCXu7R62+xGgkDB6u+mTUwHoz hQS5fKJrl5/sfkQc0g7dM/XiZXLHUz6LtW7YQSyFQJKKdqFOM0Cyd0Pc3 a/15v2Egs0pgK4xJJU9zbf1BiHrqFn0a54aO7anXizrfO2nDtNuRHcGX5 g8g6NAx65VYuk+JIesJQ/kOV7MVBkILE+Ksi5sGGqQiCm0UvFeoZs31k8 LpG7fg94oj6ZmK57KqSSw9icYTf0St5Fydfko3fONyYvTLwnRJrrn1I6/ 5Ji1kR6haaEycHBQWBHM2kTOvFBEWqkxCNchhpcLqMe0T/IKI3bvgHxCO g==; X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249466791" X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="249466791" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2022 03:37:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="542053204" Received: from unknown (HELO silpixa00399126.ir.intel.com) ([10.237.223.192]) by orsmga008.jf.intel.com with ESMTP; 11 Feb 2022 03:37:29 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v5 0/2] Verify C++ compatibility of public headers Date: Fri, 11 Feb 2022 11:36:39 +0000 Message-Id: <20220211113641.755308-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220204174209.440207-1-bruce.richardson@intel.com> References: <20220204174209.440207-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 NOTE: despite significant differences in patchset, submitting this as v5 to keep history and threading rather than as new v1 This patchset expands upon the exiting chkincs infrastructure to build a C++ test application as well as the existing C test app, which helps catch any build errors when the public DPDK headers are included in C++ code. V5: * Dropped first 6 patches which contained fixes now already applied. * Added new patch to slim-down the linkage of existing chkincs binary * New patch to add CPP checks also only does mimimal linkage V4: * add g++-multilib to packages to install for github checks to ensure 32-bit builds work * correct the fixline for patch 1 * add extra cpp_args and cpp_link_args for 32-bit builds in test-meson-builds so that includes checks can pass there if enabled. V3: * update linux-build script to have cpp_args=-m32 for 32-bit builds V2: * Changed patch 6 to have a minimally-invasive fix for C++ without affecting existing C code. * Added fixlines and Cc stable for all patches which are fixes Bruce Richardson (2): buildtools/chkincs: remove unnecesary linkage buildtools/chkincs: test headers for C++ compatibility .ci/linux-build.sh | 1 + .github/workflows/build.yml | 2 +- buildtools/chkincs/main.cpp | 4 ++++ buildtools/chkincs/meson.build | 21 +++++++++++++++++++-- devtools/test-meson-builds.sh | 3 ++- 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 buildtools/chkincs/main.cpp --- 2.32.0