public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
	 maennich@google.com
Subject: [PATCH v2 1/6] Allow C++17 code to be compiled
Date: Tue, 22 Jun 2021 11:33:13 +0100	[thread overview]
Message-ID: <20210622103318.478914-2-gprocida@google.com> (raw)
In-Reply-To: <20210622103318.478914-1-gprocida@google.com>

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 <gprocida@google.com>
---
 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"
-- 
2.32.0.288.g62a8d224e6-goog


  reply	other threads:[~2021-06-22 10:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 15:33 [PATCH 0/6] BTF ABI Giuliano Procida
2021-06-11 15:33 ` [PATCH 1/6] Tweak clang-format Giuliano Procida
2021-06-11 15:33 ` [PATCH 2/6] Allow C++17 code to be compiled Giuliano Procida
2021-06-11 15:33 ` [PATCH 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-11 15:33 ` [PATCH 4/6] BTF: add core functionality Giuliano Procida
2021-06-11 15:33 ` [PATCH 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-11 15:33 ` [PATCH 6/6] BTF: clang-format all the new source files Giuliano Procida
2021-06-22 10:33 ` [PATCH v2 0/6] BTF ABI Giuliano Procida
2021-06-22 10:33   ` Giuliano Procida [this message]
2021-06-22 10:33   ` [PATCH v2 2/6] Tweak clang-format Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 3/6] BTF: add SCC finder and test Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 4/6] BTF: add core functionality Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 5/6] BTF: add btfinfo and btfdiff tools Giuliano Procida
2021-06-22 10:33   ` [PATCH v2 6/6] BTF: clang-format all the new source files Giuliano Procida

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210622103318.478914-2-gprocida@google.com \
    --to=gprocida@google.com \
    --cc=dodji@seketeli.org \
    --cc=kernel-team@android.com \
    --cc=libabigail@sourceware.org \
    --cc=maennich@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).