mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-14 00:10:45 +03:00
1. fix unexpected errors during configuration, patch submitted to upstream at https://github.com/cpputest/cpputest/pull/1837 2. adopt patch from https://github.com/cpputest/cpputest/pull/1679, fix tests hangs w/ clang Closes: https://bugs.gentoo.org/879681 Closes: https://bugs.gentoo.org/924958 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/40105 Signed-off-by: Sam James <sam@gentoo.org>
47 lines
2.1 KiB
Diff
47 lines
2.1 KiB
Diff
patch submitted to upstream at https://github.com/cpputest/cpputest/pull/1837
|
|
|
|
From 2ba7e10e73a1daf7194b83e952df58ce1c985644 Mon Sep 17 00:00:00 2001
|
|
From: "Z. Liu" <zhixu.liu@gmail.com>
|
|
Date: Sun, 12 Jan 2025 23:04:59 +0800
|
|
Subject: [PATCH] configure.ac: fix call of AC_LANG_PROGRAM & unexpected
|
|
compilation errors
|
|
|
|
1. multiple line should be enclosed by [[ ]], otherwise compilation of
|
|
conftest.cpp will failed with:
|
|
error: extra tokens at end of #include directive [-Werror,-Wextra-tokens]
|
|
2. add #include <cstdint>
|
|
3. size_t -> std::size_t
|
|
|
|
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
|
|
---
|
|
configure.ac | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index b19c9eb6..e91c4a27 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -325,13 +325,17 @@ AC_LANG_PUSH([C++])
|
|
# Can we use operator delete without exception handling specifier? (clang warns on this!)
|
|
CXXFLAGS="-Werror"
|
|
AC_MSG_CHECKING([whether CXX supports operator delete without exception handling specifier])
|
|
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <new>\nvoid operator delete(void* mem);])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_DELETE_MUST_HAVE_EXCEPTION_SPECIFIER="yes"])
|
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdint>
|
|
+#include <new>
|
|
+void operator delete(void* mem);]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_DELETE_MUST_HAVE_EXCEPTION_SPECIFIER="yes"])
|
|
CXXFLAGS="$saved_cxxflags"
|
|
|
|
# Can we use operator new with exception specifier (g++4.7 on MacOSX is broken here)
|
|
CXXFLAGS="-Werror"
|
|
AC_MSG_CHECKING([whether CXX supports operator new with exception handling specifier])
|
|
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <new>\nvoid* operator new(size_t size) throw(std::bad_alloc);;])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_NEW_CANT_HAVE_EXCEPTION_SPECIFIER="yes"])
|
|
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cstdint>
|
|
+#include <new>
|
|
+void* operator new(std::size_t size) throw(std::bad_alloc);;]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); UT_NEW_CANT_HAVE_EXCEPTION_SPECIFIER="yes"])
|
|
CXXFLAGS="$saved_cxxflags"
|
|
|
|
# Flag -Wno-missing-exception-spec
|
|
--
|
|
2.45.2
|
|
|