From patchwork Mon Dec 23 10:57:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 1214903 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.137; helo=fraxinus.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="cr9x1GGD"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47hGXf6B9Lz9s4Y for ; Mon, 23 Dec 2019 21:57:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9101684AAB; Mon, 23 Dec 2019 10:57:52 +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 jjPlvh_2Sv60; Mon, 23 Dec 2019 10:57:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3B74780661; Mon, 23 Dec 2019 10:57:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AF0621BF2E3 for ; Mon, 23 Dec 2019 10:57:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AB3C284FBB for ; Mon, 23 Dec 2019 10:57:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xu5sa4nubox7 for ; Mon, 23 Dec 2019 10:57:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7B17584FB6 for ; Mon, 23 Dec 2019 10:57:45 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id n59so7329321pjb.1 for ; Mon, 23 Dec 2019 02:57:45 -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=WrJAGXWGkU9XxYQhhfCd8mDvXh6YP98Xn27rzl/beNM=; b=cr9x1GGD7S4Bz4bWAzhXHdxm5VEq1jVGp76FtSjASKxvUo7bpTZ0IvK5nYuyRRfs+D MLgzcqpr9Rze7+S8BzBa8ENn2kXEqHI0HCXTMHDaIr+WbPofIY/fgV5VjdhF894qxP2R LK1xgIw4Yba8PBLfJ60FgPqHDE01lyBO9xsY1EPtk9L4OftCAPLM2vvGo2342wkdbE1F ok8OFanMh5U7QJ9xfyY+FJnUXDUwu7mkH20Vqdv17T7dP8gkIq6vUwdp6ohX+V8xW2Ot YPCEGSTQjk8qxug/n536qaojNXT3N3ptKrME9dBIYuvIPBYkJEblSJL9fN7PeoRzuOQC q/jQ== 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=WrJAGXWGkU9XxYQhhfCd8mDvXh6YP98Xn27rzl/beNM=; b=PEmkew/AkUK7CDqKDl4YBbwMF2wEqwZrA/sD2SrU7/gln6IYRCYhEgs3G2PzTz+g+L Rx8U2/sn9u7K3jbVayOtVkw9QBt1jZCDcmAwZEccbqwrq1zNeq6IHb0ibbCrL8HdCS9U zMdS5Z1pvcLNSsS8cWiKrvJcmGgLSTdXCzxwO3khR1TWY5nx19XcD3+LKhQLzZaXxNaw nQDkzaRVclEOUhj3CcInmFimcASbpf4Jf8L+Lc9KgN4pHXL+M21m1xacQ2kjItaci1Bd +hPobx45rQzz6aF0JlL/IU3HScflJjzSAawfvdmIolSpKG4UsJMZIRbA58MFEL9PI24u Lg3w== X-Gm-Message-State: APjAAAVnSaT3OWKCnRrRDu0voQlYrDQ6nnaqvYqKTflGNe+k7HoQ/jIe efHlazKw3PeHkOO3pu9xd3GdrrFZ X-Google-Smtp-Source: APXvYqzhs6NhS7M2KWvPiHOefwJIce4+HavU8cQU8MoQGa752NGMhuTdXrQlLW3nxa3PTnuETN6RYg== X-Received: by 2002:a17:90a:a386:: with SMTP id x6mr34681323pjp.116.1577098664581; Mon, 23 Dec 2019 02:57:44 -0800 (PST) Received: from casantos.remote.csb ([187.65.81.63]) by smtp.gmail.com with ESMTPSA id x7sm24878413pfp.93.2019.12.23.02.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 02:57:43 -0800 (PST) From: unixmania@gmail.com To: buildroot@buildroot.org Date: Mon, 23 Dec 2019 07:57:34 -0300 Message-Id: <20191223105734.11753-1-unixmania@gmail.com> X-Mailer: git-send-email 2.18.1 Subject: [Buildroot] [PATCH v2] 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). Pull a patch from upstream that solves this. 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 Signed-off-by: Carlos Santos --- CC: Yann E. MORIN --- Changes v1->v2: - Use patch from upstream --- ...-configure-Only-use-CXX-when-fuzzing.patch | 37 +++++++++++++++++++ package/tpm2-tss/tpm2-tss.mk | 2 + 2 files changed, 39 insertions(+) create mode 100644 package/tpm2-tss/0001-configure-Only-use-CXX-when-fuzzing.patch diff --git a/package/tpm2-tss/0001-configure-Only-use-CXX-when-fuzzing.patch b/package/tpm2-tss/0001-configure-Only-use-CXX-when-fuzzing.patch new file mode 100644 index 0000000000..c9539987ec --- /dev/null +++ b/package/tpm2-tss/0001-configure-Only-use-CXX-when-fuzzing.patch @@ -0,0 +1,37 @@ +From 23fed12c9b459712295b2dfe41f3480673e4a3af Mon Sep 17 00:00:00 2001 +From: John Andersen +Date: Thu, 19 Dec 2019 08:51:20 -0800 +Subject: [PATCH] configure: Only use CXX when fuzzing + +Fixes: #1508 + +Signed-off-by: John Andersen +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cd50451d..537e3cff 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 +@@ -287,7 +286,8 @@ AS_CASE(["x$with_fuzzing"], + [AC_MSG_ERROR([Bad value for --with-fuzzing])]) + AM_CONDITIONAL([ENABLE_FUZZING],[test "x$with_fuzzing" != "xnone"]) + AS_IF([test "x$with_fuzzing" != "xnone"], +- [AS_IF([test "x$enable_tcti_fuzzing" = xno], ++ [AC_PROG_CXX ++ AS_IF([test "x$enable_tcti_fuzzing" = xno], + AC_MSG_ERROR([Fuzz tests can not be enabled without the TCTI_FUZZING module])) + AS_IF([test "x$GEN_FUZZ" != "x1"], + AC_MSG_ERROR([Fuzz tests can not be enabled without "GEN_FUZZ=1" variable]))]) +-- +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"