summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwtx2018-05-12 17:36:42 +0200
committerwtx2018-05-12 17:36:42 +0200
commit3bf4c543d9a2098a791c149988cfe2e816d373c9 (patch)
treed7837b0e836202a20c143da30e38f680a56ffab0
parent5b32dfe2b0be74a26f1f4d49f491bb5b1379da61 (diff)
downloadaur-3bf4c543d9a2098a791c149988cfe2e816d373c9.tar.gz
Compilation bugfix
-rw-r--r--PKGBUILD5
-rw-r--r--res_state.diff11
-rw-r--r--sigaltstack.diff15
-rw-r--r--sigsegv.diff12
-rw-r--r--ucontext.diff20
5 files changed, 63 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 39e4df74e08c..9cd5229ce216 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -55,6 +55,11 @@ prepare() {
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
patch -p1 -i ${startdir}/cfns.h.diff
+ patch -p1 -i ${startdir}/ucontext.diff
+ patch -p1 -i ${startdir}/sigsegv.diff
+ patch -p1 -i ${startdir}/sigaltstack.diff
+ patch -p1 -i ${startdir}/res_state.diff
+
mkdir -p ${srcdir}/gcc-build
}
diff --git a/res_state.diff b/res_state.diff
new file mode 100644
index 000000000000..03bf5c60bdd2
--- /dev/null
+++ b/res_state.diff
@@ -0,0 +1,11 @@
+--- gcc-5.3.0/libsanitizer/tsan/tsan_platform_linux.cc 2014-11-13 21:41:38.000000000 +0100
++++ gcc-5.3.0/libsanitizer/tsan/tsan_platform_linux.cc 2018-05-12 15:42:38.081399578 +0200
+@@ -377,7 +377,7 @@ bool IsGlobalVar(uptr addr) {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX
+ int cnt = 0;
+- __res_state *statp = (__res_state*)state;
++ struct __res_state *statp = (struct __res_state*)state;
+ for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+ if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+ fds[cnt++] = statp->_u._ext.nssocks[i];
diff --git a/sigaltstack.diff b/sigaltstack.diff
new file mode 100644
index 000000000000..92a36f467a16
--- /dev/null
+++ b/sigaltstack.diff
@@ -0,0 +1,15 @@
+--- gcc-5.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2014-05-22 09:09:21.000000000 +0200
++++ gcc-5.3.0/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2018-05-12 15:24:44.080409821 +0200
+@@ -31,6 +31,12 @@
+ #endif
+ #include <sys/wait.h> // for signal-related stuff
+
++struct sigaltstack {
++ void *ss_sp;
++ int ss_flags;
++ size_t ss_size;
++};
++
+ #ifdef sa_handler
+ # undef sa_handler
+ #endif
diff --git a/sigsegv.diff b/sigsegv.diff
new file mode 100644
index 000000000000..ee25c16d7b9f
--- /dev/null
+++ b/sigsegv.diff
@@ -0,0 +1,12 @@
+--- gcc-5.3.0/libsanitizer/asan/asan_linux.cc 2014-09-23 19:59:53.000000000 +0200
++++ gcc-5.3.0/libsanitizer/asan/asan_linux.cc 2018-05-12 15:17:49.785413772 +0200
+@@ -218,6 +218,9 @@ void GetPcSpBp(void *context, uptr *pc,
+ #endif
+ }
+
++#define SIGSEGV 11
++
++
+ bool AsanInterceptsSignal(int signum) {
+ return signum == SIGSEGV && common_flags()->handle_segv;
+ }
diff --git a/ucontext.diff b/ucontext.diff
new file mode 100644
index 000000000000..aa088515f197
--- /dev/null
+++ b/ucontext.diff
@@ -0,0 +1,20 @@
+--- gcc-5.3.0/libgcc/config/i386/linux-unwind.h 2015-01-05 13:33:28.000000000 +0100
++++ gcc-5.3.0/libgcc/config/i386/linux-unwind.h 2018-05-12 06:45:09.038418728 +0200
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unw
+ if (*(unsigned char *)(pc+0) == 0x48
+ && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+ {
+- struct ucontext *uc_ = context->cfa;
++ ucontext_t *uc_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem
+ because it does not alias anything. */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind
+ siginfo_t *pinfo;
+ void *puc;
+ siginfo_t info;
+- struct ucontext uc;
++ ucontext_t uc;
+ } *rt_ = context->cfa;
+ /* The void * cast is necessary to avoid an aliasing warning.
+ The aliasing warning is correct, but should not be a problem