From 900b9cf74bd1d9854630ad77a5255466de0cf934 Mon Sep 17 00:00:00 2001 From: inference Date: Tue, 24 Jan 2023 10:15:17 +0000 Subject: [PATCH] Update Portage patches. --- portage/env/gcc-nolto.conf | 29 ----------- .../patches/media-libs/gavl/patch-gavl.patch | 10 ++++ .../patches/media-libs/mlt/musl-locale.patch | 13 +++++ ...ck-for-backtrace-function-only-if-ex.patch | 39 +++++++++++++++ portage/patches/sys-boot/grub/gnulinux.patch | 29 +++++++++++ portage/patches/sys-libs/libcxx/6Tk5DmZ.patch | 49 +++++++++++++++++++ 6 files changed, 140 insertions(+), 29 deletions(-) delete mode 100644 portage/env/gcc-nolto.conf create mode 100644 portage/patches/media-libs/gavl/patch-gavl.patch create mode 100644 portage/patches/media-libs/mlt/musl-locale.patch create mode 100644 portage/patches/sys-apps/sandbox/0001-configure.ac-check-for-backtrace-function-only-if-ex.patch create mode 100644 portage/patches/sys-boot/grub/gnulinux.patch create mode 100644 portage/patches/sys-libs/libcxx/6Tk5DmZ.patch diff --git a/portage/env/gcc-nolto.conf b/portage/env/gcc-nolto.conf deleted file mode 100644 index 74ce5df..0000000 --- a/portage/env/gcc-nolto.conf +++ /dev/null @@ -1,29 +0,0 @@ -# Portage - env - GCC - No LTO - -# Copyright 2022-2023 Inference -# SPDX-License-Identifier: BSD-3-Clause-Clear - -# Version: 3.0.1.6 - - -# Toolchain -AR="ar" -CC="gcc" -CPP="cpp" -CXX="g++" -LD="ld" -NM="nm" -OBJCOPY="objcopy" -OBJDUMP="objdump" -RANLIB="ranlib" -READELF="readelf" -STRINGS="strings" -STRIP="strip" - - -# Flags -## Compiler flags -CFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe -U__gnu_linux__" -CXXFLAGS="-march=znver3 -mtune=znver3 -O2 -pipe" -## Linker flags -LDFLAGS="-Wl,-O2 -Wl,--strip-all" diff --git a/portage/patches/media-libs/gavl/patch-gavl.patch b/portage/patches/media-libs/gavl/patch-gavl.patch new file mode 100644 index 0000000..86e19d4 --- /dev/null +++ b/portage/patches/media-libs/gavl/patch-gavl.patch @@ -0,0 +1,10 @@ +--- a/src/benchmark.c 2012-06-08 14:49:30.000000000 +0300 ++++ b/src/benchmark.c 2021-03-15 01:35:44.098919393 +0200 +@@ -40,6 +40,7 @@ + #endif + + #ifdef HAVE_SCHED_SETAFFINITY ++#define _GNU_SOURCE + #define __USE_GNU + #include + #endif diff --git a/portage/patches/media-libs/mlt/musl-locale.patch b/portage/patches/media-libs/mlt/musl-locale.patch new file mode 100644 index 0000000..46f7534 --- /dev/null +++ b/portage/patches/media-libs/mlt/musl-locale.patch @@ -0,0 +1,13 @@ +diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h +index 1bfc971fb7..e2ba1c1d6d 100644 +--- a/src/framework/mlt_property.h ++++ b/src/framework/mlt_property.h +@@ -30,7 +30,7 @@ + #include + #endif + +-#if (defined(__GLIBC__) && !defined(__APPLE__)) || defined(HAVE_LOCALE_H) ++#if (defined(__linux__) && !defined(__APPLE__)) || defined(HAVE_LOCALE_H) + # include + #elif defined(__APPLE__) || (defined(__FreeBSD_version) && __FreeBSD_version >= 900506) + # include diff --git a/portage/patches/sys-apps/sandbox/0001-configure.ac-check-for-backtrace-function-only-if-ex.patch b/portage/patches/sys-apps/sandbox/0001-configure.ac-check-for-backtrace-function-only-if-ex.patch new file mode 100644 index 0000000..2900063 --- /dev/null +++ b/portage/patches/sys-apps/sandbox/0001-configure.ac-check-for-backtrace-function-only-if-ex.patch @@ -0,0 +1,39 @@ +From 1fb3b0d59e41dbef1f93e2194e1827a11b8b9f45 Mon Sep 17 00:00:00 2001 +From: Alfred Wingate +Date: Mon, 21 Feb 2022 20:24:09 +0200 +Subject: [PATCH] configure.ac: check for backtrace function only if execinfo.h + is found + +* llvm-unwindlib has backtrace function defined so it might lead to a + false result in the test otherwise on musl systems which dont have + execinfo.h + +Signed-off-by: Alfred Wingate +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 698051f..644bd06 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -161,6 +161,8 @@ AC_CHECK_HEADERS_ONCE(m4_flatten([ + linux/ptrace.h + ])) + ++AC_CHECK_HEADER(execinfo.h, AC_DEFINE(HAVE_EXECINFO_H) AC_CHECK_FUNCS_ONCE(backtrace)) ++ + dnl Checks for typedefs, structures, and compiler characteristics. + dnl Do this after all headers have been checked. + AC_C_CONST +@@ -187,7 +189,6 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK + AC_TYPE_SIGNAL + AC_FUNC_STAT + AC_CHECK_FUNCS_ONCE(m4_flatten([ +- backtrace + clone + __clone2 + creat64 +-- +2.35.1 + diff --git a/portage/patches/sys-boot/grub/gnulinux.patch b/portage/patches/sys-boot/grub/gnulinux.patch new file mode 100644 index 0000000..d8bce1e --- /dev/null +++ b/portage/patches/sys-boot/grub/gnulinux.patch @@ -0,0 +1,29 @@ +Not GNU/Linux. + +--- a/util/grub.d/10_linux.in ++++ b/util/grub.d/10_linux.in +@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" + CLASS="--class gnu-linux --class gnu --class os" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS=Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR} Linux" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi + +--- a/util/grub.d/20_linux_xen.in ++++ b/util/grub.d/20_linux_xen.in +@@ -29,9 +29,9 @@ export TEXTDOMAINDIR="@localedir@" + CLASS="--class gnu-linux --class gnu --class os --class xen" + + if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then +- OS=GNU/Linux ++ OS=Linux + else +- OS="${GRUB_DISTRIBUTOR} GNU/Linux" ++ OS="${GRUB_DISTRIBUTOR} Linux" + CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1|LC_ALL=C sed 's,[^[:alnum:]_],_,g') ${CLASS}" + fi diff --git a/portage/patches/sys-libs/libcxx/6Tk5DmZ.patch b/portage/patches/sys-libs/libcxx/6Tk5DmZ.patch new file mode 100644 index 0000000..adf61bb --- /dev/null +++ b/portage/patches/sys-libs/libcxx/6Tk5DmZ.patch @@ -0,0 +1,49 @@ +From 0065ae7bda7bd2b0748e009cd58a3a95883609ec Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= +Date: Mon, 23 Jan 2023 22:54:29 +0100 +Subject: [PATCH] libcxx/musl: Don't apply ABI tags to extern "C" fns + +--- + libcxx/include/__support/musl/xlocale.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libcxx/include/__support/musl/xlocale.h b/libcxx/include/__support/musl/xlocale.h +index 675ba93e113d..a9f29e37c0c1 100644 +--- a/libcxx/include/__support/musl/xlocale.h ++++ b/libcxx/include/__support/musl/xlocale.h +@@ -24,27 +24,27 @@ + extern "C" { + #endif + +-inline _LIBCPP_HIDE_FROM_ABI long long ++inline _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION long long + strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) { + return ::strtoll(__nptr, __endptr, __base); + } + +-inline _LIBCPP_HIDE_FROM_ABI unsigned long long ++inline _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION unsigned long long + strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) { + return ::strtoull(__nptr, __endptr, __base); + } + +-inline _LIBCPP_HIDE_FROM_ABI long long ++inline _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION long long + wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) { + return ::wcstoll(__nptr, __endptr, __base); + } + +-inline _LIBCPP_HIDE_FROM_ABI long long ++inline _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION long long + wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) { + return ::wcstoull(__nptr, __endptr, __base); + } + +-inline _LIBCPP_HIDE_FROM_ABI long double ++inline _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION long double + wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) { + return ::wcstold(__nptr, __endptr); + } +-- +2.39.1 +