summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2017-09-13 10:45:58 -0400
committerChris Severance2017-09-13 10:45:58 -0400
commite44c369edbcdd3320ae6e9cd1cf63c98d4fdd21d (patch)
tree9a44ebc4e019b882c31a06448d03e935fc62914b
parent25ef28c7c965a42bb721da61a684fd179d09f8fb (diff)
downloadaur-e44c369edbcdd3320ae6e9cd1cf63c98d4fdd21d.tar.gz
Update to glibc 2.26
-rw-r--r--.SRCINFO10
-rw-r--r--0000-gcc-4.8.ucontext.patch37
-rw-r--r--0001-gcc-4.8-SIGSEGV.patch14
-rw-r--r--0002-gcc-4.8-__res_state.patch15
-rw-r--r--PKGBUILD88
-rw-r--r--gcc.texi.49.patch78
6 files changed, 166 insertions, 76 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 025fb4111aa..d7eb1c28d18 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Mon Oct 10 03:06:13 UTC 2016
+# Wed Sep 13 14:45:38 UTC 2017
pkgbase = gcc48
pkgdesc = The GNU Compiler Collection - C and C++ frontends (4.8.x)
pkgver = 4.8.5
@@ -25,9 +25,15 @@ pkgbase = gcc48
source = ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.5/gcc-4.8.5.tar.bz2
source = gcc-4.9-fix-build-with-gcc-6.patch
source = gcc.texi.49.patch
+ source = 0000-gcc-4.8.ucontext.patch
+ source = 0001-gcc-4.8-SIGSEGV.patch
+ source = 0002-gcc-4.8-__res_state.patch
sha256sums = 22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23
sha256sums = d775a053fad367f5490111038fde7c875b4e842919d2d197f95b915e1ae562a9
- sha256sums = 93b8865cb61f455df807de90f852dc488753d4309d7a1d8f7e7f1a4efe37ffa4
+ sha256sums = 9f8c50a715a921d3d2c9d5809ac9592ca66f682b2cc496606ff6eb4de79d46b6
+ sha256sums = 5724ec27e31db32ed863871bc904f0f9cd7f41fe85f45269249ea0fa6ff2a576
+ sha256sums = e993f694c175d913c7bb6dd867ab0cdd9d81374e89de9b85151aa022b61bf3ef
+ sha256sums = a465907ce3989f2763ac022afedd8b0200c012499e24fa1748412cd1c28b11ea
pkgname = gcc48
diff --git a/0000-gcc-4.8.ucontext.patch b/0000-gcc-4.8.ucontext.patch
new file mode 100644
index 00000000000..9dee742d6e3
--- /dev/null
+++ b/0000-gcc-4.8.ucontext.patch
@@ -0,0 +1,37 @@
+--- libsanitizer/tsan/tsan_interceptors.cc.orig 2013-02-13 05:46:01.000000000 -0500
++++ libsanitizer/tsan/tsan_interceptors.cc 2017-09-13 02:02:06.696946391 -0400
+@@ -19,26 +19,27 @@
+ #include "tsan_interface.h"
+ #include "tsan_platform.h"
+ #include "tsan_rtl.h"
+ #include "tsan_mman.h"
+ #include "tsan_fd.h"
++#include <sys/ucontext.h>
+
+ using namespace __tsan; // NOLINT
+
+ const int kSigCount = 128;
+
+ struct my_siginfo_t {
+ int opaque[128];
+ };
+
+-struct sigset_t {
+- u64 val[1024 / 8 / sizeof(u64)];
+-};
+-
+-struct ucontext_t {
+- uptr opaque[117];
+-};
++//struct sigset_t {
++// u64 val[1024 / 8 / sizeof(u64)];
++//};
++
++//struct ucontext_t {
++// uptr opaque[117];
++//};
+
+ extern "C" int pthread_attr_init(void *attr);
+ extern "C" int pthread_attr_destroy(void *attr);
+ extern "C" int pthread_attr_getdetachstate(void *attr, int *v);
+ extern "C" int pthread_attr_setstacksize(void *attr, uptr stacksize);
diff --git a/0001-gcc-4.8-SIGSEGV.patch b/0001-gcc-4.8-SIGSEGV.patch
new file mode 100644
index 00000000000..a0be181536c
--- /dev/null
+++ b/0001-gcc-4.8-SIGSEGV.patch
@@ -0,0 +1,14 @@
+--- libsanitizer/asan/asan_linux.cc.orig 2013-01-23 06:41:33.000000000 -0500
++++ libsanitizer/asan/asan_linux.cc 2017-09-13 01:31:17.377100219 -0400
+@@ -26,10 +26,11 @@
+ #include <fcntl.h>
+ #include <pthread.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>
++#include <signal.h>
+
+ #if !ASAN_ANDROID
+ // FIXME: where to get ucontext on Android?
+ #include <sys/ucontext.h>
+ #endif
diff --git a/0002-gcc-4.8-__res_state.patch b/0002-gcc-4.8-__res_state.patch
new file mode 100644
index 00000000000..34e25e51d02
--- /dev/null
+++ b/0002-gcc-4.8-__res_state.patch
@@ -0,0 +1,15 @@
+--- libsanitizer/tsan/tsan_platform_linux.cc.orig 2013-02-21 05:57:10.000000000 -0500
++++ libsanitizer/tsan/tsan_platform_linux.cc 2017-09-13 01:35:01.712039033 -0400
+@@ -290,11 +290,11 @@ bool IsGlobalVar(uptr addr) {
+ }
+
+ #ifndef TSAN_GO
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ int cnt = 0;
+- __res_state *statp = (__res_state*)state;
++ res_state statp = (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];
+ }
+ return cnt;
diff --git a/PKGBUILD b/PKGBUILD
index fab8dedc8af..7b1433ff671 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -26,13 +26,23 @@ source=(
"ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2"
'gcc-4.9-fix-build-with-gcc-6.patch'
'gcc.texi.49.patch'
+ '0000-gcc-4.8.ucontext.patch'
+ '0001-gcc-4.8-SIGSEGV.patch'
+ '0002-gcc-4.8-__res_state.patch'
)
sha256sums=('22fb1e7e0f68a63cee631d85b20461d1ea6bda162f03096350e38c8d427ecf23'
'd775a053fad367f5490111038fde7c875b4e842919d2d197f95b915e1ae562a9'
- '93b8865cb61f455df807de90f852dc488753d4309d7a1d8f7e7f1a4efe37ffa4')
+ '9f8c50a715a921d3d2c9d5809ac9592ca66f682b2cc496606ff6eb4de79d46b6'
+ '5724ec27e31db32ed863871bc904f0f9cd7f41fe85f45269249ea0fa6ff2a576'
+ 'e993f694c175d913c7bb6dd867ab0cdd9d81374e89de9b85151aa022b61bf3ef'
+ 'a465907ce3989f2763ac022afedd8b0200c012499e24fa1748412cd1c28b11ea')
PKGEXT='.pkg.tar.gz'
+if [ -n "${_snapshot:-}" ]; then
+ _basedir="gcc-${_snapshot}"
+else
_basedir="gcc-${pkgver}"
+fi
#_libdir="usr/lib/gcc/${CHOST}/${pkgver}"
@@ -44,10 +54,27 @@ prepare() {
sed -e 's@\./fixinc\.sh@-c true@' -i 'gcc/Makefile.in'
# fix build with GCC 6
- patch -p1 < "${srcdir}/gcc-4.9-fix-build-with-gcc-6.patch"
+ patch -Nup1 < "${srcdir}/gcc-4.9-fix-build-with-gcc-6.patch"
# Update gcc.texi to gcc49 version, needed as of texinfo>=6.3 and possibly texinfo=6.2
- patch -p0 -c < "${srcdir}/gcc.texi.49.patch"
+ # diff -pNau5 gcc/doc/gcc.texi{,.49} > 'gcc.texi.49.patch'
+ patch -Nup0 < "${srcdir}/gcc.texi.49.patch"
+
+ # fix build with glibc 2.26
+ #diff -pNau5 libsanitizer/tsan/tsan_interceptors.cc{.orig,} > '../0000-gcc-4.8.ucontext.patch'
+ patch -Nbup0 -i "${srcdir}/0000-gcc-4.8.ucontext.patch" # https://gcc.gnu.org/bugzilla/attachment.cgi?id=41921
+ #diff -pNau5 libsanitizer/asan/asan_linux.cc{.orig,} > '../0001-gcc-4.8-SIGSEGV.patch'
+ patch -Nbup0 -i "${srcdir}/0001-gcc-4.8-SIGSEGV.patch"
+ #diff -pNau5 libsanitizer/tsan/tsan_platform_linux.cc{.orig,} > '../0002-gcc-4.8-__res_state.patch'
+ patch -Nbup0 -i "${srcdir}/0002-gcc-4.8-__res_state.patch" # https://gcc.gnu.org/bugzilla/attachment.cgi?id=41922
+ sed -e 's:\bstruct ucontext\b:ucontext_t:g' -i $(grep --include '*.[ch]' --include '*.cc' -lre '\bstruct ucontext\b')
+ sed -e 's:\bstruct sigaltstack\b:stack_t:g' -i $(grep --include '*.[ch]' --include '*.cc' -lre '\bstruct sigaltstack\b')
+ sed -e '/^struct ucontext_t/,/^};/ d' -i 'libsanitizer/tsan/tsan_interceptors.cc'
+ if grep -e '^struct ucontext_t' 'libsanitizer/tsan/tsan_interceptors.cc'; then
+ set +u
+ echo 'Failed to remove ^struct ucontext_t'
+ false
+ fi
# Arch Linux installs x86_64 libraries /lib
case "${CARCH}" in
@@ -63,37 +90,37 @@ prepare() {
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56780#c6
sed -e 's#@target_header_dir@#libiberty#' -i 'libiberty/Makefile.in'
- # Doesn't like FORTIFY_SOURCE
- export CPPFLAGS="${CPPFLAGS//-D_FORTIFY_SOURCE=?/}"
-
- # Doesn't like -fstack-protector-strong
- export CFLAGS="${CFLAGS//-fstack-protector-strong/-fstack-protector}"
- export CXXFLAGS="${CXXFLAGS//-fstack-protector-strong/-fstack-protector}"
-
- # using -pipe causes spurious test-suite failures
- # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
- export CFLAGS="${CFLAGS/-pipe/}"
- export CXXFLAGS="${CXXFLAGS/-pipe/}"
-
- # Flags from new compilers that old compilers don't recognize
- export CFLAGS="${CFLAGS/-fno-plt/}"
- export CXXFLAGS="${CXXFLAGS/-fno-plt/}"
-
- export CFLAGS="${CFLAGS/-Wformat-overflow=[0-9]/}"
- export CXXFLAGS="${CXXFLAGS/-Wformat-overflow=[0-9]/}"
-
rm -rf 'gcc-build'
mkdir 'gcc-build'
- cd 'gcc-build'
set +u
}
build() {
set -u
- cd "${_basedir}/gcc-build"
+ if [ ! -s "${_basedir}/gcc-build/Makefile" ]; then
+ cd "${_basedir}"
+
+ # Doesn't like FORTIFY_SOURCE
+ CPPFLAGS="${CPPFLAGS//-D_FORTIFY_SOURCE=?/}"
+
+ # Doesn't like -fstack-protector-strong
+ CFLAGS="${CFLAGS//-fstack-protector-strong/-fstack-protector}"
+ CXXFLAGS="${CXXFLAGS//-fstack-protector-strong/-fstack-protector}"
+
+ # using -pipe causes spurious test-suite failures
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
+ CFLAGS="${CFLAGS/-pipe/}"
+ CXXFLAGS="${CXXFLAGS/-pipe/}"
+
+ # Flags from new compilers that old compilers don't recognize
+ CFLAGS="${CFLAGS/-fno-plt/}"
+ CXXFLAGS="${CXXFLAGS/-fno-plt/}"
+
+ CFLAGS="${CFLAGS/-Wformat-overflow=[0-9]/}"
+ CXXFLAGS="${CXXFLAGS/-Wformat-overflow=[0-9]/}"
- if [ ! -s 'Makefile' ]; then
+ cd 'gcc-build'
# The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
../configure \
--build="${CHOST}" \
@@ -128,9 +155,10 @@ build() {
# CXX='g++-4.9' CC='gcc-4.9'
fi
+ cd "${srcdir}/${_basedir}/gcc-build"
local _nproc="$(nproc)"; _nproc=$((_nproc>8?8:_nproc))
- #LD_PRELOAD='/usr/lib/libstdc++.so' \\
- nice make -j "${_nproc}" # -s
+ LD_PRELOAD='/usr/lib/libstdc++.so' \
+ nice make -j "${_nproc}"
# make documentation
make -s -j1 -C "${CHOST}/libstdc++-v3/doc" 'doc-man-doxygen'
@@ -146,7 +174,7 @@ _fn_check() {
ulimit -s 32768
# do not abort on error as some are "expected"
- make -k check || :
+ make -j1 -k check || :
"${srcdir}/${_basedir}/contrib/test_summary"
set +u
}
@@ -155,8 +183,8 @@ package() {
set -u
cd "${_basedir}/gcc-build"
- #LD_PRELOAD='/usr/lib/libstdc++.so' \\
- make -s -j1 DESTDIR="${pkgdir}" install
+ LD_PRELOAD='/usr/lib/libstdc++.so' \
+ make -j1 DESTDIR="${pkgdir}" install
## Lazy way of dealing with conflicting man and info pages and locales...
rm -rf "${pkgdir}/usr"/{share,include}/
diff --git a/gcc.texi.49.patch b/gcc.texi.49.patch
index 056853ddb10..951eeb78700 100644
--- a/gcc.texi.49.patch
+++ b/gcc.texi.49.patch
@@ -1,44 +1,34 @@
-*** gcc/doc/gcc.texi Tue Jun 23 03:35:08 2015
---- gcc/doc/gcc.texi.49 Fri Jun 26 13:47:23 2015
-***************
-*** 83,93 ****
- Published by:
- @multitable @columnfractions 0.5 0.5
- @item GNU Press
-! @tab Website: www.gnupress.org
- @item a division of the
-! @tab General: @tex press@@gnu.org @end tex
- @item Free Software Foundation
-! @tab Orders: @tex sales@@gnu.org @end tex
- @item 51 Franklin Street, Fifth Floor
- @tab Tel 617-542-5942
- @item Boston, MA 02110-1301 USA
---- 83,93 ----
- Published by:
- @multitable @columnfractions 0.5 0.5
- @item GNU Press
-! @tab Website: @uref{http://www.gnupress.org}
- @item a division of the
-! @tab General: @email{press@@gnu.org}
- @item Free Software Foundation
-! @tab Orders: @email{sales@@gnu.org}
- @item 51 Franklin Street, Fifth Floor
- @tab Tel 617-542-5942
- @item Boston, MA 02110-1301 USA
-***************
-*** 140,146 ****
- * Gcov:: @command{gcov}---a test coverage program.
- * Trouble:: If you have trouble using GCC.
- * Bugs:: How, why and where to report bugs.
-! * Service:: How to find suppliers of support for GCC.
- * Contributing:: How to contribute to testing and developing GCC.
-
- * Funding:: How to help assure funding for free software.
---- 140,146 ----
- * Gcov:: @command{gcov}---a test coverage program.
- * Trouble:: If you have trouble using GCC.
- * Bugs:: How, why and where to report bugs.
-! * Service:: How To Get Help with GCC
- * Contributing:: How to contribute to testing and developing GCC.
-
- * Funding:: How to help assure funding for free software.
+--- gcc/doc/gcc.texi 2015-06-23 03:35:08.000000000 -0400
++++ gcc/doc/gcc.texi.49 2017-07-30 16:20:34.864415816 -0400
+@@ -81,15 +81,15 @@ This file documents the use of the GNU c
+ @page
+ @vskip 0pt plus 1filll
+ Published by:
+ @multitable @columnfractions 0.5 0.5
+ @item GNU Press
+-@tab Website: www.gnupress.org
++@tab Website: @uref{http://www.gnupress.org}
+ @item a division of the
+-@tab General: @tex press@@gnu.org @end tex
++@tab General: @email{press@@gnu.org}
+ @item Free Software Foundation
+-@tab Orders: @tex sales@@gnu.org @end tex
++@tab Orders: @email{sales@@gnu.org}
+ @item 51 Franklin Street, Fifth Floor
+ @tab Tel 617-542-5942
+ @item Boston, MA 02110-1301 USA
+ @tab Fax 617-542-2652
+ @end multitable
+@@ -138,11 +138,11 @@ Introduction, gccint, GNU Compiler Colle
+ * Objective-C:: GNU Objective-C runtime features.
+ * Compatibility:: Binary Compatibility
+ * Gcov:: @command{gcov}---a test coverage program.
+ * Trouble:: If you have trouble using GCC.
+ * Bugs:: How, why and where to report bugs.
+-* Service:: How to find suppliers of support for GCC.
++* Service:: How To Get Help with GCC
+ * Contributing:: How to contribute to testing and developing GCC.
+
+ * Funding:: How to help assure funding for free software.
+ * GNU Project:: The GNU Project and GNU/Linux.
+