commit:     6eea46091ef4e2f853c746f4544858bc79f63a73
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Mar 11 23:54:05 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 00:28:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6eea4609

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 <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 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 ef9bd98f1080..ac35d6f81d34 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':
+       # <artificial>:(.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 15629ba77d24..712faa838802 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':
+       # <artificial>:(.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 9e742a38c00b..6f42f41dd6a6 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':
+       # <artificial>:(.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 fd2dedaf8b86..ea0dfd5ce49d 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':
+       # <artificial>:(.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=.
 

Reply via email to