1 |
commit: 60e4b58db180cbef7dc2c98b607b459afb3af965 |
2 |
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 20 06:50:30 2019 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 20 06:50:30 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60e4b58d |
7 |
|
8 |
dev-lang/gnat-gpl: Fix build withouy ustat |
9 |
|
10 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
12 |
|
13 |
dev-lang/gnat-gpl/files/gnat-gpl-2017-ustat.patch | 31 +++++++++++++++++++++++ |
14 |
dev-lang/gnat-gpl/gnat-gpl-2017.ebuild | 5 +++- |
15 |
2 files changed, 35 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-lang/gnat-gpl/files/gnat-gpl-2017-ustat.patch b/dev-lang/gnat-gpl/files/gnat-gpl-2017-ustat.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..505c23b03a0 |
20 |
--- /dev/null |
21 |
+++ b/dev-lang/gnat-gpl/files/gnat-gpl-2017-ustat.patch |
22 |
@@ -0,0 +1,31 @@ |
23 |
+--- a/gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-04-19 20:53:11.382114157 +0200 |
24 |
++++ b/gcc-6-gpl-2017-src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2019-04-19 20:57:10.725037767 +0200 |
25 |
+@@ -150,7 +150,6 @@ |
26 |
+ # include <sys/procfs.h> |
27 |
+ #endif |
28 |
+ #include <sys/user.h> |
29 |
+-#include <sys/ustat.h> |
30 |
+ #include <linux/cyclades.h> |
31 |
+ #include <linux/if_eql.h> |
32 |
+ #include <linux/if_plip.h> |
33 |
+@@ -243,7 +242,19 @@ |
34 |
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD |
35 |
+ |
36 |
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID |
37 |
+- unsigned struct_ustat_sz = sizeof(struct ustat); |
38 |
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which |
39 |
++ // has been removed from glibc 2.28. |
40 |
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ |
41 |
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ |
42 |
++ || defined(__x86_64__) |
43 |
++#define SIZEOF_STRUCT_USTAT 32 |
44 |
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ |
45 |
++ || defined(__powerpc__) || defined(__s390__) || defined(__sparc__) |
46 |
++#define SIZEOF_STRUCT_USTAT 20 |
47 |
++#else |
48 |
++#error Unknown size of struct ustat |
49 |
++#endif |
50 |
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; |
51 |
+ unsigned struct_rlimit64_sz = sizeof(struct rlimit64); |
52 |
+ unsigned struct_statvfs64_sz = sizeof(struct statvfs64); |
53 |
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID |
54 |
|
55 |
diff --git a/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild |
56 |
index bdcc9a45caf..92ca3436505 100644 |
57 |
--- a/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild |
58 |
+++ b/dev-lang/gnat-gpl/gnat-gpl-2017.ebuild |
59 |
@@ -1,4 +1,4 @@ |
60 |
-# Copyright 1999-2018 Gentoo Foundation |
61 |
+# Copyright 1999-2019 Gentoo Authors |
62 |
# Distributed under the terms of the GNU General Public License v2 |
63 |
|
64 |
EAPI="5" |
65 |
@@ -125,6 +125,9 @@ src_prepare() { |
66 |
-e 's:$(P) ::g' \ |
67 |
gcc/ada/gcc-interface/Makefile.in \ |
68 |
|| die "sed failed" |
69 |
+ # fix missing ustat.h |
70 |
+ epatch "${FILESDIR}/${P}-ustat.patch" |
71 |
+ |
72 |
toolchain_src_prepare |
73 |
} |