Date: Wednesday, August 22, 2018 @ 14:55:45 Author: bpiotrowski Revision: 332812
archrelease: copy trunk to testing-x86_64 Added: valgrind/repos/testing-x86_64/ valgrind/repos/testing-x86_64/PKGBUILD (from rev 332811, valgrind/trunk/PKGBUILD) valgrind/repos/testing-x86_64/valgrind-3.13.0-arch_prctl.patch (from rev 332811, valgrind/trunk/valgrind-3.13.0-arch_prctl.patch) valgrind/repos/testing-x86_64/valgrind-3.7.0-respect-flags.patch (from rev 332811, valgrind/trunk/valgrind-3.7.0-respect-flags.patch) ------------------------------------+ PKGBUILD | 111 +++++++++++++++++++++++++++++++++++ valgrind-3.13.0-arch_prctl.patch | 31 +++++++++ valgrind-3.7.0-respect-flags.patch | 13 ++++ 3 files changed, 155 insertions(+) Copied: valgrind/repos/testing-x86_64/PKGBUILD (from rev 332811, valgrind/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2018-08-22 14:55:45 UTC (rev 332812) @@ -0,0 +1,111 @@ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor: Dan McGee <d...@archlinux.org> +# Contributor: Allan McRae <al...@archlinux.org> + +pkgname=valgrind +pkgver=3.13.0+290+2b0aa0a5 +pkgrel=1 +pkgdesc='Tool to help find memory-management problems in programs' +arch=('x86_64') +license=('GPL') +url='http://valgrind.org/' +depends=('glibc' 'perl') +makedepends=('gdb' 'openmpi' 'lib32-glibc' 'lib32-gcc-libs' 'git' 'docbook-xml' + 'docbook-xsl' 'docbook-sgml') +checkdepends=('procps-ng') +optdepends=('openmpi: MPI support' + 'lib32-glibc: 32-bit ABI support') +provides=('valgrind-multilib') +replaces=('valgrind-multilib') +options=('!emptydirs' '!strip') +_commit=2b0aa0a5b88f900e986a3360952fcb3d2513419d +source=(git+http://repo.or.cz/valgrind.git#commit=$_commit + valgrind-3.7.0-respect-flags.patch) +md5sums=('SKIP' + '470d9881870aacc210b7a6efb64cc9a9') +sha512sums=('SKIP' + 'e0cec39381cefeca09ae4794cca309dfac7c8693e6315e137e64f5c33684598726d41cfbb4edf764fe985503b13ff596184ca5fc32b159d500ec092e4cf8838c') + +pkgver() { + cd valgrind + local _basever=${pkgver%%+*} + local _count="$(git rev-list --count svn/VALGRIND_${_basever//./_}..master)" + + printf "%s+%s+%s" $_basever $_count ${_commit:0:8} +} + +prepare() { + cd valgrind + patch -Np1 < ../valgrind-3.7.0-respect-flags.patch + sed -i 's|sgml/docbook/xsl-stylesheets|xml/docbook/xsl-stylesheets-1.79.2|' docs/Makefile.am + + autoreconf -ifv +} + +build() { + # valgrind does not like stack protector flags + CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} + CFLAGS=${CFLAGS/-fstack-protector-strong -fno-plt/} + CXXFLAGS=${CXXFLAGS/-fstack-protector-strong -fno-plt/} + + cd valgrind + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --with-mpicc=mpicc + make + make -C docs man-pages +} + +check() { + cd valgrind + + # Make sure a basic binary runs. There should be no errors. + ./vg-in-place --error-exitcode=1 /bin/true + + # Make sure no extra CFLAGS, CXXFLAGS or LDFLAGS leak through, + # the testsuite sets all flags necessary. See also configure above. + make check CFLAGS="" CXXFLAGS="" LDFLAGS="" + + # XXX: run full regtest but only report issues some tests fail duo + # current toolchain and expectations, take a manual look if its fine + echo ===============TESTING=================== + make regtest || : + + # Make sure test failures show up in build.log + # Gather up the diffs (at most the first 20 lines for each one) + MAX_LINES=20 + diff_files=$(find . -name '*.diff' | sort) + if [ z"${diff_files}" = z ] ; then + echo "Congratulations, all tests passed!" + else + warning "Some tests failed!" + for f in ${diff_files} ; do + echo "=================================================" >> diffs + echo "${f}" >> diffs + echo "=================================================" >> diffs + if [ "$(wc -l < "${f}")" -le ${MAX_LINES} ] ; then + cat "${f}" >> diffs + else + head -n ${MAX_LINES} "${f}" >> diffs + echo "<truncated beyond ${MAX_LINES} lines>" >> diffs + fi + done + fi + cat diffs + echo ===============END TESTING=============== +} + +package() { + cd valgrind + make DESTDIR="${pkgdir}" install + + install -d "$pkgdir/usr/share/man/man1" + install -m644 docs/*.1 -t "$pkgdir/usr/share/man/man1" + + if check_option 'debug' n; then + find "${pkgdir}/usr/bin" -type f -executable -exec strip $STRIP_BINARIES {} + || true + fi +} + +# vim: ts=2 sw=2 et: Copied: valgrind/repos/testing-x86_64/valgrind-3.13.0-arch_prctl.patch (from rev 332811, valgrind/trunk/valgrind-3.13.0-arch_prctl.patch) =================================================================== --- testing-x86_64/valgrind-3.13.0-arch_prctl.patch (rev 0) +++ testing-x86_64/valgrind-3.13.0-arch_prctl.patch 2018-08-22 14:55:45 UTC (rev 332812) @@ -0,0 +1,31 @@ +diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c +index 0f2ad8c51..407af7f76 100644 +--- a/coregrind/m_syswrap/syswrap-amd64-linux.c ++++ b/coregrind/m_syswrap/syswrap-amd64-linux.c +@@ -249,6 +249,7 @@ PRE(sys_rt_sigreturn) + PRE(sys_arch_prctl) + { + ThreadState* tst; ++ Bool known_option = True; + PRINT( "arch_prctl ( %ld, %lx )", SARG1, ARG2 ); + + vg_assert(VG_(is_valid_tid)(tid)); +@@ -283,13 +284,16 @@ PRE(sys_arch_prctl) + POST_MEM_WRITE(ARG2, sizeof(unsigned long)); + } + else { +- VG_(core_panic)("Unsupported arch_prctl option"); ++ known_option = False; + } + + /* Note; the Status writeback to guest state that happens after + this wrapper returns does not change guest_FS_CONST or guest_GS_CONST; + hence that direct assignment to the guest state is safe here. */ +- SET_STATUS_Success( 0 ); ++ if (known_option) ++ SET_STATUS_Success( 0 ); ++ else ++ SET_STATUS_Failure( VKI_EINVAL ); + } + + // Parts of this are amd64-specific, but the *PEEK* cases are generic. Copied: valgrind/repos/testing-x86_64/valgrind-3.7.0-respect-flags.patch (from rev 332811, valgrind/trunk/valgrind-3.7.0-respect-flags.patch) =================================================================== --- testing-x86_64/valgrind-3.7.0-respect-flags.patch (rev 0) +++ testing-x86_64/valgrind-3.7.0-respect-flags.patch 2018-08-22 14:55:45 UTC (rev 332812) @@ -0,0 +1,13 @@ +diff -Naur valgrind-3.7.0.orig//mpi/Makefile.am valgrind-3.7.0/mpi/Makefile.am +--- valgrind-3.7.0.orig/mpi/Makefile.am 2011-10-26 17:24:23.000000000 -0400 ++++ valgrind-3.7.0/mpi/Makefile.am 2011-11-10 16:03:14.000000000 -0500 +@@ -7,9 +7,6 @@ + CC = $(MPI_CC) + DEFS = + DEFAULT_INCLUDES = +-CPPFLAGS = +-CFLAGS = +-LDFLAGS = + + EXTRA_DIST = \ + mpiwrap_type_test.c