summaryrefslogtreecommitdiff
path: root/source/l/gc
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2018-05-28 19:12:29 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:39:35 +0200
commit646a5c1cbfd95873950a87b5f75d52073a967023 (patch)
treeb8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/l/gc
parentd31c50870d0bee042ce660e445c9294a59a3a65b (diff)
downloadcurrent-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt. installpkg: default line length for --terselength is the number of columns. removepkg: added --terse mode. upgradepkg: default line length for --terselength is the number of columns. upgradepkg: accept -option in addition to --option. ap/vim-8.1.0026-x86_64-1.txz: Upgraded. d/bison-3.0.5-x86_64-1.txz: Upgraded. e/emacs-26.1-x86_64-1.txz: Upgraded. kde/kopete-4.14.3-x86_64-8.txz: Rebuilt. Recompiled against libidn-1.35. n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded. n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded. n/libnftnl-1.1.0-x86_64-1.txz: Upgraded. n/links-2.16-x86_64-2.txz: Rebuilt. Rebuilt to enable X driver for -g mode. n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded. n/nftables-0.8.5-x86_64-1.txz: Upgraded. n/p11-kit-0.23.11-x86_64-1.txz: Upgraded. n/ulogd-2.0.7-x86_64-1.txz: Upgraded. n/whois-5.3.1-x86_64-1.txz: Upgraded. xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded. xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/l/gc')
-rwxr-xr-xsource/l/gc/gc.SlackBuild48
-rw-r--r--source/l/gc/noelision.patch127
-rw-r--r--source/l/gc/refer_to_GC_setup_mark_lock_only_in_PARALLEL_MARK_code.patch26
-rw-r--r--source/l/gc/slack-desc8
4 files changed, 28 insertions, 181 deletions
diff --git a/source/l/gc/gc.SlackBuild b/source/l/gc/gc.SlackBuild
index 186f3987..d3dba1cc 100755
--- a/source/l/gc/gc.SlackBuild
+++ b/source/l/gc/gc.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2013, 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# Copyright 2014 Heinz Wiesinger, Amsterdam, NL
# All rights reserved.
#
@@ -21,10 +21,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gc
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
+LAO_VERSION="7.6.2" # libatomic_ops version
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -36,9 +39,16 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
@@ -60,10 +70,10 @@ fi
cd $TMP
rm -rf $PKGNAM-$VERSION $PKGNAM-$(echo $VERSION | cut -b 1-3)
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION 2> /dev/null || cd $PKGNAM-$(echo $VERSION | cut -b 1-3) || exit 1
-tar xvf $CWD/libatomic_ops-$VERSION.tar.xz || exit 1
-mv libatomic_ops-$VERSION libatomic_ops
+tar xvf $CWD/libatomic_ops-$LAO_VERSION.tar.?z || exit 1
+mv libatomic_ops-$LAO_VERSION libatomic_ops
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -71,13 +81,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# https://github.com/ivmai/bdwgc/pull/51
-zcat $CWD/noelision.patch.gz | patch -p1 --verbose || exit 1
-
-# Guarding GC_setup_mark_lock usage with PARALLEL_MARK is required to avoid
-# an undefined reference in non-PARALLEL_MARK configurations:
-zcat $CWD/refer_to_GC_setup_mark_lock_only_in_PARALLEL_MARK_code.patch.gz | patch -p0 --verbose || exit 1
-
sed -i 's#pkgdata#doc#' doc/doc.am
sed -i 's#pkgdata#doc#' libatomic_ops/Makefile.am
sed -i 's#pkgdata#doc#' libatomic_ops/doc/Makefile.am
@@ -99,7 +102,7 @@ CFLAGS="$SLKCFLAGS -DUSE_GET_STACKBASE_FOR_MAIN" \
--enable-parallel-mark \
--enable-threads=posix \
--with-libatomic-ops=no \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# NOTE: Using --disable-static exports a subset of symbols, and has caused
# some things that use gc to break. So it is recommended to build the static
@@ -118,14 +121,11 @@ cd libatomic_ops
make install DESTDIR=$PKG || exit 1
cd -
-# Remove static libraries that we don't want in the package, and fix the
-# .la files to remove the references to them:
-( cd $PKG/usr/lib${LIBDIRSUFFIX}
- for static in libcord libgc libgccpp ; do
- rm --verbose ${static}.a
- sed -i "s#old_library='.*'#old_library=''#g" ${static}.la
- done
-)
+# Remove static libraries that we don't want in the package:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/{libcord,libgc,libgccpp}.a
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/l/gc/noelision.patch b/source/l/gc/noelision.patch
deleted file mode 100644
index 0e1515ea..00000000
--- a/source/l/gc/noelision.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-diff --git c/include/private/gc_priv.h w/include/private/gc_priv.h
-index 0ad92fc..b877fac 100644
---- c/include/private/gc_priv.h
-+++ w/include/private/gc_priv.h
-@@ -2368,6 +2368,7 @@ GC_INNER ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str,
- /* GC_notify_all_builder() is called when GC_fl_builder_count */
- /* reaches 0. */
-
-+ GC_INNER void GC_setup_mark_lock(void);
- GC_INNER void GC_acquire_mark_lock(void);
- GC_INNER void GC_release_mark_lock(void);
- GC_INNER void GC_notify_all_builder(void);
-diff --git c/include/private/gcconfig.h w/include/private/gcconfig.h
-index c753cc2..b5ed075 100644
---- c/include/private/gcconfig.h
-+++ w/include/private/gcconfig.h
-@@ -1357,6 +1357,11 @@
- # define PREFETCH_FOR_WRITE(x) \
- __asm__ __volatile__ ("prefetchw %0" : : "m"(*(char *)(x)))
- # endif
-+# if defined(__GLIBC__)
-+ /* Workaround lock elision implementation for some glibc. */
-+# define GLIBC_2_19_TSX_BUG
-+# include <gnu/libc-version.h> /* for gnu_get_libc_version() */
-+# endif
- # endif
- # ifdef CYGWIN32
- # define OS_TYPE "CYGWIN32"
-@@ -2257,6 +2262,11 @@
- /* FIXME: This seems to be fixed in GLibc v2.14. */
- # define GETCONTEXT_FPU_EXCMASK_BUG
- # endif
-+# if defined(__GLIBC__)
-+ /* Workaround lock elision implementation for some glibc. */
-+# define GLIBC_2_19_TSX_BUG
-+# include <gnu/libc-version.h> /* for gnu_get_libc_version() */
-+# endif
- # endif
- # ifdef DARWIN
- # define OS_TYPE "DARWIN"
-diff --git c/include/private/pthread_support.h w/include/private/pthread_support.h
-index 525a9aa..017f194 100644
---- c/include/private/pthread_support.h
-+++ w/include/private/pthread_support.h
-@@ -148,6 +148,8 @@ GC_INNER_PTHRSTART GC_thread GC_start_rtn_prepare_thread(
- struct GC_stack_base *sb, void *arg);
- GC_INNER_PTHRSTART void GC_thread_exit_proc(void *);
-
-+GC_INNER void GC_setup_mark_lock(void);
-+
- #endif /* GC_PTHREADS && !GC_WIN32_THREADS */
-
- #endif /* GC_PTHREAD_SUPPORT_H */
-diff --git c/misc.c w/misc.c
-index df434a1..3aca41d 100644
---- c/misc.c
-+++ w/misc.c
-@@ -875,6 +875,9 @@ GC_API void GC_CALL GC_init(void)
- /* else */ InitializeCriticalSection (&GC_allocate_ml);
- }
- # endif /* GC_WIN32_THREADS */
-+# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
-+ GC_setup_mark_lock();
-+# endif /* GC_PTHREADS */
- # if (defined(MSWIN32) || defined(MSWINCE)) && defined(THREADS)
- InitializeCriticalSection(&GC_write_cs);
- # endif
-diff --git c/pthread_support.c w/pthread_support.c
-index c00b93d..8a7c50b 100644
---- c/pthread_support.c
-+++ w/pthread_support.c
-@@ -1979,6 +1979,55 @@ GC_INNER void GC_lock(void)
-
- static pthread_cond_t builder_cv = PTHREAD_COND_INITIALIZER;
-
-+#ifdef GLIBC_2_19_TSX_BUG
-+ /* Parse string like <major>[.<minor>[<tail>]] and return major value. */
-+ static int parse_version(int *pminor, const char *pverstr) {
-+ char *endp;
-+ unsigned long value = strtoul(pverstr, &endp, 10);
-+ int major = (int)value;
-+
-+ if (major < 0 || (char *)pverstr == endp || (unsigned)major != value) {
-+ /* Parse error */
-+ return -1;
-+ }
-+ if (*endp != '.') {
-+ /* No minor part. */
-+ *pminor = -1;
-+ } else {
-+ value = strtoul(endp + 1, &endp, 10);
-+ *pminor = (int)value;
-+ if (*pminor < 0 || (unsigned)(*pminor) != value) {
-+ return -1;
-+ }
-+ }
-+ return major;
-+ }
-+#endif /* GLIBC_2_19_TSX_BUG */
-+
-+GC_INNER void GC_setup_mark_lock(void)
-+{
-+# ifdef GLIBC_2_19_TSX_BUG
-+ pthread_mutexattr_t mattr;
-+ int glibc_minor = -1;
-+ int glibc_major = parse_version(&glibc_minor, gnu_get_libc_version());
-+
-+ if (glibc_major > 2 || (glibc_major == 2 && glibc_minor >= 19)) {
-+ /* TODO: disable this workaround for glibc with fixed TSX */
-+ /* This disables lock elision to workaround a bug in glibc 2.19+ */
-+ if (0 != pthread_mutexattr_init(&mattr)) {
-+ ABORT("pthread_mutexattr_init failed");
-+ }
-+ if (0 != pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_NORMAL)) {
-+ ABORT("pthread_mutexattr_settype failed");
-+ }
-+ if (0 != pthread_mutex_init(&mark_mutex, &mattr)) {
-+ ABORT("pthread_mutex_init failed");
-+ }
-+ pthread_mutexattr_destroy(&mattr);
-+ }
-+# endif
-+}
-+
- GC_INNER void GC_acquire_mark_lock(void)
- {
- GC_ASSERT(GC_mark_lock_holder != NUMERIC_THREAD_ID(pthread_self()));
diff --git a/source/l/gc/refer_to_GC_setup_mark_lock_only_in_PARALLEL_MARK_code.patch b/source/l/gc/refer_to_GC_setup_mark_lock_only_in_PARALLEL_MARK_code.patch
deleted file mode 100644
index 6e63c777..00000000
--- a/source/l/gc/refer_to_GC_setup_mark_lock_only_in_PARALLEL_MARK_code.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Guarding GC_setup_mark_lock usage with PARALLEL_MARK is required to avoid
-an undefined reference in non-PARALLEL_MARK configurations:
-commit 4c8e0dc234e671c4d64ffab9d4f94b6cd8cc2f63
-Author: Thomas Schwinge < thomas at codesourcery.com >
-Date: Mon Sep 22 13:36:00 2014 +0200
- Refer to GC_setup_mark_lock only in PARALLEL_MARK code.
-
- ./.libs/libgc.so: undefined reference to `GC_setup_mark_lock'
-
- * misc.c (GC_init): Guard GC_setup_mark_lock usage.
----
- misc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git misc.c misc.c
-index 41bd3f4..721a999 100644
---- misc.c
-+++ misc.c
-@@ -889,7 +889,7 @@ GC_API void GC_CALL GC_init(void)
- /* else */ InitializeCriticalSection (&GC_allocate_ml);
- }
- # endif /* GC_WIN32_THREADS */
--# if defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
-+# if defined(PARALLEL_MARK) && defined(GC_PTHREADS) && !defined(GC_WIN32_THREADS)
- GC_setup_mark_lock();
- # endif /* GC_PTHREADS */
- # if (defined(MSWIN32) || defined(MSWINCE)) && defined(THREADS)
diff --git a/source/l/gc/slack-desc b/source/l/gc/slack-desc
index 9fce3ef0..0bbcac9c 100644
--- a/source/l/gc/slack-desc
+++ b/source/l/gc/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
@@ -11,7 +11,7 @@ gc:
gc: The Boehm-Demers-Weiser conservative garbage collector can be used as
gc: a garbage collecting replacement for C malloc or C++ new.
gc:
-gc: Homepage: http://www.hboehm.info/gc/
+gc: Homepage: http://www.hboehm.info/gc/
gc:
gc:
gc: