From patchwork Mon Dec 23 11:13:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1214909 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="i7iBBppw"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47hGvz48X3z9sNH for ; Mon, 23 Dec 2019 22:14:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 05255204F0; Mon, 23 Dec 2019 11:14:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mEtq8Oc70u-s; Mon, 23 Dec 2019 11:14:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5FB022050A; Mon, 23 Dec 2019 11:14:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id ED3121BF375 for ; Mon, 23 Dec 2019 11:14:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E91B784E49 for ; Mon, 23 Dec 2019 11:14:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id w1o7uoIyhA8l for ; Mon, 23 Dec 2019 11:13:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 1BED685DB8 for ; Mon, 23 Dec 2019 11:13:27 +0000 (UTC) Received: by mail-pg1-f172.google.com with SMTP id z124so8637752pgb.13 for ; Mon, 23 Dec 2019 03:13:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=4VN9T7FXOedA+dyBs+nEDfYSXXG2JBowmRJl0GxnY1M=; b=i7iBBppwdo6xouirDgKC0Jf6frNAC/msA6OMrJb0k8HVF+uDxka4Nm+fNUiOWc+PvN MWePyHxZtvNpfrqCwu4JsT0YLqADHTC8/MA4ULEFziBXW1M3X/Qjl1iLYe5PQhOR4zhx 1GTmL35aO4Db9TRU19S7Ak506lppYD99TnU6HTq6w0mccqDMeC6MIn5queV+zyE5FJPY 02hvsRYMInJRCNQmsQ/fmS7+1dJO8tVx/DgJpzKElrs8wZuIaMkv+59nm5rqGZ+UKJk7 k9eGXmrL/a4Cj0qRmXTf7xisMarw98zyk+5UrXneN3E9zX2cZTifMXFD5IIDTyAr9Cwa QRXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4VN9T7FXOedA+dyBs+nEDfYSXXG2JBowmRJl0GxnY1M=; b=tpPUhWeHP9X4FV09OdnzY02Cps8hCww8OovqQDerQZaPDIBa5/ln+ncoXZ3MAD8xY8 dH5KhNl6MPxFkfOrIimnkQ1rVWiaU+AFmifyx+U6HnZDbNJCT3JYtbu5BQ1rOfBYMv9Q hm7yGHbczfLbeJv7YfxEMDymxitSzxyyiK3YLgpgyI5MOcpJsAqU/L1o70lN8acSD5T5 k0FinBZGV9eTQ9bWR6vF6WpwbRE+EJfmDI9yETwxCBDunfSsXhk/Pn9X8ZDOQcs1ejrC Ou6VYvS/b+TjCeZ0zypbhhd3Uvz+FmvBgP+NabJnvDSAwFYCgqkDqcI9r1Y9wQ9GkRad iVHw== X-Gm-Message-State: APjAAAUOtoVmZgjLtE1A4sKFEAy8A6y3parIfnFEICKpZyX2wFeJO7LS 36Tx3k07tbzzW9Dxvvet2GRUGFtN X-Google-Smtp-Source: APXvYqwzkdj6W2zlMSQPZi+0S8L7j/Fv3bVfM+yze7tC+NyWiBHxSUibySdYxcYO9ERnPN0A/ATf4w== X-Received: by 2002:a63:2888:: with SMTP id o130mr17310781pgo.391.1577099606273; Mon, 23 Dec 2019 03:13:26 -0800 (PST) Received: from casantos.remote.csb ([187.65.81.63]) by smtp.gmail.com with ESMTPSA id u67sm24096204pfu.28.2019.12.23.03.13.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 03:13:25 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Mon, 23 Dec 2019 08:13:21 -0300 Message-Id: <20191223111321.12912-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 Subject: [Buildroot] [PATCH v3] package/tpm2-tss: fix build without C++ X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , "Yann E . MORIN" MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Carlos Santos C++ is required only for the fuzzing tests but AC_PROG_CXX is included by configure.ac even when fuzzing is not enabled (which we don't do on Buildroot). The patch applied upstream had issues and was reverted[1]. Use a local patch to solve the problem temporaryly. Fixes: http://autobuild.buildroot.net/results/13f5e37b47b255da4158bec34e5459136f7e60d4 http://autobuild.buildroot.net/results/1c26db2509c79e00c0de1165945277eaa57b149f http://autobuild.buildroot.net/results/b7b6b7b7aca79e847b442cbd2305427d91fe5d70 http://autobuild.buildroot.net/results/1cd5a82a0e799aa5027e2e2c03b246332cc3a15d http://autobuild.buildroot.net/results/d7ec878907f714377c83e9a496e97cbf9382d787 http://autobuild.buildroot.net/results/1c7f0c1b3ce4871cd87bd6059b1f0a6dc4e74a9c http://autobuild.buildroot.net/results/196b81d580325607c8da90beeb79e1f6b8ab8b47 http://autobuild.buildroot.net/results/f90f7b4ac710b56686635f8ae27059c11b963e47 1. https://github.com/tpm2-software/tpm2-tss/commit/60c26e4c4faba6ba12469485653e17092b510840 --- CC: Yann E. MORIN --- Changes v1->v2: - Use patch from upstream Changes v2->v3: - Use a local patch, since the upstream change was reverted --- ...01-Temporary-fix-for-build-without-C.patch | 44 +++++++++++++++++++ package/tpm2-tss/tpm2-tss.mk | 2 + 2 files changed, 46 insertions(+) create mode 100644 package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch diff --git a/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch b/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch new file mode 100644 index 0000000000..b2a9cb4f78 --- /dev/null +++ b/package/tpm2-tss/0001-Temporary-fix-for-build-without-C.patch @@ -0,0 +1,44 @@ +From 158d0bc3a2a7a93090cc12c5b0dd3c27e6f44d61 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Mon, 23 Dec 2019 08:02:19 -0300 +Subject: [PATCH] Temporary fix for build without C++ + +C++ is required only for the fuzzing tests but AC_PROG_CXX is included +by configure.ac even when fuzzing is not enabled (which we don't do on +Buildroot). + +The patch applied upstream had issues and was reverted[1]. Use a local +patch to solve the problem temporaryly. + +Fixes: + http://autobuild.buildroot.net/results/13f5e37b47b255da4158bec34e5459136f7e60d4 + http://autobuild.buildroot.net/results/1c26db2509c79e00c0de1165945277eaa57b149f + http://autobuild.buildroot.net/results/b7b6b7b7aca79e847b442cbd2305427d91fe5d70 + http://autobuild.buildroot.net/results/1cd5a82a0e799aa5027e2e2c03b246332cc3a15d + http://autobuild.buildroot.net/results/d7ec878907f714377c83e9a496e97cbf9382d787 + http://autobuild.buildroot.net/results/1c7f0c1b3ce4871cd87bd6059b1f0a6dc4e74a9c + http://autobuild.buildroot.net/results/196b81d580325607c8da90beeb79e1f6b8ab8b47 + http://autobuild.buildroot.net/results/f90f7b4ac710b56686635f8ae27059c11b963e47 + +1. https://github.com/tpm2-software/tpm2-tss/commit/60c26e4c4faba6ba12469485653e17092b510840 + +Signed-off-by: Carlos Santos +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index cd50451d..a3bd7144 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,7 +25,6 @@ AC_CANONICAL_HOST + AX_IS_RELEASE(dash-version) + AX_CHECK_ENABLE_DEBUG([info]) + +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_LN_S + AC_USE_SYSTEM_EXTENSIONS +-- +2.18.1 + diff --git a/package/tpm2-tss/tpm2-tss.mk b/package/tpm2-tss/tpm2-tss.mk index 425a6703af..08090204ff 100644 --- a/package/tpm2-tss/tpm2-tss.mk +++ b/package/tpm2-tss/tpm2-tss.mk @@ -11,6 +11,8 @@ TPM2_TSS_LICENSE_FILES = LICENSE TPM2_TSS_INSTALL_STAGING = YES TPM2_TSS_DEPENDENCIES = liburiparser openssl host-pkgconf TPM2_TSS_CONF_OPTS = --with-crypto=ossl --disable-doxygen-doc --disable-defaultflags +# 0001-configure-Only-use-CXX-when-fuzzing.patch +TPM2_TSS_AUTORECONF = YES # uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used TPM2_TSS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99"