From f1af93971b7490792d8541bc790e0d8c6d787059 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 6 Sep 2019 10:28:05 +0100 Subject: gentoo resync : 06.08.2019 --- .../files/configure-fix-pthread-linking.patch | 93 ---------------------- ...est-1.9.0_pre20190607-add-mmap-stack-flag.patch | 15 ---- ...9.0_pre20190607-increase-clone-stack-size.patch | 13 +++ 3 files changed, 13 insertions(+), 108 deletions(-) delete mode 100644 dev-cpp/gtest/files/configure-fix-pthread-linking.patch delete mode 100644 dev-cpp/gtest/files/gtest-1.9.0_pre20190607-add-mmap-stack-flag.patch create mode 100755 dev-cpp/gtest/files/gtest-1.9.0_pre20190607-increase-clone-stack-size.patch (limited to 'dev-cpp/gtest/files') diff --git a/dev-cpp/gtest/files/configure-fix-pthread-linking.patch b/dev-cpp/gtest/files/configure-fix-pthread-linking.patch deleted file mode 100644 index 75e5219b7a7c..000000000000 --- a/dev-cpp/gtest/files/configure-fix-pthread-linking.patch +++ /dev/null @@ -1,93 +0,0 @@ -From fb71154012e634a5e780e93af5434bcdafaf2b24 Mon Sep 17 00:00:00 2001 -From: Justin Bronder -Date: Mon, 15 Oct 2012 17:25:07 -0400 -Subject: [PATCH] configure: fix pthread linking - -- Update the pthread check to make sure that we don't need -lpthread when -compiling with -nostdlib. - -- Make sure that the necessary pthread library is passed to libtool. - -Fixes: - -$ ldd -r /usr/lib/libgtest.so - linux-vdso.so.1 (0x00007fffe7dff000) - libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libstdc++.so.6 (0x00007fbe09a9f000) - libc.so.6 => /lib64/libc.so.6 (0x00007fbe096f7000) - libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 (0x00007fbe094e1000) - libm.so.6 => /lib64/libm.so.6 (0x00007fbe091ee000) - /lib64/ld-linux-x86-64.so.2 (0x00007fbe0a005000) -undefined symbol: pthread_key_create (/usr/lib/libgtest.so) -undefined symbol: pthread_getspecific (/usr/lib/libgtest.so) -undefined symbol: pthread_key_delete (/usr/lib/libgtest.so) -undefined symbol: pthread_setspecific (/usr/lib/libgtest.so) ---- - Makefile.am | 1 + - m4/acx_pthread.m4 | 39 ++++++++++++++++++++++++++++++++++++++- - 2 files changed, 39 insertions(+), 1 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index cb350b7..db2606e 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -181,6 +181,7 @@ endif - lib_LTLIBRARIES = lib/libgtest.la lib/libgtest_main.la - - lib_libgtest_la_SOURCES = src/gtest-all.cc -+lib_libgtest_la_LIBADD = $(AM_LIBS) - - pkginclude_HEADERS = \ - include/gtest/gtest-death-test.h \ -diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4 -index 2cf20de..7fba4d9 100644 ---- a/m4/acx_pthread.m4 -+++ b/m4/acx_pthread.m4 -@@ -339,7 +339,44 @@ if test "x$acx_pthread_ok" = xyes; then - # so it's not safe to assume that we may use pthreads - acx_pthread_ok=no - fi -- -+ -+ AC_MSG_CHECKING([whether what we have so far is sufficient with -nostdlib]) -+ CFLAGS="-nostdlib $CFLAGS" -+ # we need c with nostdlib -+ LIBS="$LIBS -lc" -+ AC_TRY_LINK([#include ], -+ [pthread_t th; pthread_join(th, 0); -+ pthread_attr_init(0); pthread_cleanup_push(0, 0); -+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], -+ [done=yes],[done=no]) -+ -+ if test "x$done" = xyes; then -+ AC_MSG_RESULT([yes]) -+ else -+ AC_MSG_RESULT([no]) -+ fi -+ -+ if test x"$done" = xno; then -+ AC_MSG_CHECKING([whether -lpthread saves the day]) -+ LIBS="-lpthread $LIBS" -+ AC_TRY_LINK([#include ], -+ [pthread_t th; pthread_join(th, 0); -+ pthread_attr_init(0); pthread_cleanup_push(0, 0); -+ pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], -+ [done=yes],[done=no]) -+ -+ if test "x$done" = xyes; then -+ AC_MSG_RESULT([yes]) -+ PTHREAD_LIBS="$PTHREAD_LIBS -lpthread" -+ else -+ AC_MSG_RESULT([no]) -+ AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries and -nostdlib]) -+ fi -+ fi -+ -+ CFLAGS="$save_CFLAGS" -+ LIBS="$save_LIBS" -+ CC="$save_CC" - CFLAGS="$save_CFLAGS" - LIBS="$save_LIBS" - CC="$save_CC" --- -1.7.8.6 - diff --git a/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-add-mmap-stack-flag.patch b/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-add-mmap-stack-flag.patch deleted file mode 100644 index 9a840aa58766..000000000000 --- a/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-add-mmap-stack-flag.patch +++ /dev/null @@ -1,15 +0,0 @@ -Bug: https://bugs.gentoo.org/688162 -Upstream PR: https://github.com/google/googletest/pull/2276 - ---- a/googletest/src/gtest-death-test.cc -+++ b/googletest/src/gtest-death-test.cc -@@ -1357,6 +1357,9 @@ static pid_t ExecDeathTestSpawnChild(char* const* argv, int close_fd) { - const auto stack_size = static_cast(getpagesize()); - // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. - void* const stack = mmap(nullptr, stack_size, PROT_READ | PROT_WRITE, -+# if GTEST_OS_LINUX -+ (stack_grows_down ? MAP_GROWSDOWN : 0) | // Needed for stack auto-resizing -+# endif - MAP_ANON | MAP_PRIVATE, -1, 0); - GTEST_DEATH_TEST_CHECK_(stack != MAP_FAILED); - diff --git a/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-increase-clone-stack-size.patch b/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-increase-clone-stack-size.patch new file mode 100755 index 000000000000..38d515a48ddb --- /dev/null +++ b/dev-cpp/gtest/files/gtest-1.9.0_pre20190607-increase-clone-stack-size.patch @@ -0,0 +1,13 @@ +Bug: https://bugs.gentoo.org/692464 + +--- a/googletest/src/gtest-death-test.cc ++++ b/googletest/src/gtest-death-test.cc +@@ -1070,7 +1070,7 @@ + + if (!use_fork) { + static const bool stack_grows_down = StackGrowsDown(); +- const auto stack_size = static_cast(getpagesize()); ++ const auto stack_size = static_cast(getpagesize()* 10); + // MMAP_ANONYMOUS is not defined on Mac, so we use MAP_ANON instead. + void* const stack = mmap(NULL, stack_size, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_PRIVATE, -1, 0); -- cgit v1.2.3