commit:     0f82b9b107ec751c104024e0c0080c1a52868ba8
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 30 21:30:03 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jun 30 21:55:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f82b9b1

dev-lang/fpc: re-add old-style gold check with updated message

The previous check would ask to use binutils-config which is no
longer possible, and tc-ld-disable-gold is not sufficient.

Re-adding is only a temporary solution, this needs a proper look
into making it respect $LD (emake LD=.. is not enough).

Also revert Makefile sed style to how it was formerly suggested
by Sergey Torokhov in previous bump, devmanual's old suggestion
isn't useful here (this bit Acked-by David Seifert).

Bug: https://bugs.gentoo.org/475210
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-lang/fpc/fpc-3.2.2.ebuild | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/dev-lang/fpc/fpc-3.2.2.ebuild b/dev-lang/fpc/fpc-3.2.2.ebuild
index 843ec9edcd9..dc061524604 100644
--- a/dev-lang/fpc/fpc-3.2.2.ebuild
+++ b/dev-lang/fpc/fpc-3.2.2.ebuild
@@ -26,6 +26,17 @@ QA_FLAGS_IGNORED="
        usr/bin/.*
        usr/lib.*/.*"
 
+pkg_pretend() {
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               # Bug 475210
+               if $(tc-getLD) --version | grep -q "GNU gold"; then
+                       eerror "fpc has several issues with the gold linker and 
does not easily"
+                       eerror "permit selection. Please do not use 
USE=default-gold on binutils."
+                       die "GNU gold detected from $(tc-getLD)"
+               fi
+       fi
+}
+
 src_unpack() {
        case ${ARCH} in
                amd64)
@@ -49,10 +60,7 @@ src_unpack() {
 src_prepare() {
        default
 
-       local f
-       while IFS="" read -d $'\0' -r f ; do
-               sed -i -e 's/ -Xs / /' "${f}" || die
-       done < <(find "${WORKDIR}" -name Makefile -type f -print0)
+       find "${WORKDIR}" -name Makefile -exec sed -i 's/ -Xs / /' {} + || die
 
        # let the pkg manager compress man files
        sed -i '/find man.* gzip /d' 
"${WORKDIR}"/fpcbuild-${PV}/install/man/Makefile || die
@@ -61,10 +69,6 @@ src_prepare() {
        hprefixify "${WORKDIR}"/fpcbuild-${PV}/fpcsrc/compiler/options.pas
 }
 
-src_configure() {
-       tc-ld-disable-gold # bug 475210
-}
-
 set_pp() {
        case ${ARCH} in
                amd64)

Reply via email to