diff options
author | Eli Schwartz <eschwartz93@gmail.com> | 2024-05-06 00:33:31 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-05-06 05:39:27 +0100 |
commit | 2839302f8546d1a9c64f1c92684b8eadf23844b0 (patch) | |
tree | c27bc512cf759780b3f7964093e121e11466c5b1 /app-text/crm114 | |
parent | stardict.eclass: stop optionally depending on stardict (diff) | |
download | gentoo-2839302f8546d1a9c64f1c92684b8eadf23844b0.tar.gz gentoo-2839302f8546d1a9c64f1c92684b8eadf23844b0.tar.bz2 gentoo-2839302f8546d1a9c64f1c92684b8eadf23844b0.zip |
app-text/crm114: fix LTO error due to broken function signatures
It is ancient sourceforge software from 2009. Not submitted upstream.
Closes: https://bugs.gentoo.org/854897
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/crm114')
-rw-r--r-- | app-text/crm114/crm114-20100106-r2.ebuild (renamed from app-text/crm114/crm114-20100106-r1.ebuild) | 9 | ||||
-rw-r--r-- | app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch | 43 |
2 files changed, 50 insertions, 2 deletions
diff --git a/app-text/crm114/crm114-20100106-r1.ebuild b/app-text/crm114/crm114-20100106-r2.ebuild index 97d0d5c39cc0..a5d4a7b851d4 100644 --- a/app-text/crm114/crm114-20100106-r1.ebuild +++ b/app-text/crm114/crm114-20100106-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -25,7 +25,12 @@ DEPEND="${RDEPEND} S="${WORKDIR}"/${MY_P} -PATCHES=( "${FILESDIR}"/${P}-fix-makefile.patch ) +PATCHES=( + "${FILESDIR}"/${P}-fix-makefile.patch + # https://bugs.gentoo.org/854897 + # Upstream is dead since 2009 so no point submitting this to them. + "${FILESDIR}"/0001-fix-broken-function-signatures-for-5-argument-functi.patch +) src_prepare() { default diff --git a/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch b/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch new file mode 100644 index 000000000000..ab2ebcaa368d --- /dev/null +++ b/app-text/crm114/files/0001-fix-broken-function-signatures-for-5-argument-functi.patch @@ -0,0 +1,43 @@ +From c0cb641ec6c1ab960df91c23b726836add0ca3a5 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Mon, 6 May 2024 00:26:18 -0400 +Subject: [PATCH] fix broken function signatures for 5-argument functions + +These are always called before exit() so presumably no one noticed that +these "log error and exit(-1)" functions were prone to "exiting with an +error" (our new term for "hello how would you like to have some UB"). + +However, the LTO optimizer noticed what was being done and died in +painful agony. Bring it back to life and soothe its hurts. +--- + crm_util_errorhandlers.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/crm_util_errorhandlers.c b/crm_util_errorhandlers.c +index 1f64f3c..cba9d89 100644 +--- a/crm_util_errorhandlers.c ++++ b/crm_util_errorhandlers.c +@@ -23,17 +23,17 @@ long untrappableerror ( char *str1, char *str2) + fprintf (stderr, "ERROR: %s%s \n", str1, str2); + exit (-1); + } +-long fatalerror5 ( char *str1, char *str2) ++long fatalerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline) + { + fprintf (stderr, "ERROR: %s%s \n", str1, str2); + exit (-1); + } +-long nonfatalerror5 ( char *str1, char *str2) ++long nonfatalerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline) + { + fprintf (stderr, "ERROR: %s%s \n", str1, str2); + exit (-1); + } +-long untrappableerror5 ( char *str1, char *str2) ++long untrappableerror5 ( char *str1, char *str2, char* myfile, char* myfunction, unsigned myline) + { + fprintf (stderr, "ERROR: %s%s \n", str1, str2); + exit (-1); +-- +2.43.2 + |