Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/gmp/files/, dev-libs/gmp/
Date: Wed, 24 Feb 2016 22:09:16
Message-Id: 1456351736.ca901d8defa4b4c3c1ddeb129f8fdf15268625ab.vapier@gentoo
1 commit: ca901d8defa4b4c3c1ddeb129f8fdf15268625ab
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 24 19:49:22 2016 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 24 22:08:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca901d8d
7
8 dev-libs/gmp: work around broken clang during noexecstack detection
9
10 .../gmp/files/gmp-6.1.0-noexecstack-detect.patch | 23 ++++++++++++++++++++++
11 dev-libs/gmp/gmp-6.1.0.ebuild | 2 ++
12 2 files changed, 25 insertions(+)
13
14 diff --git a/dev-libs/gmp/files/gmp-6.1.0-noexecstack-detect.patch b/dev-libs/gmp/files/gmp-6.1.0-noexecstack-detect.patch
15 new file mode 100644
16 index 0000000..558ba60
17 --- /dev/null
18 +++ b/dev-libs/gmp/files/gmp-6.1.0-noexecstack-detect.patch
19 @@ -0,0 +1,23 @@
20 +gmp's -Wa,--noexecstack check is based on glibc's, so backport a change
21 +that went into it there:
22 +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=215a87451d1fd623fd2699fa57f16f8ab6f6a2f3
23 +https://sourceware.org/bugzilla/show_bug.cgi?id=6428
24 +
25 +this is to workaround broken clang assembler that fails w/CFLAGS=-g:
26 +http://crbug.com/585930
27 +https://llvm.org/bugs/show_bug.cgi?id=11740
28 +
29 +patch has been sent upstream too:
30 +https://gmplib.org/list-archives/gmp-bugs/2016-February/003916.html
31 +
32 +--- a/configure
33 ++++ b/configure
34 +@@ -11339,7 +11339,7 @@ EOF
35 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36 + test $ac_status = 0; }; } \
37 + && grep .note.GNU-stack conftest.s >/dev/null \
38 +- && { ac_try='${CC} $CFLAGS $CPPFLAGS -Wa,--noexecstack
39 ++ && { ac_try='${CC} $ASMFLAGS -Wa,--noexecstack
40 + -c -o conftest.o conftest.s >/dev/null'
41 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
42 + (eval $ac_try) 2>&5
43
44 diff --git a/dev-libs/gmp/gmp-6.1.0.ebuild b/dev-libs/gmp/gmp-6.1.0.ebuild
45 index 6bc3b8f..e97c46f 100644
46 --- a/dev-libs/gmp/gmp-6.1.0.ebuild
47 +++ b/dev-libs/gmp/gmp-6.1.0.ebuild
48 @@ -38,6 +38,8 @@ src_prepare() {
49 # note: we cannot run autotools here as gcc depends on this package
50 elibtoolize
51
52 + epatch "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch
53 +
54 # GMP uses the "ABI" env var during configure as does Gentoo (econf).
55 # So, to avoid patching the source constantly, wrap things up.
56 mv configure configure.wrapped || die