From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/gmp/
Date: Fri, 31 Jan 2020 07:57:24 +0000 (UTC) [thread overview]
Message-ID: <1580457437.10a57644d5a354baac5d1018fe2dbb34342a14fd.slyfox@gentoo> (raw)
commit: 10a57644d5a354baac5d1018fe2dbb34342a14fd
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 07:56:56 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Jan 31 07:57:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10a57644
dev-libs/gmp: add USE=pic for static libraries, bug #707332
gmp makes a decision to use PIC or non-PIC assemply at
./configure time instead of (typical) build time.
On top of that non-PIC assembly also has TEXTRELs in it
which musl can't handle and crashes binaries at relocation
setup time. For gmp is it relevant only for static linking.
The change adds USE=pic to force static libraries to generate
assembly code without TEXTRELs.
Reported-by: Andrew Aladjev
Closes: https://bugs.gentoo.org/707332
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-libs/gmp/gmp-6.1.2-r1.ebuild | 7 +++++--
dev-libs/gmp/gmp-6.1.2.ebuild | 7 +++++--
dev-libs/gmp/gmp-6.2.0-r1.ebuild | 5 ++++-
dev-libs/gmp/gmp-6.2.0.ebuild | 5 ++++-
dev-libs/gmp/metadata.xml | 1 +
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dev-libs/gmp/gmp-6.1.2-r1.ebuild b/dev-libs/gmp/gmp-6.1.2-r1.ebuild
index ba741c4f37d..31bf8c0b5eb 100644
--- a/dev-libs/gmp/gmp-6.1.2-r1.ebuild
+++ b/dev-libs/gmp/gmp-6.1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asm doc cxx static-libs"
+IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@@ -77,12 +77,15 @@ multilib_src_configure() {
filter-flags -O?
fi
+ # --with-pic forces static libraries to be built as PIC
+ # and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
+ $(use pic && echo --with-pic) \
$(use_enable static-libs static)
}
diff --git a/dev-libs/gmp/gmp-6.1.2.ebuild b/dev-libs/gmp/gmp-6.1.2.ebuild
index d7e8b5b45d4..38497f189d2 100644
--- a/dev-libs/gmp/gmp-6.1.2.ebuild
+++ b/dev-libs/gmp/gmp-6.1.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
@@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asm doc cxx static-libs"
+IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@@ -76,12 +76,15 @@ multilib_src_configure() {
filter-flags -O?
fi
+ # --with-pic forces static libraries to be built as PIC
+ # and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
+ $(use pic && echo --with-pic) \
$(use_enable static-libs static)
}
diff --git a/dev-libs/gmp/gmp-6.2.0-r1.ebuild b/dev-libs/gmp/gmp-6.2.0-r1.ebuild
index b5347356b32..d5fd3a7c0fa 100644
--- a/dev-libs/gmp/gmp-6.2.0-r1.ebuild
+++ b/dev-libs/gmp/gmp-6.2.0-r1.ebuild
@@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asm doc cxx static-libs"
+IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@@ -77,12 +77,15 @@ multilib_src_configure() {
filter-flags -O?
fi
+ # --with-pic forces static libraries to be built as PIC
+ # and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
+ $(use pic && echo --with-pic) \
$(use_enable static-libs static)
}
diff --git a/dev-libs/gmp/gmp-6.2.0.ebuild b/dev-libs/gmp/gmp-6.2.0.ebuild
index c5495e13aef..e49ac021edd 100644
--- a/dev-libs/gmp/gmp-6.2.0.ebuild
+++ b/dev-libs/gmp/gmp-6.2.0.ebuild
@@ -19,7 +19,7 @@ LICENSE="|| ( LGPL-3+ GPL-2+ )"
# The subslot reflects the C & C++ SONAMEs.
SLOT="0/10.4"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+asm doc cxx static-libs"
+IUSE="+asm doc cxx pic static-libs"
DEPEND="sys-devel/m4
app-arch/xz-utils"
@@ -77,12 +77,15 @@ multilib_src_configure() {
filter-flags -O?
fi
+ # --with-pic forces static libraries to be built as PIC
+ # and without TEXTRELs. musl does not support TEXTRELs: bug #707332
tc-export CC
ECONF_SOURCE="${S}" econf \
--localstatedir="${EPREFIX}"/var/state/gmp \
--enable-shared \
$(use_enable asm assembly) \
$(use_enable cxx) \
+ $(use pic && echo --with-pic) \
$(use_enable static-libs static)
}
diff --git a/dev-libs/gmp/metadata.xml b/dev-libs/gmp/metadata.xml
index 84e19205350..2b4236a14c6 100644
--- a/dev-libs/gmp/metadata.xml
+++ b/dev-libs/gmp/metadata.xml
@@ -7,6 +7,7 @@
</maintainer>
<use>
<flag name="asm">Enable use of hand optimized assembly routines (faster execution)</flag>
+ <flag name="pic">Force static libraries to be built as PIC to avoid TEXTRELs.</flag>
</use>
<upstream>
<remote-id type="cpe">cpe:/a:gmplib:gmp</remote-id>
next reply other threads:[~2020-01-31 7:57 UTC|newest]
Thread overview: 127+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 7:57 Sergei Trofimovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-06 13:10 [gentoo-commits] repo/gentoo:master commit in: dev-libs/gmp/ Sam James
2024-12-06 13:06 Sam James
2024-11-18 14:28 Sam James
2023-12-15 3:25 Sam James
2023-09-24 15:44 Arthur Zamarin
2023-09-08 23:30 Andreas K. Hüttel
2023-09-07 23:27 Sam James
2023-09-07 23:03 Sam James
2023-09-07 23:03 Sam James
2023-09-07 20:53 Sam James
2023-09-07 20:53 Sam James
2023-09-07 20:53 Sam James
2023-09-07 20:53 Sam James
2023-07-30 17:01 Sam James
2023-07-30 13:49 Sam James
2023-05-08 7:36 Sam James
2023-05-07 23:54 Sam James
2023-01-28 19:07 Arthur Zamarin
2023-01-27 10:11 Jakov Smolić
2023-01-27 6:31 Sam James
2023-01-27 6:31 Sam James
2023-01-27 6:27 Sam James
2023-01-27 6:27 Sam James
2023-01-27 6:23 Sam James
2022-12-16 7:18 Sam James
2022-12-06 10:53 Sam James
2022-11-30 8:31 Sam James
2022-11-30 7:48 Sam James
2022-11-30 7:48 Sam James
2022-01-02 9:13 David Seifert
2021-12-22 0:42 Sam James
2021-12-17 12:00 Sam James
2021-12-17 12:00 Sam James
2021-12-17 9:20 Jakov Smolić
2021-12-17 9:20 Jakov Smolić
2021-12-17 7:55 Arthur Zamarin
2021-12-17 7:33 Arthur Zamarin
2021-12-17 7:33 Arthur Zamarin
2021-10-29 8:49 Sam James
2021-04-24 12:37 Sergei Trofimovich
2021-04-11 18:41 Sergei Trofimovich
2021-04-04 21:21 Sergei Trofimovich
2021-04-02 14:14 Sam James
2021-04-02 14:14 Sam James
2021-04-02 14:10 Sam James
2021-04-02 14:09 Sam James
2021-04-02 14:08 Sam James
2021-04-02 14:07 Sam James
2020-12-25 12:17 Sergei Trofimovich
2020-12-23 13:57 Sergei Trofimovich
2020-12-22 6:29 Sam James
2020-12-21 18:01 Sam James
2020-12-21 9:41 Sergei Trofimovich
2020-12-20 20:03 Sam James
2020-12-20 16:30 Thomas Deutschmann
2020-12-20 12:56 Sergei Trofimovich
2020-12-20 6:33 Sam James
2020-12-18 14:25 Sam James
2020-11-15 10:24 Sergei Trofimovich
2020-06-10 18:22 Sergei Trofimovich
2020-05-02 17:51 Sergei Trofimovich
2020-04-05 20:06 Mart Raudsepp
2020-04-01 11:17 Jeroen Roovers
2020-03-29 20:16 Sergei Trofimovich
2020-03-29 10:13 Sergei Trofimovich
2020-03-29 10:13 Sergei Trofimovich
2020-03-26 21:47 Sergei Trofimovich
2020-03-23 23:58 Sergei Trofimovich
2020-03-23 18:23 Sergei Trofimovich
2020-03-22 14:35 Agostino Sarubbo
2020-03-22 14:30 Agostino Sarubbo
2020-03-22 11:08 Agostino Sarubbo
2020-03-22 11:07 Agostino Sarubbo
2020-03-22 10:56 Agostino Sarubbo
2020-03-22 10:55 Agostino Sarubbo
2020-03-22 10:54 Agostino Sarubbo
2020-03-22 10:53 Agostino Sarubbo
2020-01-30 11:23 Sergei Trofimovich
2020-01-19 12:24 Sergei Trofimovich
2019-09-21 18:09 Matt Turner
2019-09-20 6:39 Sergei Trofimovich
2019-09-16 6:52 Agostino Sarubbo
2019-09-13 18:31 Mikle Kolyada
2019-09-13 7:45 Agostino Sarubbo
2019-09-10 7:10 Agostino Sarubbo
2019-09-10 7:00 Sergei Trofimovich
2019-09-10 6:56 Sergei Trofimovich
2019-09-10 6:51 Sergei Trofimovich
2019-09-09 20:56 Aaron Bauman
2019-09-09 17:23 Agostino Sarubbo
2019-05-04 14:53 Andreas K. Hüttel
2019-02-05 22:19 Sergei Trofimovich
2019-02-05 21:37 Sergei Trofimovich
2018-06-10 16:29 Sergei Trofimovich
2018-04-15 17:52 Sergei Trofimovich
2018-01-13 23:22 Mike Frysinger
2017-11-27 7:27 Sergei Trofimovich
2017-11-27 0:20 Thomas Deutschmann
2017-11-26 19:06 Sergei Trofimovich
2017-11-26 1:30 Matt Turner
2017-11-25 20:02 Matt Turner
2017-11-25 12:10 Sergei Trofimovich
2017-05-06 22:20 David Seifert
2017-01-29 16:08 Fabian Groffen
2016-12-20 17:21 Fabian Groffen
2016-12-20 14:18 Fabian Groffen
2016-12-19 18:28 Mike Frysinger
2016-12-08 16:47 Mike Frysinger
2016-11-14 14:50 Mike Frysinger
2016-07-03 19:21 Jeroen Roovers
2016-07-03 11:03 Jeroen Roovers
2016-06-30 14:47 Tobias Klausmann
2016-06-26 18:46 Markus Meier
2016-06-21 2:17 Mike Frysinger
2016-06-21 2:17 Mike Frysinger
2015-11-08 17:38 Mike Frysinger
2015-11-05 17:20 Mike Frysinger
2015-10-29 0:49 Mike Frysinger
2015-10-24 16:18 Mike Frysinger
2015-10-24 16:14 Mike Frysinger
2015-10-24 16:08 Mike Frysinger
2015-10-10 15:34 Mikle Kolyada
2015-10-04 10:14 Agostino Sarubbo
2015-10-04 9:42 Agostino Sarubbo
2015-10-03 18:24 Anthony G. Basile
2015-10-03 18:18 Jeroen Roovers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1580457437.10a57644d5a354baac5d1018fe2dbb34342a14fd.slyfox@gentoo \
--to=slyfox@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox