commit:     b7d5d123f75de06cb3ea110788469f7c7a3a20b4
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  3 18:34:51 2021 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan  3 18:35:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7d5d123

dev-lang/gforth: fix clang build (use -rdynamic)

Reported-by: Agostino Sarubbo
Closes: https://bugs.gentoo.org/729874
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/gforth/files/gforth-0.7.3-rdynamic-auto.patch | 16 ++++++++++++++++
 dev-lang/gforth/files/gforth-0.7.3-rdynamic.patch      | 14 ++++++++++++++
 dev-lang/gforth/gforth-0.7.3-r1.ebuild                 | 16 +++++++++++++---
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/dev-lang/gforth/files/gforth-0.7.3-rdynamic-auto.patch 
b/dev-lang/gforth/files/gforth-0.7.3-rdynamic-auto.patch
new file mode 100644
index 00000000000..8a5b6528290
--- /dev/null
+++ b/dev-lang/gforth/files/gforth-0.7.3-rdynamic-auto.patch
@@ -0,0 +1,16 @@
+--- a/configure
++++ b/configure
+@@ -4721,10 +4733,10 @@ test "$make_type" = "GNU Make" && GNUMAKE=''
+ $as_echo "$make_type" >&6; }
+ 
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts 
-export-dynamic" >&5
+-$as_echo_n "checking whether the linker accepts -export-dynamic... " >&6; }
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts 
-rdynamic" >&5
++$as_echo_n "checking whether the linker accepts -rdynamic... " >&6; }
+ OLDLDFLAGS=$LDFLAGS
+-LDFLAGS="$LDFLAGS -export-dynamic"
++LDFLAGS="$LDFLAGS -rdynamic"
+ if test "$cross_compiling" = yes; then :
+   ac_export_dynamic=no
+ else

diff --git a/dev-lang/gforth/files/gforth-0.7.3-rdynamic.patch 
b/dev-lang/gforth/files/gforth-0.7.3-rdynamic.patch
new file mode 100644
index 00000000000..e776f4d40d0
--- /dev/null
+++ b/dev-lang/gforth/files/gforth-0.7.3-rdynamic.patch
@@ -0,0 +1,14 @@
+--- a/configure.in
++++ b/configure.in
+@@ -191,9 +191,9 @@ test "$make_type" = "GNU Make" && GNUMAKE=''
+ AC_MSG_RESULT($make_type)
+ AC_SUBST(GNUMAKE)
+ 
+-AC_MSG_CHECKING([whether the linker accepts -export-dynamic])
++AC_MSG_CHECKING([whether the linker accepts -rdynamic])
+ OLDLDFLAGS=$LDFLAGS
+-LDFLAGS="$LDFLAGS -export-dynamic"
++LDFLAGS="$LDFLAGS -rdynamic"
+ dnl AC_TRY_LINK gives false positive on rs6000-ibm-aix4.2.1.0
+ dnl AC_TRY_LINK(,,ac_export_dynamic=yes,ac_export_dynamic=no)
+ 
AC_TRY_RUN(main(){exit(0);},ac_export_dynamic=yes,ac_export_dynamic=no,ac_export_dynamic=no)

diff --git a/dev-lang/gforth/gforth-0.7.3-r1.ebuild 
b/dev-lang/gforth/gforth-0.7.3-r1.ebuild
index 01598f0f239..ddf2c89a40a 100644
--- a/dev-lang/gforth/gforth-0.7.3-r1.ebuild
+++ b/dev-lang/gforth/gforth-0.7.3-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit elisp-common eutils
+inherit elisp-common
 
 DESCRIPTION="GNU Forth is a fast and portable implementation of the ANSI Forth 
language"
 HOMEPAGE="https://www.gnu.org/software/gforth";
@@ -22,8 +22,18 @@ SITEFILE="50${PN}-gentoo.el"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-0.7.0-make-elc.patch
+       "${FILESDIR}"/${PN}-0.7.3-rdynamic.patch
+       "${FILESDIR}"/${PN}-0.7.3-rdynamic-auto.patch
 )
 
+src_prepare() {
+       default
+
+       # We patches both configure and configure.ac.
+       # Avoid reruining aclocal.
+       touch aclocal.m4 configure || die
+}
+
 src_configure() {
        econf \
                $(use emacs || echo "--without-lispdir") \

Reply via email to