From 78fe77db0fbbfd9ec6c5c5e9c7107a7d92e8e37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Thu, 5 Jan 2023 20:44:27 +0000 Subject: [PATCH] Fix compatibility with musl libc / Alpine Linux (#3845) --- configure.ac | 2 +- docs/CONTRIBUTORS | 1 + include/verilated.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a3234f364..cd7952cba 100644 --- a/configure.ac +++ b/configure.ac @@ -355,7 +355,7 @@ AC_SUBST(CFG_CXXFLAGS_PROFILE) #_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20) #_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20) case "$(which lsb_release 2>&1 > /dev/null && lsb_release -d)" in -*Arch*Linux* | *Ubuntu*22.04*) +*Alpine*Linux* | *Arch*Linux* | *Ubuntu*22.04*) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17) _MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17) ;; diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index ea68406f2..0d5d98796 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -118,6 +118,7 @@ Sergi Granell Stefan Wallentowitz Stephen Henry Steven Hugg +Sören Tempel Teng Huang Tim Snyder Tobias Rosenkranz diff --git a/include/verilated.cpp b/include/verilated.cpp index 7706ef039..2b1c6f997 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -67,7 +67,7 @@ #if defined(_WIN32) || defined(__MINGW32__) # include // mkdir #endif -#ifdef __linux__ +#ifdef __GLIBC__ # include # define _VL_HAVE_STACKTRACE #endif