From patchwork Tue Jun 22 10:33:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giuliano Procida X-Patchwork-Id: 43950 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 69216388C00B for ; Tue, 22 Jun 2021 10:33:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 69216388C00B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1624358014; bh=abe5TnZTcqwlS7on/3vBjGXbC5kDZTXaFiczc8Xydd8=; h=Date:In-Reply-To:References:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:Cc:From; b=dC5wbFoMpY/kmVO+Mtuq+QhLtcqrd+JRxLwMBbttE0qFLuw41ObCA3pDBi9OCLBTb KeYd/WBcOwNoni3uFH8JnK7mm4KPKre5aEGJHQoMtNEETuzVBDgXEvR+V2/V6lDmjn zrlVpxidEgqegU+JWFDM5N+cY/KUgXd5PdEl/ys8= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-wr1-x449.google.com (mail-wr1-x449.google.com [IPv6:2a00:1450:4864:20::449]) by sourceware.org (Postfix) with ESMTPS id A50CB3848001 for ; Tue, 22 Jun 2021 10:33:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A50CB3848001 Received: by mail-wr1-x449.google.com with SMTP id k25-20020a5d52590000b0290114dee5b660so9559500wrc.16 for ; Tue, 22 Jun 2021 03:33:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=abe5TnZTcqwlS7on/3vBjGXbC5kDZTXaFiczc8Xydd8=; b=b0eOm2BVI+JX1QxK+TAqXKcdKz8tXHUroFkiPQNrj08ebcymdxfaP5WIgyMCQNEQcO wMmcR/edAxyilHgwoWeWt7elb61ifmuon8I5bTmTXdXtUsNkiDOnMTYeUrQAZh9UBS96 IZmfofFEOU6KB/nsB8pTCQs09a6dZ/hGF1581xXCqML6VZR9wzSQrmz7NPE5/AQBGawV ztVs0RqQk2iLbJmb3y4NSsEvrWi8YitsCGriHPjBrS2yQASmd5GMpP52GS2kONU0FhW2 PYfm1FbI03CSUOVZMNptGYQb49dIwpn5le1QYVj3OBsCvvzKIhH2MpKhlrOorj2KsIdl ua6A== X-Gm-Message-State: AOAM531VpD/gh0PJfjkzEVV0eLczPMqv5PFe8yt37SxeahdY6acLAP2F Of1YTHr2UeBrZNKONVvI+PFXXexIgeANSaqyD+njl5lURAIdNmptRir5aSE+vJds+9yrH4ikG14 WoDNFbnzv7aBhMr6aaHiuBzzIJFveGfAwkTMBwtovyNqGpmlBCmPdtklei3+0kO6vp2VZoBw= X-Google-Smtp-Source: ABdhPJwtaua0NyxRDUQQ01uhV8rdyFh6rclumCDwXk8/JithJAm5BpzeEOFN3CFNT3JA80x8r7EcmdoGcTWrhw== X-Received: from tef.lon.corp.google.com ([2a00:79e0:d:210:b7d7:a6fe:d167:7a5d]) (user=gprocida job=sendgmr) by 2002:a5d:548a:: with SMTP id h10mr3885157wrv.234.1624358006668; Tue, 22 Jun 2021 03:33:26 -0700 (PDT) Date: Tue, 22 Jun 2021 11:33:13 +0100 In-Reply-To: <20210622103318.478914-1-gprocida@google.com> Message-Id: <20210622103318.478914-2-gprocida@google.com> Mime-Version: 1.0 References: <20210611153319.778996-1-gprocida@google.com> <20210622103318.478914-1-gprocida@google.com> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog Subject: [PATCH v2 1/6] Allow C++17 code to be compiled To: libabigail@sourceware.org X-Spam-Status: No, score=-23.0 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Giuliano Procida via Libabigail From: Giuliano Procida Reply-To: Giuliano Procida Cc: maennich@google.com, kernel-team@android.com Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" The BTF code and abitidy tool were both developed in a C++17 environment. Allow C++17 to be enabled at configuration time. * configure.ac: Add --enable-cxx17 option, defaulting to no. Signed-off-by: Giuliano Procida --- configure.ac | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 735cc9de..edd03cf8 100644 --- a/configure.ac +++ b/configure.ac @@ -138,6 +138,12 @@ AC_ARG_ENABLE(ubsan, ENABLE_UBSAN=$enableval, ENABLE_UBSAN=no) +AC_ARG_ENABLE(cxx17, + AS_HELP_STRING([--enable-cxx17=yes|no], + [enable features that use the C++17 compiler]), + ENABLE_CXX17=$enableval, + ENABLE_CXX17=no) + dnl ************************************************* dnl check for dependencies dnl ************************************************* @@ -153,7 +159,7 @@ AC_LANG([C++]) AC_LANG_COMPILER_REQUIRE dnl -dnl We use C++11 +dnl We use C++11 or C++17 if enabled dnl CXX_STANDARD=c++11 @@ -591,6 +597,12 @@ AX_VALGRIND_DFLT(sgcheck, off) AX_VALGRIND_CHECK +dnl Handle conditional use of a C++17 compiler +if test x$ENABLE_CXX17 = xyes; then + CXX_STANDARD=c++17 +fi +AM_CONDITIONAL(ENABLE_CXX17, test x$ENABLE_CXX17 = xyes) + dnl Set the list of libraries libabigail depends on DEPS_LIBS="$XML_LIBS $ELF_LIBS $DW_LIBS"