From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6ED3813933E for ; Tue, 13 Jul 2021 21:49:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A0E33E0C3B; Tue, 13 Jul 2021 21:49:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7549CE0C19 for ; Tue, 13 Jul 2021 21:49:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F24EB342A59 for ; Tue, 13 Jul 2021 21:49:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B6417D1 for ; Tue, 13 Jul 2021 21:49:24 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1626212946.9a20a3a9e2db20d380c803c01e5f5ec0e19af2ab.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/lnav/files/, app-admin/lnav/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/lnav/files/lnav-0.9.0-bug786456.patch app-admin/lnav/lnav-0.9.0-r1.ebuild X-VCS-Directories: app-admin/lnav/ app-admin/lnav/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 9a20a3a9e2db20d380c803c01e5f5ec0e19af2ab X-VCS-Branch: master Date: Tue, 13 Jul 2021 21:49:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fce4b501-518f-4204-93e1-a2f45ea92271 X-Archives-Hash: e07b97f2f48df3e9bf225757fa448eac commit: 9a20a3a9e2db20d380c803c01e5f5ec0e19af2ab Author: Randy Barlow electronsweatshop com> AuthorDate: Sun Jun 27 01:31:56 2021 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jul 13 21:49:06 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a20a3a9 app-admin/lnav: Backport to build with gcc-11 This commit partially[0] backports a patch from upstream[1][2] to allow lnav to build with gcc-11. This patch was tested with gcc-10.2.0-r5 and gcc-11.1.0. [0] Only the changes to m4/ax_cxx_compile_stdcxx.m4 were necessary to address the gcc-11 fix. [1] https://github.com/tstack/lnav/issues/864 [2] https://github.com/tstack/lnav/commit/8f7b08c9c5d1b30ca2b91dbfdb13f4dfa5326f95 Closes: https://bugs.gentoo.org/786456 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Randy Barlow electronsweatshop.com> Closes: https://github.com/gentoo/gentoo/pull/20975 Signed-off-by: Sam James gentoo.org> app-admin/lnav/files/lnav-0.9.0-bug786456.patch | 561 ++++++++++++++++++++++++ app-admin/lnav/lnav-0.9.0-r1.ebuild | 3 + 2 files changed, 564 insertions(+) diff --git a/app-admin/lnav/files/lnav-0.9.0-bug786456.patch b/app-admin/lnav/files/lnav-0.9.0-bug786456.patch new file mode 100644 index 00000000000..e77dd17854e --- /dev/null +++ b/app-admin/lnav/files/lnav-0.9.0-bug786456.patch @@ -0,0 +1,561 @@ +From e6d2e2d2b95c27cc85397d4af9528111c5304d02 Mon Sep 17 00:00:00 2001 +From: Timothy Stack +Date: Sun, 30 May 2021 13:33:05 -0700 +Subject: [PATCH] [logfile] add notes for automatic decisions and fix compile + errors + +Fixes #864 + +Signed-off-by: Randy Barlow +--- + m4/ax_cxx_compile_stdcxx.m4 | 462 +++++++++++++++++++++++++++++++++--- + src/base/result.h | 1 + + src/logfile.hh | 13 + + src/optional.hpp | 45 +++- + src/pcrepp/pcrepp.hh | 1 + + 5 files changed, 482 insertions(+), 40 deletions(-) + +diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 +index 2c18e49c..9413da62 100644 +--- a/m4/ax_cxx_compile_stdcxx.m4 ++++ b/m4/ax_cxx_compile_stdcxx.m4 +@@ -1,5 +1,5 @@ + # =========================================================================== +-# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html ++# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html + # =========================================================================== + # + # SYNOPSIS +@@ -16,7 +16,7 @@ + # The second argument, if specified, indicates whether you insist on an + # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. + # -std=c++11). If neither is specified, you get whatever works, with +-# preference for an extended mode. ++# preference for no added switch, and then for an extended mode. + # + # The third argument, if specified 'mandatory' or if left unspecified, + # indicates that baseline support for the specified C++ standard is +@@ -33,21 +33,24 @@ + # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov + # Copyright (c) 2015 Paul Norman + # Copyright (c) 2015 Moritz Klammler ++# Copyright (c) 2016, 2018 Krzesimir Nowak ++# Copyright (c) 2019 Enji Cooper ++# Copyright (c) 2020 Jason Merrill + # + # Copying and distribution of this file, with or without modification, are + # permitted in any medium without royalty provided the copyright notice + # and this notice are preserved. This file is offered as-is, without any + # warranty. + +-#serial 4 ++#serial 12 + + dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro + dnl (serial version number 13). + + AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl +- m4_if([$1], [11], [], +- [$1], [14], [], +- [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], ++ m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], ++ [$1], [14], [ax_cxx_compile_alternatives="14 1y"], ++ [$1], [17], [ax_cxx_compile_alternatives="17 1z"], + [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl + m4_if([$2], [], [], + [$2], [ext], [], +@@ -59,18 +62,21 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) + AC_LANG_PUSH([C++])dnl + ac_success=no +- AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, +- ax_cv_cxx_compile_cxx$1, +- [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], +- [ax_cv_cxx_compile_cxx$1=yes], +- [ax_cv_cxx_compile_cxx$1=no])]) +- if test x$ax_cv_cxx_compile_cxx$1 = xyes; then +- ac_success=yes +- fi ++ ++ m4_if([$2], [], [dnl ++ AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, ++ ax_cv_cxx_compile_cxx$1, ++ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], ++ [ax_cv_cxx_compile_cxx$1=yes], ++ [ax_cv_cxx_compile_cxx$1=no])]) ++ if test x$ax_cv_cxx_compile_cxx$1 = xyes; then ++ ac_success=yes ++ fi]) + + m4_if([$2], [noext], [], [dnl + if test x$ac_success = xno; then +- for switch in -std=gnu++$1 -std=gnu++0x; do ++ for alternative in ${ax_cxx_compile_alternatives}; do ++ switch="-std=gnu++${alternative}" + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) + AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, + $cachevar, +@@ -96,22 +102,27 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl + dnl HP's aCC needs +std=c++11 according to: + dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf + dnl Cray's crayCC needs "-h std=c++11" +- for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do +- cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) +- AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, +- $cachevar, +- [ac_save_CXX="$CXX" +- CXX="$CXX $switch" +- AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], +- [eval $cachevar=yes], +- [eval $cachevar=no]) +- CXX="$ac_save_CXX"]) +- if eval test x\$$cachevar = xyes; then +- CXX="$CXX $switch" +- if test -n "$CXXCPP" ; then +- CXXCPP="$CXXCPP $switch" ++ for alternative in ${ax_cxx_compile_alternatives}; do ++ for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do ++ cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) ++ AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, ++ $cachevar, ++ [ac_save_CXX="$CXX" ++ CXX="$CXX $switch" ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], ++ [eval $cachevar=yes], ++ [eval $cachevar=no]) ++ CXX="$ac_save_CXX"]) ++ if eval test x\$$cachevar = xyes; then ++ CXX="$CXX $switch" ++ if test -n "$CXXCPP" ; then ++ CXXCPP="$CXXCPP $switch" ++ fi ++ ac_success=yes ++ break + fi +- ac_success=yes ++ done ++ if test x$ac_success = xyes; then + break + fi + done +@@ -148,6 +159,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], + _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 + ) + ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], ++ _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 ++ _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 ++ _AX_CXX_COMPILE_STDCXX_testbody_new_in_17 ++) + + dnl Tests for new features in C++11 + +@@ -185,11 +201,13 @@ namespace cxx11 + + struct Base + { ++ virtual ~Base() {} + virtual void f() {} + }; + + struct Derived : public Base + { ++ virtual ~Derived() override {} + virtual void f() override {} + }; + +@@ -518,7 +536,7 @@ namespace cxx14 + + } + +- namespace test_digit_seperators ++ namespace test_digit_separators + { + + constexpr auto ten_million = 100'000'000; +@@ -560,3 +578,385 @@ namespace cxx14 + #endif // __cplusplus >= 201402L + + ]]) ++ ++ ++dnl Tests for new features in C++17 ++ ++m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ ++ ++// If the compiler admits that it is not ready for C++17, why torture it? ++// Hopefully, this will speed up the test. ++ ++#ifndef __cplusplus ++ ++#error "This is not a C++ compiler" ++ ++#elif __cplusplus < 201703L ++ ++#error "This is not a C++17 compiler" ++ ++#else ++ ++#include ++#include ++#include ++ ++namespace cxx17 ++{ ++ ++ namespace test_constexpr_lambdas ++ { ++ ++ constexpr int foo = [](){return 42;}(); ++ ++ } ++ ++ namespace test::nested_namespace::definitions ++ { ++ ++ } ++ ++ namespace test_fold_expression ++ { ++ ++ template ++ int multiply(Args... args) ++ { ++ return (args * ... * 1); ++ } ++ ++ template ++ bool all(Args... args) ++ { ++ return (args && ...); ++ } ++ ++ } ++ ++ namespace test_extended_static_assert ++ { ++ ++ static_assert (true); ++ ++ } ++ ++ namespace test_auto_brace_init_list ++ { ++ ++ auto foo = {5}; ++ auto bar {5}; ++ ++ static_assert(std::is_same, decltype(foo)>::value); ++ static_assert(std::is_same::value); ++ } ++ ++ namespace test_typename_in_template_template_parameter ++ { ++ ++ template typename X> struct D; ++ ++ } ++ ++ namespace test_fallthrough_nodiscard_maybe_unused_attributes ++ { ++ ++ int f1() ++ { ++ return 42; ++ } ++ ++ [[nodiscard]] int f2() ++ { ++ [[maybe_unused]] auto unused = f1(); ++ ++ switch (f1()) ++ { ++ case 17: ++ f1(); ++ [[fallthrough]]; ++ case 42: ++ f1(); ++ } ++ return f1(); ++ } ++ ++ } ++ ++ namespace test_extended_aggregate_initialization ++ { ++ ++ struct base1 ++ { ++ int b1, b2 = 42; ++ }; ++ ++ struct base2 ++ { ++ base2() { ++ b3 = 42; ++ } ++ int b3; ++ }; ++ ++ struct derived : base1, base2 ++ { ++ int d; ++ }; ++ ++ derived d1 {{1, 2}, {}, 4}; // full initialization ++ derived d2 {{}, {}, 4}; // value-initialized bases ++ ++ } ++ ++ namespace test_general_range_based_for_loop ++ { ++ ++ struct iter ++ { ++ int i; ++ ++ int& operator* () ++ { ++ return i; ++ } ++ ++ const int& operator* () const ++ { ++ return i; ++ } ++ ++ iter& operator++() ++ { ++ ++i; ++ return *this; ++ } ++ }; ++ ++ struct sentinel ++ { ++ int i; ++ }; ++ ++ bool operator== (const iter& i, const sentinel& s) ++ { ++ return i.i == s.i; ++ } ++ ++ bool operator!= (const iter& i, const sentinel& s) ++ { ++ return !(i == s); ++ } ++ ++ struct range ++ { ++ iter begin() const ++ { ++ return {0}; ++ } ++ ++ sentinel end() const ++ { ++ return {5}; ++ } ++ }; ++ ++ void f() ++ { ++ range r {}; ++ ++ for (auto i : r) ++ { ++ [[maybe_unused]] auto v = i; ++ } ++ } ++ ++ } ++ ++ namespace test_lambda_capture_asterisk_this_by_value ++ { ++ ++ struct t ++ { ++ int i; ++ int foo() ++ { ++ return [*this]() ++ { ++ return i; ++ }(); ++ } ++ }; ++ ++ } ++ ++ namespace test_enum_class_construction ++ { ++ ++ enum class byte : unsigned char ++ {}; ++ ++ byte foo {42}; ++ ++ } ++ ++ namespace test_constexpr_if ++ { ++ ++ template ++ int f () ++ { ++ if constexpr(cond) ++ { ++ return 13; ++ } ++ else ++ { ++ return 42; ++ } ++ } ++ ++ } ++ ++ namespace test_selection_statement_with_initializer ++ { ++ ++ int f() ++ { ++ return 13; ++ } ++ ++ int f2() ++ { ++ if (auto i = f(); i > 0) ++ { ++ return 3; ++ } ++ ++ switch (auto i = f(); i + 4) ++ { ++ case 17: ++ return 2; ++ ++ default: ++ return 1; ++ } ++ } ++ ++ } ++ ++ namespace test_template_argument_deduction_for_class_templates ++ { ++ ++ template ++ struct pair ++ { ++ pair (T1 p1, T2 p2) ++ : m1 {p1}, ++ m2 {p2} ++ {} ++ ++ T1 m1; ++ T2 m2; ++ }; ++ ++ void f() ++ { ++ [[maybe_unused]] auto p = pair{13, 42u}; ++ } ++ ++ } ++ ++ namespace test_non_type_auto_template_parameters ++ { ++ ++ template ++ struct B ++ {}; ++ ++ B<5> b1; ++ B<'a'> b2; ++ ++ } ++ ++ namespace test_structured_bindings ++ { ++ ++ int arr[2] = { 1, 2 }; ++ std::pair pr = { 1, 2 }; ++ ++ auto f1() -> int(&)[2] ++ { ++ return arr; ++ } ++ ++ auto f2() -> std::pair& ++ { ++ return pr; ++ } ++ ++ struct S ++ { ++ int x1 : 2; ++ volatile double y1; ++ }; ++ ++ S f3() ++ { ++ return {}; ++ } ++ ++ auto [ x1, y1 ] = f1(); ++ auto& [ xr1, yr1 ] = f1(); ++ auto [ x2, y2 ] = f2(); ++ auto& [ xr2, yr2 ] = f2(); ++ const auto [ x3, y3 ] = f3(); ++ ++ } ++ ++ namespace test_exception_spec_type_system ++ { ++ ++ struct Good {}; ++ struct Bad {}; ++ ++ void g1() noexcept; ++ void g2(); ++ ++ template ++ Bad ++ f(T*, T*); ++ ++ template ++ Good ++ f(T1*, T2*); ++ ++ static_assert (std::is_same_v); ++ ++ } ++ ++ namespace test_inline_variables ++ { ++ ++ template void f(T) ++ {} ++ ++ template inline T g(T) ++ { ++ return T{}; ++ } ++ ++ template<> inline void f<>(int) ++ {} ++ ++ template<> int g<>(int) ++ { ++ return 5; ++ } ++ ++ } ++ ++} // namespace cxx17 ++ ++#endif // __cplusplus < 201703L ++ ++]]) diff --git a/app-admin/lnav/lnav-0.9.0-r1.ebuild b/app-admin/lnav/lnav-0.9.0-r1.ebuild index dbadbc3f293..3a59325f426 100644 --- a/app-admin/lnav/lnav-0.9.0-r1.ebuild +++ b/app-admin/lnav/lnav-0.9.0-r1.ebuild @@ -35,6 +35,9 @@ PATCHES=( # Fix a segfault when using right arrow # bug 792582 "${FILESDIR}"/${PN}-0.9.0-bug792582.patch + # Fix a build failure on gcc + # bug 786456 + "${FILESDIR}"/${PN}-0.9.0-bug786456.patch ) src_prepare() {