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@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Eli Schwartz
2024-03-11 19:54:05 -04:00
committed by Sam James
parent 19de11b220
commit 6eea46091e
4 changed files with 28 additions and 4 deletions

View File

@@ -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=.

View File

@@ -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=.

View File

@@ -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=.

View File

@@ -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=.