1 |
commit: d70bed7f53c5f0524c77f6e630ae7f4b9f9ce7c7 |
2 |
Author: Aaron Bauman <bman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 3 01:07:41 2018 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 3 01:07:57 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d70bed7f |
7 |
|
8 |
dev-libs/libressl: add build fix patch for hppa |
9 |
|
10 |
This patch addresses an issue found by the HPPA team and addressed by |
11 |
Sergei Trofimovich (slyfox). |
12 |
|
13 |
Closes: https://bugs.gentoo.org/656104 |
14 |
Package-Manager: Portage-2.3.40, Repoman-2.3.9 |
15 |
|
16 |
.../libressl/files/libressl-2.6.4-hppa-asm.patch | 62 ++++++++++++++++++++++ |
17 |
dev-libs/libressl/libressl-2.6.4.ebuild | 2 + |
18 |
2 files changed, 64 insertions(+) |
19 |
|
20 |
diff --git a/dev-libs/libressl/files/libressl-2.6.4-hppa-asm.patch b/dev-libs/libressl/files/libressl-2.6.4-hppa-asm.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..a0922af0961 |
23 |
--- /dev/null |
24 |
+++ b/dev-libs/libressl/files/libressl-2.6.4-hppa-asm.patch |
25 |
@@ -0,0 +1,62 @@ |
26 |
+From 787d8d240bbeaa812bcf37deeedb3c467be468a3 Mon Sep 17 00:00:00 2001 |
27 |
+From: Sergei Trofimovich <slyfox@g.o> |
28 |
+Date: Sat, 19 May 2018 17:31:42 +0100 |
29 |
+Subject: [PATCH] __warn_references: tweak assembly for "gnu.warning" section |
30 |
+ |
31 |
+On some targets ';' (like hppa) is treated as a comment |
32 |
+in assembly files. This occasionally causes the following |
33 |
+assembly failures: |
34 |
+ |
35 |
+``` |
36 |
+Error: can't resolve `.gnu.warning.EVP_DecryptFinal' |
37 |
+{.gnu.warning.EVP_DecryptFinal section} - `.Ltext0' {.text section} |
38 |
+``` |
39 |
+ |
40 |
+Note how branch (or other reference) attempts to cross the |
41 |
+boundary across two section types: '.text' and '.gnu.warning'. |
42 |
+ |
43 |
+Tobias Ulmer notes that openbsd already uses newlines |
44 |
+for similar macro: |
45 |
+ |
46 |
+https://github.com/openbsd/src/blob/master/sys/arch/hppa/include/cdefs.h |
47 |
+ |
48 |
+This change switches from ';' to newline as well. |
49 |
+Tested on hppa2.0 and x86_64. |
50 |
+ |
51 |
+Reported-by: Jeroen Roovers |
52 |
+Bug: https://bugs.gentoo.org/656104 |
53 |
+Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
54 |
+--- |
55 |
+ configure.ac | 2 +- |
56 |
+ include/compat/sys/types.h | 2 +- |
57 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
58 |
+ |
59 |
+diff --git a/configure.ac b/configure.ac |
60 |
+index b74b8a1..16ed825 100644 |
61 |
+--- a/configure.ac |
62 |
++++ b/configure.ac |
63 |
+@@ -91,7 +91,7 @@ AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"]) |
64 |
+ AC_MSG_CHECKING([if .gnu.warning accepts long strings]) |
65 |
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[ |
66 |
+ extern void SSLv3_method(); |
67 |
+-__asm__(".section .gnu.warning.SSLv3_method; .ascii \"SSLv3_method is insecure\" ; .text"); |
68 |
++__asm__(".section .gnu.warning.SSLv3_method\n\t.ascii \"SSLv3_method is insecure\"\n\t.text"); |
69 |
+ int main() {return 0;} |
70 |
+ ]])], [ |
71 |
+ AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.]) |
72 |
+diff --git a/include/compat/sys/types.h b/include/compat/sys/types.h |
73 |
+index 2107119..dec09e3 100644 |
74 |
+--- a/include/compat/sys/types.h |
75 |
++++ b/include/compat/sys/types.h |
76 |
+@@ -62,7 +62,7 @@ typedef SSIZE_T ssize_t; |
77 |
+ #if defined(__GNUC__) && defined (HAS_GNU_WARNING_LONG) |
78 |
+ #define __warn_references(sym,msg) \ |
79 |
+ __asm__(".section .gnu.warning." __STRING(sym) \ |
80 |
+- " ; .ascii \"" msg "\" ; .text"); |
81 |
++ "\n\t.ascii \"" msg "\"\n\t.text"); |
82 |
+ #else |
83 |
+ #define __warn_references(sym,msg) |
84 |
+ #endif |
85 |
+-- |
86 |
+2.17.0 |
87 |
+ |
88 |
|
89 |
diff --git a/dev-libs/libressl/libressl-2.6.4.ebuild b/dev-libs/libressl/libressl-2.6.4.ebuild |
90 |
index 9aaf4681a71..bc3550222a7 100644 |
91 |
--- a/dev-libs/libressl/libressl-2.6.4.ebuild |
92 |
+++ b/dev-libs/libressl/libressl-2.6.4.ebuild |
93 |
@@ -22,6 +22,8 @@ RDEPEND="!dev-libs/openssl:0" |
94 |
DEPEND="${RDEPEND}" |
95 |
PDEPEND="app-misc/ca-certificates" |
96 |
|
97 |
+PATCHES=( "${FILESDIR}/libressl-2.6.4-hppa-asm.patch" ) |
98 |
+ |
99 |
src_prepare() { |
100 |
touch crypto/Makefile.in |