From 6eea46091ef4e2f853c746f4544858bc79f63a73 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 11 Mar 2024 19:54:05 -0400 Subject: [PATCH] app-shells/bash: mark as LTO-unsafe in particularly old versions Due to implicit function declarations, LTO fails to detect the availability of a function and errors out due to an undefined reference at link time. It's fixed in bash 4.0 and on, but the value of backporting the fix to versions of bash that have niche use (people interested in exploring old versions, not people who are looking for the shebang interpreter for their system scripts) is a matter of some question... Closes: https://bugs.gentoo.org/893958 Signed-off-by: Eli Schwartz Signed-off-by: Sam James --- app-shells/bash/bash-2.05b_p13.ebuild | 8 +++++++- app-shells/bash/bash-3.0_p22.ebuild | 8 +++++++- app-shells/bash/bash-3.1_p23.ebuild | 8 +++++++- app-shells/bash/bash-3.2_p57.ebuild | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/app-shells/bash/bash-2.05b_p13.ebuild b/app-shells/bash/bash-2.05b_p13.ebuild index ef9bd98f1080a..ac35d6f81d344 100644 --- a/app-shells/bash/bash-2.05b_p13.ebuild +++ b/app-shells/bash/bash-2.05b_p13.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 @@ -95,6 +95,12 @@ src_prepare() { } src_configure() { + #/var/tmp/portage/app-shells/bash-3.2_p57/temp/ccW7JJDK.ltrans2.ltrans.o: in function `shell_execve': + # :(.text+0x8b30): undefined reference to `__setostype' + # + # It works fine in bash 4+. Backporting may not be worth it. + filter-lto + local myconf=( --with-installed-readline=. diff --git a/app-shells/bash/bash-3.0_p22.ebuild b/app-shells/bash/bash-3.0_p22.ebuild index 15629ba77d245..712faa838802f 100644 --- a/app-shells/bash/bash-3.0_p22.ebuild +++ b/app-shells/bash/bash-3.0_p22.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 @@ -100,6 +100,12 @@ src_prepare() { } src_configure() { + #/var/tmp/portage/app-shells/bash-3.2_p57/temp/ccW7JJDK.ltrans2.ltrans.o: in function `shell_execve': + # :(.text+0x8b30): undefined reference to `__setostype' + # + # It works fine in bash 4+. Backporting may not be worth it. + filter-lto + local myconf=( --with-installed-readline=. diff --git a/app-shells/bash/bash-3.1_p23.ebuild b/app-shells/bash/bash-3.1_p23.ebuild index 9e742a38c00b1..6f42f41dd6a60 100644 --- a/app-shells/bash/bash-3.1_p23.ebuild +++ b/app-shells/bash/bash-3.1_p23.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 @@ -95,6 +95,12 @@ src_prepare() { } src_configure() { + #/var/tmp/portage/app-shells/bash-3.2_p57/temp/ccW7JJDK.ltrans2.ltrans.o: in function `shell_execve': + # :(.text+0x8b30): undefined reference to `__setostype' + # + # It works fine in bash 4+. Backporting may not be worth it. + filter-lto + local myconf=( --with-installed-readline=. diff --git a/app-shells/bash/bash-3.2_p57.ebuild b/app-shells/bash/bash-3.2_p57.ebuild index fd2dedaf8b86e..ea0dfd5ce49d4 100644 --- a/app-shells/bash/bash-3.2_p57.ebuild +++ b/app-shells/bash/bash-3.2_p57.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 @@ -97,6 +97,12 @@ src_prepare() { } src_configure() { + #/var/tmp/portage/app-shells/bash-3.2_p57/temp/ccW7JJDK.ltrans2.ltrans.o: in function `shell_execve': + # :(.text+0x8b30): undefined reference to `__setostype' + # + # It works fine in bash 4+. Backporting may not be worth it. + filter-lto + local myconf=( --with-installed-readline=.