summaryrefslogtreecommitdiff
path: root/source/d
diff options
context:
space:
mode:
Diffstat (limited to 'source/d')
-rwxr-xr-xsource/d/Cython/Cython.SlackBuild81
-rw-r--r--source/d/Cython/Cython.url2
-rw-r--r--source/d/Cython/slack-desc19
-rw-r--r--source/d/automake/automake-1.15-perl-escape-curly-bracket.patch21
-rwxr-xr-xsource/d/automake/automake.SlackBuild7
-rw-r--r--source/d/automake/automake.perl516.prototype.diff119
-rw-r--r--source/d/binutils/binutils-2.23.52.0.1.tar.signbin543 -> 0 bytes
-rwxr-xr-xsource/d/binutils/binutils.SlackBuild42
-rw-r--r--source/d/binutils/binutils.addr2line.dynsymtab.diff128
-rw-r--r--source/d/binutils/binutils.revert.pr15149.diff22
-rw-r--r--source/d/binutils/binutils.texinfo5.diff201
-rw-r--r--source/d/binutils/patches/binutils-2.20.51.0.10-copy-osabi.patch16
-rw-r--r--source/d/binutils/patches/binutils-2.20.51.0.10-ppc64-pie.patch12
-rw-r--r--source/d/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch11
-rw-r--r--source/d/binutils/patches/binutils-2.20.51.0.2-libtool-lib64.patch236
-rw-r--r--source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch58
-rw-r--r--source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch38
-rw-r--r--source/d/binutils/patches/binutils-2.24-ldforcele.patch54
-rw-r--r--source/d/binutils/patches/binutils-2.25-set-long-long.patch38
-rw-r--r--source/d/binutils/patches/binutils-2.25-version.patch44
-rw-r--r--source/d/binutils/patches/binutils-2.25.1-cleansweep.patch63
-rw-r--r--source/d/binutils/patches/binutils-2.26-Bsymbolic_PIE.patch146
-rw-r--r--source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch17
-rw-r--r--source/d/binutils/patches/binutils-2.26-fix-compile-warnings.patch75
-rw-r--r--source/d/binutils/patches/binutils-2.26-formatting.patch297
-rw-r--r--source/d/binutils/patches/binutils-2.26-lto.patch2652
-rw-r--r--source/d/binutils/patches/binutils-rh1312151.patch22
-rw-r--r--source/d/binutils/patches/binutils.export.demangle.h.diff (renamed from source/d/binutils/binutils.export.demangle.h.diff)0
-rw-r--r--source/d/binutils/patches/binutils.no-config-h-check.diff (renamed from source/d/binutils/binutils.no-config-h-check.diff)0
-rw-r--r--source/d/binutils/release.binutils-2.23.52.0.1775
-rwxr-xr-xsource/d/ccache/ccache.SlackBuild5
-rwxr-xr-xsource/d/clisp/clisp.SlackBuild50
-rw-r--r--source/d/clisp/ffcall-arm.patch93
-rwxr-xr-xsource/d/cmake/cmake.SlackBuild33
-rwxr-xr-xsource/d/cscope/cscope.SlackBuild30
-rw-r--r--source/d/dev86/README8
-rw-r--r--source/d/dev86/dev86-x86_64.noelks.patch19
-rw-r--r--source/d/dev86/dev86-x86_64.patch20
-rwxr-xr-xsource/d/dev86/dev86.SlackBuild43
-rw-r--r--source/d/dev86/dev86.info8
-rw-r--r--source/d/dev86/slack-desc2
-rwxr-xr-xsource/d/flex/flex.SlackBuild6
-rw-r--r--source/d/gcc/c89.sh10
-rw-r--r--source/d/gcc/c99.sh10
-rw-r--r--source/d/gcc/ecj-4.5.jarbin1470676 -> 0 bytes
-rw-r--r--source/d/gcc/ecj-4.9.jarbin0 -> 1619429 bytes
-rw-r--r--source/d/gcc/ecj.url1
-rw-r--r--source/d/gcc/gcc.66782.diff124
-rw-r--r--source/d/gcc/gcc.69140.diff13
-rwxr-xr-xsource/d/gcc/gcc.SlackBuild47
-rw-r--r--source/d/gcc/slack-desc.gcc4
-rw-r--r--source/d/gcc/slack-desc.gcc-gnat8
-rwxr-xr-xsource/d/gdb/gdb.SlackBuild11
-rw-r--r--source/d/git/git-2.9.0.tar.signbin0 -> 543 bytes
-rwxr-xr-xsource/d/git/git.SlackBuild18
-rw-r--r--source/d/git/git.url2
-rwxr-xr-xsource/d/gnu-cobol/gnu-cobol.SlackBuild (renamed from source/d/open-cobol/open-cobol.SlackBuild)8
-rw-r--r--source/d/gnu-cobol/slack-desc19
-rwxr-xr-xsource/d/guile/guile.SlackBuild7
-rwxr-xr-xsource/d/help2man/help2man.SlackBuild8
-rw-r--r--source/d/intltool/intltool-0.51.0-perl-5.22.patch44
-rwxr-xr-xsource/d/intltool/intltool.SlackBuild17
-rwxr-xr-xsource/d/libtool/libtool.SlackBuild10
-rw-r--r--source/d/libtool/libtool.no.moved.warning.diff66
-rw-r--r--source/d/llvm/clang.toolchains.i586.triple.diff11
-rwxr-xr-xsource/d/llvm/llvm.SlackBuild143
-rw-r--r--source/d/llvm/llvm.url6
-rw-r--r--source/d/make/make-3.82-android-build-fix.diff16
-rw-r--r--source/d/make/make-3.82-bugfixes.patch250
-rwxr-xr-xsource/d/make/make.SlackBuild67
-rwxr-xr-xsource/d/mercurial/mercurial.SlackBuild8
-rwxr-xr-xsource/d/nasm/nasm.SlackBuild17
-rw-r--r--source/d/open-cobol/slack-desc19
-rwxr-xr-xsource/d/oprofile/oprofile.SlackBuild9
-rw-r--r--source/d/oprofile/oprofile.binutils.diff44
-rw-r--r--source/d/oprofile/oprofile.config.h.diff22
-rwxr-xr-xsource/d/perl/perl.SlackBuild71
-rw-r--r--source/d/pkg-config/doinst.sh13
-rwxr-xr-xsource/d/pkg-config/pkg-config.SlackBuild8
-rwxr-xr-xsource/d/pkg-config/scripts/pkgconfig.csh4
-rwxr-xr-xsource/d/pkg-config/scripts/pkgconfig.sh4
-rwxr-xr-xsource/d/python-setuptools/python-setuptools.SlackBuild75
-rw-r--r--source/d/python-setuptools/slack-desc19
-rwxr-xr-xsource/d/python/python.SlackBuild6
-rw-r--r--source/d/python/python.x86_64.diff84
-rwxr-xr-xsource/d/rcs/rcs.SlackBuild2
-rwxr-xr-xsource/d/ruby/ruby.SlackBuild18
-rwxr-xr-xsource/d/scons/scons.SlackBuild94
-rw-r--r--source/d/scons/slack-desc19
-rwxr-xr-xsource/d/slacktrack/slacktrack.SlackBuild2
-rwxr-xr-xsource/d/strace/strace.SlackBuild8
-rwxr-xr-xsource/d/subversion/subversion.SlackBuild16
-rwxr-xr-xsource/d/swig/swig.SlackBuild6
-rwxr-xr-xsource/d/yasm/yasm.SlackBuild77
94 files changed, 4954 insertions, 2124 deletions
diff --git a/source/d/Cython/Cython.SlackBuild b/source/d/Cython/Cython.SlackBuild
new file mode 100755
index 00000000..11716068
--- /dev/null
+++ b/source/d/Cython/Cython.SlackBuild
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Slackware build script for Cython
+
+# Copyright 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=Cython
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+python setup.py install --root=$PKG --prefix=/usr || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a *.txt Doc/* $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/d/Cython/Cython.url b/source/d/Cython/Cython.url
new file mode 100644
index 00000000..caf98d8b
--- /dev/null
+++ b/source/d/Cython/Cython.url
@@ -0,0 +1,2 @@
+http://www.cython.org
+http://cython.org/release/Cython-0.23.4.tar.gz
diff --git a/source/d/Cython/slack-desc b/source/d/Cython/slack-desc
new file mode 100644
index 00000000..6c806733
--- /dev/null
+++ b/source/d/Cython/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+Cython: Cython (C bindings for Python)
+Cython:
+Cython: Cython is a language that makes writing C extensions for the Python
+Cython: language as easy as Python itself. Cython is based on the well-known
+Cython: Pyrex, but supports more cutting edge functionality and optimizations.
+Cython:
+Cython: Homepage: http://www.cython.org/
+Cython:
+Cython:
+Cython:
+Cython:
diff --git a/source/d/automake/automake-1.15-perl-escape-curly-bracket.patch b/source/d/automake/automake-1.15-perl-escape-curly-bracket.patch
new file mode 100644
index 00000000..7c22c4ee
--- /dev/null
+++ b/source/d/automake/automake-1.15-perl-escape-curly-bracket.patch
@@ -0,0 +1,21 @@
+From: Pavel Raiskup <praiskup@redhat.com>
+Date: Tue, 7 Jul 2015 10:54:24 +0200
+Subject: [PATCH 2/2] bin/automake: escape '{' in regexp pattern
+
+Resolves: rhbz#1239379
+Upstream report:
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21001
+
+diff --git a/bin/automake.in b/bin/automake.in
+index eedc8bc..a679d16 100644
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -3878,7 +3878,7 @@ sub substitute_ac_subst_variables_worker
+ sub substitute_ac_subst_variables
+ {
+ my ($text) = @_;
+- $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
++ $text =~ s/\$\{([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
+ return $text;
+ }
+
diff --git a/source/d/automake/automake.SlackBuild b/source/d/automake/automake.SlackBuild
index 7f3e3d3c..058b3b97 100755
--- a/source/d/automake/automake.SlackBuild
+++ b/source/d/automake/automake.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2012, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,7 +29,7 @@ BUILD=${BUILD:-1}
# Automatically determine architecture for build & packaging:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
@@ -47,7 +47,8 @@ rm -rf automake-$VERSION
tar xvf $CWD/automake-$VERSION.tar.xz || exit 1
cd automake-$VERSION
-zcat $CWD/automake.perl516.prototype.diff.gz | patch -p1 || exit 1
+# Patch to work with Perl 5.20:
+zcat $CWD/automake-1.15-perl-escape-curly-bracket.patch.gz | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
diff --git a/source/d/automake/automake.perl516.prototype.diff b/source/d/automake/automake.perl516.prototype.diff
deleted file mode 100644
index e88b0993..00000000
--- a/source/d/automake/automake.perl516.prototype.diff
+++ /dev/null
@@ -1,119 +0,0 @@
-From 6bf58a59a1f3803e57e3f0378aa9344686707b75 Mon Sep 17 00:00:00 2001
-From: Stefano Lattarini <stefano.lattarini@gmail.com>
-Date: Mon, 28 May 2012 11:32:03 +0000
-Subject: aclocal: declare function prototypes, do not use '&' in function calls
-
-This change will also fix automake bug#11543 (from a report by Matt
-Burgess).
-
-* aclocal.in: Declare prototypes for almost all functions early, before
-any actual function definition (but omit the prototype for the dynamically
-generated '&search' function). Add prototypes to any function definition.
-Remove '&' from function invocations (i.e., simply use "func(ARGS..)"
-instead of "&func(ARGS...)").
-* THANKS, NEWS: Update.
-
-Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
----
-diff --git a/aclocal.in b/aclocal.in
-index dfb851b..e8855d5 100644
---- a/aclocal.in
-+++ b/aclocal.in
-@@ -152,8 +152,34 @@ my $erase_me;
-
- ################################################################
-
-+# Prototypes for all subroutines.
-+
-+sub unlink_tmp (;$);
-+sub xmkdir_p ($);
-+sub check_acinclude ();
-+sub reset_maps ();
-+sub install_file ($$);
-+sub list_compare (\@\@);
-+sub scan_m4_dirs ($@);
-+sub scan_m4_files ();
-+sub add_macro ($);
-+sub scan_configure_dep ($);
-+sub add_file ($);
-+sub scan_file ($$$);
-+sub strip_redundant_includes (%);
-+sub trace_used_macros ();
-+sub scan_configure ();
-+sub write_aclocal ($@);
-+sub usage ($);
-+sub version ();
-+sub handle_acdir_option ($$);
-+sub parse_arguments ();
-+sub parse_ACLOCAL_PATH ();
-+
-+################################################################
-+
- # Erase temporary file ERASE_ME. Handle signals.
--sub unlink_tmp
-+sub unlink_tmp (;$)
- {
- my ($sig) = @_;
-
-@@ -350,7 +376,7 @@ sub scan_m4_dirs ($@)
- next if $file eq 'aclocal.m4';
-
- my $fullfile = File::Spec->canonpath ("$m4dir/$file");
-- &scan_file ($type, $fullfile, 'aclocal');
-+ scan_file ($type, $fullfile, 'aclocal');
- }
- closedir (DIR);
- }
-@@ -361,12 +387,12 @@ sub scan_m4_files ()
- {
- # First, scan configure.ac. It may contain macro definitions,
- # or may include other files that define macros.
-- &scan_file (FT_USER, $configure_ac, 'aclocal');
-+ scan_file (FT_USER, $configure_ac, 'aclocal');
-
- # Then, scan acinclude.m4 if it exists.
- if (-f 'acinclude.m4')
- {
-- &scan_file (FT_USER, 'acinclude.m4', 'aclocal');
-+ scan_file (FT_USER, 'acinclude.m4', 'aclocal');
- }
-
- # Finally, scan all files in our search paths.
-@@ -380,7 +406,7 @@ sub scan_m4_files ()
- my $search = "sub search {\nmy \$found = 0;\n";
- foreach my $key (reverse sort keys %map)
- {
-- $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { & add_macro ("' . $key
-+ $search .= ('if (/\b\Q' . $key . '\E(?!\w)/) { add_macro ("' . $key
- . '"); $found = 1; }' . "\n");
- }
- $search .= "return \$found;\n};\n";
-@@ -403,7 +429,7 @@ sub add_macro ($)
-
- verb "saw macro $macro";
- $macro_seen{$macro} = 1;
-- &add_file ($map{$macro});
-+ add_file ($map{$macro});
- }
-
- # scan_configure_dep ($file)
-@@ -465,7 +491,7 @@ sub scan_configure_dep ($)
- }
-
- add_macro ($_) foreach (@rlist);
-- &scan_configure_dep ($_) foreach @ilist;
-+ scan_configure_dep ($_) foreach @ilist;
- }
-
- # add_file ($FILE)
-@@ -931,7 +957,7 @@ EOF
- }
-
- # Print version and exit.
--sub version()
-+sub version ()
- {
- print <<EOF;
- aclocal (GNU $PACKAGE) $VERSION
---
-cgit v0.9.0.2
diff --git a/source/d/binutils/binutils-2.23.52.0.1.tar.sign b/source/d/binutils/binutils-2.23.52.0.1.tar.sign
deleted file mode 100644
index 83daf366..00000000
--- a/source/d/binutils/binutils-2.23.52.0.1.tar.sign
+++ /dev/null
Binary files differ
diff --git a/source/d/binutils/binutils.SlackBuild b/source/d/binutils/binutils.SlackBuild
index 82b7f181..41fa980b 100755
--- a/source/d/binutils/binutils.SlackBuild
+++ b/source/d/binutils/binutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +25,13 @@
PKGNAM=binutils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -58,8 +58,8 @@ DEFAULT_LD=ld.bfd
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
NO_INITFINI=" --disable-initfini-array "
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
# The config option below is currently needed to compile on x86:
WERROR="--enable-werror=no"
LIBDIRSUFFIX=""
@@ -100,16 +100,28 @@ tar xvf $CWD/binutils-$VERSION.tar.xz || \
tar xvf $CWD/binutils-$VERSION.tar.bz2 || exit 1
cd binutils-$VERSION
-# Use dynamic symbol table if addr2line can't find ordinary symbols:
-zcat $CWD/binutils.addr2line.dynsymtab.diff.gz | patch -p1 --verbose || exit 1
+# Various upstream patches:
+zcat $CWD/patches/binutils-2.20.51.0.2-libtool-lib64.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.20.51.0.10-ppc64-pie.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.25-version.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.25-set-long-long.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.20.51.0.10-copy-osabi.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.20.51.0.10-sec-merge-emit.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.22.52.0.1-relro-on-by-default.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.24-ldforcele.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.25.1-cleansweep.patch | patch -p2 --verbose || exit 1
+zcat $CWD/patches/binutils-2.26-formatting.patch | patch -p2 --verbose || exit 1
+zcat $CWD/patches/binutils-2.26-fix-compile-warnings.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.26-Bsymbolic_PIE.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.26-lto.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-rh1312151.patch | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils-2.26-fix-GOT-offset-calculation.patch | patch -p1 --verbose || exit 1
+
# Export the demangle.h header file:
-zcat $CWD/binutils.export.demangle.h.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils.export.demangle.h.diff.gz | patch -p1 --verbose || exit 1
# Don't check to see if "config.h" was included in the installed headers:
-zcat $CWD/binutils.no-config-h-check.diff.gz | patch -p1 --verbose || exit 1
-# Revert a patch that broke library linking for weak symbols:
-zcat $CWD/binutils.revert.pr15149.diff.gz | patch -p1 --verbose || exit 1
-# Prepare for texinfo-5.x... someday:
-zcat $CWD/binutils.texinfo5.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/patches/binutils.no-config-h-check.diff.gz | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
@@ -137,6 +149,7 @@ CFLAGS="$SLKCFLAGS" \
--enable-plugins \
--enable-threads \
--enable-targets=i386-efi-pe,${TARGET} \
+ --enable-install-libiberty \
$GOLD \
$NO_INITFINI \
$WERROR \
@@ -147,9 +160,6 @@ make clean || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# "make install" skips this, but binutils.spec doesn't. Sneaky, huh?
-cp -a include/libiberty.h $PKG/usr/include/libiberty.h
-
# Differentiate between BSD strings and GNU strings
( cd $PKG/usr/bin ; mv strings strings-GNU )
( cd $PKG/usr/man/man1 ; mv strings.1 strings-GNU.1 )
diff --git a/source/d/binutils/binutils.addr2line.dynsymtab.diff b/source/d/binutils/binutils.addr2line.dynsymtab.diff
deleted file mode 100644
index ee71eb7e..00000000
--- a/source/d/binutils/binutils.addr2line.dynsymtab.diff
+++ /dev/null
@@ -1,128 +0,0 @@
---- ./bfd/opncls.c.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./bfd/opncls.c 2013-04-02 15:56:55.703204116 -0500
-@@ -1297,6 +1297,8 @@
- bfd_malloc (strlen (debug_file_directory) + 1
- + (canon_dirlen > dirlen ? canon_dirlen : dirlen)
- + strlen (".debug/")
-+#define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/"
-+ + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/")
- + strlen (base)
- + 1);
- if (debugfile == NULL)
-@@ -1332,6 +1334,26 @@
- return debugfile;
- }
-
-+ /* Then try in the global debug dir for Fedora libraries. */
-+ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
-+ if (separate_debug_file_exists (debugfile, crc32))
-+ {
-+ free (base);
-+ free (dir);
-+ free (canon_dir);
-+ return debugfile;
-+ }
-+
-+ /* Then try in the usr subdirectory of the global debug dir for Fedora libraries. */
-+ sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
-+ if (separate_debug_file_exists (debugfile, crc32))
-+ {
-+ free (base);
-+ free (dir);
-+ free (canon_dir);
-+ return debugfile;
-+ }
-+
- /* Then try in the global debugfile directory. */
- strcpy (debugfile, debug_file_directory);
- dirlen = strlen (debug_file_directory) - 1;
---- ./bfd/dwarf2.c.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./bfd/dwarf2.c 2013-04-02 15:56:55.704204116 -0500
-@@ -3339,8 +3339,11 @@
- struct dwarf2_debug *stash;
- /* What address are we looking for? */
- bfd_vma addr;
-+ /* What is the address without relocation ? */
-+ bfd_vma unrelocated_addr;
- struct comp_unit* each;
- bfd_vma found = FALSE;
-+ bfd_vma possible_find = FALSE;
- bfd_boolean do_line;
-
- *filename_ptr = NULL;
-@@ -3380,6 +3383,12 @@
- else
- abort ();
-
-+ /* If we are dealing with PIC code then the debug information
-+ will be based on unrelocated addresses. Since we cannot be
-+ sure if this is a PIC address we test both with and without
-+ relocation. */
-+ unrelocated_addr = addr;
-+
- if (section->output_section)
- addr += section->output_section->vma + section->output_offset;
- else
-@@ -3442,6 +3451,16 @@
- stash));
- if (found)
- goto done;
-+
-+ if (! possible_find)
-+ possible_find = ((each->arange.high == 0
-+ || comp_unit_contains_address (each, unrelocated_addr))
-+ && comp_unit_find_nearest_line (each, unrelocated_addr,
-+ filename_ptr,
-+ functionname_ptr,
-+ linenumber_ptr,
-+ discriminator_ptr,
-+ stash));
- }
- }
-
-@@ -3535,6 +3554,16 @@
- discriminator_ptr,
- stash));
-
-+ if (! found && ! do_line && ! possible_find)
-+ possible_find = ((each->arange.high == 0
-+ || comp_unit_contains_address (each, unrelocated_addr))
-+ && comp_unit_find_nearest_line (each, unrelocated_addr,
-+ filename_ptr,
-+ functionname_ptr,
-+ linenumber_ptr,
-+ discriminator_ptr,
-+ stash));
-+
- if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
- == stash->sec->size)
- {
-@@ -3552,6 +3581,8 @@
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- unset_sections (stash);
-
-+ if (! found)
-+ return possible_find;
- return found;
- }
-
---- ./binutils/addr2line.c.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./binutils/addr2line.c 2013-04-02 15:56:55.703204116 -0500
-@@ -130,6 +130,17 @@
- symcount = bfd_canonicalize_symtab (abfd, syms);
- if (symcount < 0)
- bfd_fatal (bfd_get_filename (abfd));
-+
-+ /* If there are no symbols left after canonicalization and
-+ we have not tried the dynamic symbols then give them a go. */
-+ if (symcount == 0
-+ && ! dynamic
-+ && (storage = bfd_get_dynamic_symtab_upper_bound (abfd)) > 0)
-+ {
-+ free (syms);
-+ syms = xmalloc (storage);
-+ symcount = bfd_canonicalize_dynamic_symtab (abfd, syms);
-+ }
- }
-
- /* These global variables are used to pass information between
diff --git a/source/d/binutils/binutils.revert.pr15149.diff b/source/d/binutils/binutils.revert.pr15149.diff
deleted file mode 100644
index f1fe6279..00000000
--- a/source/d/binutils/binutils.revert.pr15149.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./bfd/elflink.c.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./bfd/elflink.c 2013-04-02 15:54:06.072211349 -0500
-@@ -4080,8 +4080,7 @@
- FALSE, FALSE, FALSE);
-
- if (h != NULL
-- && (h->root.type == bfd_link_hash_undefined
-- || h->root.type == bfd_link_hash_undefweak)
-+ && h->root.type == bfd_link_hash_undefined
- && h->root.u.undef.abfd)
- undef_bfd = h->root.u.undef.abfd;
- }
-@@ -4201,8 +4200,7 @@
- FALSE, FALSE, FALSE);
-
- if (h != NULL
-- && (h->root.type == bfd_link_hash_undefined
-- || h->root.type == bfd_link_hash_undefweak)
-+ && h->root.type == bfd_link_hash_undefined
- && h->root.u.undef.abfd)
- undef_bfd = h->root.u.undef.abfd;
- }
diff --git a/source/d/binutils/binutils.texinfo5.diff b/source/d/binutils/binutils.texinfo5.diff
deleted file mode 100644
index b81529e0..00000000
--- a/source/d/binutils/binutils.texinfo5.diff
+++ /dev/null
@@ -1,201 +0,0 @@
---- ./gas/doc/c-cr16.texi.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./gas/doc/c-cr16.texi 2013-04-02 15:56:15.582205827 -0500
-@@ -44,26 +44,33 @@
- CR16 target operand qualifiers and its size (in bits):
-
- @table @samp
--@item Immediate Operand
--- s ---- 4 bits
--@item
--- m ---- 16 bits, for movb and movw instructions.
--@item
--- m ---- 20 bits, movd instructions.
--@item
--- l ---- 32 bits
--
--@item Absolute Operand
--- s ---- Illegal specifier for this operand.
--@item
--- m ---- 20 bits, movd instructions.
--
--@item Displacement Operand
--- s ---- 8 bits
--@item
--- m ---- 16 bits
--@item
--- l ---- 24 bits
-+@item Immediate Operand: s
-+4 bits.
-+
-+@item Immediate Operand: m
-+16 bits, for movb and movw instructions.
-+
-+@item Immediate Operand: m
-+20 bits, movd instructions.
-+
-+@item Immediate Operand: l
-+32 bits.
-+
-+@item Absolute Operand: s
-+Illegal specifier for this operand.
-+
-+@item Absolute Operand: m
-+20 bits, movd instructions.
-+
-+@item Displacement Operand: s
-+8 bits.
-+
-+@item Displacement Operand: m
-+16 bits.
-+
-+@item Displacement Operand: l
-+24 bits.
-+
- @end table
-
- For example:
---- ./gas/doc/c-arm.texi.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./gas/doc/c-arm.texi 2013-04-02 15:56:15.582205827 -0500
-@@ -390,29 +390,29 @@
- @code{unified} syntax, which can be selected via the @code{.syntax}
- directive, and has the following main features:
-
--@table @bullet
--@item
-+@table @code
-+@item 1
- Immediate operands do not require a @code{#} prefix.
-
--@item
-+@item 2
- The @code{IT} instruction may appear, and if it does it is validated
- against subsequent conditional affixes. In ARM mode it does not
- generate machine code, in THUMB mode it does.
-
--@item
-+@item 3
- For ARM instructions the conditional affixes always appear at the end
- of the instruction. For THUMB instructions conditional affixes can be
- used, but only inside the scope of an @code{IT} instruction.
-
--@item
-+@item 4
- All of the instructions new to the V6T2 architecture (and later) are
- available. (Only a few such instructions can be written in the
- @code{divided} syntax).
-
--@item
-+@item 5
- The @code{.N} and @code{.W} suffixes are recognized and honored.
-
--@item
-+@item 6
- All instructions set the flags if and only if they have an @code{s}
- affix.
- @end table
-@@ -451,28 +451,6 @@
- @cindex register names, ARM
- *TODO* Explain about ARM register naming, and the predefined names.
-
--@node ARM-Neon-Alignment
--@subsection NEON Alignment Specifiers
--
--@cindex alignment for NEON instructions
--Some NEON load/store instructions allow an optional address
--alignment qualifier.
--The ARM documentation specifies that this is indicated by
--@samp{@@ @var{align}}. However GAS already interprets
--the @samp{@@} character as a "line comment" start,
--so @samp{: @var{align}} is used instead. For example:
--
--@smallexample
-- vld1.8 @{q0@}, [r0, :128]
--@end smallexample
--
--@node ARM Floating Point
--@section Floating Point
--
--@cindex floating point, ARM (@sc{ieee})
--@cindex ARM floating point (@sc{ieee})
--The ARM family uses @sc{ieee} floating-point numbers.
--
- @node ARM-Relocations
- @subsection ARM relocation generation
-
-@@ -519,6 +497,28 @@
- MOVT r0, #:upper16:foo
- @end smallexample
-
-+@node ARM-Neon-Alignment
-+@subsection NEON Alignment Specifiers
-+
-+@cindex alignment for NEON instructions
-+Some NEON load/store instructions allow an optional address
-+alignment qualifier.
-+The ARM documentation specifies that this is indicated by
-+@samp{@@ @var{align}}. However GAS already interprets
-+the @samp{@@} character as a "line comment" start,
-+so @samp{: @var{align}} is used instead. For example:
-+
-+@smallexample
-+ vld1.8 @{q0@}, [r0, :128]
-+@end smallexample
-+
-+@node ARM Floating Point
-+@section Floating Point
-+
-+@cindex floating point, ARM (@sc{ieee})
-+@cindex ARM floating point (@sc{ieee})
-+The ARM family uses @sc{ieee} floating-point numbers.
-+
- @node ARM Directives
- @section ARM Machine Directives
-
---- ./gas/doc/c-tic54x.texi.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./gas/doc/c-tic54x.texi 2013-04-02 15:56:15.583205827 -0500
-@@ -109,7 +109,7 @@
- is replaced with x. At this point, x has already been encountered
- and the substitution stops.
-
--@smallexample @code
-+@smallexample
- .asg "x",SYM1
- .asg "SYM1",SYM2
- .asg "SYM2",x
-@@ -126,14 +126,14 @@
- ambiguous by placing colons on either side of the subsym. The following
- code:
-
--@smallexample @code
-+@smallexample
- .eval "10",x
- LAB:X: add #x, a
- @end smallexample
-
- When assembled becomes:
-
--@smallexample @code
-+@smallexample
- LAB10 add #10, a
- @end smallexample
-
-@@ -309,7 +309,7 @@
- of a label or address. For example, if an address @code{_label} resides
- in extended program memory, the value of @code{_label} may be loaded as
- follows:
--@smallexample @code
-+@smallexample
- ldx #_label,16,a ; loads extended bits of _label
- or #_label,a ; loads lower 16 bits of _label
- bacc a ; full address is in accumulator A
---- ./gas/doc/c-arc.texi.orig 2013-02-27 14:28:03.000000000 -0600
-+++ ./gas/doc/c-arc.texi 2013-04-02 15:56:15.582205827 -0500
-@@ -220,7 +220,7 @@
- encodings for use of these instructions according to the specification
- by the user. The parameters are:
-
--@table @bullet
-+@table @code
- @item @var{name}
- Name of the extension instruction
-
diff --git a/source/d/binutils/patches/binutils-2.20.51.0.10-copy-osabi.patch b/source/d/binutils/patches/binutils-2.20.51.0.10-copy-osabi.patch
new file mode 100644
index 00000000..6bd9f3df
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.20.51.0.10-copy-osabi.patch
@@ -0,0 +1,16 @@
+--- binutils-2.26.orig/bfd/elf.c 2016-01-25 10:11:33.482288877 +0000
++++ binutils-2.26/bfd/elf.c 2016-01-25 10:16:48.520223863 +0000
+@@ -1300,6 +1300,13 @@ _bfd_elf_copy_private_bfd_data (bfd *ibf
+ }
+ }
+
++ /* If the input BFD has the OSABI field set and the
++ output BFD does not, then copy the value. */
++ if (elf_elfheader (ibfd)->e_ident [EI_OSABI] != ELFOSABI_NONE
++ && elf_elfheader (obfd)->e_ident [EI_OSABI] == ELFOSABI_NONE)
++ elf_elfheader (obfd)->e_ident [EI_OSABI] =
++ elf_elfheader (ibfd)->e_ident [EI_OSABI];
++
+ return TRUE;
+ }
+
diff --git a/source/d/binutils/patches/binutils-2.20.51.0.10-ppc64-pie.patch b/source/d/binutils/patches/binutils-2.20.51.0.10-ppc64-pie.patch
new file mode 100644
index 00000000..740c071b
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.20.51.0.10-ppc64-pie.patch
@@ -0,0 +1,12 @@
+--- a/bfd/elf64-ppc.c 2012-09-11 12:13:00.637448573 +0100
++++ b/bfd/elf64-ppc.c 2012-09-11 12:13:17.922449052 +0100
+@@ -13523,6 +13523,9 @@
+ {
+ BFD_ASSERT (h->elf.dynindx != -1);
+ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
++ if (h->elf.dynindx == -1
++ && h->elf.root.type == bfd_link_hash_undefweak)
++ memset (&outrel, 0, sizeof outrel);
+ }
+ else
+ {
diff --git a/source/d/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch b/source/d/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch
new file mode 100644
index 00000000..238beb38
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.20.51.0.10-sec-merge-emit.patch
@@ -0,0 +1,11 @@
+--- binutils-2.26.orig/bfd/merge.c 2016-01-25 10:11:33.505289018 +0000
++++ binutils-2.26/bfd/merge.c 2016-01-25 10:19:56.961381656 +0000
+@@ -334,7 +334,7 @@ sec_merge_emit (bfd *abfd, struct sec_me
+
+ /* Trailing alignment needed? */
+ off = sec->size - off;
+- if (off != 0)
++ if (off != 0 && alignment_power)
+ {
+ if (contents)
+ memcpy (contents + offset, pad, off);
diff --git a/source/d/binutils/patches/binutils-2.20.51.0.2-libtool-lib64.patch b/source/d/binutils/patches/binutils-2.20.51.0.2-libtool-lib64.patch
new file mode 100644
index 00000000..142fc7e2
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.20.51.0.2-libtool-lib64.patch
@@ -0,0 +1,236 @@
+diff -rcp ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
+--- a/bfd/configure 2010-04-08 14:53:48.000000000 +0100
++++ b/bfd/configure 2010-04-08 14:56:50.000000000 +0100
+@@ -10762,10 +10762,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+diff -rcp ../binutils-2.20.51.0.7.original/binutils/configure ./binutils/configure
+--- a/binutils/configure 2010-04-08 14:53:45.000000000 +0100
++++ b/binutils/configure 2010-04-08 14:56:21.000000000 +0100
+@@ -10560,10 +10560,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+diff -rcp ../binutils-2.20.51.0.7.original/gas/configure ./gas/configure
+--- a/gas/configure 2010-04-08 14:53:47.000000000 +0100
++++ b/gas/configure 2010-04-08 14:57:24.000000000 +0100
+@@ -10547,10 +10547,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+diff -rcp ../binutils-2.20.51.0.7.original/gprof/configure ./gprof/configure
+--- a/gprof/configure 2010-04-08 14:53:45.000000000 +0100
++++ b/gprof/configure 2010-04-08 14:57:50.000000000 +0100
+@@ -10485,10 +10485,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+diff -rcp ../binutils-2.20.51.0.7.original/ld/configure ./ld/configure
+--- a/ld/configure 2010-04-08 14:53:44.000000000 +0100
++++ b/ld/configure 2010-04-08 14:58:21.000000000 +0100
+@@ -10966,10 +10966,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+Only in .: .#libtool.m4
+Only in .: #libtool.m4#
+diff -rcp ../binutils-2.20.51.0.7.original/opcodes/configure ./opcodes/configure
+--- a/opcodes/configure 2010-04-08 14:53:45.000000000 +0100
++++ b/opcodes/configure 2010-04-08 14:59:10.000000000 +0100
+@@ -10496,10 +10496,34 @@
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
++ # find out which ABI we are using
++ libsuff=
++ case "$host_cpu" in
++ x86_64*|s390*|powerpc*|ppc*|sparc*)
++ echo 'int i;' > conftest.$ac_ext
++ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++ (eval $ac_compile) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; then
++ case `/usr/bin/file conftest.$ac_objext` in
++ *64-bit*)
++ libsuff=64
++ if test x"$sys_lib_search_path_spec" = x"/lib /usr/lib /usr/local/lib"; then
++ sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
++ fi
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
++ ;;
++ esac
++ fi
++ rm -rf conftest*
++ ;;
++ esac
++
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
++ sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
diff --git a/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch b/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
new file mode 100644
index 00000000..ba8318df
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.22.52.0.1-relro-on-by-default.patch
@@ -0,0 +1,58 @@
+diff -upr ../binutils-2.22.52.0.1.orig/ld/testsuite/config/default.exp ld/testsuite/config/default.exp
+--- a/ld/testsuite/config/default.exp 2012-03-06 14:00:31.141957656 +0000
++++ b/ld/testsuite/config/default.exp 2012-03-06 14:09:33.492940503 +0000
+@@ -23,7 +23,7 @@
+ #
+
+ if ![info exists ld] then {
+- set ld [findfile $base_dir/ld-new $base_dir/ld-new [transform ld]]
++ set ld "[findfile $base_dir/ld-new $base_dir/ld-new [transform ld]] -znorelro"
+ }
+
+ if ![info exists as] then {
+@@ -60,7 +60,7 @@ if {![file isdirectory tmpdir/ld]} then
+ catch "exec ln -s ld tmpdir/ld/collect-ld" status
+ catch "exec ln -s ../../../gas/as-new tmpdir/ld/as" status
+ }
+-set gcc_B_opt "-B[pwd]/tmpdir/ld/"
++set gcc_B_opt "-B[pwd]/tmpdir/ld/ -Wl,-z,norelro"
+
+ # load the linker path
+ set ld_L_opt ""
+@@ -279,7 +279,7 @@
+ }
+
+ if ![info exists LD] then {
+- set LD [findfile $base_dir/ld-new ./ld-new [transform ld]]
++ set LD "[findfile $base_dir/ld-new ./ld-new [transform ld]] -znorelro"
+ }
+
+ if ![info exists LDFLAGS] then {
+diff -cpr ../binutils-2.22.52.0.1.orig/ld/testsuite/ld-bootstrap/bootstrap.exp ld/testsuite/ld-bootstrap/bootstrap.exp
+--- a/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 14:00:30.503957676 +0000
++++ b/ld/testsuite/ld-bootstrap/bootstrap.exp 2012-03-06 15:03:33.949837926 +0000
+@@ -71,7 +71,13 @@
+
+ # This test can only be run if we have the ld build directory,
+ # since we need the object files.
+- if {$ld != "$objdir/ld-new"} {
++ set ldexe $ld
++ set ldparm [string first " " $ld]
++ if { $ldparm > 0 } then {
++ set ldparm [expr $ldparm - 1]
++ set ldexe [string range $ld 0 $ldparm]
++ }
++ if {$ldexe != "$objdir/ld-new"} {
+ untested $testname
+ continue
+ }
+--- binutils-2.26.orig/ld/emultempl/elf32.em 2016-01-25 10:11:33.990291993 +0000
++++ binutils-2.26/ld/emultempl/elf32.em 2016-01-25 10:21:40.333016777 +0000
+@@ -104,6 +104,7 @@ gld${EMULATION_NAME}_before_parse (void)
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo TRUE ; else echo FALSE ; fi`;
+ config.separate_code = `if test "x${SEPARATE_CODE}" = xyes ; then echo TRUE ; else echo FALSE ; fi`;
+ `if test -n "$CALL_NOP_BYTE" ; then echo link_info.call_nop_byte = $CALL_NOP_BYTE; fi`;
++ link_info.relro = TRUE;
+ }
+
+ EOF
diff --git a/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch b/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
new file mode 100644
index 00000000..944f4fdd
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.23.52.0.1-addr2line-dynsymtab.patch
@@ -0,0 +1,38 @@
+--- a/bfd/opncls.c 2013-03-14 11:25:30.338306122 +0000
++++ b/bfd/opncls.c 2013-03-14 12:20:21.686397360 +0000
+@@ -1297,6 +1297,8 @@
+ bfd_malloc (strlen (debug_file_directory) + 1
+ + (canon_dirlen > dirlen ? canon_dirlen : dirlen)
+ + strlen (".debug/")
++#define FEDORA_LIB_DEBUG_DIR "/usr/lib/debug/"
++ + strlen (FEDORA_LIB_DEBUG_DIR) + strlen ("usr/")
+ + strlen (base)
+ + 1);
+ if (debugfile == NULL)
+@@ -1332,6 +1334,26 @@
+ if (check_func (debugfile, crc32))
+ goto found;
+
++ /* Then try in the global debug dir for Fedora libraries. */
++ sprintf (debugfile, "%s%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
++ if (separate_debug_file_exists (debugfile, crc32))
++ {
++ free (base);
++ free (dir);
++ free (canon_dir);
++ return debugfile;
++ }
++
++ /* Then try in the usr subdirectory of the global debug dir for Fedora libraries. */
++ sprintf (debugfile, "%s/usr%s%s", FEDORA_LIB_DEBUG_DIR, dir, base);
++ if (separate_debug_file_exists (debugfile, crc32))
++ {
++ free (base);
++ free (dir);
++ free (canon_dir);
++ return debugfile;
++ }
++
+ /* Then try in the global debugfile directory. */
+ strcpy (debugfile, debug_file_directory);
+ dirlen = strlen (debug_file_directory) - 1;
diff --git a/source/d/binutils/patches/binutils-2.24-ldforcele.patch b/source/d/binutils/patches/binutils-2.24-ldforcele.patch
new file mode 100644
index 00000000..194cf1ea
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.24-ldforcele.patch
@@ -0,0 +1,54 @@
+Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
+Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
+diff -up ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
+--- a/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
++++ b/ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
+@@ -7096,6 +7096,18 @@
+ && little != NULL)
+ format = little;
+
++ if (getenv ("LD_FORCE_LE") != NULL)
++ {
++ if (strcmp (format, "elf64-powerpc") == 0)
++ format = "elf64-powerpcle";
++ else if (strcmp (format, "elf32-powerpc") == 0)
++ format = "elf32-powerpcle";
++ else if (strcmp (format, "elf64-big") == 0)
++ format = "elf64-little";
++ else if (strcmp (format, "elf32-big") == 0)
++ format = "elf32-little";
++ }
++
+ output_target = format;
+ }
+ }
+Only in ld: ldlang.c.orig
+diff -up ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
+--- a/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
++++ b/ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
+@@ -603,6 +603,18 @@
+ }
+ }
+
++ if ((strncmp (emulation, "elf64ppc", 8) == 0
++ || strncmp (emulation, "elf32ppc", 8) == 0)
++ && getenv ("LD_FORCE_LE") != NULL)
++ {
++ size_t len = strlen (emulation);
++ char *le = xmalloc (len + 2);
++ memcpy (le, emulation, 5);
++ le[5] = 'l';
++ memcpy (le + 6, emulation + 5, len - 4);
++ emulation = le;
++ }
++
+ return emulation;
+ }
+
+Only in ld: ldmain.c.orig
+Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
+Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
+Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
+Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
+Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
+Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir
diff --git a/source/d/binutils/patches/binutils-2.25-set-long-long.patch b/source/d/binutils/patches/binutils-2.25-set-long-long.patch
new file mode 100644
index 00000000..1ea74181
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.25-set-long-long.patch
@@ -0,0 +1,38 @@
+diff -up binutils-2.25.orig/bfd/configure.ac binutils-2.25/bfd/configure.ac
+--- binutils-2.25.orig/bfd/configure.ac 2014-12-24 10:34:45.590491143 +0000
++++ binutils-2.25/bfd/configure.ac 2014-12-24 10:36:12.997981992 +0000
+@@ -183,11 +183,13 @@ if test "x${ac_cv_sizeof_long}" = "x8";
+ BFD_HOST_64BIT_LONG=1
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
+-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
++fi
++if test "x${ac_cv_sizeof_long_long}" = "x8"; then
+ BFD_HOST_64BIT_LONG_LONG=1
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
+- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
++ if test "x${ac_cv_sizeof_void_p}" = "x8" \
++ -a "x${ac_cv_sizeof_long}" != "x8"; then
+ BFD_HOSTPTR_T="unsigned long long"
+ fi
+ fi
+diff -up ../binutils-2.20.51.0.7.original/bfd/configure ./bfd/configure
+--- a/bfd/configure 2010-04-08 15:23:58.000000000 +0100
++++ b/bfd/configure 2010-04-08 15:24:06.000000000 +0100
+@@ -12819,11 +12819,13 @@
+ BFD_HOST_64BIT_LONG=1
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long"
+-elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
++fi
++if test "x${ac_cv_sizeof_long_long}" = "x8"; then
+ BFD_HOST_64BIT_LONG_LONG=1
+ test -n "${HOST_64BIT_TYPE}" || HOST_64BIT_TYPE="long long"
+ test -n "${HOST_U_64BIT_TYPE}" || HOST_U_64BIT_TYPE="unsigned long long"
+- if test "x${ac_cv_sizeof_void_p}" = "x8"; then
++ if test "x${ac_cv_sizeof_void_p}" = "x8" \
++ -a "x${ac_cv_sizeof_long}" != "x8"; then
+ BFD_HOSTPTR_T="unsigned long long"
+ fi
+ fi
diff --git a/source/d/binutils/patches/binutils-2.25-version.patch b/source/d/binutils/patches/binutils-2.25-version.patch
new file mode 100644
index 00000000..d97e81bc
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.25-version.patch
@@ -0,0 +1,44 @@
+--- binutils-2.26.orig/bfd/Makefile.am 2016-01-25 10:11:33.505289018 +0000
++++ binutils-2.26/bfd/Makefile.am 2016-01-25 10:13:23.489964145 +0000
+@@ -1043,8 +1043,8 @@ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD
+ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
+ @echo "creating $@"
+ @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+- bfd_version_string="\"$(VERSION)\"" ;\
+- bfd_soversion="$(VERSION)" ;\
++ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
++ bfd_soversion="$(VERSION)-%{release}" ;\
+ bfd_version_package="\"$(PKGVERSION)\"" ;\
+ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
+ . $(srcdir)/development.sh ;\
+@@ -1055,7 +1055,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
+ fi ;\
+ $(SED) -e "s,@bfd_version@,$$bfd_version," \
+ -e "s,@bfd_version_string@,$$bfd_version_string," \
+- -e "s,@bfd_version_package@,$$bfd_version_package," \
++ -e "s,@bfd_version_package@,\"version \"," \
+ -e "s,@report_bugs_to@,$$report_bugs_to," \
+ < $(srcdir)/version.h > $@; \
+ echo "$${bfd_soversion}" > libtool-soversion
+--- binutils-2.26.orig/bfd/Makefile.in 2016-01-25 10:11:33.505289018 +0000
++++ binutils-2.26/bfd/Makefile.in 2016-01-25 10:14:17.818297941 +0000
+@@ -2111,8 +2111,8 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES)
+ bfdver.h: $(srcdir)/version.h $(srcdir)/development.sh $(srcdir)/Makefile.in
+ @echo "creating $@"
+ @bfd_version=`echo "$(VERSION)" | $(SED) -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
+- bfd_version_string="\"$(VERSION)\"" ;\
+- bfd_soversion="$(VERSION)" ;\
++ bfd_version_string="\"$(VERSION)-%{release}\"" ;\
++ bfd_soversion="$(VERSION)-%{release}" ;\
+ bfd_version_package="\"$(PKGVERSION)\"" ;\
+ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
+ . $(srcdir)/development.sh ;\
+@@ -2123,7 +2123,7 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/
+ fi ;\
+ $(SED) -e "s,@bfd_version@,$$bfd_version," \
+ -e "s,@bfd_version_string@,$$bfd_version_string," \
+- -e "s,@bfd_version_package@,$$bfd_version_package," \
++ -e "s,@bfd_version_package@,\"version \"," \
+ -e "s,@report_bugs_to@,$$report_bugs_to," \
+ < $(srcdir)/version.h > $@; \
+ echo "$${bfd_soversion}" > libtool-soversion
diff --git a/source/d/binutils/patches/binutils-2.25.1-cleansweep.patch b/source/d/binutils/patches/binutils-2.25.1-cleansweep.patch
new file mode 100644
index 00000000..2603d130
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.25.1-cleansweep.patch
@@ -0,0 +1,63 @@
+--- ../binutils-2.25.1.orig/ld/testsuite/ld-plugin/lto.exp 2016-01-08 15:24:58.241083264 +0000
++++ ld/testsuite/ld-plugin/lto.exp 2016-01-08 16:30:51.845827089 +0000
+@@ -386,6 +386,11 @@ if { [at_least_gcc_version 4 7] } {
+ }
+ }
+
++# Fedora specific binutils patches break some of the tests that follow...
++restore_notify
++return
++
++
+ # Run "ld -r" to generate inputs for complex LTO tests.
+ run_dump_test "lto-3r"
+ remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
+--- ../binutils-2.26.orig/ld/testsuite/ld-size/size.exp 2016-01-27 15:51:27.223093570 +0000
++++ ld/testsuite/ld-size/size.exp 2016-01-27 16:00:04.262015016 +0000
+@@ -113,37 +113,6 @@ run_cc_link_tests [list \
+ "libsize-6b.so" \
+ ] \
+ [list \
+- "Build libsize-7.so" \
+- "-shared" \
+- "-fPIC" \
+- {size-7b.c} \
+- {} \
+- "libsize-7.so" \
+- ] \
+- [list \
+- "Build size-7" \
+- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libsize-7.so" \
+- "$NOPIE_CFLAGS" \
+- {size-7a.c} \
+- {{readelf -rW size-7.rd}} \
+- "size-7.exe" \
+- ] \
+- [list \
+- "Build libsize-8.so" \
+- "-shared" "-fPIC" \
+- {size-8b.c} \
+- {} \
+- "libsize-8.so" \
+- ] \
+- [list \
+- "Build size-8" \
+- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libsize-8.so" \
+- "$NOPIE_CFLAGS" \
+- {size-8a.c} \
+- {{readelf -rW size-8.rd}} \
+- "size-8.exe" \
+- ] \
+- [list \
+ "Build libsize-9.so" \
+ "-shared" \
+ "-fPIC" \
+@@ -161,6 +130,8 @@ run_cc_link_tests [list \
+ ] \
+ ]
+
++return
++
+ # Check if size relocation works at run-time.
+ catch "exec tmpdir/size-7.exe > tmpdir/dump.out" exec_output
+ if ![string match "" $exec_output] then {
diff --git a/source/d/binutils/patches/binutils-2.26-Bsymbolic_PIE.patch b/source/d/binutils/patches/binutils-2.26-Bsymbolic_PIE.patch
new file mode 100644
index 00000000..552056a7
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.26-Bsymbolic_PIE.patch
@@ -0,0 +1,146 @@
+diff -upr binutils-2.26.orig/ld/ld.texinfo binutils-2.26/ld/ld.texinfo
+--- binutils-2.26.orig/ld/ld.texinfo 2016-02-16 10:45:43.245336561 +0000
++++ binutils-2.26/ld/ld.texinfo 2016-02-16 10:47:04.670763451 +0000
+@@ -1325,15 +1325,21 @@ libraries.
+ When creating a shared library, bind references to global symbols to the
+ definition within the shared library, if any. Normally, it is possible
+ for a program linked against a shared library to override the definition
+-within the shared library. This option is only meaningful on ELF
+-platforms which support shared libraries.
++within the shared library. This option can also be used with the
++@option{--export-dynamic} option, when creating a position independent
++executable, to bind references to global symbols to the definition within
++the executable. This option is only meaningful on ELF platforms which
++support shared libraries and position independent executables.
+
+ @kindex -Bsymbolic-functions
+ @item -Bsymbolic-functions
+ When creating a shared library, bind references to global function
+ symbols to the definition within the shared library, if any.
++This option can also be used with the @option{--export-dynamic} option,
++when creating a position independent executable, to bind references
++to global function symbols to the definition within the executable.
+ This option is only meaningful on ELF platforms which support shared
+-libraries.
++libraries and position independent executables.
+
+ @kindex --dynamic-list=@var{dynamic-list-file}
+ @item --dynamic-list=@var{dynamic-list-file}
+diff -upr binutils-2.26.orig/ld/lexsup.c binutils-2.26/ld/lexsup.c
+--- binutils-2.26.orig/ld/lexsup.c 2016-02-16 10:45:43.246336567 +0000
++++ binutils-2.26/ld/lexsup.c 2016-02-16 10:47:04.671763456 +0000
+@@ -1586,15 +1586,14 @@ parse_args (unsigned argc, char **argv)
+ /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
+ --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
+ --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
+- for shared libraries. -Bsymbolic overrides all others and vice
+- versa. */
++ for PIC outputs. -Bsymbolic overrides all others and vice versa. */
+ switch (command_line.symbolic)
+ {
+ case symbolic_unset:
+ break;
+ case symbolic:
+- /* -Bsymbolic is for shared library only. */
+- if (bfd_link_dll (&link_info))
++ /* -Bsymbolic is for PIC output only. */
++ if (bfd_link_pic (&link_info))
+ {
+ link_info.symbolic = TRUE;
+ /* Should we free the unused memory? */
+@@ -1603,8 +1602,8 @@ parse_args (unsigned argc, char **argv)
+ }
+ break;
+ case symbolic_functions:
+- /* -Bsymbolic-functions is for shared library only. */
+- if (bfd_link_dll (&link_info))
++ /* -Bsymbolic-functions is for PIC output only. */
++ if (bfd_link_pic (&link_info))
+ command_line.dynamic_list = dynamic_list_data;
+ break;
+ }
+diff -upr binutils-2.26.orig/ld/testsuite/ld-i386/i386.exp binutils-2.26/ld/testsuite/ld-i386/i386.exp
+--- binutils-2.26.orig/ld/testsuite/ld-i386/i386.exp 2016-02-16 10:45:43.319336949 +0000
++++ binutils-2.26/ld/testsuite/ld-i386/i386.exp 2016-02-16 10:47:04.672763461 +0000
+@@ -319,6 +319,7 @@ run_dump_test "load5a"
+ run_dump_test "load5b"
+ run_dump_test "load6"
+ run_dump_test "pr19175"
++run_dump_test "pr19615"
+
+ if { !([istarget "i?86-*-linux*"]
+ || [istarget "i?86-*-gnu*"]
+--- /dev/null 2016-02-16 08:27:18.513962320 +0000
++++ binutils-2.26/ld/testsuite/ld-i386/pr19615.s 2016-02-16 10:56:11.886632341 +0000
+@@ -0,0 +1,13 @@
++ .text
++ .globl _start
++ .type _start, @function
++_start:
++ ret
++
++ .globl xyzzy /* This symbol should be exported */
++ .type xyzzy, @function
++xyzzy:
++ ret
++
++ .section ".xyzzy_ptr","aw",%progbits
++ .dc.a xyzzy
+--- /dev/null 2016-02-16 08:27:18.513962320 +0000
++++ binutils-2.26/ld/testsuite/ld-i386/pr19615.d 2016-02-16 10:56:11.886632341 +0000
+@@ -0,0 +1,13 @@
++#as: --32
++#ld: -pie -Bsymbolic -E -melf_i386
++#readelf: -r --wide --dyn-syms
++
++Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
++ Offset Info Type Sym. Value Symbol's Name
++[0-9a-f]+ +[0-9a-f]+ +R_386_RELATIVE +
++
++Symbol table '.dynsym' contains [0-9]+ entries:
++ Num: Value Size Type Bind Vis Ndx Name
++#...
++[ ]*[a-f0-9]+: [a-f0-9]+ 0 FUNC GLOBAL DEFAULT [a-f0-9]+ xyzzy
++#...
+--- /dev/null 2016-02-16 08:27:18.513962320 +0000
++++ binutils-2.26/ld/testsuite/ld-x86-64/pr19615.s 2016-02-16 10:57:55.386174958 +0000
+@@ -0,0 +1,13 @@
++ .text
++ .globl _start
++ .type _start, @function
++_start:
++ ret
++
++ .globl xyzzy /* This symbol should be exported */
++ .type xyzzy, @function
++xyzzy:
++ ret
++
++ .section ".xyzzy_ptr","aw",%progbits
++ .dc.a xyzzy
+--- /dev/null 2016-02-16 08:27:18.513962320 +0000
++++ binutils-2.26/ld/testsuite/ld-x86-64/pr19615.d 2016-02-16 10:57:55.386174958 +0000
+@@ -0,0 +1,13 @@
++#as: --64
++#ld: -pie -Bsymbolic -E -melf_x86_64
++#readelf: -r --wide --dyn-syms
++
++Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
++ Offset Info Type Symbol's Value Symbol's Name \+ Addend
++[0-9a-f]+ +[0-9a-f]+ +R_X86_64_RELATIVE +[0-9]+
++
++Symbol table '.dynsym' contains [0-9]+ entries:
++ Num: Value Size Type Bind Vis Ndx Name
++#...
++[ ]*[a-f0-9]+: [a-f0-9]+ 0 FUNC GLOBAL DEFAULT [a-f0-9]+ xyzzy
++#...
+--- binutils-2.26.orig/ld/testsuite/ld-x86-64/x86-64.exp 2016-02-16 10:45:43.443337600 +0000
++++ binutils-2.26/ld/testsuite/ld-x86-64/x86-64.exp 2016-02-16 11:01:02.418162157 +0000
+@@ -353,6 +353,7 @@ run_dump_test "pr19013-x32"
+ run_dump_test "pr19013-nacl"
+ run_dump_test "pr19162"
+ run_dump_test "pr19175"
++run_dump_test "pr19615"
+
+ # Add $PLT_CFLAGS if PLT is expected.
+ global PLT_CFLAGS
diff --git a/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch b/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch
new file mode 100644
index 00000000..99e8b708
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.26-fix-GOT-offset-calculation.patch
@@ -0,0 +1,17 @@
+--- binutils-2.26.orig/bfd/elf32-i386.c 2016-02-29 15:47:45.172597805 +0000
++++ binutils-2.26/bfd/elf32-i386.c 2016-02-29 15:48:42.161904973 +0000
+@@ -4016,10 +4016,12 @@ elf_i386_relocate_section (bfd *output_b
+
+ /* It is relative to .got.plt section. */
+ if (h->got.offset != (bfd_vma) -1)
+- /* Use GOT entry. */
++ /* Use GOT entry. Mask off the least significant bit in
++ GOT offset which may be set by R_386_GOT32 processing
++ below. */
+ relocation = (htab->elf.sgot->output_section->vma
+ + htab->elf.sgot->output_offset
+- + h->got.offset - offplt);
++ + (h->got.offset & ~1) - offplt);
+ else
+ /* Use GOTPLT entry. */
+ relocation = (h->plt.offset / plt_entry_size - 1 + 3) * 4;
diff --git a/source/d/binutils/patches/binutils-2.26-fix-compile-warnings.patch b/source/d/binutils/patches/binutils-2.26-fix-compile-warnings.patch
new file mode 100644
index 00000000..0fa527c7
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.26-fix-compile-warnings.patch
@@ -0,0 +1,75 @@
+--- binutils-2.26.orig/gold/dirsearch.cc 2016-02-04 10:31:45.228796199 +0000
++++ binutils-2.26/gold/dirsearch.cc 2016-02-04 11:33:15.875824355 +0000
+@@ -122,6 +122,7 @@ class Dir_caches
+ Cache_hash caches_;
+ };
+
++#if 0
+ Dir_caches::~Dir_caches()
+ {
+ for (Cache_hash::iterator p = this->caches_.begin();
+@@ -129,6 +130,7 @@ Dir_caches::~Dir_caches()
+ ++p)
+ delete p->second;
+ }
++#endif
+
+ void
+ Dir_caches::add(const char* dirname)
+--- binutils-2.26.orig/gold/arm.cc 2016-02-04 10:31:45.227796193 +0000
++++ binutils-2.26/gold/arm.cc 2016-02-04 12:02:43.897996168 +0000
+@@ -4493,7 +4493,7 @@ Stub::do_fixed_endian_write(unsigned cha
+ // Reloc_stub::Key methods.
+
+ // Dump a Key as a string for debugging.
+-
++#if 0
+ std::string
+ Reloc_stub::Key::name() const
+ {
+@@ -4524,7 +4524,7 @@ Reloc_stub::Key::name() const
+ return std::string(buffer);
+ }
+ }
+-
++#endif
+ // Reloc_stub methods.
+
+ // Determine the type of stub needed, if any, for a relocation of R_TYPE at
+--- binutils-2.26.orig/gas/config/tc-arm.c 2016-02-04 10:31:44.893794316 +0000
++++ binutils-2.26/gas/config/tc-arm.c 2016-02-04 12:41:25.534564806 +0000
+@@ -155,10 +155,12 @@ static const arm_feature_set *object_arc
+
+ /* Constants for known architecture features. */
+ static const arm_feature_set fpu_default = FPU_DEFAULT;
+-static const arm_feature_set fpu_arch_vfp_v1 = FPU_ARCH_VFP_V1;
+ static const arm_feature_set fpu_arch_vfp_v2 = FPU_ARCH_VFP_V2;
++#if 0
++static const arm_feature_set fpu_arch_vfp_v1 = FPU_ARCH_VFP_V1;
+ static const arm_feature_set fpu_arch_vfp_v3 = FPU_ARCH_VFP_V3;
+ static const arm_feature_set fpu_arch_neon_v1 = FPU_ARCH_NEON_V1;
++#endif
+ static const arm_feature_set fpu_arch_fpa = FPU_ARCH_FPA;
+ static const arm_feature_set fpu_any_hard = FPU_ANY_HARD;
+ static const arm_feature_set fpu_arch_maverick = FPU_ARCH_MAVERICK;
+@@ -210,7 +212,9 @@ static const arm_feature_set arm_ext_vir
+ static const arm_feature_set arm_ext_pan = ARM_FEATURE_CORE_HIGH (ARM_EXT2_PAN);
+
+ static const arm_feature_set arm_arch_any = ARM_ANY;
++#if 0
+ static const arm_feature_set arm_arch_full = ARM_FEATURE (-1, -1, -1);
++#endif
+ static const arm_feature_set arm_arch_t2 = ARM_ARCH_THUMB2;
+ static const arm_feature_set arm_arch_none = ARM_ARCH_NONE;
+ static const arm_feature_set arm_arch_v6m_only = ARM_ARCH_V6M_ONLY;
+@@ -259,8 +263,10 @@ static const arm_feature_set fpu_crypto_
+ ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8);
+ static const arm_feature_set crc_ext_armv8 =
+ ARM_FEATURE_COPROC (CRC_EXT_ARMV8);
++#if 0
+ static const arm_feature_set fpu_neon_ext_v8_1 =
+ ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8 | FPU_NEON_EXT_RDMA);
++#endif
+
+ static int mfloat_abi_opt = -1;
+ /* Record user cpu selection for object attributes. */
diff --git a/source/d/binutils/patches/binutils-2.26-formatting.patch b/source/d/binutils/patches/binutils-2.26-formatting.patch
new file mode 100644
index 00000000..0eadb0c3
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.26-formatting.patch
@@ -0,0 +1,297 @@
+--- ../binutils-2.26.orig/bfd/coff-i386.c 2016-02-04 10:31:44.684793142 +0000
++++ bfd/coff-i386.c 2016-02-04 10:32:02.106891045 +0000
+@@ -139,41 +139,41 @@ coff_i386_reloc (bfd *abfd,
+ #define DOIT(x) \
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
+
+- if (diff != 0)
+- {
+- reloc_howto_type *howto = reloc_entry->howto;
+- unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++ if (diff != 0)
++ {
++ reloc_howto_type *howto = reloc_entry->howto;
++ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++
++ switch (howto->size)
++ {
++ case 0:
++ {
++ char x = bfd_get_8 (abfd, addr);
++ DOIT (x);
++ bfd_put_8 (abfd, x, addr);
++ }
++ break;
+
+- switch (howto->size)
++ case 1:
+ {
+- case 0:
+- {
+- char x = bfd_get_8 (abfd, addr);
+- DOIT (x);
+- bfd_put_8 (abfd, x, addr);
+- }
+- break;
+-
+- case 1:
+- {
+- short x = bfd_get_16 (abfd, addr);
+- DOIT (x);
+- bfd_put_16 (abfd, (bfd_vma) x, addr);
+- }
+- break;
+-
+- case 2:
+- {
+- long x = bfd_get_32 (abfd, addr);
+- DOIT (x);
+- bfd_put_32 (abfd, (bfd_vma) x, addr);
+- }
+- break;
++ short x = bfd_get_16 (abfd, addr);
++ DOIT (x);
++ bfd_put_16 (abfd, (bfd_vma) x, addr);
++ }
++ break;
+
+- default:
+- abort ();
++ case 2:
++ {
++ long x = bfd_get_32 (abfd, addr);
++ DOIT (x);
++ bfd_put_32 (abfd, (bfd_vma) x, addr);
+ }
+- }
++ break;
++
++ default:
++ abort ();
++ }
++ }
+
+ /* Now let bfd_perform_relocation finish everything up. */
+ return bfd_reloc_continue;
+--- ../binutils-2.26.orig/bfd/coff-x86_64.c 2016-02-04 10:31:44.686793153 +0000
++++ bfd/coff-x86_64.c 2016-02-04 10:33:02.044227862 +0000
+@@ -138,59 +138,61 @@ coff_amd64_reloc (bfd *abfd,
+ #define DOIT(x) \
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
+
+- if (diff != 0)
+- {
+- reloc_howto_type *howto = reloc_entry->howto;
+- unsigned char *addr = (unsigned char *) data + reloc_entry->address;
+-
+- /* FIXME: We do not have an end address for data, so we cannot
+- accurately range check any addresses computed against it.
+- cf: PR binutils/17512: file: 1085-1761-0.004.
+- For now we do the best that we can. */
+- if (addr < (unsigned char *) data || addr > ((unsigned char *) data) + input_section->size)
++ if (diff != 0)
++ {
++ reloc_howto_type *howto = reloc_entry->howto;
++ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++
++ /* FIXME: We do not have an end address for data, so we cannot
++ accurately range check any addresses computed against it.
++ cf: PR binutils/17512: file: 1085-1761-0.004.
++ For now we do the best that we can. */
++ if (addr < (unsigned char *) data
++ || addr > ((unsigned char *) data) + input_section->size)
++ {
++ bfd_set_error (bfd_error_bad_value);
++ return bfd_reloc_notsupported;
++ }
++
++ switch (howto->size)
++ {
++ case 0:
+ {
+- bfd_set_error (bfd_error_bad_value);
+- return bfd_reloc_notsupported;
++ char x = bfd_get_8 (abfd, addr);
++ DOIT (x);
++ bfd_put_8 (abfd, x, addr);
+ }
++ break;
+
+- switch (howto->size)
++ case 1:
+ {
+- case 0:
+- {
+- char x = bfd_get_8 (abfd, addr);
+- DOIT (x);
+- bfd_put_8 (abfd, x, addr);
+- }
+- break;
+-
+- case 1:
+- {
+- short x = bfd_get_16 (abfd, addr);
+- DOIT (x);
+- bfd_put_16 (abfd, (bfd_vma) x, addr);
+- }
+- break;
+-
+- case 2:
+- {
+- long x = bfd_get_32 (abfd, addr);
+- DOIT (x);
+- bfd_put_32 (abfd, (bfd_vma) x, addr);
+- }
+- break;
+- case 4:
+- {
+- long long x = bfd_get_64 (abfd, addr);
+- DOIT (x);
+- bfd_put_64 (abfd, (bfd_vma) x, addr);
+- }
+- break;
+-
+- default:
+- bfd_set_error (bfd_error_bad_value);
+- return bfd_reloc_notsupported;
++ short x = bfd_get_16 (abfd, addr);
++ DOIT (x);
++ bfd_put_16 (abfd, (bfd_vma) x, addr);
+ }
+- }
++ break;
++
++ case 2:
++ {
++ long x = bfd_get_32 (abfd, addr);
++ DOIT (x);
++ bfd_put_32 (abfd, (bfd_vma) x, addr);
++ }
++ break;
++
++ case 4:
++ {
++ long long x = bfd_get_64 (abfd, addr);
++ DOIT (x);
++ bfd_put_64 (abfd, (bfd_vma) x, addr);
++ }
++ break;
++
++ default:
++ bfd_set_error (bfd_error_bad_value);
++ return bfd_reloc_notsupported;
++ }
++ }
+
+ /* Now let bfd_perform_relocation finish everything up. */
+ return bfd_reloc_continue;
+--- ../binutils-2.26.orig/bfd/elf64-s390.c 2016-02-09 15:01:11.983640775 +0000
++++ bfd/elf64-s390.c 2016-02-09 15:01:37.675779605 +0000
+@@ -337,10 +337,10 @@ elf_s390_reloc_name_lookup (bfd *abfd AT
+ && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+ return &elf_howto_table[i];
+
+- if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
+- return &elf64_s390_vtinherit_howto;
+- if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
+- return &elf64_s390_vtentry_howto;
++ if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
++ return &elf64_s390_vtinherit_howto;
++ if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
++ return &elf64_s390_vtentry_howto;
+
+ return NULL;
+ }
+--- ../binutils-2.26.orig/bfd/pe-mips.c 2016-02-09 15:01:11.995640840 +0000
++++ bfd/pe-mips.c 2016-02-09 15:31:21.348317265 +0000
+@@ -95,44 +95,44 @@ coff_mips_reloc (bfd *abfd,
+ #define DOIT(x) \
+ x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + (diff >> howto->rightshift)) & howto->dst_mask))
+
+- if (diff != 0)
+- {
+- reloc_howto_type *howto = reloc_entry->howto;
+- unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++ if (diff != 0)
++ {
++ reloc_howto_type *howto = reloc_entry->howto;
++ unsigned char *addr = (unsigned char *) data + reloc_entry->address;
++
++ switch (howto->size)
++ {
++ case 0:
++ {
++ char x = bfd_get_8 (abfd, addr);
++
++ DOIT (x);
++ bfd_put_8 (abfd, x, addr);
++ }
++ break;
++
++ case 1:
++ {
++ short x = bfd_get_16 (abfd, addr);
++
++ DOIT (x);
++ bfd_put_16 (abfd, (bfd_vma) x, addr);
++ }
++ break;
+
+- switch (howto->size)
++ case 2:
+ {
+- case 0:
+- {
+- char x = bfd_get_8 (abfd, addr);
+-
+- DOIT (x);
+- bfd_put_8 (abfd, x, addr);
+- }
+- break;
+-
+- case 1:
+- {
+- short x = bfd_get_16 (abfd, addr);
+-
+- DOIT (x);
+- bfd_put_16 (abfd, (bfd_vma) x, addr);
+- }
+- break;
+-
+- case 2:
+- {
+- long x = bfd_get_32 (abfd, addr);
+-
+- DOIT (x);
+- bfd_put_32 (abfd, (bfd_vma) x, addr);
+- }
+- break;
++ long x = bfd_get_32 (abfd, addr);
+
+- default:
+- abort ();
++ DOIT (x);
++ bfd_put_32 (abfd, (bfd_vma) x, addr);
+ }
+- }
++ break;
++
++ default:
++ abort ();
++ }
++ }
+
+ /* Now let bfd_perform_relocation finish everything up. */
+ return bfd_reloc_continue;
+--- ../binutils-2.26.orig/gas/config/tc-ia64.c 2016-02-09 15:01:12.086641332 +0000
++++ gas/config/tc-ia64.c 2016-02-09 15:30:18.562003661 +0000
+@@ -4360,7 +4360,8 @@ dot_prologue (int dummy ATTRIBUTE_UNUSED
+ as_warn (_("Pointless use of zero first operand to .prologue"));
+ else
+ mask = e.X_add_number;
+- n = popcount (mask);
++
++ n = popcount (mask);
+
+ if (sep == ',')
+ parse_operand_and_eval (&e, 0);
diff --git a/source/d/binutils/patches/binutils-2.26-lto.patch b/source/d/binutils/patches/binutils-2.26-lto.patch
new file mode 100644
index 00000000..a20757b6
--- /dev/null
+++ b/source/d/binutils/patches/binutils-2.26-lto.patch
@@ -0,0 +1,2652 @@
+diff -rup binutils-2.26.orig/bfd/bfd.c binutils-2.26/bfd/bfd.c
+--- binutils-2.26.orig/bfd/bfd.c 2016-02-19 09:35:36.231000625 +0000
++++ binutils-2.26/bfd/bfd.c 2016-02-19 09:35:54.901106498 +0000
+@@ -57,6 +57,14 @@ CODE_FRAGMENT
+ . bfd_byte data[1];
+ . };
+ .
++.enum bfd_lto_object_type
++. {
++. lto_non_object,
++. lto_non_ir_object,
++. lto_ir_object,
++. lto_mixed_object
++. };
++.
+ .struct bfd
+ .{
+ . {* The filename the application opened the BFD with. *}
+@@ -227,6 +235,9 @@ CODE_FRAGMENT
+ . {* Set if this is a plugin output file. *}
+ . unsigned int lto_output : 1;
+ .
++. {* LTO object type. *}
++. ENUM_BITFIELD (bfd_lto_object_type) lto_type : 2;
++.
+ . {* Set to dummy BFD created when claimed by a compiler plug-in
+ . library. *}
+ . bfd *plugin_dummy_bfd;
+@@ -252,6 +263,9 @@ CODE_FRAGMENT
+ . {* The last section on the section list. *}
+ . struct bfd_section *section_last;
+ .
++. {* The object-only section on the section list. *}
++. struct bfd_section *object_only_section;
++.
+ . {* The number of sections. *}
+ . unsigned int section_count;
+ .
+@@ -2270,3 +2284,36 @@ bfd_convert_section_contents (bfd *ibfd,
+ *ptr_size = size;
+ return TRUE;
+ }
++
++/*
++FUNCTION
++ bfd_group_signature
++
++SYNOPSIS
++ asymbol *bfd_group_signature (asection *group, asymbol **isympp);
++
++DESCRIPTION
++ Return a pointer to the symbol used as a signature for GROUP.
++*/
++
++asymbol *
++bfd_group_signature (asection *group, asymbol **isympp)
++{
++ bfd *abfd = group->owner;
++ Elf_Internal_Shdr *ghdr;
++
++ if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
++ return NULL;
++
++ ghdr = &elf_section_data (group)->this_hdr;
++ if (ghdr->sh_link < elf_numsections (abfd))
++ {
++ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
++ Elf_Internal_Shdr *symhdr = elf_elfsections (abfd) [ghdr->sh_link];
++
++ if (symhdr->sh_type == SHT_SYMTAB
++ && ghdr->sh_info < symhdr->sh_size / bed->s->sizeof_sym)
++ return isympp[ghdr->sh_info - 1];
++ }
++ return NULL;
++}
+diff -rup binutils-2.26.orig/bfd/bfd-in2.h binutils-2.26/bfd/bfd-in2.h
+--- binutils-2.26.orig/bfd/bfd-in2.h 2016-02-19 09:35:36.280000903 +0000
++++ binutils-2.26/bfd/bfd-in2.h 2016-02-19 09:35:54.900106492 +0000
+@@ -1089,6 +1089,9 @@ struct bfd_section *bfd_create_gnu_debug
+ bfd_boolean bfd_fill_in_gnu_debuglink_section
+ (bfd *abfd, struct bfd_section *sect, const char *filename);
+
++const char *bfd_extract_object_only_section
++ (bfd *abfd);
++
+ /* Extracted from libbfd.c. */
+
+ /* Byte swapping macros for user section data. */
+@@ -1654,6 +1657,9 @@ extern asection _bfd_std_section[4];
+ #define BFD_COM_SECTION_NAME "*COM*"
+ #define BFD_IND_SECTION_NAME "*IND*"
+
++/* GNU object-only section name. */
++#define GNU_OBJECT_ONLY_SECTION_NAME ".gnu_object_only"
++
+ /* Pointer to the common section. */
+ #define bfd_com_section_ptr (&_bfd_std_section[0])
+ /* Pointer to the undefined section. */
+@@ -6511,6 +6517,14 @@ struct bfd_build_id
+ bfd_byte data[1];
+ };
+
++enum bfd_lto_object_type
++ {
++ lto_non_object,
++ lto_non_ir_object,
++ lto_ir_object,
++ lto_mixed_object
++ };
++
+ struct bfd
+ {
+ /* The filename the application opened the BFD with. */
+@@ -6681,6 +6695,9 @@ struct bfd
+ /* Set if this is a plugin output file. */
+ unsigned int lto_output : 1;
+
++ /* LTO object type. */
++ ENUM_BITFIELD (bfd_lto_object_type) lto_type : 2;
++
+ /* Set to dummy BFD created when claimed by a compiler plug-in
+ library. */
+ bfd *plugin_dummy_bfd;
+@@ -6706,6 +6723,9 @@ struct bfd
+ /* The last section on the section list. */
+ struct bfd_section *section_last;
+
++ /* The object-only section on the section list. */
++ struct bfd_section *object_only_section;
++
+ /* The number of sections. */
+ unsigned int section_count;
+
+@@ -7026,6 +7046,8 @@ bfd_boolean bfd_convert_section_contents
+ (bfd *ibfd, asection *isec, bfd *obfd,
+ bfd_byte **ptr, bfd_size_type *ptr_size);
+
++asymbol *bfd_group_signature (asection *group, asymbol **isympp);
++
+ /* Extracted from archive.c. */
+ symindex bfd_get_next_mapent
+ (bfd *abfd, symindex previous, carsym **sym);
+diff -rup binutils-2.26.orig/bfd/elf.c binutils-2.26/bfd/elf.c
+--- binutils-2.26.orig/bfd/elf.c 2016-02-19 09:35:36.280000903 +0000
++++ binutils-2.26/bfd/elf.c 2016-02-19 09:35:54.904106515 +0000
+@@ -2387,6 +2387,7 @@ static const struct bfd_elf_special_sect
+ { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".gnu.lto_"), -1, SHT_PROGBITS, SHF_EXCLUDE },
+ { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
++ { STRING_COMMA_LEN (".gnu_object_only"), 0, SHT_GNU_OBJECT_ONLY, SHF_EXCLUDE },
+ { STRING_COMMA_LEN (".gnu.version"), 0, SHT_GNU_versym, 0 },
+ { STRING_COMMA_LEN (".gnu.version_d"), 0, SHT_GNU_verdef, 0 },
+ { STRING_COMMA_LEN (".gnu.version_r"), 0, SHT_GNU_verneed, 0 },
+diff -rup binutils-2.26.orig/bfd/format.c binutils-2.26/bfd/format.c
+--- binutils-2.26.orig/bfd/format.c 2016-02-19 09:35:36.265000818 +0000
++++ binutils-2.26/bfd/format.c 2016-02-19 09:36:21.420256880 +0000
+@@ -46,6 +46,9 @@ SUBSECTION
+ #include "sysdep.h"
+ #include "bfd.h"
+ #include "libbfd.h"
++#if BFD_SUPPORTS_PLUGINS
++#include "plugin.h"
++#endif
+
+ /* IMPORT from targets.c. */
+ extern const size_t _bfd_target_vector_entries;
+@@ -179,6 +182,33 @@ bfd_preserve_finish (bfd *abfd ATTRIBUTE
+ preserve->marker = NULL;
+ }
+
++/* Set lto_type in ABFD. */
++
++static void
++bfd_set_lto_type (bfd *abfd)
++{
++ if (abfd->format == bfd_object
++ && abfd->lto_type == lto_non_object
++ && (abfd->flags & (DYNAMIC | EXEC_P)) == 0)
++ {
++ asection *sec;
++ enum bfd_lto_object_type type = lto_non_ir_object;
++ for (sec = abfd->sections; sec != NULL; sec = sec->next)
++ {
++ if (strcmp (sec->name, GNU_OBJECT_ONLY_SECTION_NAME) == 0)
++ {
++ type = lto_mixed_object;
++ abfd->object_only_section = sec;
++ break;
++ }
++ else if (type != lto_ir_object
++ && strncmp (sec->name, ".gnu.lto_", 9) == 0)
++ type = lto_ir_object;
++ }
++ abfd->lto_type = type;
++ }
++}
++
+ /*
+ FUNCTION
+ bfd_check_format_matches
+@@ -221,7 +251,10 @@ bfd_check_format_matches (bfd *abfd, bfd
+ }
+
+ if (abfd->format != bfd_unknown)
+- return abfd->format == format;
++ {
++ bfd_set_lto_type (abfd);
++ return abfd->format == format;
++ }
+
+ if (matching != NULL || *bfd_associated_vector != NULL)
+ {
+@@ -285,6 +318,13 @@ bfd_check_format_matches (bfd *abfd, bfd
+ || (*target)->match_priority > best_match)
+ continue;
+
++#if BFD_SUPPORTS_PLUGINS
++ /* If the plugin target is explicitly specified when a BFD file
++ is opened, don't check it twice. */
++ if (bfd_plugin_specified_p () && bfd_plugin_target_p (*target))
++ continue;
++#endif
++
+ /* If we already tried a match, the bfd is modified and may
+ have sections attached, which will confuse the next
+ _bfd_check_format call. */
+@@ -449,6 +489,8 @@ bfd_check_format_matches (bfd *abfd, bfd
+ if (matching_vector)
+ free (matching_vector);
+
++ bfd_set_lto_type (abfd);
++
+ /* File position has moved, BTW. */
+ return TRUE;
+ }
+diff -rup binutils-2.26.orig/bfd/opncls.c binutils-2.26/bfd/opncls.c
+--- binutils-2.26.orig/bfd/opncls.c 2016-02-19 09:35:36.281000909 +0000
++++ binutils-2.26/bfd/opncls.c 2016-02-19 09:35:54.905106520 +0000
+@@ -1717,3 +1717,69 @@ bfd_fill_in_gnu_debuglink_section (bfd *
+
+ return TRUE;
+ }
++
++/*
++FUNCTION
++ bfd_extract_object_only_section
++
++SYNOPSIS
++ const char *bfd_extract_object_only_section
++ (bfd *abfd);
++
++DESCRIPTION
++
++ Takes a @var{ABFD} and extract the .gnu_object_only section into
++ a temporary file.
++
++RETURNS
++ The name of the temporary file is returned if all is ok.
++ Otherwise <<NULL>> is returned and bfd_error is set.
++*/
++
++const char *
++bfd_extract_object_only_section (bfd *abfd)
++{
++ asection *sec = abfd->object_only_section;
++ const char *name;
++ FILE *file;
++ bfd_byte *memhunk = NULL;
++ size_t off, size;
++ bfd_error_type err;
++
++ /* Get a temporary object-only file. */
++ name = make_temp_file (".obj-only.o");
++
++ /* Open the object-only file. */
++ file = real_fopen (name, FOPEN_WB);
++ if (!bfd_get_full_section_contents (abfd, sec, &memhunk))
++ {
++ err = bfd_get_error ();
++
++loser:
++ free (memhunk);
++ fclose (file);
++ unlink (name);
++ bfd_set_error (err);
++ return NULL;
++ }
++
++ off = 0;
++ size = sec->size;
++ while (off != size)
++ {
++ size_t written, nwrite = size - off;
++
++ written = fwrite (memhunk + off, 1, nwrite, file);
++ if (written < nwrite && ferror (file))
++ {
++ err = bfd_error_system_call;
++ goto loser;
++ }
++
++ off += written;
++ }
++
++ free (memhunk);
++ fclose (file);
++ return name;
++}
+diff -rup binutils-2.26.orig/bfd/plugin.c binutils-2.26/bfd/plugin.c
+--- binutils-2.26.orig/bfd/plugin.c 2016-02-19 09:35:36.271000852 +0000
++++ binutils-2.26/bfd/plugin.c 2016-02-19 09:35:54.905106520 +0000
+@@ -130,6 +130,146 @@ register_claim_file (ld_plugin_claim_fil
+ return LDPS_OK;
+ }
+
++static asection bfd_plugin_fake_text_section
++ = BFD_FAKE_SECTION (bfd_plugin_fake_text_section, 0, 0, ".text", 0);
++static asection bfd_plugin_fake_common_section
++ = BFD_FAKE_SECTION (bfd_plugin_fake_common_section, SEC_IS_COMMON, 0,
++ NULL, 0);
++
++/* Get symbols from object only section. */
++
++static void
++bfd_plugin_get_symbols_in_object_only (bfd *abfd)
++{
++ struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data;
++ const char *object_only_file;
++ bfd *nbfd;
++ long storage;
++ long object_only_nsyms, added_nsyms, i;
++ asymbol **object_only_syms, **added_syms;
++
++ plugin_data->object_only_syms = NULL;
++ plugin_data->object_only_nsyms = 0;
++
++ if (abfd->sections == NULL && abfd->my_archive == NULL)
++ {
++ nbfd = bfd_openr (abfd->filename, NULL);
++ if (nbfd == NULL)
++ {
++ (*_bfd_error_handler)
++ (_("%s: failed to open to extract object only section: %s"),
++ abfd->filename, bfd_errmsg (bfd_get_error ()));
++ goto error_return;
++ }
++ else if (!bfd_check_format (nbfd, bfd_object))
++ {
++ /* There is no object only section if it isn't a bfd_object
++ file. */
++error_return:
++ bfd_close (nbfd);
++ return;
++ }
++ }
++ else
++ {
++ if (!bfd_check_format (abfd, bfd_object))
++ {
++ (*_bfd_error_handler)
++ (_("%B: invalid file to extract object only section: %s"),
++ abfd, bfd_errmsg (bfd_get_error ()));
++ return;
++ }
++ nbfd = abfd;
++ }
++
++ if (nbfd->lto_type == lto_mixed_object
++ && (nbfd->flags & HAS_SYMS) != 0)
++ {
++ object_only_file = bfd_extract_object_only_section (nbfd);
++ if (object_only_file == NULL)
++ (*_bfd_error_handler)
++ (_("%B: failed to extract object only section: %s"),
++ abfd, bfd_errmsg (bfd_get_error ()));
++ }
++ else
++ object_only_file = NULL;
++
++ /* Close the new bfd we just opened. */
++ if (nbfd != abfd)
++ bfd_close (nbfd);
++
++ /* Return if there is no object only section or there is no
++ symbol in object only section. */
++ if (!object_only_file)
++ return;
++
++ /* Open the file containing object only section. */
++ nbfd = bfd_openr (object_only_file, NULL);
++ if (!bfd_check_format (nbfd, bfd_object))
++ {
++ (*_bfd_error_handler)
++ (_("%B: failed to open object only section: %s"),
++ abfd, bfd_errmsg (bfd_get_error ()));
++ goto quit;
++ }
++
++ storage = bfd_get_symtab_upper_bound (nbfd);
++ if (storage <= 0)
++ {
++ if (storage < 0)
++ (*_bfd_error_handler)
++ (_("%B: failed to get symbol table in object only section: %s"),
++ abfd, bfd_errmsg (bfd_get_error ()));
++
++ goto quit;
++ }
++
++ object_only_syms = (asymbol **) bfd_malloc (storage);
++ object_only_nsyms = bfd_canonicalize_symtab (nbfd, object_only_syms);
++
++ /* FIXME: We waste some spaces if not all symbols are copied. */
++ added_syms = (asymbol **) bfd_alloc (abfd, storage);
++ added_nsyms = 0;
++
++ /* Copy only global symbols from object only section. */
++ for (i = 0; i < object_only_nsyms; i++)
++ {
++ asection *sec = object_only_syms[i]->section;
++ flagword flags = object_only_syms[i]->flags;
++ asymbol *s;
++
++ if (bfd_is_com_section (sec))
++ sec = &bfd_plugin_fake_common_section;
++ else if (bfd_is_und_section (sec))
++ ;
++ else if ((flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0)
++ sec = &bfd_plugin_fake_text_section;
++ else
++ continue;
++
++ s = bfd_alloc (abfd, sizeof (asymbol));
++ BFD_ASSERT (s);
++ added_syms[added_nsyms++] = s;
++
++ s->section = sec;
++ s->the_bfd = abfd;
++ s->name = xstrdup (object_only_syms[i]->name);
++ s->value = 0;
++ s->flags = flags;
++ s->udata.p = NULL;
++ }
++
++ plugin_data->object_only_syms = added_syms;
++ plugin_data->object_only_nsyms = added_nsyms;
++
++ free (object_only_syms);
++
++quit:
++ /* Close and remove the object only section file. */
++ bfd_close (nbfd);
++ unlink (object_only_file);
++}
++
+ static enum ld_plugin_status
+ add_symbols (void * handle,
+ int nsyms,
+@@ -142,10 +282,13 @@ add_symbols (void * handle,
+ plugin_data->nsyms = nsyms;
+ plugin_data->syms = syms;
+
+- if (nsyms != 0)
++ abfd->tdata.plugin_data = plugin_data;
++
++ bfd_plugin_get_symbols_in_object_only (abfd);
++
++ if ((nsyms + plugin_data->object_only_nsyms) != 0)
+ abfd->flags |= HAS_SYMS;
+
+- abfd->tdata.plugin_data = plugin_data;
+ return LDPS_OK;
+ }
+
+@@ -440,7 +583,8 @@ static long
+ bfd_plugin_get_symtab_upper_bound (bfd *abfd)
+ {
+ struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data;
+- long nsyms = plugin_data->nsyms;
++ /* Add symbols from object only section. */
++ long nsyms = plugin_data->nsyms + plugin_data->object_only_nsyms;
+
+ BFD_ASSERT (nsyms >= 0);
+
+@@ -474,12 +618,7 @@ bfd_plugin_canonicalize_symtab (bfd *abf
+ struct plugin_data_struct *plugin_data = abfd->tdata.plugin_data;
+ long nsyms = plugin_data->nsyms;
+ const struct ld_plugin_symbol *syms = plugin_data->syms;
+- static asection fake_section;
+- static asection fake_common_section;
+- int i;
+-
+- fake_section.name = ".text";
+- fake_common_section.flags = SEC_IS_COMMON;
++ int i, j;
+
+ for (i = 0; i < nsyms; i++)
+ {
+@@ -492,10 +631,11 @@ bfd_plugin_canonicalize_symtab (bfd *abf
+ s->name = syms[i].name;
+ s->value = 0;
+ s->flags = convert_flags (&syms[i]);
++ s->udata.p = NULL;
+ switch (syms[i].def)
+ {
+ case LDPK_COMMON:
+- s->section = &fake_common_section;
++ s->section = &bfd_plugin_fake_common_section;
+ break;
+ case LDPK_UNDEF:
+ case LDPK_WEAKUNDEF:
+@@ -503,15 +643,18 @@ bfd_plugin_canonicalize_symtab (bfd *abf
+ break;
+ case LDPK_DEF:
+ case LDPK_WEAKDEF:
+- s->section = &fake_section;
++ s->section = &bfd_plugin_fake_text_section;
+ break;
+ default:
+ BFD_ASSERT (0);
+ }
+-
+- s->udata.p = (void *) &syms[i];
+ }
+
++ /* Copy symbols from object only section. */
++ nsyms += plugin_data->object_only_nsyms;
++ for (j = 0; j < plugin_data->object_only_nsyms; j++, i++)
++ alocation[i] = plugin_data->object_only_syms[j];
++
+ return nsyms;
+ }
+
+diff -rup binutils-2.26.orig/bfd/plugin.h binutils-2.26/bfd/plugin.h
+--- binutils-2.26.orig/bfd/plugin.h 2016-02-19 09:35:36.271000852 +0000
++++ binutils-2.26/bfd/plugin.h 2016-02-19 09:35:54.906106526 +0000
+@@ -33,6 +33,8 @@ typedef struct plugin_data_struct
+ {
+ int nsyms;
+ const struct ld_plugin_symbol *syms;
++ int object_only_nsyms;
++ asymbol **object_only_syms;
+ }
+ plugin_data_struct;
+
+diff -rup binutils-2.26.orig/bfd/section.c binutils-2.26/bfd/section.c
+--- binutils-2.26.orig/bfd/section.c 2016-02-19 09:35:36.276000881 +0000
++++ binutils-2.26/bfd/section.c 2016-02-19 09:35:54.906106526 +0000
+@@ -588,6 +588,9 @@ CODE_FRAGMENT
+ .#define BFD_COM_SECTION_NAME "*COM*"
+ .#define BFD_IND_SECTION_NAME "*IND*"
+ .
++.{* GNU object-only section name. *}
++.#define GNU_OBJECT_ONLY_SECTION_NAME ".gnu_object_only"
++.
+ .{* Pointer to the common section. *}
+ .#define bfd_com_section_ptr (&_bfd_std_section[0])
+ .{* Pointer to the undefined section. *}
+diff -rup binutils-2.26.orig/binutils/objcopy.c binutils-2.26/binutils/objcopy.c
+--- binutils-2.26.orig/binutils/objcopy.c 2016-02-19 09:35:36.287000943 +0000
++++ binutils-2.26/binutils/objcopy.c 2016-02-19 09:35:54.908106537 +0000
+@@ -1108,30 +1108,6 @@ is_specified_symbol (const char *name, h
+ return htab_find (htab, name) != NULL;
+ }
+
+-/* Return a pointer to the symbol used as a signature for GROUP. */
+-
+-static asymbol *
+-group_signature (asection *group)
+-{
+- bfd *abfd = group->owner;
+- Elf_Internal_Shdr *ghdr;
+-
+- if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+- return NULL;
+-
+- ghdr = &elf_section_data (group)->this_hdr;
+- if (ghdr->sh_link < elf_numsections (abfd))
+- {
+- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+- Elf_Internal_Shdr *symhdr = elf_elfsections (abfd) [ghdr->sh_link];
+-
+- if (symhdr->sh_type == SHT_SYMTAB
+- && ghdr->sh_info < symhdr->sh_size / bed->s->sizeof_sym)
+- return isympp[ghdr->sh_info - 1];
+- }
+- return NULL;
+-}
+-
+ /* Return TRUE if the section is a DWO section. */
+
+ static bfd_boolean
+@@ -1237,7 +1213,7 @@ is_strip_section (bfd *abfd ATTRIBUTE_UN
+ /* PR binutils/3181
+ If we are going to strip the group signature symbol, then
+ strip the group section too. */
+- gsym = group_signature (sec);
++ gsym = bfd_group_signature (sec, isympp);
+ if (gsym != NULL)
+ gname = gsym->name;
+ else
+@@ -3091,7 +3067,7 @@ setup_section (bfd *ibfd, sec_ptr isecti
+
+ if ((isection->flags & SEC_GROUP) != 0)
+ {
+- asymbol *gsym = group_signature (isection);
++ asymbol *gsym = bfd_group_signature (isection, isympp);
+
+ if (gsym != NULL)
+ {
+diff -rup binutils-2.26.orig/binutils/readelf.c binutils-2.26/binutils/readelf.c
+--- binutils-2.26.orig/binutils/readelf.c 2016-02-19 09:35:36.295000988 +0000
++++ binutils-2.26/binutils/readelf.c 2016-02-19 09:35:54.911106554 +0000
+@@ -3900,6 +3900,7 @@ get_section_type_name (unsigned int sh_t
+ case 0x7ffffffd: return "AUXILIARY";
+ case 0x7fffffff: return "FILTER";
+ case SHT_GNU_LIBLIST: return "GNU_LIBLIST";
++ case SHT_GNU_OBJECT_ONLY: return "GNU_OBJECT_ONLY";
+
+ default:
+ if ((sh_type >= SHT_LOPROC) && (sh_type <= SHT_HIPROC))
+diff -rup binutils-2.26.orig/gas/testsuite/gas/elf/section9.d binutils-2.26/gas/testsuite/gas/elf/section9.d
+--- binutils-2.26.orig/gas/testsuite/gas/elf/section9.d 2016-02-19 09:35:36.397001567 +0000
++++ binutils-2.26/gas/testsuite/gas/elf/section9.d 2016-02-19 09:35:54.912106560 +0000
+@@ -4,4 +4,5 @@
+ #...
+ [ ]*\[.*\][ ]+\.gnu\.lto_main[ ]+PROGBITS.*[ ]+E[ ]+.*
+ [ ]*\[.*\][ ]+\.gnu\.lto_\.pureconst[ ]+PROGBITS.*[ ]+E[ ]+.*
++[ ]*\[.*\][ ]+\.gnu_object_only[ ]+GNU_OBJECT_ONLY.*[ ]+E[ ]+.*
+ #pass
+diff -rup binutils-2.26.orig/gas/testsuite/gas/elf/section9.s binutils-2.26/gas/testsuite/gas/elf/section9.s
+--- binutils-2.26.orig/gas/testsuite/gas/elf/section9.s 2016-02-19 09:35:36.397001567 +0000
++++ binutils-2.26/gas/testsuite/gas/elf/section9.s 2016-02-19 09:35:54.912106560 +0000
+@@ -2,3 +2,5 @@
+ .byte 0,0,0,0
+ .section .gnu.lto_.pureconst,"",%progbits
+ .byte 0,0,0,0
++ .section .gnu_object_only
++ .byte 0,0,0,0
+diff -rup binutils-2.26.orig/include/bfdlink.h binutils-2.26/include/bfdlink.h
+--- binutils-2.26.orig/include/bfdlink.h 2016-02-19 09:35:36.672003126 +0000
++++ binutils-2.26/include/bfdlink.h 2016-02-19 09:35:54.913106566 +0000
+@@ -400,6 +400,12 @@ struct bfd_link_info
+ /* TRUE if ok to have multiple definition. */
+ unsigned int allow_multiple_definition: 1;
+
++ /* TRUE if .gnu_object_only section should be created. */
++ unsigned int emit_gnu_object_only: 1;
++
++ /* TRUE if .gnu_object_only section is being created. */
++ unsigned int emitting_gnu_object_only: 1;
++
+ /* TRUE if ok to have version with no definition. */
+ unsigned int allow_undefined_version: 1;
+
+diff -rup binutils-2.26.orig/include/elf/common.h binutils-2.26/include/elf/common.h
+--- binutils-2.26.orig/include/elf/common.h 2016-02-19 09:35:36.675003143 +0000
++++ binutils-2.26/include/elf/common.h 2016-02-19 09:35:54.913106566 +0000
+@@ -478,6 +478,7 @@
+ #define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */
+ #define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */
+ #define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
++#define SHT_GNU_OBJECT_ONLY 0x6ffffff8 /* Object only */
+
+ /* The next three section types are defined by Solaris, and are named
+ SHT_SUNW*. We use them in GNU code, so we also define SHT_GNU*
+diff -rup binutils-2.26.orig/ld/emultempl/aarch64elf.em binutils-2.26/ld/emultempl/aarch64elf.em
+--- binutils-2.26.orig/ld/emultempl/aarch64elf.em 2016-02-19 09:35:36.698003274 +0000
++++ binutils-2.26/ld/emultempl/aarch64elf.em 2016-02-19 09:35:54.914106571 +0000
+@@ -271,7 +271,7 @@ gld${EMULATION_NAME}_after_allocation (v
+ }
+
+ static void
+-gld${EMULATION_NAME}_finish (void)
++aarch64_finish (void)
+ {
+ if (!bfd_link_relocatable (&link_info))
+ {
+@@ -283,7 +283,7 @@ gld${EMULATION_NAME}_finish (void)
+ }
+ }
+
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+
+ /* This is a convenient point to tell BFD about target specific flags.
+@@ -435,4 +435,4 @@ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=
+ LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
+
+ # Call the extra arm-elf function
+-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
++LDEMUL_FINISH=aarch64_finish
+diff -rup binutils-2.26.orig/ld/emultempl/alphaelf.em binutils-2.26/ld/emultempl/alphaelf.em
+--- binutils-2.26.orig/ld/emultempl/alphaelf.em 2016-02-19 09:35:36.698003274 +0000
++++ binutils-2.26/ld/emultempl/alphaelf.em 2016-02-19 09:35:54.914106571 +0000
+@@ -104,7 +104,7 @@ alpha_finish (void)
+ if (limit_32bit)
+ elf_elfheader (link_info.output_bfd)->e_flags |= EF_ALPHA_32BIT;
+
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+ EOF
+
+diff -rup binutils-2.26.orig/ld/emultempl/armelf.em binutils-2.26/ld/emultempl/armelf.em
+--- binutils-2.26.orig/ld/emultempl/armelf.em 2016-02-19 09:35:36.698003274 +0000
++++ binutils-2.26/ld/emultempl/armelf.em 2016-02-19 09:35:54.914106571 +0000
+@@ -377,7 +377,7 @@ gld${EMULATION_NAME}_after_allocation (v
+ }
+
+ static void
+-gld${EMULATION_NAME}_finish (void)
++arm_finish (void)
+ {
+ struct bfd_link_hash_entry * h;
+
+@@ -404,7 +404,7 @@ gld${EMULATION_NAME}_finish (void)
+ }
+ }
+
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+
+ if (thumb_entry_symbol)
+ {
+@@ -730,4 +730,4 @@ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=
+ LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
+
+ # Call the extra arm-elf function
+-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
++LDEMUL_FINISH=arm_finish
+diff -rup binutils-2.26.orig/ld/emultempl/avrelf.em binutils-2.26/ld/emultempl/avrelf.em
+--- binutils-2.26.orig/ld/emultempl/avrelf.em 2016-02-19 09:35:36.698003274 +0000
++++ binutils-2.26/ld/emultempl/avrelf.em 2016-02-19 09:35:54.915106577 +0000
+@@ -209,7 +209,7 @@ avr_finish (void)
+ else
+ elf_elfheader (abfd)->e_flags &= ~EF_AVR_LINKRELAX_PREPARED;
+
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+ EOF
+
+diff -rup binutils-2.26.orig/ld/emultempl/elf32.em binutils-2.26/ld/emultempl/elf32.em
+--- binutils-2.26.orig/ld/emultempl/elf32.em 2016-02-19 09:35:36.700003285 +0000
++++ binutils-2.26/ld/emultempl/elf32.em 2016-02-19 09:35:54.915106577 +0000
+@@ -66,6 +66,7 @@ static void gld${EMULATION_NAME}_before_
+ static void gld${EMULATION_NAME}_after_allocation (void);
+ static lang_output_section_statement_type *gld${EMULATION_NAME}_place_orphan
+ (asection *, const char *, int);
++static void gld${EMULATION_NAME}_finish (void);
+ EOF
+
+ if [ "x${USE_LIBPATH}" = xyes ] ; then
+@@ -1795,6 +1796,8 @@ output_rel_find (asection *sec, int isdy
+ return last;
+ }
+
++static int orphan_init_done = 0;
++
+ /* Place an orphan section. We use this to put random SHF_ALLOC
+ sections in the right segment. */
+
+@@ -1803,7 +1806,7 @@ gld${EMULATION_NAME}_place_orphan (asect
+ const char *secname,
+ int constraint)
+ {
+- static struct orphan_save hold[] =
++ static struct orphan_save orig_hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+@@ -1833,6 +1836,7 @@ gld${EMULATION_NAME}_place_orphan (asect
+ SEC_HAS_CONTENTS,
+ 0, 0, 0, 0 },
+ };
++ static struct orphan_save hold[ARRAY_SIZE (orig_hold)];
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+@@ -1845,7 +1849,6 @@ gld${EMULATION_NAME}_place_orphan (asect
+ orphan_sdata,
+ orphan_nonalloc
+ };
+- static int orphan_init_done = 0;
+ struct orphan_save *place;
+ lang_output_section_statement_type *after;
+ lang_output_section_statement_type *os;
+@@ -1924,15 +1927,22 @@ gld${EMULATION_NAME}_place_orphan (asect
+
+ if (!orphan_init_done)
+ {
+- struct orphan_save *ho;
++ struct orphan_save *ho, *horig;
+
+ for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
++ for (ho = hold, horig = orig_hold;
++ ho < hold + ARRAY_SIZE (hold);
++ ++ho, ++horig)
++ {
++ *ho = *horig;
++ if (ho->name != NULL)
+ if (ho->name != NULL)
+ {
+ ho->os = lang_output_section_find (ho->name);
+ if (ho->os != NULL && ho->os->flags == 0)
+ ho->os->flags = ho->flags;
+ }
++ }
+ orphan_init_done = 1;
+ }
+
+@@ -2017,6 +2027,27 @@ gld${EMULATION_NAME}_place_orphan (asect
+ EOF
+ fi
+
++fragment <<EOF
++
++/* Final emulation specific call. */
++
++static void
++gld${EMULATION_NAME}_finish (void)
++{
++EOF
++if test x"$LDEMUL_PLACE_ORPHAN" != xgld"$EMULATION_NAME"_place_orphan; then
++fragment <<EOF
++ /* Support the object-only output. */
++ if (link_info.emit_gnu_object_only)
++ orphan_init_done = 0;
++
++EOF
++fi
++fragment <<EOF
++ finish_default ();
++}
++EOF
++
+ if test x"$LDEMUL_AFTER_ALLOCATION" != xgld"$EMULATION_NAME"_after_allocation; then
+ fragment <<EOF
+
+@@ -2503,7 +2534,7 @@ struct ld_emulation_xfer_struct ld_${EMU
+ ${LDEMUL_GET_SCRIPT-gld${EMULATION_NAME}_get_script},
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+- ${LDEMUL_FINISH-finish_default},
++ ${LDEMUL_FINISH-gld${EMULATION_NAME}_finish},
+ ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
+ ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-gld${EMULATION_NAME}_open_dynamic_archive},
+ ${LDEMUL_PLACE_ORPHAN-gld${EMULATION_NAME}_place_orphan},
+diff -rup binutils-2.26.orig/ld/emultempl/ppc32elf.em binutils-2.26/ld/emultempl/ppc32elf.em
+--- binutils-2.26.orig/ld/emultempl/ppc32elf.em 2016-02-19 09:35:36.699003279 +0000
++++ binutils-2.26/ld/emultempl/ppc32elf.em 2016-02-19 09:35:54.916106583 +0000
+@@ -215,7 +215,7 @@ ppc_finish (void)
+ {
+ if (params.ppc476_workaround)
+ lang_for_each_statement (no_zero_padding);
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+
+ EOF
+diff -rup binutils-2.26.orig/ld/emultempl/ppc64elf.em binutils-2.26/ld/emultempl/ppc64elf.em
+--- binutils-2.26.orig/ld/emultempl/ppc64elf.em 2016-02-19 09:35:36.699003279 +0000
++++ binutils-2.26/ld/emultempl/ppc64elf.em 2016-02-19 09:35:54.916106583 +0000
+@@ -562,7 +562,7 @@ gld${EMULATION_NAME}_after_allocation (v
+ /* Final emulation specific call. */
+
+ static void
+-gld${EMULATION_NAME}_finish (void)
++ppc_finish (void)
+ {
+ char *msg = NULL;
+ char *line, *endline;
+@@ -594,7 +594,7 @@ gld${EMULATION_NAME}_finish (void)
+ free (msg);
+
+ ppc64_elf_restore_symbols (&link_info);
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+
+
+@@ -928,4 +928,4 @@ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=
+ LDEMUL_AFTER_OPEN=ppc_after_open
+ LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
+ LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
+-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
++LDEMUL_FINISH=ppc_finish
+diff -rup binutils-2.26.orig/ld/emultempl/spuelf.em binutils-2.26/ld/emultempl/spuelf.em
+--- binutils-2.26.orig/ld/emultempl/spuelf.em 2016-02-19 09:35:36.699003279 +0000
++++ binutils-2.26/ld/emultempl/spuelf.em 2016-02-19 09:35:54.916106583 +0000
+@@ -416,7 +416,7 @@ spu_elf_relink (void)
+ /* Final emulation specific call. */
+
+ static void
+-gld${EMULATION_NAME}_finish (void)
++spu_finish (void)
+ {
+ if (is_spu_target ())
+ {
+@@ -432,7 +432,7 @@ gld${EMULATION_NAME}_finish (void)
+ einfo ("%P: --auto-overlay ignored with zero local store range\n");
+ }
+
+- finish_default ();
++ gld${EMULATION_NAME}_finish ();
+ }
+
+ static char *
+@@ -832,5 +832,5 @@ PARSE_AND_LIST_ARGS_CASES='
+
+ LDEMUL_AFTER_OPEN=spu_after_open
+ LDEMUL_BEFORE_ALLOCATION=spu_before_allocation
+-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
++LDEMUL_FINISH=spu_finish
+ LDEMUL_CHOOSE_TARGET=gld${EMULATION_NAME}_choose_target
+diff -rup binutils-2.26.orig/ld/ldexp.c binutils-2.26/ld/ldexp.c
+--- binutils-2.26.orig/ld/ldexp.c 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldexp.c 2016-02-19 09:35:54.917106588 +0000
+@@ -1616,14 +1616,15 @@ align_n (bfd_vma value, bfd_vma align)
+ }
+
+ void
+-ldexp_init (void)
++ldexp_init (bfd_boolean object_only)
+ {
+ /* The value "13" is ad-hoc, somewhat related to the expected number of
+ assignments in a linker script. */
+- if (!bfd_hash_table_init_n (&definedness_table,
+- definedness_newfunc,
+- sizeof (struct definedness_hash_entry),
+- 13))
++ if (!object_only
++ && !bfd_hash_table_init_n (&definedness_table,
++ definedness_newfunc,
++ sizeof (struct definedness_hash_entry),
++ 13))
+ einfo (_("%P%F: can not create hash table: %E\n"));
+ }
+
+@@ -1658,7 +1659,8 @@ ldexp_finalize_syms (void)
+ }
+
+ void
+-ldexp_finish (void)
++ldexp_finish (bfd_boolean object_only)
+ {
+- bfd_hash_table_free (&definedness_table);
++ if (!object_only)
++ bfd_hash_table_free (&definedness_table);
+ }
+diff -rup binutils-2.26.orig/ld/ldexp.h binutils-2.26/ld/ldexp.h
+--- binutils-2.26.orig/ld/ldexp.h 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldexp.h 2016-02-19 09:35:54.917106588 +0000
+@@ -229,8 +229,8 @@ fill_type *exp_get_fill
+ (etree_type *, fill_type *, char *);
+ bfd_vma exp_get_abs_int
+ (etree_type *, int, char *);
+-void ldexp_init (void);
++void ldexp_init (bfd_boolean);
+ void ldexp_finalize_syms (void);
+-void ldexp_finish (void);
++void ldexp_finish (bfd_boolean);
+
+ #endif
+diff -rup binutils-2.26.orig/ld/ldfile.c binutils-2.26/ld/ldfile.c
+--- binutils-2.26.orig/ld/ldfile.c 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldfile.c 2016-02-19 09:35:54.918106594 +0000
+@@ -313,7 +313,9 @@ success:
+ && !no_more_claiming
+ && bfd_check_format (entry->the_bfd, bfd_object))
+ plugin_maybe_claim (entry);
++ else
+ #endif /* ENABLE_PLUGINS */
++ cmdline_check_object_only_section (entry->the_bfd, FALSE);
+
+ /* It opened OK, the format checked out, and the plugins have had
+ their chance to claim it, so this is success. */
+diff -rup binutils-2.26.orig/ld/ldlang.c binutils-2.26/ld/ldlang.c
+--- binutils-2.26.orig/ld/ldlang.c 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldlang.c 2016-02-19 09:35:54.921106611 +0000
+@@ -36,6 +36,7 @@
+ #include "ldctor.h"
+ #include "ldfile.h"
+ #include "ldemul.h"
++#include "ldwrite.h"
+ #include "fnmatch.h"
+ #include "demangle.h"
+ #include "hashtab.h"
+@@ -45,6 +46,9 @@
+ #include "plugin.h"
+ #endif /* ENABLE_PLUGINS */
+
++/* FIXME: Put it here to avoid NAME conflict from ldgram.h. */
++#include "elf-bfd.h"
++
+ #ifndef offsetof
+ #define offsetof(TYPE, MEMBER) ((size_t) & (((TYPE*) 0)->MEMBER))
+ #endif
+@@ -68,6 +72,9 @@ static lang_statement_list_type *stat_sa
+ static lang_statement_list_type **stat_save_ptr = &stat_save[0];
+ static struct unique_sections *unique_section_list;
+ static struct asneeded_minfo *asneeded_list_head;
++static cmdline_list_type cmdline_object_only_file_list;
++static cmdline_list_type cmdline_object_only_archive_list;
++static cmdline_list_type cmdline_temp_object_only_list;
+
+ /* Forward declarations. */
+ static void exp_init_os (etree_type *);
+@@ -86,6 +93,10 @@ static void lang_do_version_exports_sect
+ static void lang_finalize_version_expr_head
+ (struct bfd_elf_version_expr_head *);
+ static void lang_do_memory_regions (void);
++static void cmdline_lists_init (void);
++static void cmdline_get_object_only_input_files (void);
++static void print_cmdline_list (cmdline_union_type *);
++static bfd_boolean cmdline_on_object_only_archive_list_p (bfd *);
+
+ /* Exported variables. */
+ const char *output_target;
+@@ -1219,14 +1230,17 @@ output_section_statement_table_free (voi
+ /* Build enough state so that the parser can build its tree. */
+
+ void
+-lang_init (void)
++lang_init (bfd_boolean object_only)
+ {
+- obstack_begin (&stat_obstack, 1000);
++ if (!object_only)
++ obstack_begin (&stat_obstack, 1000);
+
+ stat_ptr = &statement_list;
+
+ output_section_statement_table_init ();
+
++ cmdline_lists_init ();
++
+ lang_list_init (stat_ptr);
+
+ lang_list_init (&input_file_chain);
+@@ -2843,6 +2857,12 @@ load_symbols (lang_input_statement_type
+ loaded = FALSE;
+ }
+
++ if (link_info.emitting_gnu_object_only)
++ {
++ if (!cmdline_on_object_only_archive_list_p (member))
++ continue;
++ }
++
+ subsbfd = member;
+ if (!(*link_info.callbacks
+ ->add_archive_element) (&link_info, member,
+@@ -6780,7 +6800,38 @@ lang_process (void)
+ open_input_bfds (statement_list.head, OPEN_BFD_RESCAN);
+ }
+ }
++ else
+ #endif /* ENABLE_PLUGINS */
++ if (bfd_link_relocatable (&link_info))
++ {
++ /* Check if .gnu_object_only section should be created. */
++ bfd *p;
++ int object_type;
++
++ object_type = 0;
++ for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link.next)
++ {
++ object_type |= 1 << p->lto_type;
++ if ((object_type & (1 << lto_mixed_object)) != 0
++ || ((object_type
++ & (1 << lto_non_ir_object
++ | 1 << lto_ir_object))
++ == (1 << lto_non_ir_object | 1 << lto_ir_object)))
++ {
++ link_info.emit_gnu_object_only = TRUE;
++ break;
++ }
++ }
++
++ if (verbose
++ && (cmdline_object_only_file_list.head
++ || cmdline_object_only_archive_list.head))
++ {
++ info_msg (_("Object-only input files:\n "));
++ print_cmdline_list (cmdline_object_only_file_list.head);
++ print_cmdline_list (cmdline_object_only_archive_list.head);
++ }
++ }
+
+ link_info.gc_sym_list = &entry_symbol;
+ if (entry_symbol.name == NULL)
+@@ -8275,3 +8326,965 @@ lang_print_memory_usage (void)
+ printf (" %6.2f%%\n", percent);
+ }
+ }
++
++static void
++cmdline_lists_init (void)
++{
++ cmdline_object_only_file_list.tail
++ = &cmdline_object_only_file_list.head;
++ cmdline_object_only_archive_list.tail
++ = &cmdline_object_only_archive_list.head;
++ cmdline_temp_object_only_list.tail
++ = &cmdline_temp_object_only_list.head;
++}
++
++/* Allocate an item with TYPE and DATA. */
++
++static cmdline_union_type *
++cmdline_list_new (cmdline_enum_type type, void *data)
++{
++ cmdline_union_type *new_opt;
++
++ new_opt = (cmdline_union_type *) stat_alloc (sizeof (*new_opt));
++ new_opt->header.type = type;
++ switch (type)
++ {
++ default:
++ break;
++ case cmdline_is_file_enum:
++ new_opt->file.filename = (const char *) data;
++ break;
++ case cmdline_is_bfd_enum:
++ new_opt->abfd.abfd = (bfd *) data;
++ break;
++ }
++ return new_opt;
++}
++
++/* Append an item with TYPE and DATA to LIST. */
++
++static void
++cmdline_list_append (cmdline_list_type *list, cmdline_enum_type type,
++ void *data)
++{
++ cmdline_union_type *new_opt = cmdline_list_new (type, data);
++ new_opt->header.next = NULL;
++ *list->tail = new_opt;
++ list->tail = &new_opt->header.next;
++}
++
++static void
++print_cmdline_list (cmdline_union_type *c)
++{
++ for (; c != NULL; c = c->header.next)
++ switch (c->header.type)
++ {
++ default:
++ abort ();
++ case cmdline_is_file_enum:
++ info_msg (" %s", c->file.filename);
++ break;
++ case cmdline_is_bfd_enum:
++ info_msg (" [%B]", c->abfd.abfd);
++ break;
++ }
++
++ info_msg ("\n");
++}
++
++/* Return TRUE if ABFD is on cmdline_object_only_archive_list. */
++
++static bfd_boolean
++cmdline_on_object_only_archive_list_p (bfd *abfd)
++{
++ cmdline_union_type *c, *next;
++ bfd *archive, *obfd, *oarchive;
++ ufile_ptr origin = abfd->origin;
++
++ archive = bfd_my_archive (abfd);
++ for (c = cmdline_object_only_archive_list.head; c != NULL; c = next)
++ {
++ if (c->header.type != cmdline_is_bfd_enum)
++ abort ();
++
++ next = c->header.next;
++ obfd = c->abfd.abfd;
++ oarchive = bfd_my_archive (obfd);
++
++ /* The list is grouped by archive file name and sorted by member
++ origin. */
++ if (strcmp (archive->filename, oarchive->filename) != 0)
++ continue;
++
++ if (origin == obfd->origin)
++ return TRUE;
++ else if (origin < obfd->origin)
++ return FALSE;
++ }
++
++ return FALSE;
++}
++
++/* Append an item with TYPE and DATA to cmdline_object_only_file_list
++ or cmdline_object_only_archive_list if needed. */
++
++static void
++cmdline_object_only_list_append (cmdline_enum_type type, void *data)
++{
++ cmdline_union_type *c;
++ cmdline_union_type *new_opt, *next, **prev;
++ bfd *abfd, *archive;
++ bfd *obfd, *oarchive;
++ bfd *nbfd, *narchive;
++ ufile_ptr origin, norigin;
++
++ /* Put it on cmdline_object_only_file_list if it isn't an archive
++ member. */
++ switch (type)
++ {
++ default:
++ abort ();
++ case cmdline_is_bfd_enum:
++ abfd = (bfd *) data;
++ archive = bfd_my_archive (abfd);
++ if (archive)
++ break;
++ case cmdline_is_file_enum:
++ cmdline_list_append (&cmdline_object_only_file_list, type, data);
++ return;
++ }
++
++ /* Put archive member on cmdline_object_only_archive_list and sort
++ the list by archive name and archive member origin. */
++ new_opt = (cmdline_union_type *) stat_alloc (sizeof (*new_opt));
++ new_opt->header.type = cmdline_is_bfd_enum;
++ new_opt->header.next = NULL;
++ new_opt->abfd.abfd = (bfd *) data;
++
++ c = cmdline_object_only_archive_list.head;
++ if (c == NULL)
++ {
++ cmdline_object_only_archive_list.head = new_opt;
++ cmdline_object_only_archive_list.tail = &new_opt->header.next;
++ return;
++ }
++
++ prev = NULL;
++ origin = abfd->origin;
++ for (; c != NULL; c = next)
++ {
++ if (c->header.type != cmdline_is_bfd_enum)
++ abort ();
++
++ next = c->header.next;
++
++ obfd = c->abfd.abfd;
++ oarchive = bfd_my_archive (obfd);
++
++ if (strcmp (archive->filename, oarchive->filename) == 0)
++ {
++ bfd_boolean after;
++
++ if (origin < obfd->origin)
++ {
++ /* Insert it before the current. */
++ new_opt->header.next = c;
++ if (prev)
++ *prev = new_opt;
++ else
++ cmdline_object_only_archive_list.head = new_opt;
++ return;
++ }
++
++ after = TRUE;
++
++ /* Check origin. */
++ while (next)
++ {
++ if (next->header.type != cmdline_is_bfd_enum)
++ abort ();
++
++ nbfd = next->abfd.abfd;
++ norigin = nbfd->origin;
++ if (origin > norigin)
++ {
++ /* Insert it after NEXT. */
++ break;
++ }
++
++ narchive = bfd_my_archive (nbfd);
++ if (strcmp (archive->filename, narchive->filename) != 0)
++ {
++ /* Insert it befor NEXT. */
++ after = FALSE;
++ break;
++ }
++
++ c = next;
++ next = next->header.next;
++ }
++
++ if (after && next)
++ {
++ c = next;
++ next = next->header.next;
++ }
++
++ if (*cmdline_object_only_archive_list.tail == c->header.next)
++ cmdline_object_only_archive_list.tail
++ = &new_opt->header.next;
++
++ prev = &c->header.next;
++ new_opt->header.next = next;
++ *prev = new_opt;
++ return;
++ }
++
++ prev = &c->header.next;
++ }
++
++ *cmdline_object_only_archive_list.tail = new_opt;
++ cmdline_object_only_archive_list.tail = &new_opt->header.next;
++}
++
++/* Get object-only input files. */
++
++static void
++cmdline_get_object_only_input_files (void)
++{
++ cmdline_union_type *c, *next;
++ bfd *abfd, *archive;
++ bfd *nbfd, *narchive;
++
++ /* Add files first. */
++ for (c = cmdline_object_only_file_list.head;
++ c != NULL; c = c->header.next)
++ switch (c->header.type)
++ {
++ default:
++ abort ();
++ case cmdline_is_file_enum:
++ lang_add_input_file (c->file.filename,
++ lang_input_file_is_file_enum, NULL);
++ break;
++ case cmdline_is_bfd_enum:
++ abfd = c->abfd.abfd;
++ if (bfd_my_archive (abfd))
++ abort ();
++ lang_add_input_file (abfd->filename,
++ lang_input_file_is_file_enum, NULL);
++ break;
++ }
++
++ /* Add archive members next. */
++ for (c = cmdline_object_only_archive_list.head; c != NULL; c = next)
++ {
++ if (c->header.type != cmdline_is_bfd_enum)
++ abort ();
++
++ next = c->header.next;
++
++ abfd = c->abfd.abfd;
++ archive = bfd_my_archive (abfd);
++
++ /* Add the first archive of the archive member group. */
++ lang_add_input_file (archive->filename,
++ lang_input_file_is_file_enum, NULL);
++
++ /* Skip the rest members in the archive member group. */
++ do
++ {
++ if (!next)
++ break;
++
++ if (next->header.type != cmdline_is_bfd_enum)
++ abort ();
++
++ next = next->header.next;
++ if (!next)
++ break;
++ nbfd = next->abfd.abfd;
++ narchive = bfd_my_archive (nbfd);
++ }
++ while (strcmp (archive->filename, narchive->filename) == 0);
++ }
++}
++
++struct cmdline_arg
++{
++ bfd *obfd;
++ asymbol **isympp;
++ int status;
++};
++
++/* Create a section in OBFD with the same
++ name and attributes as ISECTION in IBFD. */
++
++static void
++setup_section (bfd *ibfd, sec_ptr isection, void *p)
++{
++ struct cmdline_arg *arg = (struct cmdline_arg *) p;
++ bfd *obfd = arg->obfd;
++ asymbol **isympp = arg->isympp;
++ const char *name = isection->name;
++ sec_ptr osection;
++ const char *err;
++
++ /* Skip the object-only section. */
++ if (ibfd->object_only_section == isection)
++ return;
++
++ /* If we have already failed earlier on, do not keep on generating
++ complaints now. */
++ if (arg->status)
++ return;
++
++ osection = bfd_make_section_anyway_with_flags (obfd, name,
++ isection->flags);
++
++ if (osection == NULL)
++ {
++ err = _("failed to create output section");
++ goto loser;
++ }
++
++ osection->size = isection->size;
++ osection->vma = isection->vma;
++ osection->lma = isection->lma;
++ osection->alignment_power = isection->alignment_power;
++
++ /* Copy merge entity size. */
++ osection->entsize = isection->entsize;
++
++ /* This used to be mangle_section; we do here to avoid using
++ bfd_get_section_by_name since some formats allow multiple
++ sections with the same name. */
++ isection->output_section = osection;
++ isection->output_offset = 0;
++
++ if ((isection->flags & SEC_GROUP) != 0)
++ {
++ asymbol *gsym = bfd_group_signature (isection, isympp);
++
++ if (gsym != NULL)
++ {
++ gsym->flags |= BSF_KEEP;
++ if (ibfd->xvec->flavour == bfd_target_elf_flavour)
++ elf_group_id (isection) = gsym;
++ }
++ }
++
++ /* Allow the BFD backend to copy any private data it understands
++ from the input section to the output section. */
++ if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
++ {
++ err = _("failed to copy private data");
++ goto loser;
++ }
++
++ /* All went well. */
++ return;
++
++loser:
++ arg->status = 1;
++ einfo (_("%P%F: setup_section: %s: %s\n"), err, name);
++}
++
++/* Copy the data of input section ISECTION of IBFD
++ to an output section with the same name in OBFD.
++ If stripping then don't copy any relocation info. */
++
++static void
++copy_section (bfd *ibfd, sec_ptr isection, void *p)
++{
++ struct cmdline_arg *arg = (struct cmdline_arg *) p;
++ bfd *obfd = arg->obfd;
++ asymbol **isympp = arg->isympp;
++ arelent **relpp;
++ long relcount;
++ sec_ptr osection;
++ bfd_size_type size;
++ long relsize;
++ flagword flags;
++ const char *err;
++
++ /* Skip the object-only section. */
++ if (ibfd->object_only_section == isection)
++ return;
++
++ /* If we have already failed earlier on, do not keep on generating
++ complaints now. */
++ if (arg->status)
++ return;
++
++ flags = bfd_get_section_flags (ibfd, isection);
++ if ((flags & SEC_GROUP) != 0)
++ return;
++
++ osection = isection->output_section;
++ size = bfd_get_section_size (isection);
++
++ if (size == 0 || osection == 0)
++ return;
++
++ relsize = bfd_get_reloc_upper_bound (ibfd, isection);
++
++ if (relsize < 0)
++ {
++ /* Do not complain if the target does not support relocations. */
++ if (relsize == -1
++ && bfd_get_error () == bfd_error_invalid_operation)
++ relsize = 0;
++ else
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++ }
++
++ if (relsize == 0)
++ bfd_set_reloc (obfd, osection, NULL, 0);
++ else
++ {
++ relpp = (arelent **) xmalloc (relsize);
++ relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, isympp);
++ if (relcount < 0)
++ {
++ err = _("relocation count is negative");
++ goto loser;
++ }
++
++ bfd_set_reloc (obfd, osection,
++ relcount == 0 ? NULL : relpp, relcount);
++ if (relcount == 0)
++ free (relpp);
++ }
++
++ if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS)
++ {
++ bfd_byte *memhunk = NULL;
++
++ if (!bfd_get_full_section_contents (ibfd, isection, &memhunk))
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ if (!bfd_set_section_contents (obfd, osection, memhunk, 0, size))
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++ free (memhunk);
++ }
++
++ /* All went well. */
++ return;
++
++loser:
++ einfo (_("%P%F: copy_section: %s: %s\n"), err, isection->name);
++}
++/* Open the temporary bfd created in the same directory as PATH. */
++
++static bfd *
++cmdline_fopen_temp (const char *path, const char *target,
++ const char *mode)
++{
++#define template "ldXXXXXX"
++ const char *slash = strrchr (path, '/');
++ char *tmpname;
++ size_t len;
++ int fd;
++
++#ifdef HAVE_DOS_BASED_FILE_SYSTEM
++ {
++ /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
++ char *bslash = strrchr (path, '\\');
++
++ if (slash == NULL || (bslash != NULL && bslash > slash))
++ slash = bslash;
++ if (slash == NULL && path[0] != '\0' && path[1] == ':')
++ slash = path + 1;
++ }
++#endif
++
++ if (slash != (char *) NULL)
++ {
++ len = slash - path;
++ tmpname = (char *) xmalloc (len + sizeof (template) + 2);
++ memcpy (tmpname, path, len);
++
++#ifdef HAVE_DOS_BASED_FILE_SYSTEM
++ /* If tmpname is "X:", appending a slash will make it a root
++ directory on drive X, which is NOT the same as the current
++ directory on drive X. */
++ if (len == 2 && tmpname[1] == ':')
++ tmpname[len++] = '.';
++#endif
++ tmpname[len++] = '/';
++ }
++ else
++ {
++ tmpname = (char *) xmalloc (sizeof (template));
++ len = 0;
++ }
++
++ memcpy (tmpname + len, template, sizeof (template));
++#undef template
++
++#ifdef HAVE_MKSTEMP
++ fd = mkstemp (tmpname);
++#else
++ tmpname = mktemp (tmpname);
++ if (tmpname == NULL)
++ return NULL;
++ fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
++#endif
++ if (fd == -1)
++ return NULL;
++ return bfd_fopen (tmpname, target, mode, fd);
++}
++
++/* Add the object-only section. */
++
++static void
++cmdline_add_object_only_section (bfd_byte *contents, size_t size)
++{
++ bfd_vma start;
++ flagword flags;
++ enum bfd_architecture iarch;
++ unsigned int imach;
++ long symcount;
++ long symsize;
++ asymbol **isympp = NULL;
++ asymbol **osympp = NULL;
++ bfd *obfd = NULL, *ibfd;
++ const char *err;
++ struct arg
++ {
++ bfd *obfd;
++ asymbol **isympp;
++ int status;
++ } arg;
++ char **matching;
++ char *ofilename = NULL;
++ asection *sec;
++
++ ibfd = bfd_openr (output_filename, output_target);
++ if (!ibfd)
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ if (!bfd_check_format_matches (ibfd, bfd_object, &matching))
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ obfd = cmdline_fopen_temp (output_filename, output_target, "w");
++ if (!obfd)
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++ /* To be used after bfd_close (). */
++ ofilename = xstrdup (bfd_get_filename (obfd));
++
++ if (!bfd_set_format (obfd, bfd_object))
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ /* Copy the start address, flags and architecture of input file to
++ output file. */
++ flags = bfd_get_file_flags (ibfd);
++ start = bfd_get_start_address (ibfd);
++ iarch = bfd_get_arch (ibfd);
++ imach = bfd_get_mach (ibfd);
++ if (!bfd_set_start_address (obfd, start)
++ || !bfd_set_file_flags (obfd, flags)
++ || !bfd_set_arch_mach (obfd, iarch, imach))
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ symsize = bfd_get_symtab_upper_bound (ibfd);
++ if (symsize < 0)
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ isympp = (asymbol **) xmalloc (symsize);
++ symcount = bfd_canonicalize_symtab (ibfd, isympp);
++ if (symcount < 0)
++ {
++ err = bfd_errmsg (bfd_get_error ());
++ goto loser;
++ }
++
++ arg.obfd = obfd;
++ arg.isympp = isympp;
++ arg.status = 0;
++
++ /* BFD mandates that all output sections be created and sizes set before
++ any output is done. Thus, we traverse all sections multiple times. */
++ bfd_map_over_sections (ibfd, setup_section, &arg);
++
++ if (arg.status)
++ {
++ err = _("error setting up sections");
++ goto loser;
++ }
++
++ /* Allow the BFD backend to copy any private data it understands
++ from the input section to the output section. */
++ if (! bfd_copy_private_header_data (ibfd, obfd))
++ {
++ err = _("error copying private header data");
++ goto loser;
++ }
++
++ /* Create the object-only section. */
++ sec = bfd_make_section_with_flags (obfd,
++ GNU_OBJECT_ONLY_SECTION_NAME,
++ (SEC_HAS_CONTENTS
++ | SEC_READONLY
++ | SEC_DATA
++ | SEC_LINKER_CREATED));
++ if (sec == NULL)
++ {
++ err = _("can't create object-only section");
++ goto loser;
++ }
++
++ if (! bfd_set_section_size (obfd, sec, size))
++ {
++ err = _("can't set object-only section size");
++ goto loser;
++ }
++
++ if (ibfd->object_only_section)
++ {
++ /* Filter out the object-only section symbol. */
++ long src_count = 0, dst_count = 0;
++ asymbol **from, **to;
++
++ osympp = (asymbol **) xmalloc (symcount * sizeof (asymbol *));
++ from = isympp;
++ to = osympp;
++ for (; src_count < symcount; src_count++)
++ {
++ asymbol *sym = from[src_count];
++ if (bfd_get_section (sym) != ibfd->object_only_section)
++ to[dst_count++] = sym;
++ }
++ to[dst_count] = NULL;
++ symcount = dst_count;
++ bfd_set_symtab (obfd, osympp, symcount);
++ }
++ else
++ bfd_set_symtab (obfd, isympp, symcount);
++
++ /* This has to happen after the symbol table has been set. */
++ bfd_map_over_sections (ibfd, copy_section, &arg);
++
++ if (arg.status)
++ {
++ err = _("error copying sections");
++ goto loser;
++ }
++
++ /* Copy the object-only section to the output. */
++ if (! bfd_set_section_contents (obfd, sec, contents, 0, size))
++ {
++ err = _("error adding object-only section");
++ goto loser;
++ }
++
++ /* Allow the BFD backend to copy any private data it understands
++ from the input BFD to the output BFD. This is done last to
++ permit the routine to look at the filtered symbol table, which is
++ important for the ECOFF code at least. */
++ if (! bfd_copy_private_bfd_data (ibfd, obfd))
++ {
++ err = _("error copying private BFD data");
++ goto loser;
++ }
++
++ if (!bfd_close (obfd))
++ {
++ unlink (ofilename);
++ einfo (_("%P%F: failed to finish output with object-only section\n"));
++ }
++
++ /* Must be freed after bfd_close (). */
++ free (isympp);
++ if (osympp)
++ free (osympp);
++
++ if (rename (ofilename, output_filename))
++ {
++ unlink (ofilename);
++ einfo (_("%P%F: failed to rename output with object-only section\n"));
++ }
++
++ free (ofilename);
++ return;
++
++loser:
++ if (isympp)
++ free (isympp);
++ if (osympp)
++ free (osympp);
++ if (obfd)
++ bfd_close (obfd);
++ if (ofilename)
++ unlink (ofilename);
++ einfo (_("%P%F: failed to add object-only section: %s\n"), err);
++}
++
++/* Emit the final output with object-only section. */
++
++void
++cmdline_emit_object_only_section (void)
++{
++ const char *saved_output_filename = output_filename;
++ int fd;
++ size_t size, off;
++ bfd_byte *contents;
++ struct stat st;
++
++ /* Get a temporary object-only file. */
++ output_filename = make_temp_file (".obj-only.o");
++
++ had_output_filename = FALSE;
++ link_info.input_bfds = NULL;
++ link_info.input_bfds_tail = &link_info.input_bfds;
++
++ lang_init (TRUE);
++ ldexp_init (TRUE);
++
++ ld_parse_linker_script ();
++
++ /* Set up the object-only output. */
++ lang_final ();
++
++ /* Open the object-only file for output. */
++ lang_for_each_statement (ldlang_open_output);
++
++ ldemul_create_output_section_statements ();
++
++ if (!bfd_section_already_linked_table_init ())
++ einfo (_("%P%F: Failed to create hash table\n"));
++
++ /* Call cmdline_on_object_only_archive_list_p to check which member
++ should be loaded. */
++ input_flags.whole_archive = TRUE;
++
++ /* Set it to avoid adding more to cmdline lists. */
++ link_info.emitting_gnu_object_only = TRUE;
++
++ /* Get object-only input files. */
++ cmdline_get_object_only_input_files ();
++
++ /* Open object-only input files. */
++ open_input_bfds (statement_list.head, FALSE);
++
++ ldemul_after_open ();
++
++ bfd_section_already_linked_table_free ();
++
++ /* Make sure that we're not mixing architectures. We call this
++ after all the input files have been opened, but before we do any
++ other processing, so that any operations merge_private_bfd_data
++ does on the output file will be known during the rest of the
++ link. */
++ lang_check ();
++
++ /* Size up the common data. */
++ lang_common ();
++
++ /* Update wild statements. */
++ update_wild_statements (statement_list.head);
++
++ /* Run through the contours of the script and attach input sections
++ to the correct output sections. */
++ map_input_to_output_sections (statement_list.head, NULL, NULL);
++
++ /* Find any sections not attached explicitly and handle them. */
++ lang_place_orphans ();
++
++ /* Do anything special before sizing sections. This is where ELF
++ and other back-ends size dynamic sections. */
++ ldemul_before_allocation ();
++
++ /* Size up the sections. */
++ lang_size_sections (NULL, ! RELAXATION_ENABLED);
++
++ /* See if anything special should be done now we know how big
++ everything is. This is where relaxation is done. */
++ ldemul_after_allocation ();
++
++ ldemul_finish ();
++
++ /* Make sure that the section addresses make sense. */
++ if (command_line.check_section_addresses)
++ lang_check_section_addresses ();
++
++ lang_end ();
++
++ ldwrite ();
++
++ ldexp_finish (TRUE);
++ lang_finish ();
++
++ if (! bfd_close (link_info.output_bfd))
++ einfo (_("%P%F:%s: final close failed on object-only output: %E\n"),
++ output_filename);
++
++ /* Read in the object-only file. */
++ fd = open (output_filename, O_RDONLY | O_BINARY);
++ if (fd < 0)
++ {
++ bfd_set_error (bfd_error_system_call);
++ einfo (_("%P%F:%s: cannot open object-only output: %E"),
++ output_filename);
++ }
++
++ /* Get the object-only file size. */
++ if (fstat (fd, &st) != 0)
++ {
++ bfd_set_error (bfd_error_system_call);
++ einfo (_("%P%F:%s: cannot stat object-only output: %E"),
++ output_filename);
++ }
++
++ size = st.st_size;
++ off = 0;
++ contents = (bfd_byte *) xmalloc (size);
++ while (off != size)
++ {
++ ssize_t got;
++
++ got = read (fd, contents + off, size - off);
++ if (got < 0)
++ {
++ bfd_set_error (bfd_error_system_call);
++ einfo (_("%P%F:%s: read failed on object-only output: %E"),
++ output_filename);
++ }
++
++ off += got;
++ }
++
++ close (fd);
++
++ /* Remove the temporary object-only file. */
++ unlink (output_filename);
++
++ output_filename = saved_output_filename;
++
++ cmdline_add_object_only_section (contents, size);
++
++ free (contents);
++}
++
++/* Extract the object-only section. */
++
++static const char *
++cmdline_extract_object_only_section (bfd *abfd)
++{
++ const char *name = bfd_extract_object_only_section (abfd);
++
++ if (name == NULL)
++ einfo (_("%P%F: cannot extract object-only section from %B: %E"),
++ abfd);
++
++ /* It should be removed after it is done. */
++ cmdline_list_append (&cmdline_temp_object_only_list,
++ cmdline_is_file_enum, (void *) name);
++
++ return name;
++}
++
++/* Check and handle the object-only section. */
++
++void
++cmdline_check_object_only_section (bfd *abfd, bfd_boolean lto)
++{
++ const char *filename;
++
++ if (link_info.emitting_gnu_object_only
++ || abfd->format != bfd_object)
++ return;
++
++ if (lto)
++ {
++ /* For LTO link, we only need to extract object-only section
++ from the mixed object, add it to input, and put it on LTO
++ claimed output. */
++ switch (abfd->lto_type)
++ {
++ default:
++ abort ();
++ case lto_mixed_object:
++ filename = cmdline_extract_object_only_section (abfd);
++ lang_add_input_file (filename,
++ lang_input_file_is_file_enum, NULL);
++ break;
++ case lto_non_ir_object:
++ case lto_ir_object:
++ break;
++ }
++ }
++ else if (bfd_link_relocatable (&link_info))
++ {
++ /* For non-LTO relocatable link, we need to append non-IR object
++ file and the object file in object-only section to the object
++ only list. */
++ switch (abfd->lto_type)
++ {
++ default:
++ abort ();
++ case lto_mixed_object:
++ filename = cmdline_extract_object_only_section (abfd);
++ cmdline_object_only_list_append (cmdline_is_file_enum,
++ (void *) filename);
++ break;
++ case lto_non_ir_object:
++ cmdline_object_only_list_append (cmdline_is_bfd_enum, abfd);
++ break;
++ case lto_ir_object:
++ break;
++ }
++ }
++}
++
++/* Remove temporary object-only files. */
++
++void
++cmdline_remove_object_only_files (void)
++{
++ cmdline_union_type *c;
++
++#ifdef ENABLE_PLUGINS
++ if (plugin_save_temps)
++ return;
++#endif
++
++ c = cmdline_temp_object_only_list.head;
++ for (; c != NULL; c = c->header.next)
++ switch (c->header.type)
++ {
++ default:
++ abort ();
++ case cmdline_is_file_enum:
++ unlink (c->file.filename);
++ break;
++ }
++}
+diff -rup binutils-2.26.orig/ld/ldlang.h binutils-2.26/ld/ldlang.h
+--- binutils-2.26.orig/ld/ldlang.h 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldlang.h 2016-02-19 09:35:54.921106611 +0000
+@@ -517,7 +517,7 @@ extern struct asneeded_minfo **asneeded_
+ extern void (*output_bfd_hash_table_free_fn) (struct bfd_link_hash_table *);
+
+ extern void lang_init
+- (void);
++ (bfd_boolean);
+ extern void lang_finish
+ (void);
+ extern lang_memory_region_type * lang_memory_region_lookup
+@@ -693,4 +693,45 @@ lang_ld_feature (char *);
+ extern void
+ lang_print_memory_usage (void);
+
++typedef enum
++{
++ cmdline_is_file_enum,
++ cmdline_is_bfd_enum
++} cmdline_enum_type;
++
++typedef struct cmdline_header_struct
++{
++ union cmdline_union *next;
++ cmdline_enum_type type;
++} cmdline_header_type;
++
++typedef struct cmdline_file_struct
++{
++ cmdline_header_type header;
++ const char *filename;
++} cmdline_file_type;
++
++typedef struct cmdline_bfd_struct
++{
++ cmdline_header_type header;
++ bfd *abfd;
++} cmdline_bfd_type;
++
++typedef union cmdline_union
++{
++ cmdline_header_type header;
++ cmdline_file_type file;
++ cmdline_bfd_type abfd;
++} cmdline_union_type;
++
++typedef struct cmdline_list
++{
++ cmdline_union_type *head;
++ cmdline_union_type **tail;
++} cmdline_list_type;
++
++extern void cmdline_emit_object_only_section (void);
++extern void cmdline_check_object_only_section (bfd *, bfd_boolean);
++extern void cmdline_remove_object_only_files (void);
++
+ #endif
+diff -rup binutils-2.26.orig/ld/ldlex.h binutils-2.26/ld/ldlex.h
+--- binutils-2.26.orig/ld/ldlex.h 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldlex.h 2016-02-19 09:35:54.921106611 +0000
+@@ -134,6 +134,7 @@ enum option_values
+ #ifdef ENABLE_PLUGINS
+ OPTION_PLUGIN,
+ OPTION_PLUGIN_OPT,
++ OPTION_PLUGIN_SAVE_TEMPS,
+ #endif /* ENABLE_PLUGINS */
+ OPTION_DEFAULT_SCRIPT,
+ OPTION_PRINT_OUTPUT_FORMAT,
+diff -rup binutils-2.26.orig/ld/ldmain.c binutils-2.26/ld/ldmain.c
+--- binutils-2.26.orig/ld/ldmain.c 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldmain.c 2016-02-19 09:35:54.922106617 +0000
+@@ -219,6 +219,9 @@ main (int argc, char **argv)
+
+ xatexit (ld_cleanup);
+
++ /* Remove temporary object-only files. */
++ xatexit (cmdline_remove_object_only_files);
++
+ /* Set up the sysroot directory. */
+ ld_sysroot = get_sysroot (argc, argv);
+ if (*ld_sysroot)
+@@ -291,8 +294,8 @@ main (int argc, char **argv)
+ default_target = ldemul_choose_target (argc, argv);
+ config.maxpagesize = bfd_emul_get_maxpagesize (default_target);
+ config.commonpagesize = bfd_emul_get_commonpagesize (default_target);
+- lang_init ();
+- ldexp_init ();
++ lang_init (FALSE);
++ ldexp_init (FALSE);
+ ldemul_before_parse ();
+ lang_has_input_file = FALSE;
+ parse_args (argc, argv);
+@@ -307,34 +310,7 @@ main (int argc, char **argv)
+
+ ldemul_set_symbols ();
+
+- /* If we have not already opened and parsed a linker script,
+- try the default script from command line first. */
+- if (saved_script_handle == NULL
+- && command_line.default_script != NULL)
+- {
+- ldfile_open_command_file (command_line.default_script);
+- parser_input = input_script;
+- yyparse ();
+- }
+-
+- /* If we have not already opened and parsed a linker script
+- read the emulation's appropriate default script. */
+- if (saved_script_handle == NULL)
+- {
+- int isfile;
+- char *s = ldemul_get_script (&isfile);
+-
+- if (isfile)
+- ldfile_open_default_command_file (s);
+- else
+- {
+- lex_string = s;
+- lex_redirect (s, _("built in linker script"), 1);
+- }
+- parser_input = input_script;
+- yyparse ();
+- lex_string = NULL;
+- }
++ ld_parse_linker_script ();
+
+ if (verbose)
+ {
+@@ -445,7 +421,7 @@ main (int argc, char **argv)
+ fprintf (stderr, "lookup = %p val %lx\n", h, h ? h->u.def.value : 1);
+ }
+ #endif
+- ldexp_finish ();
++ ldexp_finish (FALSE);
+ lang_finish ();
+
+ /* Even if we're producing relocatable output, some non-fatal errors should
+@@ -465,6 +441,8 @@ main (int argc, char **argv)
+ if (! bfd_close (link_info.output_bfd))
+ einfo (_("%F%B: final close failed: %E\n"), link_info.output_bfd);
+
++ link_info.output_bfd = NULL;
++
+ /* If the --force-exe-suffix is enabled, and we're making an
+ executable file and it doesn't end in .exe, copy it to one
+ which does. */
+@@ -512,6 +490,9 @@ main (int argc, char **argv)
+ }
+ }
+
++ if (link_info.emit_gnu_object_only)
++ cmdline_emit_object_only_section ();
++
+ END_PROGRESS (program_name);
+
+ if (config.stats)
+@@ -805,7 +786,9 @@ add_archive_element (struct bfd_link_inf
+ *subsbfd = input->the_bfd;
+ }
+ }
++ else
+ #endif /* ENABLE_PLUGINS */
++ cmdline_check_object_only_section (input->the_bfd, FALSE);
+
+ ldlang_add_file (input);
+
+@@ -1484,3 +1467,38 @@ notice (struct bfd_link_info *info,
+
+ return TRUE;
+ }
++
++/* Parse the linker script. */
++
++void
++ld_parse_linker_script ()
++{
++ /* If we have not already opened and parsed a linker script,
++ try the default script from command line first. */
++ if (saved_script_handle == NULL
++ && command_line.default_script != NULL)
++ {
++ ldfile_open_command_file (command_line.default_script);
++ parser_input = input_script;
++ yyparse ();
++ }
++
++ /* If we have not already opened and parsed a linker script
++ read the emulation's appropriate default script. */
++ if (saved_script_handle == NULL)
++ {
++ int isfile;
++ char *s = ldemul_get_script (&isfile);
++
++ if (isfile)
++ ldfile_open_default_command_file (s);
++ else
++ {
++ lex_string = s;
++ lex_redirect (s, _("built in linker script"), 1);
++ }
++ parser_input = input_script;
++ yyparse ();
++ lex_string = NULL;
++ }
++}
+diff -rup binutils-2.26.orig/ld/ldmain.h binutils-2.26/ld/ldmain.h
+--- binutils-2.26.orig/ld/ldmain.h 2016-02-19 09:35:36.701003291 +0000
++++ binutils-2.26/ld/ldmain.h 2016-02-19 09:35:54.922106617 +0000
+@@ -59,4 +59,6 @@ extern void add_wrap (const char *);
+ extern void add_ignoresym (struct bfd_link_info *, const char *);
+ extern void add_keepsyms_file (const char *);
+
++extern void ld_parse_linker_script (void);
++
+ #endif
+diff -rup binutils-2.26.orig/ld/lexsup.c binutils-2.26/ld/lexsup.c
+--- binutils-2.26.orig/ld/lexsup.c 2016-02-19 09:35:36.700003285 +0000
++++ binutils-2.26/ld/lexsup.c 2016-02-19 09:35:54.923106623 +0000
+@@ -169,6 +169,9 @@ static const struct ld_option ld_options
+ '\0', N_("PLUGIN"), N_("Load named plugin"), ONE_DASH },
+ { {"plugin-opt", required_argument, NULL, OPTION_PLUGIN_OPT},
+ '\0', N_("ARG"), N_("Send arg to last-loaded plugin"), ONE_DASH },
++ { {"plugin-save-temps", no_argument, NULL, OPTION_PLUGIN_SAVE_TEMPS},
++ '\0', NULL, N_("Store plugin intermediate files permanently"),
++ ONE_DASH },
+ { {"flto", optional_argument, NULL, OPTION_IGNORE},
+ '\0', NULL, N_("Ignored for GCC LTO option compatibility"),
+ ONE_DASH },
+@@ -1020,6 +1023,9 @@ parse_args (unsigned argc, char **argv)
+ if (plugin_opt_plugin_arg (optarg))
+ einfo (_("%P%F: bad -plugin-opt option\n"));
+ break;
++ case OPTION_PLUGIN_SAVE_TEMPS:
++ plugin_save_temps = TRUE;
++ break;
+ #endif /* ENABLE_PLUGINS */
+ case 'q':
+ link_info.emitrelocations = TRUE;
+diff -rup binutils-2.26.orig/ld/plugin.c binutils-2.26/ld/plugin.c
+--- binutils-2.26.orig/ld/plugin.c 2016-02-19 09:35:36.702003296 +0000
++++ binutils-2.26/ld/plugin.c 2016-02-19 09:35:54.923106623 +0000
+@@ -57,6 +57,9 @@ extern int errno;
+ /* Report plugin symbols. */
+ bfd_boolean report_plugin_symbols;
+
++/* Store plugin intermediate files permanently. */
++bfd_boolean plugin_save_temps;
++
+ /* The suffix to append to the name of the real (claimed) object file
+ when generating a dummy BFD to hold the IR symbols sent from the
+ plugin. For cosmetic use only; appears in maps, crefs etc. */
+@@ -1182,6 +1185,9 @@ plugin_maybe_claim (lang_input_statement
+ {
+ bfd *abfd = entry->the_bfd->plugin_dummy_bfd;
+
++ /* Check object only section. */
++ cmdline_check_object_only_section (entry->the_bfd, TRUE);
++
+ /* Discard the real file's BFD and substitute the dummy one. */
+
+ /* BFD archive handling caches elements so we can't call
+@@ -1227,14 +1233,17 @@ plugin_call_cleanup (void)
+ {
+ if (curplug->cleanup_handler && !curplug->cleanup_done)
+ {
+- enum ld_plugin_status rv;
+- curplug->cleanup_done = TRUE;
+- called_plugin = curplug;
+- rv = (*curplug->cleanup_handler) ();
+- called_plugin = NULL;
+- if (rv != LDPS_OK)
+- info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),
+- curplug->name, rv);
++ if (!plugin_save_temps)
++ {
++ enum ld_plugin_status rv;
++ curplug->cleanup_done = TRUE;
++ called_plugin = curplug;
++ rv = (*curplug->cleanup_handler) ();
++ called_plugin = NULL;
++ if (rv != LDPS_OK)
++ info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),
++ curplug->name, rv);
++ }
+ dlclose (curplug->dlhandle);
+ }
+ curplug = curplug->next;
+diff -rup binutils-2.26.orig/ld/plugin.h binutils-2.26/ld/plugin.h
+--- binutils-2.26.orig/ld/plugin.h 2016-02-19 09:35:36.702003296 +0000
++++ binutils-2.26/ld/plugin.h 2016-02-19 09:35:54.924106628 +0000
+@@ -24,6 +24,9 @@
+ /* Report plugin symbols. */
+ extern bfd_boolean report_plugin_symbols;
+
++/* Store plugin intermediate files permanently. */
++extern bfd_boolean plugin_save_temps;
++
+ /* Set at all symbols read time, to avoid recursively offering the plugin
+ its own newly-added input files and libs to claim. */
+ extern bfd_boolean no_more_claiming;
+diff -rup binutils-2.26.orig/ld/scripttempl/armbpabi.sc binutils-2.26/ld/scripttempl/armbpabi.sc
+--- binutils-2.26.orig/ld/scripttempl/armbpabi.sc 2016-02-19 09:35:36.704003308 +0000
++++ binutils-2.26/ld/scripttempl/armbpabi.sc 2016-02-19 09:35:54.924106628 +0000
+@@ -36,7 +36,7 @@ INTERP=".interp 0 : { *(.interp) }
+ PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+ RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+ DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }"
+ if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+diff -rup binutils-2.26.orig/ld/scripttempl/elf32sh-symbian.sc binutils-2.26/ld/scripttempl/elf32sh-symbian.sc
+--- binutils-2.26.orig/ld/scripttempl/elf32sh-symbian.sc 2016-02-19 09:35:36.705003313 +0000
++++ binutils-2.26/ld/scripttempl/elf32sh-symbian.sc 2016-02-19 09:35:54.925106634 +0000
+@@ -88,7 +88,7 @@ fi
+ PLT=".plt : { *(.plt) } :dynamic :dyn"
+ DYNAMIC=".dynamic : { *(.dynamic) } :dynamic :dyn"
+ RODATA=".rodata ALIGN(4) : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.directive) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.directive) *(.gnu.lto_*) *(.gnu_object_only) }"
+ test -z "$GOT" && GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) } :dynamic :dyn"
+ INIT_ARRAY=".init_array ${RELOCATING-0} :
+ {
+diff -rup binutils-2.26.orig/ld/scripttempl/elf64hppa.sc binutils-2.26/ld/scripttempl/elf64hppa.sc
+--- binutils-2.26.orig/ld/scripttempl/elf64hppa.sc 2016-02-19 09:35:36.705003313 +0000
++++ binutils-2.26/ld/scripttempl/elf64hppa.sc 2016-02-19 09:35:54.925106634 +0000
+@@ -132,7 +132,7 @@ fi
+ DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+ RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+ DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }"
+ if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+diff -rup binutils-2.26.orig/ld/scripttempl/elf.sc binutils-2.26/ld/scripttempl/elf.sc
+--- binutils-2.26.orig/ld/scripttempl/elf.sc 2016-02-19 09:35:36.705003313 +0000
++++ binutils-2.26/ld/scripttempl/elf.sc 2016-02-19 09:35:54.924106628 +0000
+@@ -170,7 +170,7 @@ RELA_IPLT=".rela.iplt ${RELOCATING-0}
+ DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+ RODATA=".${RODATA_NAME} ${RELOCATING-0} : { *(.${RODATA_NAME}${RELOCATING+ .${RODATA_NAME}.* .gnu.linkonce.r.*}) }"
+ DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }"
+ if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".${SBSS_NAME} ${RELOCATING-0} :
+ {
+diff -rup binutils-2.26.orig/ld/scripttempl/elfxtensa.sc binutils-2.26/ld/scripttempl/elfxtensa.sc
+--- binutils-2.26.orig/ld/scripttempl/elfxtensa.sc 2016-02-19 09:35:36.705003313 +0000
++++ binutils-2.26/ld/scripttempl/elfxtensa.sc 2016-02-19 09:35:54.925106634 +0000
+@@ -145,7 +145,7 @@ fi
+ DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+ RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+ DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }"
+ INIT_LIT=".init.literal 0 : { *(.init.literal) }"
+ INIT=".init 0 : { *(.init) }"
+ FINI_LIT=".fini.literal 0 : { *(.fini.literal) }"
+diff -rup binutils-2.26.orig/ld/scripttempl/mep.sc binutils-2.26/ld/scripttempl/mep.sc
+--- binutils-2.26.orig/ld/scripttempl/mep.sc 2016-02-19 09:35:36.706003319 +0000
++++ binutils-2.26/ld/scripttempl/mep.sc 2016-02-19 09:35:54.926106640 +0000
+@@ -119,7 +119,7 @@ fi
+ DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+ RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+ DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro .data.rel.ro.*) }"
+-DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }"
++DISCARDED="/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) *(.gnu_object_only) }"
+ if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+diff -rup binutils-2.26.orig/ld/scripttempl/pep.sc binutils-2.26/ld/scripttempl/pep.sc
+--- binutils-2.26.orig/ld/scripttempl/pep.sc 2016-02-19 09:35:36.706003319 +0000
++++ binutils-2.26/ld/scripttempl/pep.sc 2016-02-19 09:35:54.926106640 +0000
+@@ -178,6 +178,7 @@ SECTIONS
+ *(.drectve)
+ ${RELOCATING+ *(.note.GNU-stack)}
+ ${RELOCATING+ *(.gnu.lto_*)}
++ ${RELOCATING+ *(.gnu_object_only)}
+ }
+
+ .idata ${RELOCATING+BLOCK(__section_alignment__)} :
+diff -rup binutils-2.26.orig/ld/scripttempl/pe.sc binutils-2.26/ld/scripttempl/pe.sc
+--- binutils-2.26.orig/ld/scripttempl/pe.sc 2016-02-19 09:35:36.706003319 +0000
++++ binutils-2.26/ld/scripttempl/pe.sc 2016-02-19 09:35:54.926106640 +0000
+@@ -165,6 +165,7 @@ SECTIONS
+ *(.drectve)
+ ${RELOCATING+ *(.note.GNU-stack)}
+ ${RELOCATING+ *(.gnu.lto_*)}
++ ${RELOCATING+ *(.gnu_object_only)}
+ }
+
+ .idata ${RELOCATING+BLOCK(__section_alignment__)} :
+diff -rup binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.26/ld/testsuite/ld-plugin/lto.exp
+--- binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:35:36.807003892 +0000
++++ binutils-2.26/ld/testsuite/ld-plugin/lto.exp 2016-02-19 09:36:15.450223025 +0000
+@@ -79,6 +79,15 @@ set lto_link_tests [list \
+ [list "Build liblto-3.a" \
+ "" "-flto $lto_fat" \
+ {lto-3b.c} {} "liblto-3.a"] \
++ [list "Compile 4a" \
++ "" "-flto $lto_fat" \
++ {lto-4a.c} {} ""] \
++ [list "Compile 4b" \
++ "" "-O2" \
++ {lto-4b.c} {} ""] \
++ [list "Compile 4c" \
++ "" "-O2" \
++ {lto-4c.c} {} ""] \
+ [list "Compile 5a" \
+ "" "-flto $lto_fat" \
+ {lto-5a.c} {} ""] \
+@@ -94,6 +103,12 @@ set lto_link_tests [list \
+ [list "Compile 9" \
+ "" "-O2 -finline -flto" \
+ {lto-9.cc} {} "" "c++"] \
++ [list "Compile 10a" \
++ "" "-O2" \
++ {lto-10a.c} {} ""] \
++ [list "Compile 10b" \
++ "" "-O2 -flto $lto_fat" \
++ {lto-10b.c} {} ""] \
+ [list "Compile 11a" \
+ "" "-O -flto" \
+ {lto-11a.c} {} ""] \
+@@ -291,9 +306,21 @@ set lto_run_tests [list \
+ [list "LTO 3c" \
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-3a.o tmpdir/lto-3c.o -Wl,--whole-archive tmpdir/liblto-3.a -Wl,--no-whole-archive tmpdir/liblto-3.a" "" \
+ {dummy.c} "lto-3d.exe" "lto-3.out" "" "c"] \
++ [list "LTO 4a" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-a.o" "" \
++ {dummy.c} "lto-4a.exe" "lto-4.out" "" "c"] \
++ [list "LTO 4c" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-c.o" "" \
++ {dummy.c} "lto-4c.exe" "lto-4.out" "" "c"] \
++ [list "LTO 4d" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-d.o" "" \
++ {dummy.c} "lto-4d.exe" "lto-4.out" "" "c"] \
+ [list "LTO 5" \
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-5.o" "" \
+ {dummy.c} "lto-5.exe" "lto-5.out" "" "c"] \
++ [list "LTO 10" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-10.o" "" \
++ {dummy.c} "lto-10.exe" "lto-10.out" "" "c"] \
+ [list "LTO 11" \
+ "-O -flto -fuse-linker-plugin tmpdir/liblto-11.a" "" \
+ {dummy.c} "lto-11.exe" "lto-11.out" "" "c"] \
+@@ -378,6 +405,15 @@ if { [is_elf_format] && [check_lto_share
+ }
+ }
+
++set testname "Build liblto-4.a"
++remote_file host delete "tmpdir/liblto-4.a"
++set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-4.a tmpdir/lto-4a.o tmpdir/lto-4b.o tmpdir/lto-4c.o"]
++if {![string match "" $catch_output]} {
++ unresolved $testname
++ restore_notify
++ return
++}
++
+ set testname "Build liblto-11.a"
+ remote_file host delete "tmpdir/liblto-11.a"
+ set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
+@@ -424,8 +460,30 @@ return
+ # Run "ld -r" to generate inputs for complex LTO tests.
+ run_dump_test "lto-3r"
+ remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
++run_dump_test "lto-4r-a"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
++run_dump_test "lto-4r-b"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
++run_dump_test "lto-4r-c"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
++run_dump_test "lto-4r-d"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
+ run_dump_test "lto-5r"
+ remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
++run_dump_test "lto-10r"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
++set testname "nm mixed object"
++set lto_plugin [run_host_cmd "$CC" "-print-prog-name=liblto_plugin.so tmpdir/lto-10.o"]
++if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
++ set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"]
++ if { [ regexp "T main" $exec_output ] } {
++ pass $testname
++ } {
++ fail $testname
++ }
++} {
++ fail $testname
++ }
+
+ run_cc_link_tests $lto_link_symbol_tests
+
+diff -rup binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp.orig binutils-2.26/ld/testsuite/ld-plugin/lto.exp.orig
+--- binutils-2.26.orig/ld/testsuite/ld-plugin/lto.exp.orig 2016-02-19 09:35:36.805003880 +0000
++++ binutils-2.26/ld/testsuite/ld-plugin/lto.exp.orig 2016-02-19 09:35:54.929106657 +0000
+@@ -79,6 +79,15 @@ set lto_link_tests [list \
+ [list "Build liblto-3.a" \
+ "" "-flto $lto_fat" \
+ {lto-3b.c} {} "liblto-3.a"] \
++ [list "Compile 4a" \
++ "" "-flto $lto_fat" \
++ {lto-4a.c} {} ""] \
++ [list "Compile 4b" \
++ "" "-O2" \
++ {lto-4b.c} {} ""] \
++ [list "Compile 4c" \
++ "" "-O2" \
++ {lto-4c.c} {} ""] \
+ [list "Compile 5a" \
+ "" "-flto $lto_fat" \
+ {lto-5a.c} {} ""] \
+@@ -94,6 +103,12 @@ set lto_link_tests [list \
+ [list "Compile 9" \
+ "" "-O2 -finline -flto" \
+ {lto-9.cc} {} "" "c++"] \
++ [list "Compile 10a" \
++ "" "-O2" \
++ {lto-10a.c} {} ""] \
++ [list "Compile 10b" \
++ "" "-O2 -flto $lto_fat" \
++ {lto-10b.c} {} ""] \
+ [list "Compile 11a" \
+ "" "-O -flto" \
+ {lto-11a.c} {} ""] \
+@@ -291,9 +306,21 @@ set lto_run_tests [list \
+ [list "LTO 3c" \
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-3a.o tmpdir/lto-3c.o -Wl,--whole-archive tmpdir/liblto-3.a -Wl,--no-whole-archive tmpdir/liblto-3.a" "" \
+ {dummy.c} "lto-3d.exe" "lto-3.out" "" "c"] \
++ [list "LTO 4a" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-a.o" "" \
++ {dummy.c} "lto-4a.exe" "lto-4.out" "" "c"] \
++ [list "LTO 4c" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-c.o" "" \
++ {dummy.c} "lto-4c.exe" "lto-4.out" "" "c"] \
++ [list "LTO 4d" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-4r-d.o" "" \
++ {dummy.c} "lto-4d.exe" "lto-4.out" "" "c"] \
+ [list "LTO 5" \
+ "-O2 -flto -fuse-linker-plugin tmpdir/lto-5.o" "" \
+ {dummy.c} "lto-5.exe" "lto-5.out" "" "c"] \
++ [list "LTO 10" \
++ "-O2 -flto -fuse-linker-plugin tmpdir/lto-10.o" "" \
++ {dummy.c} "lto-10.exe" "lto-10.out" "" "c"] \
+ [list "LTO 11" \
+ "-O -flto -fuse-linker-plugin tmpdir/liblto-11.a" "" \
+ {dummy.c} "lto-11.exe" "lto-11.out" "" "c"] \
+@@ -378,6 +405,15 @@ if { [is_elf_format] && [check_lto_share
+ }
+ }
+
++set testname "Build liblto-4.a"
++remote_file host delete "tmpdir/liblto-4.a"
++set catch_output [run_host_cmd "$ar" "rc tmpdir/liblto-4.a tmpdir/lto-4a.o tmpdir/lto-4b.o tmpdir/lto-4c.o"]
++if {![string match "" $catch_output]} {
++ unresolved $testname
++ restore_notify
++ return
++}
++
+ set testname "Build liblto-11.a"
+ remote_file host delete "tmpdir/liblto-11.a"
+ set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
+@@ -416,11 +452,26 @@ if { [at_least_gcc_version 4 7] } {
+ }
+ }
+
++# Fedora specific binutils patches break some of the tests that follow...
++restore_notify
++return
++
++
+ # Run "ld -r" to generate inputs for complex LTO tests.
+ run_dump_test "lto-3r"
+ remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o"
++run_dump_test "lto-4r-a"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-a.o"
++run_dump_test "lto-4r-b"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-b.o"
++run_dump_test "lto-4r-c"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-c.o"
++run_dump_test "lto-4r-d"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-4r-d.o"
+ run_dump_test "lto-5r"
+ remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
++run_dump_test "lto-10r"
++remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
+
+ run_cc_link_tests $lto_link_symbol_tests
+
diff --git a/source/d/binutils/patches/binutils-rh1312151.patch b/source/d/binutils/patches/binutils-rh1312151.patch
new file mode 100644
index 00000000..e989b86f
--- /dev/null
+++ b/source/d/binutils/patches/binutils-rh1312151.patch
@@ -0,0 +1,22 @@
+--- binutils-2.26.orig/bfd/elflink.c 2016-02-26 13:21:54.134859610 +0000
++++ binutils-2.26/bfd/elflink.c 2016-02-26 13:22:49.083168157 +0000
+@@ -555,6 +555,19 @@ bfd_elf_record_link_assignment (bfd *out
+ if (h == NULL)
+ return provide;
+
++ if (h->versioned == unknown)
++ {
++ /* Set versioned if symbol version is unknown. */
++ char *version = strrchr (name, ELF_VER_CHR);
++ if (version)
++ {
++ if (version > name && version[-1] != ELF_VER_CHR)
++ h->versioned = versioned_hidden;
++ else
++ h->versioned = versioned;
++ }
++ }
++
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
diff --git a/source/d/binutils/binutils.export.demangle.h.diff b/source/d/binutils/patches/binutils.export.demangle.h.diff
index 1f31cd11..1f31cd11 100644
--- a/source/d/binutils/binutils.export.demangle.h.diff
+++ b/source/d/binutils/patches/binutils.export.demangle.h.diff
diff --git a/source/d/binutils/binutils.no-config-h-check.diff b/source/d/binutils/patches/binutils.no-config-h-check.diff
index 55cba7fb..55cba7fb 100644
--- a/source/d/binutils/binutils.no-config-h-check.diff
+++ b/source/d/binutils/patches/binutils.no-config-h-check.diff
diff --git a/source/d/binutils/release.binutils-2.23.52.0.1 b/source/d/binutils/release.binutils-2.23.52.0.1
deleted file mode 100644
index 192948f3..00000000
--- a/source/d/binutils/release.binutils-2.23.52.0.1
+++ /dev/null
@@ -1,775 +0,0 @@
-This is the beta release of binutils 2.23.52.0.1 for Linux, which is
-based on binutils 2013 0226 in CVS on sourceware.org plus various
-changes. It is purely for Linux.
-
-All relevant patches in patches have been applied to the source tree.
-You can take a look at patches/README to see what have been applied and
-in what order they have been applied.
-
-Starting from the 2.23.52.0.1 release, when creating executables, BFD
-linker will issue an error for undefined weak reference which is
-defined in a shared library from DT_NEEDED. Previously BFD linker
-will silently include the shared library from DT_NEEDED.
-
-Starting from the 2.21.51.0.3 release, you must remove .ctors/.dtors
-section sentinels when building glibc or other C run-time libraries.
-Otherwise, you will run into:
-
-http://sourceware.org/bugzilla/show_bug.cgi?id=12343
-
-Starting from the 2.21.51.0.2 release, BFD linker has the working LTO
-plugin support. It can be used with GCC 4.5 and above. For GCC 4.5, you
-need to configure GCC with --enable-gold to enable LTO plugin support.
-
-Starting from the 2.21.51.0.2 release, binutils fully supports compressed
-debug sections. However, compressed debug section isn't turned on by
-default in assembler. I am planning to turn it on for x86 assembler in
-the future release, which may lead to the Linux kernel bug messages like
-
-WARNING: lib/ts_kmp.o (.zdebug_aranges): unexpected non-allocatable section.
-
-But the resulting kernel works fine.
-
-Starting from the 2.20.51.0.4 release, no diffs against the previous
-release will be provided.
-
-You can enable both gold and bfd ld with --enable-gold=both. Gold will
-be installed as ld.gold and bfd ld will be installed as ld.bfd. By
-default, ld.bfd will be installed as ld. You can use the configure
-option, --enable-gold=both/gold to choose gold as the default linker,
-ld. IA-32 binary and X64_64 binary tar balls are configured with
---enable-gold=both/ld --enable-plugins --enable-threads.
-
-Starting from the 2.18.50.0.4 release, the x86 assembler no longer
-accepts
-
- fnstsw %eax
-
-fnstsw stores 16bit into %ax and the upper 16bit of %eax is unchanged.
-Please use
-
- fnstsw %ax
-
-Starting from the 2.17.50.0.4 release, the default output section LMA
-(load memory address) has changed for allocatable sections from being
-equal to VMA (virtual memory address), to keeping the difference between
-LMA and VMA the same as the previous output section in the same region.
-
-For
-
-.data.init_task : { *(.data.init_task) }
-
-LMA of .data.init_task section is equal to its VMA with the old linker.
-With the new linker, it depends on the previous output section. You
-can use
-
-.data.init_task : AT (ADDR(.data.init_task)) { *(.data.init_task) }
-
-to ensure that LMA of .data.init_task section is always equal to its
-VMA. The linker script in the older 2.6 x86-64 kernel depends on the
-old behavior. You can add AT (ADDR(section)) to force LMA of
-.data.init_task section equal to its VMA. It will work with both old
-and new linkers. The x86-64 kernel linker script in kernel 2.6.13 and
-above is OK.
-
-The new x86_64 assembler no longer accepts
-
- monitor %eax,%ecx,%edx
-
-You should use
-
- monitor %rax,%ecx,%edx
-
-or
- monitor
-
-which works with both old and new x86_64 assemblers. They should
-generate the same opcode.
-
-The new i386/x86_64 assemblers no longer accept instructions for moving
-between a segment register and a 32bit memory location, i.e.,
-
- movl (%eax),%ds
- movl %ds,(%eax)
-
-To generate instructions for moving between a segment register and a
-16bit memory location without the 16bit operand size prefix, 0x66,
-
- mov (%eax),%ds
- mov %ds,(%eax)
-
-should be used. It will work with both new and old assemblers. The
-assembler starting from 2.16.90.0.1 will also support
-
- movw (%eax),%ds
- movw %ds,(%eax)
-
-without the 0x66 prefix. Patches for 2.4 and 2.6 Linux kernels are
-available at
-
-http://www.kernel.org/pub/linux/devel/binutils/linux-2.4-seg-4.patch
-http://www.kernel.org/pub/linux/devel/binutils/linux-2.6-seg-5.patch
-
-The ia64 assembler is now defaulted to tune for Itanium 2 processors.
-To build a kernel for Itanium 1 processors, you will need to add
-
-ifeq ($(CONFIG_ITANIUM),y)
- CFLAGS += -Wa,-mtune=itanium1
- AFLAGS += -Wa,-mtune=itanium1
-endif
-
-to arch/ia64/Makefile in your kernel source tree.
-
-Please report any bugs related to binutils 2.23.52.0.1 to
-hjl.tools@gmail.com
-
-and
-
-http://www.sourceware.org/bugzilla/
-
-Changes from binutils 2.23.51.0.9:
-
-1. Update from binutils 2013 0226.
-2. Add Intel SAMP new instruction support.
-3. Allow dynamic R_386_SIZE32, R_X86_64_SIZE32 and R_X86_64_SIZE64
-relocations agaist TLS symbols.
-4. Fix BFD linker to set STB_GNU_UNIQUE only for definition. PR 15167.
-5. Fix BFD linker to set STB_GNU_UNIQUE only if symbol is defined in
-regular object. PR 15107.
-6. Don't add DT_NEEDED for references from the LTO IR input. PR 15146.
-7. When creating executables, BFD linker will issue an error for undefined
-weak reference which is defined in a shared library from DT_NEEDED.
-PR 15149.
-8. Also trace symbol from the LTO IR input. PR 15141.
-9. Support stripping LTO IR sections. PR 15033.
-10. Don't allow a nested archive pointing to itself and don't generate
-bad archive. PR 15140.
-11. Fix objcopy segfault on non-ELF input. PR 14873.
-12. Update DWARF dump support.
-13. Improve gold.
-14. Add nios2 support.
-15. Improve mach support.
-16. Improve aarch64 support.
-17. Improve arm support.
-18. Improve avr support.
-19. Improve h8300 support.
-20. Improve meta support.
-21. Improve mips support.
-22. Improve ppc support.
-23. Improve rl78 support.
-24. Improve sparc support.
-25. Improve v850 support.
-
-Changes from binutils 2.23.51.0.8:
-
-1. Update from binutils 2013 0118.
-2. Support R_386_SIZE32, R_X86_64_SIZE32 and R_X86_64_SIZE64
-relocations.
-3. Fix x86 assembler for "xtrn@got -1". PR 15019.
-4. Don't generate old dtags with --enable-new-dtags.
-5. Add Meta support.
-6. Improve gold.
-7. Improve aarch64 support.
-8. Improve arm support.
-9. Improve cr16 support.
-10. Improve mips support.
-11. Improve ppc support.
-12. Improve v850 support.
-13. Improve xgate support.
-
-Changes from binutils 2.23.51.0.7:
-
-1. Properly adjust h->plt.refcount. PR 14980.
-
-Changes from binutils 2.23.51.0.6:
-
-1. Update from binutils 2012 1218.
-2. Add missing R_*_IRELATIVE relocations. PR 14968.
-3. Remove unnecessary R_*_NONE relocations. PR 14956.
-4. Fix ar/ranlib on 32-bit filesystems. PR 14933.
-5. Fix a "Not enough room for program headers" linker bug. PR 14926.
-6. Support self-assignment in a linker script to convert symbols to
-absolute. PR 14962.
-7. Support --copy-dt-needed-entries when creating DSO. PR 14915.
-8. Improve linker plugin DSO error handling. PR 14904.
-9. Issue warning for plugin dummy. PR 12760.
-10. Add -fuse-ld=bfd|gold support to ld and gold.
-11. Fix gold configure. PR 14897.
-12. Correct gas dependency. PR 14899.
-13. Add rdos support.
-14. Improve gold.
-15. Improve nacl support.
-16. Improve aarch64 support.
-17. Improve arm support.
-18. Improve microblaze support.
-19. Improve mips support.
-20. Improve ppc support.
-21. Improve tile support.
-
-Changes from binutils 2.23.51.0.5:
-
-1. Update from binutils 2012 1123.
-2. Fix 64-bit jecxz encoding regression in x86 assembler. PR 14859.
-3. Revert an accidental linker change. PR 14862.
-4. Fix x32 TLS LD to LE optimization in gold. PR 14858.
-5. Add "-z global" option to set DF_1_GLOBAL to ld.
-6. Improve ld plugin error handling.
-7. Port ld lib32 arrangement from Debian.
-8. Properly set the output maxpagesize when rewriting program header.
-PR 14493.
-9. Add additional DF_1_XXX support to readelf.
-10. Improve nacl support with separate code segments.
-11. Improve macos support.
-12. Improve arm support.
-13. Improve microblaze support.
-14. Improve mips support.
-15. Improve ppc support.
-16. Improve sparc support.
-
-Changes from binutils 2.23.51.0.4:
-
-1. Update from binutils 2012 1110.
-2. Support new Linux NOTE sections.
-3. Add -z stacksize=SIZE option to ld to set size of stack segment.
-4. Fix a BFD IOVEC close bug. PR 14813.
-5. Fix a BFD IOVEC on archive bug. PR 14567.
-6. Fix archive support for non-ELF targets. PR 14481.
-7. Improve gold.
-8. Improve COFF support.
-9. Improve arm support.
-10. Improve microblaze support.
-11. Improve mips support.
-12. Improve ppc support.
-13. Improve rx support.
-14. Improve s390 support.
-15. Improve v850 support.
-16. Improve xgate support.
-
-Changes from binutils 2.23.51.0.3:
-
-1. Update from binutils 2012 1026.
-2. Fix an LTO linker bug. PR 14747.
-3. Add cx16 arch feature to x86 assembler.
-4. Add -march=bdver3 option to x86 assembler.
-5. Properly handle ignored REX prefix with fwait in x86 disassembler.
-6. Fix x32 register names in objdump DWARF output.
-7. Add NT_SIGINFO/NT_FILE support to readelf.
-8. Add linker --ignore-unresolved-symbol option from NetBSD.
-9. Treat .gdb_index section as debug section. PR 14662.
-10. Add --debug-dump=addr, --debug_dump=cu_index options to readelf and
-objdump.
-11. Add dwp, DWARF packaging utility.
-12. Add compressed debug section support to Windows. PR 14067.
-13. Improve gold.
-14. Improve aarch64 support.
-15. Improve arm support.
-16. Improve hppa support.
-17. Improve mips support.
-18. Improve s390 support.
-19. Improve tile support.
-20. Improve v850 support.
-
-Changes from binutils 2.23.51.0.2:
-
-1. Update from binutils 2012 0918.
-2. Properly handle versioned STB_SECONDARY symbols.
-3. Fix wrong symbol type with common symbol and weak function. PR 14591.
-4. Ignore discarded sections when converting mov to lea.
-5. Improve gold.
-6. Improve avr support.
-7. Improve aarch64 support.
-8. Improve moxie support.
-9. Improve ppc support.
-10. Improve tile support.
-
-Changes from binutils 2.23.51.0.1:
-
-1. Update from binutils 2012 0908.
-2. Fix STB_SECONDARY support:
- a. Generate STB_SECONDARY symbols in DSO by default.
- b. Properly handle STB_SECONDAY symbols when linking with archive.
- c. Don't allow .weak directive to override .secondary directive.
-3. Optimize i386/x86-64 linker to convert GOT load (MOV) to LEA.
-4. Clarify x86 assembler error messages. PR 14457.
-5. Improve NOP/prefetch support in x86 disassembler.
-6. Improve Intel syntax support in x86 assembler.
-7. Add -march={btver1, btver2} options to x86 assembler.
-8. Fix binutils build with --enable-shared. PR 4970.
-9. Also provide __executable_start for PIE. PR 14525.
-10. Use xmalloc to allocate memory for argument list file. PR 14526.
-11. Add Intel Itanium Series 9500 support to assembler/diassembler.
-12. Ignore section symbols without a BFD section when outputing symbols
-and check bad section index. PR 14493.
-13. Improve archive reader. PR 14475.
-14. Support DW_OP_GNU_const_index reader.
-15. Improve handling of imput files with empty ELF group sections.
-PR 14444.
-16. Fix IFUNC support in s390 linker.
-17. Improve gold.
-18. Add aarch64 support.
-19. Improve arm support.
-20. Improve mips support.
-21. Improve mmix support.
-22. Improve moxie support.
-23. Improve ppc support.
-24. Improve s390 support.
-25. Improve tile support.
-
-Changes from binutils 2.22.52.0.4:
-
-1. Update from binutils 2012 0806.
-2. Add Intel ADX, RDSEED and PRFCHW new instruction support.
-3. Support 'rep bsf', 'rep bsr', and 'rep ret' syntax in x86 assembler.
-4. Mark 256-bit vmovntdqa as AVX2 instruction for x86 assembler.
-5. Improve x86 assembler error handling.
-6. Improve the repeat directive support in assembler. PR 14201.
-7. Improve x86-64 disassembler on superfluous prefixes.
-8. Fix x86 disassembler crash on bad XOP instructions. PR 14355.
-9. Support STB_SECONDARY:
-
-https://groups.google.com/forum/?hl=en&fromgroups#!forum/generic-abi
-
-10. Added SORT_NONE to the linker script language to disable section
-sorting and properly handle .init/.fini sections. PR 14156.
-11. Fix a weak alias linker bug. PR 14323.
-12. Fix the NULL GNU_RELRO segment linker bug. PR 14207.
-13. Fix the bad GNU_RELRO segment linker bug. PR 14215.
-14. Add linker support of __ehdr_start symbol for the ELF file header.
-15. Add IFUNC support to s390 linker.
-16. Fix ar for >4GB member. PR 14302.
-17. Fix objcopy --compress-debug-sections on empty debug section. PR
-14319.
-18. Fix readelf/objdup to display null bytes in DWARF debug info. PR
-14420.
-19. Improve gold.
-20. Improve arm support.
-21. Improve avr support.
-22. Improve cris support.
-23. Improve m68k support.
-24. Improve mips support.
-25. Improve ppc support.
-26. Improve vax support.
-27. Improve xgate support.
-
-Changes from binutils 2.22.52.0.3:
-
-1. Update from binutils 2012 0604.
-2. Check addend overflow for R_X86_64_RELATIVE64.
-3. Fix ar/nm/ranlib with --plugin.
-4. Create .eh_frame_hdr section only if needed. PR 13909.
-5. Properly create .eh_frame section for PLT. PR 14105.
-6. Fix a linker crash. PR 14170.
-7. Fix readelf to properly display addend.
-8. Don't make _DYNAMIC/_GLOBAL_OFFSET_TABLE_/_PROCEDURE_LINKAGE_TABLE_
-symbols absolute for x86 and ppc.
-9. Properly handle shared libraries with zero dynamic symbols. PRs
-7023/13962.
-10. Update readelf/assembler to support multibyte characters in symbol
-names.
-11. Add --strip-dwo/--extract-dwo options to objcopy/strip.
-12. Add R_X86_64_RELATIVE64 support to gold.
-13. Improve gold.
-14. Improve NACL support.
-15. Improve alpha support.
-16. Improve avr support.
-17. Improve m68k support.
-18. Improve mips support.
-19. Improve ppc support.
-20. Improve vax support.
-
-Changes from binutils 2.22.52.0.2:
-
-1. Update from binutils 2012 0507.
-2. Fix Linux kernel build by reverting the PR 13621 fix. PR 14052.
-3. Add support for x86_64-*-linux-gnux32 target.
-4. Improve x86 assembler.
-5. Improve DWARF support.
-6. Improve gold.
-7. Improve rx support.
-8. Improve sparc support.
-9. Add xgate support.
-
-Changes from binutils 2.22.52.0.1:
-
-1. Update from binutils 2012 0424.
-2. Support Intel HLE and RTM extension.
-3. Add NACL support.
-4. Fix -Bsymbolic with protected function pointer. PR 13880.
-5. Fix an IFUNC regression. PR 13817.
-6. Fix x86 NOP fill regression. PR 13675.
-7. Fix a linker regression. PR 13991.
-8. Fix dangling global hidden symbol in symtab. PR 13621.
-9. Fix objcopy, strip and ld for --emit-relocs. PR 13947.
-10. Improve gold.
-11. Improve mach support.
-12. Improve vms support.
-13. Improve windows support.
-14. Improve arm support.
-15. Improve avr support.
-16. Improve mips support.
-17. Improve ppc support.
-18. Improve rx support.
-19. Improve s390 support.
-20. Improve sh support.
-21. Improve sparc support.
-22. Improve tile support.
-
-Changes from binutils 2.22.51.0.1:
-
-1. Update from binutils 2012 0131.
-2. Add x32 support to gold.
-3. Support linker arch-depedent fill. PR 13616.
-4. Add i386 NACL support to x86 assembler.
-5. Add fake zero displacement for .d8 and .d32 suffixes to x86 assembler.
-6. Add vmfunc support to x86 assembler/disassembler.
-7. Support >2GB archive member. PR 13534.
-8. Support R_X86_64_PC32 relocation for PIC on x32. PR 13581.
-9. Fix LTO linker with --start-group and archive. PR 12758.
-10. Fix linker with --build-id. PR 12451.
-11. Improve linker dead code dependency removal on DSO. PR 12772.
-12. Improve demangler.
-13. Fix elf64-x86-64.c build with GCC 4.7.
-14. Avoid linker -z text crash. PR 13468.
-15. Avoid readelf crash. PR 13622.
-16. Avoid nm crash on --size-sort --no-sort. PR 13593.
-17. Fix linker COFF SECREL32 relocation support. PR 13491.
-18. Improve gold.
-19. Improve mach support.
-20. Improve arm support.
-21. Improve avr support.
-22. Improve hppa support.
-23. Improve m68k support.
-24. Improve mips support.
-25. Improve ppc support.
-26. Improve rl78 support.
-27. Improve rx support.
-
-Changes from binutils 2.21.53.0.2:
-
-1. Update from binutils 2011 1118.
-2. Fix ar --plugin on archive with mixed IR/non-IR objects. PR 13298.
-3. Preserve the maximum alignment and size for common symbols. PR 13250.
-4. Fix LTO linker with -as-needed. PR 13287.
-5. Fix --plugin support on thin archive. PR 13257.
-6. Fix LTO linker on thin archive. PR 13183.
-7. Fix --plugin slim object support on archive. PR 13278.
-8. Support LDPR_PREVAILING_DEF_IRONLY_EXP in linker plugin. PR 13229.
-9. Don't make make IR symbols dynamic. PR 13244.
-10. Fix LTO linker with --as-needed. PR 13201.
-11. Properly handle 2 IR symbols with the same comdat key. PR 13066.
-12. Keep .debug_types sections with linker garbage collection. PR 13233.
-13. Fix -ffunction-sections -Wl,--gc-sections failure with symbol
-versioning. PR 13195.
-14. Improve linker garbage collection support. PR 13177.
-15. Remove symbols hidden by version scripts with --gc-sections. PR 12975.
-16. Remove unnecessary GOT relocation created for IFUNC. PR 13178.
-17. Move IRELATIVE relocations to the end. PR 13302.
-18. Avoid readelf core dump. PR 13219.
-19. Check zero address size when dumping DWARF sections. PR 13196.
-20. Remove the group section if all members are removed. PR 13180.
-21. Support R_X86_64_64 and R_X86_64_RELATIVE64 relocations for x32.
-PR 13082.
-22. Add Adapteva Epiphany support.
-23. Add Renesas RL78 support.
-24. Improve gold.
-25. Improve mach-o support.
-26. Improve alpha support.
-27. Improve arm support.
-28. Improve hppa support.
-29. Improve mips support.
-30. Improve ppc support.
-31. Improve rx support.
-32. Improve sparc support.
-
-Changes from binutils 2.21.53.0.1:
-
-1. Update from binutils 2011 0804.
-2. Add Intel K1OM support.
-3. Allow R_X86_64_64 relocation for x32 and check x32 relocation overflow.
-PR ld/13048.
-4. Support direct call in x86-64 assembly code. PR gas/13046.
-5. Add ia32 Google Native Client support.
-6. Add .debug_macro section support.
-7. Improve gold.
-8. Improve VMS support.
-9. Improve arm support.
-10. Improve hppa support.
-11. Improve mips support.
-12. Improve mmix support.
-13. Improve ppc support.
-
-Changes from binutils 2.21.52.0.2:
-
-1. Update from binutils 2011 0716.
-2. Fix LTO linker bugs. PRs 12982/12942.
-3. Fix rorx support in x86 assembler/disassembler for AVX Programming
-Reference (June, 2011).
-4. Fix an x86-64 ELFOSABI linker regression.
-5. Update ELFOSABI_GNU support. PR 12913.
-6. Fix a linker regression with prelink support. PR 12921.
-7. Add unwind info to x86 PLT section. PR 12570.
-8. Support x32 core files.
-9. Support native x32 linker.
-10. Fix linker --gc-sections on note sections. PR 12851.
-11. Avoid linker crash on bad input. PR 12887.
-12. Add section flags in linker script.
-13. Improve elf linker -z option support.
-14. Fix nm on compressed debug sections. PR 12983.
-15. Fix an ar bug. PR 12558.
-16. Fix an ia64 linker regression. PR 12978.
-17. Improve gold.
-18. Improve VMS support.
-19. Add TILE-Gx/TILEPro support.
-20. Improve alpha support.
-21. Improve avr support.
-22. Improve mips support.
-23. Improve arm support.
-24. Improve ppc support.
-25. Improve sh support.
-26. Improve TIC6X support.
-
-Changes from binutils 2.21.52.0.1:
-
-1. Update from binutils 2011 0610.
-2. Support AVX Programming Reference (June, 2011)
-3. Allow R_X86_64_64 relocations in SEC_DEBUGGING sections when building
-x32 shared libraries. Used to build kernel x32 vDSO.
-4. Fix linker --gc-sections on note sections. PR 12851.
-5. Update readelf to handle binaries containing corrupt version
-information. PR 12855.
-6. Improve gold.
-7. Improve VMS support.
-8. Improve mips support.
-
-Changes from binutils 2.21.51.0.9:
-
-1. Update from binutils 2011 0608.
-2. Fix an x86 linker regression. PRs 12833/12837/12859.
-3. Fix an x86-64 large model TLS linker bug. PR 12809.
-4. Fix LTO bugs. PRs 12758/12760.
-5. Add a new linker switch, -plugin-save-temps.
-6. Fix an linker bug for warning on common symbol in archive.
-7. Fix warning support when building shared library. PR 12761.
-8. Reduce linker memory usage when linking many small object files.
-PR 12682.
-9. Fix a thin archive bug. PR 12710.
-10. Fix a TLS linker bug. PR 12763.
-11. Improve gold.
-12. Improve DWARF dump support.
-13. Improve XCOFF support.
-14. Improve arm support.
-15. Improve cris support.
-16. Improve ia64 ILP32 support.
-17. Improve mips support.
-18. Improve ppc support.
-19. Improve rx support.
-20. Improve s390 support.
-21. Improve tic30 support.
-22. Improve tic6x support.
-23. Improve v850 support.
-
-Changes from binutils 2.21.51.0.8:
-
-1. Update from binutils 2011 0507.
-2. Improve LTO bfd linker. PRs 12365/12696/12672
-3. Fix a linker regression with constructor attribute in C++. PR 12730.
-4. Warn relocation in readonly section when creating a shared object.
-5. Remove empty output sections. PR 12718.
-6. Remove DT_TEXTREL with local IFUNC symbols. PR 12694.
-7. Properly set ELFOSABI_LINUX for STB_GNU_UNIQUE. PR 10549.
-8. Fix objcopy on unusual input. PR 12632.
-9. Fix an ar regression. PR 12720.
-10 Avoid linker crash on bad linker input.
-11. Fix a linker script regression. PR 12726.
-12. Support new GNU DWARF extensions.
-13. Initial support for SystemTap note sections.
-14. Add --dwarf-start and --dwarf-end to readelf and objdump.
-15. Disable 3dnow and 3dnowa for bdver1 in x86 assembler.
-16. Improve gold.
-17. Improve VMS support.
-18. Improve arm support.
-19. Improve mips support.
-20. Improve ppc support.
-21. Improve s390 support.
-22. Improve tic6x support.
-
-Changes from binutils 2.21.51.0.7:
-
-1. Update from binutils 2011 0408.
-2. Fix x32 TLS linker bug.
-3. Enable .quad directive in x32 assembler.
-4. Fix an assembler regression. PRs 12569/12589.
-5. Add --size-check= assembler option to issue a warning, instead of an
-error, on bad ELF .size directive.
-6. Fix an ia32 linker bug with TLS/PIE. PR 12654.
-7. Fix Intel L1OM linker library search path.
-8. Fix a linker buffer overflow on malformed inputs. PR 12613.
-9. Check corrupted symtab in nm/readelf. PR 12639.
-10. Avoid objcopy crash on archive with unknown objects. PR 12632.
-11. Fix "ar -t". PR 12590.
-12. Fix many memory leaks.
-13. Improve DWARF support.
-14. Improve gold.
-15. Improve VMS support.
-16. Improve Windows support.
-17. Improve alpha support.
-18. Improve arm support.
-19. Improve avr support.
-20. Improve ppc support.
-21. Improve sparc support.
-22. Improve tic6x support.
-
-Changes from binutils 2.21.51.0.6:
-
-1. Update from binutils 2011 0306.
-2. Supprt x32 TLS IE->LE transition.
-3. Change x32 library directory from /lib32 to /libx32.
-4. Improve LTO linker support. Fix PRs 12439/12314/12248/12430.
-5. Improve linker plugin support.
-6. Fix an ar bug. PR 12513.
-7. Properly generate nops for ia32. PR 6957.
-8. Improve readelf DT_GNU_HASH support. PR 12523.
-9. Improve readelf on invalid input. PR 12467.
-10. Update ELF assembler to issue an error on invalid .size directive.
-PR 12519,
-11. Properly handle PT_DYNAMIC segment with zero size sections. PR 12516.
-12. Add a new linker option, --verbose=2, to report plugin symbol
-status.
-13. Properly handle entry symbols in linker LTO support. PR 12507.
-14. Improve gold.
-15. Improve arm support.
-16. Improve bfin support.
-17. Improve mips support.
-18. Improve ppc support.
-
-Changes from binutils 2.21.51.0.5:
-
-1. Update from binutils 2011 0118.
-2. Fix x32 (ILP32) support. Renamed assembler option to --x32. It
-can create working static and dynamic x32 executables.
-3. Add BMI and TBM new instruction support.
-4. Fix x86 disassembler to properly display sign-extended byte.
-5. Improve IFUNC linker support. PRs 12366/12371.
-6. Fix readelf bug on archive. PR 12408.
-7. Fix a assembler when compressing empty debug sections. PR 12409.
-8. Fix a warning symbol linker bug. PR 12339.
-9. Fix a duplicated assert message linker bug. PR 12380.
-10. Fix plugin linker build. PR 12391.
-11. Fix a plugin linker crash. PR 12364.
-12. Improve plugin linker.
-13. Improve gold.
-14. Improve arm support.
-15. Improve mips support.
-16. Improve rx support.
-
-Changes from binutils 2.21.51.0.4:
-
-1. Update from binutils 2011 0104.
-2. Add ILP32 support:
-
-http://www.kernel.org/pub/linux/devel/binutils/ilp32/abi.pdf
-
-to Linux/x86-64.
-3. Prevent the Linux x86-64 kernel build failure and remove
-__ld_compatibility support. PR 12356.
-4. Improve gold.
-5. Improve Windows support.
-6. Improve hppa support.
-7. Improve mips support.
-
-Changes from binutils 2.21.51.0.3:
-
-1. Update from binutils 2010 1217.
-2. Fix the Linux relocatable kernel build. PR 12327.
-3. Improve mips support.
-
-Changes from binutils 2.21.51.0.2:
-
-1. Update from binutils 2010 1215.
-2. Add BFD linker support for placing input .ctors/.dtors sections in
-output .init_array/.fini_array section. Add SORT_BY_INIT_PRIORITY. The
-benefits are
- a. Avoid output .ctors/.dtors section in executables and shared
- libraries.
- b. Allow mixing input .ctors/.dtors sections with input
- .init_array/.fini_array sectiobs. GCC PR 46770.
-3. Add BFD linker support for "ld -r" on mixed IR/non-IR objects. Add
-the new ELF section type SHT_GNU_OBJECT_ONLY (0x6ffffff8). See
-
-http://sourceware.org/bugzilla/show_bug.cgi?id=12291
-
-4. Update BFD linker to accept -flto and -flto-partition= for GCC LTO
-option compatibility.
-5. Fix BFD linker to avoid touching uncompressed section content when
-relocating DWARF debug sections for errror reporting.
-6. Mark .gnu.lto_* sections with SHF_EXCLUDE.
-7. Add --target option to ar.
-8. Improve gold.
-9. Improve AIX support.
-10. Improve Windows support.
-11. Improve mips support.
-
-Changes from binutils 2.21.51.0.1:
-
-1. Update from binutils 2010 1206.
-2. Fix BFD and GOLD linker for compressed debug section support.
-3. Fix BFD linker plugin support. PR ld/12246, ld/12247, ld/12248,
-ld/12277, ld/12288 and ld/12289.
-4. Update BFD linker to group .text.exit, text.startup and .text.hot
-sections.
-5. Fix linker for W_EH_PE_datarel handling. PR ld/12253.
-6. Fix array access bug in readelf/elfedit. PR binutils/11742 and
-binutils/12235.
-7. Support dumping GDB .gdb_index section.
-8. Install plugin-api.h.
-9. Improve gold.
-10. Improve Solaris support.
-11. Improve VMS support.
-12. Improve Windows support.
-13. Improve arm support.
-14. Improve bfin support.
-15. Improve mips support.
-16. Improve s390 support.
-17. Improve z80 support.
-
-Changes from binutils 2.20.51.0.12:
-
-1. Update from binutils 2010 1110.
-2. Fix ld plugin support. PRs lto/46291 and lto/46319.
-3. Fix x86 assembler to properly fold _GLOBAL_OFFSET_TABLE_ in Intel
-syntax. PR 12186.
-4. Update assembler to ensure that group signature symbols have the name
-of the group.
-5. Avoid unnecessary relaxation in assembler. PR 12049.
-6. Update linker NOLOAD processing.
-7. Update linker not to include archive members when symbols therein have
-already been defined. PR 12001.
-8. Change objdump to display compressed section names without 'z'.
-9. Improve gold.
-10. Improve Solaris support.
-11. Improve VMS support.
-12. Improve Windows support.
-13. Improve arm support.
-14. Improve cr16 support.
-15. Improve mips support.
-16. Improve ppc support.
-17. Improve tic6x support.
-
-The file list:
-
-1. binutils-2.23.52.0.1.tar.bz2. Source code.
-
-The primary sites for the beta Linux binutils are:
-
-1. http://www.kernel.org/pub/linux/devel/binutils/
-
-It is also available on linux/release/2.23.52.0.1 branch at
-
-http://git.kernel.org/?p=linux/kernel/git/hjl/binutils.git;a=summary
-
-Thanks.
-
-
-H.J. Lu
-hjl.tools@gmail.com
-02/27/2013
diff --git a/source/d/ccache/ccache.SlackBuild b/source/d/ccache/ccache.SlackBuild
index ea0e5a69..ecd70ac3 100755
--- a/source/d/ccache/ccache.SlackBuild
+++ b/source/d/ccache/ccache.SlackBuild
@@ -27,7 +27,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -56,7 +56,8 @@ find . \
./configure \
--prefix=/usr \
- --mandir=/usr/man
+ --mandir=/usr/man \
+ --sysconfdir=/etc
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/source/d/clisp/clisp.SlackBuild b/source/d/clisp/clisp.SlackBuild
index f6d9a268..f98057df 100755
--- a/source/d/clisp/clisp.SlackBuild
+++ b/source/d/clisp/clisp.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,11 +23,10 @@
VERSION=2.49
DIRNAME=2.49
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
# Bundled libraries:
-FFCALLVER=20080704cvs
-LIBSIGSEVVER=2.8
+FFCALLVER=20120424cvs
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -63,46 +62,15 @@ rm -rf $PKG
mkdir -p $TMP $PKG
#=================================================================
-# First we need this. It used to ship with CLISP, but no longer does.
-cd $TMP
-rm -rf libsigsegv-$LIBSIGSEVVER
-tar xvf $CWD/libsigsegv-$LIBSIGSEVVER.tar.?z* || exit 1
-cd libsigsegv-$LIBSIGSEVVER || exit 1
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# Nah.
-# --enable-shared=yes
-
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --enable-static=yes
-make $NUMJOBS || make || exit 1
-
-# Now I must install this. Sorry, it's gotta happen.
-make install
-# Now add to the package:
-mkdir -p $PKG/usr
-make install prefix=$PKG/usr
-strip --strip-unneeded $PKG/usr/lib${LIBDIRSUFFIX}/*.so
-strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a
-mkdir -p $PKG/usr/doc/clisp-$VERSION/libsigsegv-$LIBSIGSEVVER
-cp -a \
- AUTHORS COPYING ChangeLog NEWS PORTING README \
- $PKG/usr/doc/clisp-$VERSION/libsigsegv-$LIBSIGSEVVER
-
-#=================================================================
# Build ffcall - needed for --dynamic-ffi with clisp.
cd $TMP
rm -rf ffcall*
-tar xvf $CWD/ffcall-$FFCALLVER.tar.* || exit 1
+tar xvf $CWD/ffcall-$FFCALLVER.tar.?z* || exit 1
cd ffcall* || exit 1
+
+# Not sure if this is useful or not, but I'll leave it for MoZes:
+zcat $CWD/ffcall-arm.patch.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -139,7 +107,7 @@ rmdir $PKG/usr/share/
# OK, now we compile CLISP:
cd $TMP
rm -rf clisp-$VERSION
-tar xvf $CWD/clisp-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/clisp-$VERSION.tar.?z* || exit 1
cd clisp-$DIRNAME || exit 1
chown -R root:root .
find . \
diff --git a/source/d/clisp/ffcall-arm.patch b/source/d/clisp/ffcall-arm.patch
new file mode 100644
index 00000000..8e8509b1
--- /dev/null
+++ b/source/d/clisp/ffcall-arm.patch
@@ -0,0 +1,93 @@
+--- ./callback/trampoline_r/cache-armel.c.orig 2009-04-27 10:44:13.000000000 -0600
++++ ./callback/trampoline_r/cache-armel.c 2013-09-06 11:00:00.000000000 -0600
+@@ -12,8 +12,9 @@
+
+ void __TR_clear_cache (char *first_addr, char *last_addr)
+ {
+- register unsigned long _beg __asm ("a1") = first_addr;
+- register unsigned long _end __asm ("a2") = last_addr;
++ register unsigned long _beg __asm ("a1") = (unsigned long) first_addr;
++ register unsigned long _end __asm ("a2") = (unsigned long) last_addr;
+ register unsigned long _flg __asm ("a3") = 0;
+- __asm __volatile__ ("swi 0x9f0002" : : "r" (_beg), "r" (_end), "r" (_flg));
++ register unsigned long _sys __asm ("r7") = __ARM_NR_cacheflush;
++ __asm __volatile__ ("swi 0x0" : "=r" (_beg) : "0" (_beg), "r" (_end), "r" (_flg), "r" (_sys));
+ }
+--- ./callback/trampoline_r/cache-armel.s.orig 2009-04-27 10:44:13.000000000 -0600
++++ ./callback/trampoline_r/cache-armel.s 2013-09-06 13:00:00.000000000 -0600
+@@ -1,5 +1,5 @@
+- .cpu arm10tdmi
+- .fpu softvfp
++ .arch armv7-a
++ .fpu vfpv3-d16
+ .file "cache-armel.c"
+ .text
+ .align 2
+@@ -9,10 +9,13 @@ __TR_clear_cache:
+ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+- @ lr needed for prologue
++ str r7, [sp, #-4]!
+ mov r2, #0
++ mov r7, #2
++ movt r7, 15
+ #APP
+- swi 0x9f0002
++ swi 0x0
++ ldr r7, [sp], #4
+ bx lr
+ .size __TR_clear_cache, .-__TR_clear_cache
+- .ident "GCC: (GNU) 3.4.4 (release) (CodeSourcery ARM 2005q3-2)"
++ .ident "GCC: (GNU) 4.8.1 20130829 (Red Hat 4.8.1-7)"
+--- ./trampoline/cache-armel.c.orig 2009-04-27 10:44:14.000000000 -0600
++++ ./trampoline/cache-armel.c 2013-09-06 11:00:00.000000000 -0600
+@@ -12,8 +12,9 @@
+
+ void __TR_clear_cache (char *first_addr, char *last_addr)
+ {
+- register unsigned long _beg __asm ("a1") = first_addr;
+- register unsigned long _end __asm ("a2") = last_addr;
++ register unsigned long _beg __asm ("a1") = (unsigned long) first_addr;
++ register unsigned long _end __asm ("a2") = (unsigned long) last_addr;
+ register unsigned long _flg __asm ("a3") = 0;
+- __asm __volatile__ ("swi 0x9f0002" : : "r" (_beg), "r" (_end), "r" (_flg));
++ register unsigned long _sys __asm ("r7") = __ARM_NR_cacheflush;
++ __asm __volatile__ ("swi 0x0" : "=r" (_beg) : "0" (_beg), "r" (_end), "r" (_flg), "r" (_sys));
+ }
+--- ./trampoline/cache-armel.s.orig 2009-04-27 10:44:14.000000000 -0600
++++ ./trampoline/cache-armel.s 2013-09-06 13:00:00.000000000 -0600
+@@ -1,24 +1,21 @@
+- .cpu arm10tdmi
+- .fpu softvfp
++ .arch armv7-a
++ .fpu vfpv3-d16
+ .file "cache-armel.c"
+ .text
+ .align 2
+ .global __TR_clear_cache
+ .type __TR_clear_cache, %function
+ __TR_clear_cache:
+- @ args = 0, pretend = 0, frame = 8
++ @ args = 0, pretend = 0, frame = 0
+ @ frame_needed = 0, uses_anonymous_args = 0
+ @ link register save eliminated.
+- sub sp, sp, #8
+- @ lr needed for prologue
+- str r0, [sp, #4]
+- str r1, [sp, #0]
+- ldr r0, [sp, #4]
+- ldr r1, [sp, #0]
++ str r7, [sp, #-4]!
+ mov r2, #0
++ mov r7, #2
++ movt r7, 15
+ #APP
+- swi 0x9f0002
+- add sp, sp, #8
++ swi 0x0
++ ldr r7, [sp], #4
+ bx lr
+ .size __TR_clear_cache, .-__TR_clear_cache
+- .ident "GCC: (GNU) 3.4.4 (release) (CodeSourcery ARM 2005q3-2)"
++ .ident "GCC: (GNU) 4.8.1 20130829 (Red Hat 4.8.1-7)"
diff --git a/source/d/cmake/cmake.SlackBuild b/source/d/cmake/cmake.SlackBuild
index 6150598b..1f832f00 100755
--- a/source/d/cmake/cmake.SlackBuild
+++ b/source/d/cmake/cmake.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -m32 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -71,7 +71,15 @@ cd cmake-build
--prefix=/usr \
--docdir=/doc/$PKGNAM-$VERSION \
--qt-gui \
- --system-libs
+ --system-curl \
+ --system-expat \
+ --no-system-jsoncpp \
+ --system-zlib \
+ --system-bzip2 \
+ --system-libarchive
+# --system-libs
+# --sphinx-man \
+
# Build
CFLAGS="$SLKCFLAGS" \
@@ -80,12 +88,25 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--docdir=/doc/$PKGNAM-$VERSION \
--qt-gui \
- --system-libs \
+ --system-curl \
+ --system-expat \
+ --no-system-jsoncpp \
+ --system-zlib \
+ --system-bzip2 \
+ --system-libarchive \
--build=$ARCH-slackware-linux
+# --system-libs \
+# --sphinx-man \
+
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Install preprocessed man pages instead of adding six new python packages:
+( cd $PKG
+ tar xf $CWD/cmake.manpages.tar.xz
+)
+
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ../ChangeLog.txt ]; then
diff --git a/source/d/cscope/cscope.SlackBuild b/source/d/cscope/cscope.SlackBuild
index 21e86d3f..e88ece4d 100755
--- a/source/d/cscope/cscope.SlackBuild
+++ b/source/d/cscope/cscope.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,13 @@
PKGNAM=cscope
-VERSION=${VERSION:-$(echo $(basename $(echo $PRGNAM-*.tar.bz2 | cut -f 2 -d -) .tar.bz2) | cut -f 2 -d -)}
+VERSION=${VERSION:-$(echo $(basename $(echo $PRGNAM-*.tar.xz | cut -f 2 -d -) .tar.xz) | cut -f 2 -d -)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,12 +41,32 @@ PKG=$TMP/package-cscope
NUMJOBS=${NUMJOBS:-" -j7 "}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-$VERSION
-tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.xz || exit 1
cd ${PKGNAM}-$VERSION || exit 1
chown -R root:root .
find . \
@@ -55,8 +75,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--build=${ARCH}-slackware-linux
diff --git a/source/d/dev86/README b/source/d/dev86/README
deleted file mode 100644
index 407e6d07..00000000
--- a/source/d/dev86/README
+++ /dev/null
@@ -1,8 +0,0 @@
-This is a complete 8086 assembler and loader which can make 32-bit
-code for the 386+ processors. In the past it was used to compile the
-16-bit bootsector and setup binaries for the kernel, but modern
-(2.4.x or newer) kernels use GNU ld instead.
-
-There's a package bin86 already included in Slackware, which is a
-subset of the programs of dev86. Therefore the bin86 programs are
-not included in this package. \ No newline at end of file
diff --git a/source/d/dev86/dev86-x86_64.noelks.patch b/source/d/dev86/dev86-x86_64.noelks.patch
deleted file mode 100644
index f30ae35a..00000000
--- a/source/d/dev86/dev86-x86_64.noelks.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-* Wed Jan 25 2006 Jeremy Katz <katzj@redhat.com> - 0.16.17-2
-- build on x86_64
-- don't build elks (it's not happy on x86_64)
-
---- dev86-0.16.17/makefile.in.noelks 2006-01-25 17:03:02.000000000 -0500
-+++ dev86-0.16.17/makefile.in 2006-01-25 17:03:19.000000000 -0500
-@@ -89,10 +89,10 @@
-
- #ifdef GNUMAKE
- all: check_config bcc86 cpp unproto copt as86 ar86 ld86 objdump86 \
-- library lib-bsd alt-libs elksemu
-+ library lib-bsd alt-libs
-
- install: check_config install-bcc install-man \
-- install-lib install-emu
-+ install-lib
-
- install-all: install install-other
-
diff --git a/source/d/dev86/dev86-x86_64.patch b/source/d/dev86/dev86-x86_64.patch
deleted file mode 100644
index 01fa549b..00000000
--- a/source/d/dev86/dev86-x86_64.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- dev86-0.16.17/bcc/bcc.c.fix 2005-01-03 23:41:55.000000000 +0100
-+++ dev86-0.16.17/bcc/bcc.c 2006-12-27 16:32:57.000000000 +0100
-@@ -226,12 +226,12 @@
-
- } else {
- /* Relative paths to normal PREFIX directory */
-- default_include = build_libpath("-I", "/lib/bcc/include", "");
-- default_libdir = build_libpath("-L", "/lib/bcc", libdir_suffix);
-- optim_rules = build_libpath("-d", "/lib/bcc", libdir_suffix);
-+ default_include = build_libpath("-I", "/lib64/bcc/include", "");
-+ default_libdir = build_libpath("-L", "/lib64/bcc", libdir_suffix);
-+ optim_rules = build_libpath("-d", "/lib64/bcc", libdir_suffix);
-
-- build_prefix("/lib/bcc", libdir_suffix, "");
-- build_prefix("/lib/bcc", "", "");
-+ build_prefix("/lib64/bcc", libdir_suffix, "");
-+ build_prefix("/lib64/bcc", "", "");
- }
-
- build_prefix("/bin", "", "");
diff --git a/source/d/dev86/dev86.SlackBuild b/source/d/dev86/dev86.SlackBuild
index 5c4e1555..583e821c 100755
--- a/source/d/dev86/dev86.SlackBuild
+++ b/source/d/dev86/dev86.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2007-2008 Heinz Wiesinger <hmwiesinger@gmx.at>
+# Copyright 2007, 2008, 2015 Heinz Wiesinger, Amsterdam, The Netherlands
# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,13 +23,13 @@
PRGNAM=dev86
SRCNAM=Dev86src
-VERSION=0.16.17
-BUILD=${BUILD:-2}
+VERSION=0.16.21
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,8 +41,8 @@ TMP=${TMP:-/tmp}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -55,35 +55,29 @@ else
LIBDIRSUFFIX=""
fi
-set -e
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvzf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-if [ "$ARCH" = "x86_64" ]; then
- zcat $CWD/dev86-x86_64.patch.gz \
- | patch -p1 --verbose --backup --suffix=.orig -E
- # On x86_64 elks will not build:
- zcat $CWD/dev86-x86_64.noelks.patch.gz \
- | patch -p1 --verbose --backup --suffix=.orig -E
-fi
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
+cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
#Does not compile with changed CFLAGS
#CC="gcc" make CFLAGS="-Wall -Wstrict-prototypes $SLKCFLAGS -g" DIST=$PKG
CC="gcc" \
-make DIST=$PKG MANDIR=/usr/man LIBDIR=/usr/lib${LIBDIRSUFFIX}/bcc \
+make \
+ DIST=$PKG MANDIR=/usr/man LIBDIR=/usr/lib${LIBDIRSUFFIX}/bcc \
INCLDIR=/usr/lib${LIBDIRSUFFIX}/bcc LOCALPREFIX=/usr \
- install install-man
+ install install-man || exit 1
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -95,7 +89,6 @@ cp -a Changes Contributors COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
for i in bootblocks copt dis88 elksemu unproto ; do
cp -a $i/README $PKG/usr/doc/$PRGNAM-$VERSION/README.$i ;
done
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \;
if [ "$ARCH" = "x86_64" ]; then # Remove traces of elks
diff --git a/source/d/dev86/dev86.info b/source/d/dev86/dev86.info
deleted file mode 100644
index ef223b1d..00000000
--- a/source/d/dev86/dev86.info
+++ /dev/null
@@ -1,8 +0,0 @@
-PRGNAM="dev86"
-VERSION="0.16.15"
-HOMEPAGE="http://homepage.ntlworld.com/robert.debath/"
-DOWNLOAD="http://distrib-coffee.ipsl.jussieu.fr/pub/linux/momonga/1/PKGS/SOURCES/Dev86src-0.16.15.tar.gz"
-MD5SUM="c3266fa6530b472e1d3e98d826db6409"
-MAINTAINER="Heinz Wiesinger"
-EMAIL="HMWiesinger@gmx.at"
-APPROVED="rworkman"
diff --git a/source/d/dev86/slack-desc b/source/d/dev86/slack-desc
index 557638a6..50c46cef 100644
--- a/source/d/dev86/slack-desc
+++ b/source/d/dev86/slack-desc
@@ -6,7 +6,7 @@ dev86: code for the 386+ processors. In the past it was used to compile the
dev86: 16-bit bootsector and setup binaries for the kernel, but modern
dev86: (2.4.x or newer) kernels use GNU ld instead.
dev86:
-dev86: Homepage: http://homepage.ntlworld.com/robert.debath/
+dev86: Homepage: http://v3.sk/~lkundrak/dev86/
dev86:
dev86:
dev86:
diff --git a/source/d/flex/flex.SlackBuild b/source/d/flex/flex.SlackBuild
index 89239ce2..b79f0e76 100755
--- a/source/d/flex/flex.SlackBuild
+++ b/source/d/flex/flex.SlackBuild
@@ -28,7 +28,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -44,8 +44,8 @@ PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/d/gcc/c89.sh b/source/d/gcc/c89.sh
new file mode 100644
index 00000000..35486ea8
--- /dev/null
+++ b/source/d/gcc/c89.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c89"
+for opt; do
+ case "$opt" in
+ -ansi|-std=c89|-std=iso9899:1990) fl="";;
+ -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/source/d/gcc/c99.sh b/source/d/gcc/c99.sh
new file mode 100644
index 00000000..88dd8064
--- /dev/null
+++ b/source/d/gcc/c99.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c99"
+for opt; do
+ case "$opt" in
+ -std=c99|-std=iso9899:1999) fl="";;
+ -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/source/d/gcc/ecj-4.5.jar b/source/d/gcc/ecj-4.5.jar
deleted file mode 100644
index 8d5ed17a..00000000
--- a/source/d/gcc/ecj-4.5.jar
+++ /dev/null
Binary files differ
diff --git a/source/d/gcc/ecj-4.9.jar b/source/d/gcc/ecj-4.9.jar
new file mode 100644
index 00000000..29dc442f
--- /dev/null
+++ b/source/d/gcc/ecj-4.9.jar
Binary files differ
diff --git a/source/d/gcc/ecj.url b/source/d/gcc/ecj.url
new file mode 100644
index 00000000..9a28b2ce
--- /dev/null
+++ b/source/d/gcc/ecj.url
@@ -0,0 +1 @@
+ftp://sourceware.org/pub/java/ecj-4.9.jar
diff --git a/source/d/gcc/gcc.66782.diff b/source/d/gcc/gcc.66782.diff
new file mode 100644
index 00000000..0743f885
--- /dev/null
+++ b/source/d/gcc/gcc.66782.diff
@@ -0,0 +1,124 @@
+Index: config/i386/i386.md
+===================================================================
+--- config/i386/i386.md (revision 225539)
++++ config/i386/i386.md (working copy)
+@@ -108,6 +108,7 @@
+ UNSPEC_LD_MPIC ; load_macho_picbase
+ UNSPEC_TRUNC_NOOP
+ UNSPEC_DIV_ALREADY_SPLIT
++ UNSPEC_MS_TO_SYSV_CALL
+ UNSPEC_PAUSE
+ UNSPEC_LEA_ADDR
+ UNSPEC_XBEGIN_ABORT
+@@ -11584,6 +11585,15 @@
+ "* return ix86_output_call_insn (insn, operands[0]);"
+ [(set_attr "type" "call")])
+
++(define_insn "*call_rex64_ms_sysv"
++ [(match_parallel 2 "call_rex64_ms_sysv_operation"
++ [(call (mem:QI (match_operand:DI 0 "call_insn_operand" "rBwBz"))
++ (match_operand 1))
++ (unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)])]
++ "TARGET_64BIT && !SIBLING_CALL_P (insn)"
++ "* return ix86_output_call_insn (insn, operands[0]);"
++ [(set_attr "type" "call")])
++
+ (define_insn "*sibcall"
+ [(call (mem:QI (match_operand:W 0 "sibcall_insn_operand" "UBsBz"))
+ (match_operand 1))]
+@@ -11808,6 +11818,16 @@
+ (match_dup 3)))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)])])
+
++(define_insn "*call_value_rex64_ms_sysv"
++ [(match_parallel 3 "call_rex64_ms_sysv_operation"
++ [(set (match_operand 0)
++ (call (mem:QI (match_operand:DI 1 "call_insn_operand" "rBwBz"))
++ (match_operand 2)))
++ (unspec [(const_int 0)] UNSPEC_MS_TO_SYSV_CALL)])]
++ "TARGET_64BIT && !SIBLING_CALL_P (insn)"
++ "* return ix86_output_call_insn (insn, operands[1]);"
++ [(set_attr "type" "callv")])
++
+ (define_expand "call_value_pop"
+ [(parallel [(set (match_operand 0)
+ (call (match_operand:QI 1)
+Index: config/i386/predicates.md
+===================================================================
+--- config/i386/predicates.md (revision 225533)
++++ config/i386/predicates.md (working copy)
+@@ -616,6 +616,36 @@
+ && XINT (XEXP (op, 0), 1) == UNSPEC_GOTPCREL);
+ })
+
++;; Return true if OP is a call from MS ABI to SYSV ABI function.
++(define_predicate "call_rex64_ms_sysv_operation"
++ (match_code "parallel")
++{
++ unsigned creg_size = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
++ unsigned i;
++
++ if ((unsigned) XVECLEN (op, 0) != creg_size + 2)
++ return false;
++
++ for (i = 0; i < creg_size; i++)
++ {
++ rtx elt = XVECEXP (op, 0, i+2);
++ enum machine_mode mode;
++ unsigned regno;
++
++ if (GET_CODE (elt) != CLOBBER
++ || GET_CODE (SET_DEST (elt)) != REG)
++ return false;
++
++ regno = x86_64_ms_sysv_extra_clobbered_registers[i];
++ mode = SSE_REGNO_P (regno) ? TImode : DImode;
++
++ if (GET_MODE (SET_DEST (elt)) != mode
++ || REGNO (SET_DEST (elt)) != regno)
++ return false;
++ }
++ return true;
++})
++
+ ;; Match exactly zero.
+ (define_predicate "const0_operand"
+ (match_code "const_int,const_wide_int,const_double,const_vector")
+Index: config/i386/i386.c
+===================================================================
+--- config/i386/i386.c (revision 225533)
++++ config/i386/i386.c (working copy)
+@@ -25639,7 +25639,9 @@
+ rtx callarg2,
+ rtx pop, bool sibcall)
+ {
+- rtx vec[3];
++ unsigned int const cregs_size
++ = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
++ rtx vec[3 + cregs_size];
+ rtx use = NULL, call;
+ unsigned int vec_len = 0;
+
+@@ -25742,16 +25744,18 @@
+ if (TARGET_64BIT_MS_ABI
+ && (!callarg2 || INTVAL (callarg2) != -2))
+ {
+- int const cregs_size
+- = ARRAY_SIZE (x86_64_ms_sysv_extra_clobbered_registers);
+- int i;
++ unsigned i;
+
++ vec[vec_len++] = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, const0_rtx),
++ UNSPEC_MS_TO_SYSV_CALL);
++
+ for (i = 0; i < cregs_size; i++)
+ {
+ int regno = x86_64_ms_sysv_extra_clobbered_registers[i];
+ machine_mode mode = SSE_REGNO_P (regno) ? TImode : DImode;
+
+- clobber_reg (&use, gen_rtx_REG (mode, regno));
++ vec[vec_len++]
++ = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (mode, regno));
+ }
+ }
+
diff --git a/source/d/gcc/gcc.69140.diff b/source/d/gcc/gcc.69140.diff
new file mode 100644
index 00000000..ace60ebd
--- /dev/null
+++ b/source/d/gcc/gcc.69140.diff
@@ -0,0 +1,13 @@
+--- ./gcc/config/i386/i386.c.orig 2015-11-18 09:45:26.000000000 -0600
++++ ./gcc/config/i386/i386.c 2016-02-05 13:50:07.202981920 -0600
+@@ -9677,6 +9677,10 @@
+ if (TARGET_64BIT_MS_ABI && get_frame_size () > SEH_MAX_FRAME_SIZE)
+ return true;
+
++ /* SSE saves require frame-pointer when stack is misaligned. */
++ if (TARGET_64BIT_MS_ABI && ix86_incoming_stack_boundary < 128)
++ return true;
++
+ /* In ix86_option_override_internal, TARGET_OMIT_LEAF_FRAME_POINTER
+ turns off the frame pointer by default. Turn it back on now if
+ we've not got a leaf function. */
diff --git a/source/d/gcc/gcc.SlackBuild b/source/d/gcc/gcc.SlackBuild
index cb96a231..f23ed521 100755
--- a/source/d/gcc/gcc.SlackBuild
+++ b/source/d/gcc/gcc.SlackBuild
@@ -2,7 +2,7 @@
# GCC package build script (written by volkerdi@slackware.com)
#
# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA
-# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -44,9 +44,17 @@
# I see no reason to continue 386 support in the latest Slackware (and indeed
# it's no longer easily possible).
+# Some more notes, Mon Aug 3 19:49:51 UTC 2015:
+#
+# Changing to -march=i586 for 32-bit x86 as several things (Mesa being one of
+# them) no longer work if constrained to -march=i486. We're not going to use
+# -march=i686 since the only additional opcode is CMOV, which is actually less
+# efficient on modern CPUs running in 32-bit mode than the alternate i586
+# instructions. No need to throw i586 CPUs under the bus (yet).
+
PKGNAM=gcc
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
# How many jobs to run in parallel:
NUMJOBS=" -j 7 "
@@ -54,8 +62,8 @@ NUMJOBS=" -j 7 "
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -137,13 +145,14 @@ cat $CWD/slack-desc.gcc-go > $PKG8/install/slack-desc
cd $TMP
tar xvf $CWD/gcc-$VERSION.tar.?z*
-#( cd gcc-$VERSION
-# If we had any patches, we would apply them here, but we're .diff free now.
-#) || exit 1
+( cd gcc-$VERSION/gcc
+ zcat $CWD/gcc.66782.diff.gz | patch -p0 --verbose || exit 1
+ zcat $CWD/gcc.69140.diff.gz | patch -p2 --verbose || exit 1
+) || exit 1
# Copy ecj.jar into the TLD of the source. Needed for java compiler.
# This can be retrieved from ftp://sourceware.org/pub/java
-cp $CWD/ecj-4.5.jar gcc-$VERSION/ecj.jar
+cp $CWD/ecj-4.9.jar gcc-$VERSION/ecj.jar
# Use an antlr runtime to compile javadoc.
# The runtime can be obtained from:
@@ -393,7 +402,7 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
# If enough people need "treelang" support for it may be considered.
# --enable-languages=ada,c,c++,fortran,java,objc,treelang
# I think it's incorrect to include this option (as it'll end up set
- # to i486 on x86 platforms), and we want to tune the binary structure
+ # to i586 on x86 platforms), and we want to tune the binary structure
# for i686, as that's where almost all of the optimization speedups
# are to be found.
# Correct me if my take on this is wrong.
@@ -405,6 +414,9 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
GCC_ARCHOPTS="--disable-multilib"
fi
+ # NOTE: For Slackware 15.0, look into removing --with-default-libstdcxx-abi=gcc4-compatible,
+ # which will then require rebuilding all C++ libraries. That is, if there's any benefit.
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../gcc-$VERSION/configure --prefix=/usr \
@@ -419,10 +431,13 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
--enable-objc-gc \
--with-system-zlib \
--with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \
+ --enable-libstdcxx-dual-abi \
+ --with-default-libstdcxx-abi=gcc4-compatible \
--disable-libunwind-exceptions \
--enable-__cxa_atexit \
--enable-libssp \
--enable-lto \
+ --disable-install-libiberty \
--with-gnu-ld \
--verbose \
--enable-java-home \
@@ -489,10 +504,6 @@ chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj.a
rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a
-# This is provided by binutils, so delete it here:
-rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libiberty.a
-rm -f $PKG1/usr/lib/libiberty.a # catch-all
-
# Fix stuff up:
( cd $PKG1/usr/info ; rm dir ; gzip -9 * )
( cd $PKG1
@@ -528,6 +539,9 @@ rm -f $PKG1/usr/lib/libiberty.a # catch-all
ln -sf gfortran-gcc-$VERSION ${TARGET}-g77
ln -sf gfortran g77
ln -sf gfortran f77
+ cat $CWD/c89.sh > c89
+ cat $CWD/c99.sh > c99
+ chmod 755 c89 c99
)
( cd $PKG1/usr/man
@@ -735,19 +749,22 @@ mv $PKG1/usr/bin/gnative2ascii $PKG5/usr/bin
( cd $PKG8
mkdir -p usr/bin
mv $PKG1/usr/bin/*gccgo* usr/bin
+ mv $PKG1/usr/bin/go{,fmt} usr/bin
mkdir -p usr/libexec/gcc/$TARGET/$VERSION
- mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/go1 usr/libexec/gcc/$TARGET/$VERSION/go1
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/{cgo,go1} usr/libexec/gcc/$TARGET/$VERSION
mkdir -p usr/info
mv $PKG1/usr/info/gccgo.info.gz usr/info
mkdir -p usr/lib${LIBDIRSUFFIX}
mv $PKG1/usr/lib${LIBDIRSUFFIX}/go usr/lib${LIBDIRSUFFIX}
- mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.la,libgo.so*,libgobegin.a} usr/lib${LIBDIRSUFFIX} || exit 1
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.la,libgo.so*,libgobegin.a,libgolibbegin.a,libnetgo.a} usr/lib${LIBDIRSUFFIX} || exit 1
# Ordinarily Slackware doesn't package static libraries, but in this case
# it is useful for deploying compiled binaries on machines that do not yet
# have libgo.so.0.0.0.
mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a usr/lib${LIBDIRSUFFIX}
mkdir -p usr/man/man1
mv $PKG1/usr/man/man1/gccgo.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/go.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gofmt.1.gz usr/man/man1
) || exit 1
# Filter all .la files (thanks much to Mark Post for the sed script):
diff --git a/source/d/gcc/slack-desc.gcc b/source/d/gcc/slack-desc.gcc
index 1f842675..72e33b46 100644
--- a/source/d/gcc/slack-desc.gcc
+++ b/source/d/gcc/slack-desc.gcc
@@ -11,8 +11,8 @@ gcc:
gcc: GCC is the GNU Compiler Collection.
gcc:
gcc: This package contains those parts of the compiler collection needed to
-gcc: compile C code. Other packages add C++, Fortran, Go, Objective-C, and
-gcc: Java support to the compiler core.
+gcc: compile C code. Other packages add Ada, C++, Fortran, Go,
+gcc: Objective-C, and Java support to the compiler core.
gcc:
gcc:
gcc:
diff --git a/source/d/gcc/slack-desc.gcc-gnat b/source/d/gcc/slack-desc.gcc-gnat
index ca2da571..9aa4b3c4 100644
--- a/source/d/gcc/slack-desc.gcc-gnat
+++ b/source/d/gcc/slack-desc.gcc-gnat
@@ -8,12 +8,12 @@
|-----handy-ruler------------------------------------------------------|
gcc-gnat: gcc-gnat (Ada support for GCC)
gcc-gnat:
-gcc-gnat: Ada 95 support for the GNU Compiler Collection.
+gcc-gnat: Ada support for the GNU Compiler Collection.
gcc-gnat:
gcc-gnat: This package contains those parts of the compiler collection needed to
-gcc-gnat: compile Ada 95 code. Ada95 is the object oriented successor to the
-gcc-gnat: Ada83 language. The base gcc package is also required.
-gcc-gnat:
+gcc-gnat: compile Ada code. GNAT implements Ada 95, Ada 2005 and Ada 2012, and
+gcc-gnat: it may also be invoked in Ada 83 compatibility mode. By default, GNAT
+gcc-gnat: assumes Ada 2012. The base gcc package is also required.
gcc-gnat:
gcc-gnat:
gcc-gnat:
diff --git a/source/d/gdb/gdb.SlackBuild b/source/d/gdb/gdb.SlackBuild
index a3f3e742..41f6abfd 100755
--- a/source/d/gdb/gdb.SlackBuild
+++ b/source/d/gdb/gdb.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,7 +22,7 @@
PKGNAM=gdb
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -30,7 +30,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -52,7 +52,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf gdb-$VERSION
-tar xvf $CWD/gdb-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/gdb-$VERSION.tar.xz || exit 1
cd gdb-$VERSION || exit 1
chown -R root:root .
find . \
@@ -66,8 +66,9 @@ find . \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--infodir=/usr/info \
+ --with-guile \
--with-python \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
( cd readline ; make )
diff --git a/source/d/git/git-2.9.0.tar.sign b/source/d/git/git-2.9.0.tar.sign
new file mode 100644
index 00000000..47cdfdf4
--- /dev/null
+++ b/source/d/git/git-2.9.0.tar.sign
Binary files differ
diff --git a/source/d/git/git.SlackBuild b/source/d/git/git.SlackBuild
index 5130525b..3a947c59 100755
--- a/source/d/git/git.SlackBuild
+++ b/source/d/git/git.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -29,7 +29,7 @@ NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -40,16 +40,16 @@ eval $(perl '-V:installvendorlib')
PERLDIR=$installvendorlib/$ARCH-linux-thread-multi/auto
if ls /var/log/packages/git-* 1> /dev/null 2> /dev/null ; then
- echo "Git is installed. The package should be removed before"
- echo "building, or the new package might be missing some"
- echo "perl modules."
+ echo "The git package needs to be removed before building to ensure that"
+ echo "the perl modules are included in the new package."
echo
- echo "You'll be given a short time to consider this."
- sleep 3600
+ echo "Removing the git package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg git
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/d/git/git.url b/source/d/git/git.url
index a88fd582..a4c15db3 100644
--- a/source/d/git/git.url
+++ b/source/d/git/git.url
@@ -1 +1 @@
-http://git-core.googlecode.com/
+https://www.kernel.org/pub/software/scm/git/
diff --git a/source/d/open-cobol/open-cobol.SlackBuild b/source/d/gnu-cobol/gnu-cobol.SlackBuild
index 8e0afd59..142c5cf7 100755
--- a/source/d/open-cobol/open-cobol.SlackBuild
+++ b/source/d/gnu-cobol/gnu-cobol.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,15 +21,15 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PKGNAM=open-cobol
+PKGNAM=gnu-cobol
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/d/gnu-cobol/slack-desc b/source/d/gnu-cobol/slack-desc
new file mode 100644
index 00000000..9a6c9b4f
--- /dev/null
+++ b/source/d/gnu-cobol/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gnu-cobol: gnu-cobol (open source COBOL compiler)
+gnu-cobol:
+gnu-cobol: GNU Cobol is an open source COBOL compiler. GNU Cobol implements a
+gnu-cobol: substantial part of the COBOL 85 and COBOL 2002 standards, as well as
+gnu-cobol: many extensions of the existent COBOL compilers. GNU Cobol translates
+gnu-cobol: COBOL into C and compiles the translated code using the native C
+gnu-cobol: compiler. GNU Cobol was written by Roger While and Keisuke Nishida,
+gnu-cobol: with the invaluable assistance of many others.
+gnu-cobol:
+gnu-cobol: Homepage: http://opencobol.add1tocobol.com/gnucobol
+gnu-cobol:
diff --git a/source/d/guile/guile.SlackBuild b/source/d/guile/guile.SlackBuild
index 9f94e55b..ef6cdd1a 100755
--- a/source/d/guile/guile.SlackBuild
+++ b/source/d/guile/guile.SlackBuild
@@ -23,7 +23,7 @@
PKGNAM=guile
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -84,6 +84,11 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Move libguile*-gdb.scm to GDB's autoload directory to avoid
+# getting "not an ELF file" errors from ldconfig:
+mkdir -p $PKG/usr/share/gdb/auto-load/usr/lib${LIBDIRSUFFIX}
+mv $PKG/usr/lib${LIBDIRSUFFIX}/libguile*-gdb.scm $PKG/usr/share/gdb/auto-load/usr/lib${LIBDIRSUFFIX} || exit 1
+
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/d/help2man/help2man.SlackBuild b/source/d/help2man/help2man.SlackBuild
index bc93fffa..7c21dc6f 100755
--- a/source/d/help2man/help2man.SlackBuild
+++ b/source/d/help2man/help2man.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +22,14 @@
PKGNAM=help2man
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
@@ -73,7 +73,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION
chown -R root:root .
diff --git a/source/d/intltool/intltool-0.51.0-perl-5.22.patch b/source/d/intltool/intltool-0.51.0-perl-5.22.patch
new file mode 100644
index 00000000..be672d0c
--- /dev/null
+++ b/source/d/intltool/intltool-0.51.0-perl-5.22.patch
@@ -0,0 +1,44 @@
+diff -Naur intltool-0.51.0.orig/intltool-update.in intltool-0.51.0/intltool-update.in
+--- intltool-0.51.0.orig/intltool-update.in 2015-03-09 02:39:54.000000000 +0100
++++ intltool-0.51.0/intltool-update.in 2015-06-19 01:52:07.171228154 +0200
+@@ -1062,7 +1062,7 @@
+ }
+ }
+
+- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
++ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
+ {
+ my $rest = $3;
+ my $untouched = $1;
+@@ -1190,10 +1190,10 @@
+ $name =~ s/\(+$//g;
+ $version =~ s/\(+$//g;
+
+- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+ }
+
+ if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
+@@ -1219,11 +1219,11 @@
+ $version =~ s/\(+$//g;
+ $bugurl =~ s/\(+$//g if (defined $bugurl);
+
+- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
++ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
+ }
+
+ # \s makes this not work, why?
diff --git a/source/d/intltool/intltool.SlackBuild b/source/d/intltool/intltool.SlackBuild
index ef265b32..bf5a8f72 100755
--- a/source/d/intltool/intltool.SlackBuild
+++ b/source/d/intltool/intltool.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +23,14 @@
PKGNAM=intltool
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
@@ -56,7 +56,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
-cd ${PKGNAM}-$VERSION
+cd ${PKGNAM}-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -66,6 +66,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Compatability with perl 5.22:
+zcat $CWD/intltool-0.51.0-perl-5.22.patch.gz | patch -p1 --verbose || exit 1
+
# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
@@ -73,7 +76,7 @@ CFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/${PKGNAM}-$VERSION \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# Build and install:
make $NUMJOBS || make || exit 1
diff --git a/source/d/libtool/libtool.SlackBuild b/source/d/libtool/libtool.SlackBuild
index ffa0bc4b..44810932 100755
--- a/source/d/libtool/libtool.SlackBuild
+++ b/source/d/libtool/libtool.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,14 +21,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=${VERSION:-$(echo libtool-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-4}
NUMJOBS=${NUMJOBS:--j6}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -39,8 +39,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libtool
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
diff --git a/source/d/libtool/libtool.no.moved.warning.diff b/source/d/libtool/libtool.no.moved.warning.diff
index 80077516..783c97af 100644
--- a/source/d/libtool/libtool.no.moved.warning.diff
+++ b/source/d/libtool/libtool.no.moved.warning.diff
@@ -1,44 +1,42 @@
---- ./libltdl/config/ltmain.m4sh.orig 2010-09-22 09:45:18.000000000 -0500
-+++ ./libltdl/config/ltmain.m4sh 2010-11-06 13:38:09.000000000 -0500
-@@ -5710,7 +5710,7 @@
+diff -Nur libtool-2.4.3.orig/build-aux/ltmain.in libtool-2.4.3/build-aux/ltmain.in
+--- libtool-2.4.3.orig/build-aux/ltmain.in 2014-10-27 12:20:51.000000000 -0500
++++ libtool-2.4.3/build-aux/ltmain.in 2014-10-28 11:01:00.731257807 -0500
+@@ -5978,7 +5978,7 @@
# Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
+ if test yes = "$installed"; then
if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-- func_warning "library \`$lib' was moved."
-+ #func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
-@@ -6277,8 +6277,8 @@
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+- func_warning "library '$lib' was moved."
++ #func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+@@ -6546,7 +6546,7 @@
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
-- test "$absdir" != "$libdir" && \
-- func_warning "\`$deplib' seems to be moved"
-+ #test "$absdir" != "$libdir" && \
-+ # func_warning "\`$deplib' seems to be moved"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+- func_warning "'$deplib' seems to be moved"
++ #func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
---- ./libltdl/config/ltmain.sh.orig 2010-09-22 09:45:43.000000000 -0500
-+++ ./libltdl/config/ltmain.sh 2010-11-06 13:38:49.000000000 -0500
-@@ -6499,7 +6499,7 @@
+diff -Nur libtool-2.4.3.orig/build-aux/ltmain.sh libtool-2.4.3/build-aux/ltmain.sh
+--- libtool-2.4.3.orig/build-aux/ltmain.sh 2014-10-27 13:04:31.000000000 -0500
++++ libtool-2.4.3/build-aux/ltmain.sh 2014-10-28 11:01:14.196484821 -0500
+@@ -7890,7 +7890,7 @@
# Find the relevant object directory and library name.
- if test "X$installed" = Xyes; then
+ if test yes = "$installed"; then
if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-- func_warning "library \`$lib' was moved."
-+ #func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
-@@ -7066,8 +7066,8 @@
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+- func_warning "library '$lib' was moved."
++ #func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+@@ -8458,7 +8458,7 @@
test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
-- test "$absdir" != "$libdir" && \
-- func_warning "\`$deplib' seems to be moved"
-+ #test "$absdir" != "$libdir" && \
-+ # func_warning "\`$deplib' seems to be moved"
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+- func_warning "'$deplib' seems to be moved"
++ #func_warning "'$deplib' seems to be moved"
- path="-L$absdir"
+ path=-L$absdir
fi
diff --git a/source/d/llvm/clang.toolchains.i586.triple.diff b/source/d/llvm/clang.toolchains.i586.triple.diff
new file mode 100644
index 00000000..3795f5e0
--- /dev/null
+++ b/source/d/llvm/clang.toolchains.i586.triple.diff
@@ -0,0 +1,11 @@
+--- ./tools/clang/lib/Driver/ToolChains.cpp.orig 2015-09-13 13:30:39.748069603 -0500
++++ ./tools/clang/lib/Driver/ToolChains.cpp 2015-09-13 13:32:16.584075557 -0500
+@@ -1296,7 +1296,7 @@
+ "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
+ "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
+ "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
+- "i486-slackware-linux", "i686-montavista-linux", "i686-linux-android",
++ "i486-slackware-linux", "i586-slackware-linux", "i686-montavista-linux", "i686-linux-android",
+ "i586-linux-gnu"};
+
+ static const char *const MIPSLibDirs[] = {"/lib"};
diff --git a/source/d/llvm/llvm.SlackBuild b/source/d/llvm/llvm.SlackBuild
index 1f5150c7..4d15ffaa 100755
--- a/source/d/llvm/llvm.SlackBuild
+++ b/source/d/llvm/llvm.SlackBuild
@@ -2,8 +2,8 @@
# Slackware build script for llvm
-# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands
-# Copyright 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008-2015 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,14 +24,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=llvm
-VERSION=3.3
+VERSION=${VERSION:-$(echo llvm-*.tar.xz | rev | cut -f 4- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -58,50 +58,68 @@ fi
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-${VERSION}.src
+rm -rf $PKGNAM-${VERSION}.src $PKGNAM-${VERSION}
tar xvf $CWD/$PKGNAM-$VERSION.src.tar.xz || exit 1
-cd $PKGNAM-${VERSION}.src/tools
+cd $PKGNAM-${VERSION}/tools || cd $PKGNAM-${VERSION}.src/tools || exit 1
tar xvf $CWD/cfe-$VERSION.src.tar.xz || exit 1
- mv cfe-${VERSION}.src clang || exit 1
+ mv cfe-${VERSION} clang 2>/dev/null || mv cfe-${VERSION}.src clang || exit 1
cd ../
+cd tools/clang/tools || exit 1
+ tar xvf $CWD/clang-tools-extra-$VERSION.src.tar.xz || exit 1
+ mv clang-tools-extra-${VERSION} extra 2>/dev/null \
+ || mv clang-tools-extra-${VERSION}.src extra || exit 1
+cd ../../../
+
+cd projects || exit 1
+ tar xvf $CWD/compiler-rt-$VERSION.src.tar.xz || exit 1
+ mv compiler-rt-${VERSION} compiler-rt 2>/dev/null \
+ || mv compiler-rt-${VERSION}.src compiler-rt || exit 1
+cd ../
+
+# Support GCC built for i586-slackware-linux:
+zcat $CWD/clang.toolchains.i586.triple.diff.gz | patch -p1 --verbose || exit 1
+
+# Use i586 $ARCH on 32-bit x86:
+sed -r "/ifeq.*CompilerTargetArch/s#i386#i586#g" \
+ -i projects/compiler-rt/make/platform/clang_linux.mk
+
chown -R root:root .
-chmod -R u+w,go+r-w,a-s .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
-# --mandir doesn't work currently
# need to disable assertions to make llvm thread-safe
# clang resource dir is a relative path based on the location of the clang binary
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --enable-optimized \
- --disable-assertions \
- --enable-pic \
- --enable-experimental-targets=R600 \
- --with-clang-resource-dir="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux || exit 1
-
-# Fix hardcoded libdir
-sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
- Makefile.config
-sed -i "s|\$(PROJ_prefix)/lib|\$(PROJ_prefix)/lib$LIBDIRSUFFIX|" \
- tools/clang/lib/Headers/Makefile
-sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
- tools/clang/lib/Frontend/CompilerInvocation.cpp
-sed -i "s|\"lib\"|\"lib${LIBDIRSUFFIX}\"|" \
- tools/clang/lib/Driver/Tools.cpp
-sed -i "s|ActiveLibDir = ActivePrefix + \"/lib\"|ActiveLibDir = ActivePrefix + \"/lib${LIBDIRSUFFIX}\"|g" \
- tools/llvm-config/llvm-config.cpp
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+mkdir build
+cd build
+ cmake \
+ -DCMAKE_C_COMPILER="clang" \
+ -DCMAKE_CXX_COMPILER="clang++" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLLVM_LIBDIR_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_BUILD_LLVM_DYLIB=ON \
+ -DLLVM_DYLIB_EXPORT_ALL=ON \
+ -DLLVM_LINK_LLVM_DYLIB=ON \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DLLVM_BINUTILS_INCDIR=/usr/include \
+ -DCLANG_RESOURCE_DIR="../lib${LIBDIRSUFFIX}/clang/${VERSION}" \
+ ..
+
+ # breaks with one of the patches above. Maybe revisit later
+ # -DBUILD_SHARED_LIBS=ON \
+
+ make $NUMJOBS VERBOSE=1 || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
# Add symlinks for $ARCH-slackware-linux-{clang,clang++}:
( cd $PKG/usr/bin
@@ -110,37 +128,34 @@ make install DESTDIR=$PKG || exit 1
)
# install clang-static-analyzer
-mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer
-cp -pr tools/clang/tools/scan-{build,view} \
- $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/ || exit 1
-for i in scan-{build,view}; do
- ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/$i/$i \
- $PKG/usr/bin/$i || exit 1
-done
for i in ccc c++; do
- ln -s /usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/$i-analyzer \
+ ln -s /usr/libexec/$i-analyzer \
$PKG/usr/bin/$i-analyzer || exit 1
done
-# Fix paths in scan-build
-sed -i "s|\$RealBin/bin|/usr/bin|" \
- $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
-sed -i "s|\$RealBin/sorttable.js|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/sorttable.js|" \
- $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
-sed -i "s|\$RealBin/scanview.css|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/scanview.css|" \
- $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+## Fix paths in scan-build
+#sed -i "s|\$RealBin/bin|/usr/bin|" \
+# $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+#sed -i "s|\$RealBin/sorttable.js|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/sorttable.js|" \
+# $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+#sed -i "s|\$RealBin/scanview.css|/usr/lib${LIBDIRSUFFIX}/clang-analyzer/scan-build/scanview.css|" \
+# $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build
+#
+## fix strange permissions
+#chmod 755 $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build
+#chmod 755 $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-view
+#chmod 755 $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-view/Resources
+
+# Install Python bindings
+mkdir -p "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages"
+cp -a tools/clang/bindings/python/clang "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/"
-# Remove example libraries
-rm -f $PKG/usr/lib$LIBDIRSUFFIX/LLVMHello*
+# Compile Python scripts
+python -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/clang"
+python -O -m compileall "$PKG/usr/lib$LIBDIRSUFFIX/python2.7/site-packages/clang"
# Move man page directory:
mv $PKG/usr/share/man $PKG/usr/
-# Try to remove /usr/share, which should be empty now. If it's not, fine.
-rmdir $PKG/usr/share
-
-# Move scan-build man-page into place
-mv $PKG/usr/lib$LIBDIRSUFFIX/clang-analyzer/scan-build/scan-build.1 \
- $PKG/usr/man/man1/
# Strip binaries:
( cd $PKG
diff --git a/source/d/llvm/llvm.url b/source/d/llvm/llvm.url
index 96e8fd58..f276cfe1 100644
--- a/source/d/llvm/llvm.url
+++ b/source/d/llvm/llvm.url
@@ -1,2 +1,4 @@
-http://llvm.org/releases/3.3/llvm-3.3.tar.gz
-http://llvm.org/releases/3.3/cfe-3.3.tar.gz
+http://llvm.org/releases/3.8.0/llvm-3.8.0.src.tar.xz
+http://llvm.org/releases/3.8.0/cfe-3.8.0.src.tar.xz
+http://llvm.org/releases/3.8.0/clang-tools-extra-3.8.0.src.tar.xz
+http://llvm.org/releases/3.8.0/compiler-rt-3.8.0.src.tar.xz
diff --git a/source/d/make/make-3.82-android-build-fix.diff b/source/d/make/make-3.82-android-build-fix.diff
deleted file mode 100644
index 8cd3db0d..00000000
--- a/source/d/make/make-3.82-android-build-fix.diff
+++ /dev/null
@@ -1,16 +0,0 @@
---- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200
-+++ make-3.82/function.c 2010-10-27 01:43:27.000000000 +0200
-@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c
- {
- char c = *(t++);
-
-- if (! isspace ((unsigned char)c))
-+ if (! isblank ((unsigned char)c))
- continue;
-
- ++wordi;
-
-- while (isspace ((unsigned char)*t))
-+ while (isblank ((unsigned char)*t))
- ++t;
- }
diff --git a/source/d/make/make-3.82-bugfixes.patch b/source/d/make/make-3.82-bugfixes.patch
deleted file mode 100644
index e89f14e0..00000000
--- a/source/d/make/make-3.82-bugfixes.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-diff -urpN make/ChangeLog make-new/ChangeLog
---- make/ChangeLog 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/ChangeLog 2010-09-13 13:42:09.000000000 +0200
-@@ -1,3 +1,22 @@
-+2010-08-13 Paul Smith <psmith@gnu.org>
-+
-+ * NEWS: Accidentally forgot to back out the sorted wildcard
-+ enhancement in 3.82, so update NEWS.
-+ Also add NEWS about the error check for explicit and pattern
-+ targets in the same rule, added to 3.82.
-+
-+ * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add
-+ this in 3.82!)
-+
-+ * read.c (parse_file_seq): Fix various errors parsing archives
-+ with multiple objects in the parenthesis, as well as wildcards.
-+ Fixes Savannah bug #30612.
-+
-+2010-08-10 Paul Smith <psmith@gnu.org>
-+
-+ * main.c (main): Expand MAKEFLAGS before adding it to the
-+ environment when re-exec'ing. Fixes Savannah bug #30723.
-+
- 2010-07-28 Paul Smith <psmith@gnu.org>
-
- Version 3.82 released.
-diff -urpN make/main.c make-new/main.c
---- make/main.c 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/main.c 2010-09-13 13:42:12.000000000 +0200
-@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp
- a macro and some compilers (MSVC) don't like conditionals in macros. */
- {
- const char *features = "target-specific order-only second-expansion"
-- " else-if shortest-stem undefine"
-+ " else-if shortest-stem undefine oneshell"
- #ifndef NO_ARCHIVES
- " archives"
- #endif
-@@ -2093,7 +2093,7 @@ main (int argc, char **argv, char **envp
- const char *pv = define_makeflags (1, 1);
- char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
- sprintf (p, "MAKEFLAGS=%s", pv);
-- putenv (p);
-+ putenv (allocated_variable_expand (p));
- }
-
- if (ISDB (DB_BASIC))
-diff -urpN make/NEWS make-new/NEWS
---- make/NEWS 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/NEWS 2010-09-13 13:42:11.000000000 +0200
-@@ -18,14 +18,6 @@ http://sv.gnu.org/bugs/index.php?group=m
- * Compiling GNU make now requires a conforming ISO C 1989 compiler and
- standard runtime library.
-
--* WARNING: Future backward-incompatibility!
-- Wildcards are not documented as returning sorted values, but up to and
-- including this release the results have been sorted and some makefiles are
-- apparently depending on that. In the next release of GNU make, for
-- performance reasons, we may remove that sorting. If your makefiles
-- require sorted results from wildcard expansions, use the $(sort ...)
-- function to request it explicitly.
--
- * WARNING: Backward-incompatibility!
- The POSIX standard for make was changed in the 2008 version in a
- fundamentally incompatible way: make is required to invoke the shell as if
-@@ -42,6 +34,21 @@ http://sv.gnu.org/bugs/index.php?group=m
- existing targets were provided in $?).
-
- * WARNING: Backward-incompatibility!
-+ Wildcards were not documented as returning sorted values, but the results
-+ have been sorted up until this release.. If your makefiles require sorted
-+ results from wildcard expansions, use the $(sort ...) function to request
-+ it explicitly.
-+
-+* WARNING: Backward-incompatibility!
-+ In previous versions of make it was acceptable to list one or more explicit
-+ targets followed by one or more pattern targets in the same rule and it
-+ worked "as expected". However, this was not documented as acceptable and if
-+ you listed any explicit targets AFTER the pattern targets, the entire rule
-+ would be mis-parsed. This release removes this ability completely: make
-+ will generate an error message if you mix explicit and pattern targets in
-+ the same rule.
-+
-+* WARNING: Backward-incompatibility!
- As a result of parser enhancements, three backward-compatibility issues
- exist: first, a prerequisite containing an "=" cannot be escaped with a
- backslash any longer. You must create a variable containing an "=" and
-diff -urpN make/read.c make-new/read.c
---- make/read.c 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/read.c 2010-09-13 13:42:11.000000000 +0200
-@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned
- {
- /* This looks like the first element in an open archive group.
- A valid group MUST have ')' as the last character. */
-- const char *e = p + nlen;
-+ const char *e = p;
- do
- {
- e = next_token (e);
-@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned
- Go to the next item in the string. */
- if (flags & PARSEFS_NOGLOB)
- {
-- NEWELT (concat (2, prefix, tp));
-+ NEWELT (concat (2, prefix, tmpbuf));
- continue;
- }
-
- /* If we get here we know we're doing glob expansion.
- TP is a string in tmpbuf. NLEN is no longer used.
- We may need to do more work: after this NAME will be set. */
-- name = tp;
-+ name = tmpbuf;
-
- /* Expand tilde if applicable. */
-- if (tp[0] == '~')
-+ if (tmpbuf[0] == '~')
- {
-- tildep = tilde_expand (tp);
-+ tildep = tilde_expand (tmpbuf);
- if (tildep != 0)
- name = tildep;
- }
-@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned
- else
- {
- /* We got a chain of items. Attach them. */
-- (*newp)->next = found;
-+ if (*newp)
-+ (*newp)->next = found;
-+ else
-+ *newp = found;
-
- /* Find and set the new end. Massage names if necessary. */
- while (1)
-diff -urpN make/tests/ChangeLog make-new/tests/ChangeLog
---- make/tests/ChangeLog 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/tests/ChangeLog 2010-09-13 13:42:10.000000000 +0200
-@@ -1,3 +1,16 @@
-+2010-08-13 Paul Smith <psmith@gnu.org>
-+
-+ * scripts/features/archives: New regression tests for archive
-+ support. Test for fix to Savannah bug #30612.
-+
-+ * run_make_tests.pl (set_more_defaults): Set a %FEATURES hash to
-+ the features available in $(.FEATURES).
-+
-+2010-08-10 Paul Smith <psmith@gnu.org>
-+
-+ * scripts/features/reinvoke: Ensure command line variable settings
-+ are preserved across make re-exec. Tests Savannah bug #30723.
-+
- 2010-07-28 Paul Smith <psmith@gnu.org>
-
- * scripts/targets/POSIX: Compatibility issues with Solaris (and
-diff -urpN make/tests/run_make_tests.pl make-new/tests/run_make_tests.pl
---- make/tests/run_make_tests.pl 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/tests/run_make_tests.pl 2010-09-13 13:42:10.000000000 +0200
-@@ -29,6 +29,7 @@
- # You should have received a copy of the GNU General Public License along with
- # this program. If not, see <http://www.gnu.org/licenses/>.
-
-+%FEATURES = ();
-
- $valgrind = 0; # invoke make with valgrind
- $valgrind_args = '';
-@@ -367,6 +368,8 @@ sub set_more_defaults
- $parallel_jobs = 1;
- }
-
-+ %FEATURES = map { $_ => 1 } split /\s+/, `sh -c "echo '\\\$(info \\\$(.FEATURES))' | $make_path -f- 2>/dev/null"`;
-+
- # Set up for valgrind, if requested.
-
- if ($valgrind) {
-diff -urpN make/tests/scripts/features/archives make-new/tests/scripts/features/archives
---- make/tests/scripts/features/archives 1970-01-01 01:00:00.000000000 +0100
-+++ make-new/tests/scripts/features/archives 2010-09-13 13:42:10.000000000 +0200
-@@ -0,0 +1,42 @@
-+# -*-mode: perl-*-
-+
-+$description = "Test GNU make's archive management features.";
-+
-+$details = "\
-+This only works on systems that support it.";
-+
-+# If this instance of make doesn't support archives, skip it
-+exists $FEATURES{archives} or return -1;
-+
-+# Create some .o files to work with
-+utouch(-60, qw(a1.o a2.o a3.o));
-+
-+# Very simple
-+run_make_test('all: libxx.a(a1.o)',
-+ '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n");
-+
-+# Multiple .o's. Add a new one to the existing library
-+run_make_test('all: libxx.a(a1.o a2.o)',
-+ '', "ar rv libxx.a a2.o\na - a2.o\n");
-+
-+# Touch one of the .o's so it's rebuilt
-+utouch(-40, 'a1.o');
-+run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
-+
-+# Use wildcards
-+run_make_test('all: libxx.a(*.o)',
-+ '', "#MAKE#: Nothing to be done for `all'.\n");
-+
-+# Touch one of the .o's so it's rebuilt
-+utouch(-30, 'a1.o');
-+run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n");
-+
-+# Use both wildcards and simple names
-+utouch(-50, 'a2.o');
-+run_make_test('all: libxx.a(a3.o *.o)', '',
-+ "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n");
-+
-+rmfiles(qw(a1.o a2.o a3.o libxx.a));
-+
-+# This tells the test driver that the perl test script executed properly.
-+1;
-diff -urpN make/tests/scripts/features/reinvoke make-new/tests/scripts/features/reinvoke
---- make/tests/scripts/features/reinvoke 2010-09-13 13:42:35.000000000 +0200
-+++ make-new/tests/scripts/features/reinvoke 2010-09-13 13:42:10.000000000 +0200
-@@ -57,9 +57,24 @@ include $(F)',
- # Now try with the file we're not updating being the actual file we're
- # including: this and the previous one test different parts of the code.
-
--run_make_test(undef, "F=b", "[ -f b ] || echo >> b\nhello\n")
-+run_make_test(undef, 'F=b', "[ -f b ] || echo >> b\nhello\n")
-
- &rmfiles('a','b','c');
-
-+# Ensure command line variables are preserved properly across re-exec
-+# Tests for Savannah bug #30723
-+
-+run_make_test('
-+ifdef RECURSE
-+-include foo30723
-+endif
-+recurse: ; @$(MAKE) -f $(MAKEFILE_LIST) RECURSE=1 test
-+test: ; @echo F.O=$(F.O)
-+foo30723: ; @touch $@
-+',
-+ '--no-print-directory F.O=bar', "F.O=bar\n");
-+
-+unlink('foo30723');
-+
- # This tells the test driver that the perl test script executed properly.
- 1;
diff --git a/source/d/make/make.SlackBuild b/source/d/make/make.SlackBuild
index 2e70788d..66f60f0b 100755
--- a/source/d/make/make.SlackBuild
+++ b/source/d/make/make.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2016 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,27 +23,26 @@
PKGNAM=make
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-make
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -70,37 +69,67 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix a problem using make-3.82 to build Android:
-zcat $CWD/make-3.82-android-build-fix.diff.gz | patch -p1 --verbose || exit 1
-
-zcat $CWD/make-3.82-bugfixes.patch.gz | patch -p1 --verbose || exit 1
-
+# Configure:
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--infodir=/usr/info \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
-make -j6 || make || exit 1
+# Build and install:
+make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-gzip -9 $PKG/usr/man/man1/*
-rm $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
# This has been here so long that it should probably stay.
# Trying to get rid of ginstall didn't go well, so... :-)
( cd $PKG/usr/bin
rm -f gmake
ln -sf make gmake )
+
mkdir -p $PKG/usr/doc/make-$VERSION
cp -a \
- ABOUT-NLS AUTHORS COPYING* NEWS README* \
+ AUTHORS COPYING* ChangeLog NEWS README* \
$PKG/usr/doc/make-$VERSION/
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/d/mercurial/mercurial.SlackBuild b/source/d/mercurial/mercurial.SlackBuild
index 0069eac2..b1629a65 100755
--- a/source/d/mercurial/mercurial.SlackBuild
+++ b/source/d/mercurial/mercurial.SlackBuild
@@ -26,7 +26,7 @@ BUILD=${BUILD-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -71,9 +71,9 @@ path=/usr/libexec/mercurial/hgk
EOF
# Bash and zsh completion:
-mkdir -p $PKG/etc/bash_completion.d
-cp -a contrib/bash_completion $PKG/etc/bash_completion.d/mercurial.sh
-chmod 644 $PKG/etc/bash_completion.d/mercurial.sh
+mkdir -p $PKG/usr/share/bash-completion/completions/
+cp -a contrib/bash_completion $PKG/usr/share/bash-completion/completions/hg
+chmod 644 $PKG/usr/share/bash-completion/completions/hg
mkdir -p $PKG/usr/share/zsh/site-functions
cp -a contrib/zsh_completion $PKG/usr/share/zsh/site-functions/_mercurial
chmod 644 $PKG/usr/share/zsh/site-functions/_mercurial
diff --git a/source/d/nasm/nasm.SlackBuild b/source/d/nasm/nasm.SlackBuild
index d4162c0e..63f80748 100755
--- a/source/d/nasm/nasm.SlackBuild
+++ b/source/d/nasm/nasm.SlackBuild
@@ -28,7 +28,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -63,9 +63,13 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--mandir=/usr/man \
--build=${ARCH}-slackware-linux || exit 1
+
make || exit 1
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1
+make -C doc || exit 1
+
+mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/info
make install INSTALLROOT=$PKG || exit 1
+cp -a doc/info/* $PKG/usr/info
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -75,15 +79,8 @@ cp -a \
AUTHORS CHANGES COPYING* INSTALL LICENSE README* TODO \
$PKG/usr/doc/nasm-$VERSION
-( cd doc
- make
- cd info
- mkdir -p $PKG/usr/info
- cp -a * $PKG/usr/info
- gzip -9 $PKG/usr/info/*
-)
-
gzip -9 $PKG/usr/man/man?/*
+gzip -9 $PKG/usr/info/*
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/d/open-cobol/slack-desc b/source/d/open-cobol/slack-desc
deleted file mode 100644
index 94fa2fbd..00000000
--- a/source/d/open-cobol/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# 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
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-open-cobol: open-cobol (open source COBOL compiler)
-open-cobol:
-open-cobol: OpenCOBOL is an open-source COBOL compiler. OpenCOBOL implements a
-open-cobol: substantial part of the COBOL 85 and COBOL 2002 standards, as well as
-open-cobol: many extensions of the existent COBOL compilers. OpenCOBOL translates
-open-cobol: COBOL into C and compiles the translated code using the native C
-open-cobol: compiler. OpenCOBOL was written by Roger While and Keisuke Nishida,
-open-cobol: with the invaluable assistance of many others.
-open-cobol:
-open-cobol: Homepage: http://opencobol.add1tocobol.com
-open-cobol:
diff --git a/source/d/oprofile/oprofile.SlackBuild b/source/d/oprofile/oprofile.SlackBuild
index b425e9aa..5af56855 100755
--- a/source/d/oprofile/oprofile.SlackBuild
+++ b/source/d/oprofile/oprofile.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,14 +22,14 @@
VERSION=${VERSION:-$(echo oprofile-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -64,9 +64,6 @@ rm -rf oprofile-$VERSION
tar xvf $CWD/oprofile-$VERSION.tar.?z* || exit 1
cd oprofile-$VERSION
-zcat $CWD/oprofile.binutils.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/oprofile.config.h.diff.gz | patch -p1 --verbose || exit 1
-
./autogen.sh
chown -R root:root .
diff --git a/source/d/oprofile/oprofile.binutils.diff b/source/d/oprofile/oprofile.binutils.diff
deleted file mode 100644
index 947ce5d5..00000000
--- a/source/d/oprofile/oprofile.binutils.diff
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -u -r --new-file oprofile-0.9.7.orig/libopagent/opagent.c oprofile-0.9.7/libopagent/opagent.c
---- oprofile-0.9.7.orig/libopagent/opagent.c 2011-07-04 21:25:04.000000000 -0500
-+++ oprofile-0.9.7/libopagent/opagent.c 2012-06-20 10:59:17.851896225 -0500
-@@ -60,6 +60,7 @@
- #include <fcntl.h>
- #include <unistd.h>
- #include <time.h>
-+#include "config.h"
- #include <bfd.h>
-
- #include "opagent.h"
-diff -u -r --new-file oprofile-0.9.7.orig/libpp/symbol.h oprofile-0.9.7/libpp/symbol.h
---- oprofile-0.9.7.orig/libpp/symbol.h 2011-07-04 21:25:04.000000000 -0500
-+++ oprofile-0.9.7/libpp/symbol.h 2012-06-20 10:59:23.579895917 -0500
-@@ -18,6 +18,7 @@
- #include "format_flags.h"
- #include "op_types.h"
-
-+#include "config.h"
- #include <bfd.h>
- #include <stdint.h>
-
-diff -u -r --new-file oprofile-0.9.7.orig/opjitconv/debug_line.c oprofile-0.9.7/opjitconv/debug_line.c
---- oprofile-0.9.7.orig/opjitconv/debug_line.c 2011-07-04 21:25:04.000000000 -0500
-+++ oprofile-0.9.7/opjitconv/debug_line.c 2012-06-20 10:59:40.620895008 -0500
-@@ -13,6 +13,7 @@
- #include <string.h>
- #include <stddef.h>
- #include <stdio.h>
-+#include "config.h"
- #include <bfd.h>
- #include <limits.h>
-
-diff -u -r --new-file oprofile-0.9.7.orig/opjitconv/opjitconv.h oprofile-0.9.7/opjitconv/opjitconv.h
---- oprofile-0.9.7.orig/opjitconv/opjitconv.h 2011-07-04 21:25:04.000000000 -0500
-+++ oprofile-0.9.7/opjitconv/opjitconv.h 2012-06-20 10:59:35.387895285 -0500
-@@ -26,6 +26,7 @@
- #define OP_JIT_CONV_ALREADY_DONE 5
- #define OP_JIT_CONV_TMPDIR_NOT_REMOVED 6
-
-+#include "config.h"
- #include <bfd.h>
- #include <stddef.h>
- #include <sys/stat.h>
diff --git a/source/d/oprofile/oprofile.config.h.diff b/source/d/oprofile/oprofile.config.h.diff
deleted file mode 100644
index 41c86857..00000000
--- a/source/d/oprofile/oprofile.config.h.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- ./libutil++/bfd_spu_support.cpp.orig 2011-07-04 21:25:04.000000000 -0500
-+++ ./libutil++/bfd_spu_support.cpp 2012-12-20 18:42:01.400977322 -0600
-@@ -9,6 +9,8 @@
- * (C) Copyright IBM Corporation 2007
- */
-
-+#include "config.h"
-+
- #include "bfd_support.h"
- #include "op_bfd.h"
- #include "config.h"
---- ./libutil++/bfd_support.cpp.orig 2011-07-04 21:25:04.000000000 -0500
-+++ ./libutil++/bfd_support.cpp 2012-12-20 18:41:31.160978289 -0600
-@@ -8,6 +8,8 @@
- * @author John Levon
- */
-
-+#include "config.h"
-+
- #include "bfd_support.h"
-
- #include "op_bfd.h"
diff --git a/source/d/perl/perl.SlackBuild b/source/d/perl/perl.SlackBuild
index 7485d33f..1210b6dc 100755
--- a/source/d/perl/perl.SlackBuild
+++ b/source/d/perl/perl.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011, 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,13 +24,13 @@
# originally by: David Cantrell <david@slackware.com>
# maintained by: <volkerdi@slackware.com>
-VERSION=5.18.1
+VERSION=5.22.2
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -44,18 +44,19 @@ TMP=${TMP:-/tmp}
PKG=$TMP/package-perl
# Additional required modules:
-DBDMYSQL=4.023
-DBI=1.628
-URI=1.60
-XMLPARSER=2.41
-XMLSIMPLE=2.20
-GETTEXT=1.05
-
-if [ "$ARCH" = "i386" ]; then
- SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+DBDMYSQL=4.033
+DBI=1.636
+URI=1.71
+XMLPARSER=2.44
+XMLSIMPLE=2.22
+GETTEXT=1.07
+TERMREADKEY=2.33
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -68,9 +69,12 @@ fi
if [ -x /usr/bin/perl ]; then
echo "Perl detected."
echo
- echo "It's a good idea to remove your existing perl first."
+ echo "The perl package needs to be removed before building to ensure that"
+ echo "the perl modules are included in the new package."
echo
+ echo "Removing the perl package in 15 seconds, and then continuing with the build."
sleep 15
+ removepkg perl
fi
# Clear build location:
@@ -144,8 +148,6 @@ fi
# Kludge for gcc-4.2.4's needlessly changed output:
cat makefile | grep -v '\<command-line\>' > foo
mv foo makefile
-cat x2p/makefile | grep -v '\<command-line\>' > foo
-mv foo x2p/makefile
# Build perl
make $NUMJOBS || exit 1
@@ -156,7 +158,6 @@ make install
( cd /usr/bin
ln -sf perl$VERSION perl
ln -sf c2ph pstruct
- ln -sf s2p psed
)
#mkdir -p /usr/lib${LIBDIRSUFFIX}/perl5/vendor_perl/${VERSION}/${ARCH}-linux-thread-multi
@@ -175,8 +176,8 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/DBI-${DBI}
- cp -a README $PKG/usr/doc/perl-$VERSION/DBI-${DBI}
- chmod 644 $PKG/usr/doc/perl-$VERSION/DBI-${DBI}/README
+ cp -a README* $PKG/usr/doc/perl-$VERSION/DBI-${DBI}
+ chmod 644 $PKG/usr/doc/perl-$VERSION/DBI-${DBI}/README*
)
( tar xzvf $CWD/DBD-mysql-${DBDMYSQL}.tar.gz
cd DBD-mysql-${DBDMYSQL}
@@ -187,7 +188,7 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL}
- cp -a INSTALL.html README TODO $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL}
+ cp -a INSTALL.html README* TODO $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL}
chmod 644 $PKG/usr/doc/perl-$VERSION/DBD-mysql-${DBDMYSQL}/*
)
( tar xzvf $CWD/XML-Parser-${XMLPARSER}.tar.gz
@@ -199,7 +200,7 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER}
- cp -a README $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER}
+ cp -a README* $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER}
chmod 644 $PKG/usr/doc/perl-$VERSION/XML-Parser-${XMLPARSER}/*
)
( tar xzvf $CWD/XML-Simple-${XMLSIMPLE}.tar.gz
@@ -211,7 +212,7 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE}
- cp -a README $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE}
+ cp -a README* $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE}
chmod 644 $PKG/usr/doc/perl-$VERSION/XML-Simple${XMLSIMPLE}/*
)
( tar xzvf $CWD/URI-${URI}.tar.gz
@@ -223,11 +224,11 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/URI-${URI}
- cp -a README $PKG/usr/doc/perl-$VERSION/URI-${URI}
+ cp -a README* $PKG/usr/doc/perl-$VERSION/URI-${URI}
chmod 644 $PKG/usr/doc/perl-$VERSION/URI-${URI}/*
)
( tar xzvf $CWD/gettext-${GETTEXT}.tar.gz
- cd gettext-${GETTEXT}
+ cd Locale-gettext-${GETTEXT}
chown -R root:root .
perl Makefile.PL INSTALLDIRS=vendor
make
@@ -235,9 +236,21 @@ make install DESTDIR=$PKG
make install
make install DESTDIR=$PKG
mkdir -p $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT}
- cp -a README $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT}
+ cp -a README* $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT}
chmod 644 $PKG/usr/doc/perl-$VERSION/gettext-${GETTEXT}/*
)
+ ( tar xzvf $CWD/TermReadKey-${TERMREADKEY}.tar.gz
+ cd TermReadKey-${TERMREADKEY}
+ chown -R root:root .
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+ make install
+ make install DESTDIR=$PKG
+ mkdir -p $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY}
+ cp -a README* $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY}
+ chmod 644 $PKG/usr/doc/perl-$VERSION/TermReadKey-${TERMREADKEY}/*
+ )
)
# Strip everything:
@@ -255,8 +268,7 @@ make install DESTDIR=$PKG
# Symlinks that replace hard links
( cd $PKG/usr/bin
ln -sf perl$VERSION perl
- ln -sf c2ph pstruct
- ln -sf s2p psed )
+ ln -sf c2ph pstruct )
# Install documentation
mkdir -p $PKG/usr/doc/perl-$VERSION
@@ -276,8 +288,7 @@ cp -a \
mv foo/* .
rmdir foo
gzip -9 *
- ln -sf c2ph.1.gz pstruct.1.gz
- ln -sf s2p.1.gz psed.1.gz )
+ ln -sf c2ph.1.gz pstruct.1.gz )
( cd $PKG/usr/man/man3
gzip -9 * )
diff --git a/source/d/pkg-config/doinst.sh b/source/d/pkg-config/doinst.sh
index c8adcd31..06ebcafc 100644
--- a/source/d/pkg-config/doinst.sh
+++ b/source/d/pkg-config/doinst.sh
@@ -1,6 +1,9 @@
-if [ ! -L usr/share/pkgconfig ]; then
- mkdir -p usr/lib/pkgconfig 2> /dev/null
- mv usr/share/pkgconfig/* usr/lib/pkgconfig 2> /dev/null
- rmdir usr/share/pkgconfig 2> /dev/null
- ( cd usr/share ; ln -sf ../lib/pkgconfig . 2> /dev/null )
+# Break the /usr/share/pkgconfig symlinks, if it exists.
+# Then move the .pc files to the standard location.
+if [ -L usr/share/pkgconfig ]; then
+ rm usr/share/pkgconfig
+ mkdir -p usr/share/pkgconfig
+ grep usr/share/pkgconfig var/log/packages/* | grep '\.pc$' | cut -f 2 -d : | cut -f 4 -d / | while read movefile ; do
+ mv usr/lib/pkgconfig/$movefile usr/share/pkgconfig 1> /dev/null 2> /dev/null
+ done
fi
diff --git a/source/d/pkg-config/pkg-config.SlackBuild b/source/d/pkg-config/pkg-config.SlackBuild
index 0c42ef57..595e9759 100755
--- a/source/d/pkg-config/pkg-config.SlackBuild
+++ b/source/d/pkg-config/pkg-config.SlackBuild
@@ -22,12 +22,12 @@
PKGNAM=pkg-config
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -42,8 +42,8 @@ PKG=$TMP/package-pkg-config
rm -rf $PKG
mkdir -p $TMP $PKG/usr
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/source/d/pkg-config/scripts/pkgconfig.csh b/source/d/pkg-config/scripts/pkgconfig.csh
index 477a93a7..da9a45a6 100755
--- a/source/d/pkg-config/scripts/pkgconfig.csh
+++ b/source/d/pkg-config/scripts/pkgconfig.csh
@@ -1,6 +1,6 @@
#!/bin/csh
if ( $?PKG_CONFIG_PATH ) then
- setenv PKG_CONFIG_PATH ${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
+ setenv PKG_CONFIG_PATH ${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
else
- setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/lib/pkgconfig
+ setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
endif
diff --git a/source/d/pkg-config/scripts/pkgconfig.sh b/source/d/pkg-config/scripts/pkgconfig.sh
index c3f35031..96e07c4f 100755
--- a/source/d/pkg-config/scripts/pkgconfig.sh
+++ b/source/d/pkg-config/scripts/pkgconfig.sh
@@ -1,7 +1,7 @@
#!/bin/sh
if [ ! "$PKG_CONFIG_PATH" = "" ]; then
- PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig
+ PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
else
- PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
+ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
fi
export PKG_CONFIG_PATH
diff --git a/source/d/python-setuptools/python-setuptools.SlackBuild b/source/d/python-setuptools/python-setuptools.SlackBuild
new file mode 100755
index 00000000..b867d366
--- /dev/null
+++ b/source/d/python-setuptools/python-setuptools.SlackBuild
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+# Copyright 2013-2014 Audrius Kažukauskas <audrius@neutrino.lt>
+# Copyright 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=python-setuptools
+VERSION=${VERSION:-$(echo setuptools-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+SRCNAM=setuptools
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
+cd $SRCNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+rm -f setuptools/*.exe
+python setup.py install --root=$PKG
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a CHANGES.rst PKG-INFO README.rst docs/*.txt \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 0644 {} \;
+
+# If there's a CHANGES.rst, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES.rst ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat CHANGES.rst | head -n 1000 > $DOCSDIR/CHANGES.rst
+ touch -r CHANGES.rst $DOCSDIR/CHANGES.rst
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/d/python-setuptools/slack-desc b/source/d/python-setuptools/slack-desc
new file mode 100644
index 00000000..6dcce3c6
--- /dev/null
+++ b/source/d/python-setuptools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+python-setuptools: python-setuptools (a collection of enhancements to Python distutils)
+python-setuptools:
+python-setuptools: This is a full featured library designed to facilitate packaging
+python-setuptools: Python projects. Features include Python package and module
+python-setuptools: definitions, distribution package metadata, test hooks, project
+python-setuptools: installation, and platform-specific details.
+python-setuptools:
+python-setuptools:
+python-setuptools:
+python-setuptools:
+python-setuptools:
diff --git a/source/d/python/python.SlackBuild b/source/d/python/python.SlackBuild
index 1afb586a..09a27a21 100755
--- a/source/d/python/python.SlackBuild
+++ b/source/d/python/python.SlackBuild
@@ -25,14 +25,14 @@ PKGNAM=python
SRCNAM=Python
VERSION=$(echo $SRCNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
BRANCH_VERSION=$(echo $VERSION | cut -f 1,2 -d . )
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -47,7 +47,7 @@ mkdir -p $TMP $PKG
# Don't set any SLKCFLAGS here, or OPT="$SLKCFLAGS" before the ./configure.
# Python gets the compile options right without any help.
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i586" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
LIBDIRSUFFIX=""
diff --git a/source/d/python/python.x86_64.diff b/source/d/python/python.x86_64.diff
index 0e7c6c45..e3a2af8e 100644
--- a/source/d/python/python.x86_64.diff
+++ b/source/d/python/python.x86_64.diff
@@ -1,6 +1,6 @@
-diff -uar Python-2.7.2.orig/Lib/distutils/command/install.py Python-2.7.2/Lib/distutils/command/install.py
---- Python-2.7.2.orig/Lib/distutils/command/install.py 2011-06-11 18:46:24.000000000 +0300
-+++ Python-2.7.2/Lib/distutils/command/install.py 2011-06-13 12:29:32.239106481 +0300
+diff -Nur Python-2.7.9.orig/Lib/distutils/command/install.py Python-2.7.9/Lib/distutils/command/install.py
+--- Python-2.7.9.orig/Lib/distutils/command/install.py 2014-12-10 09:59:34.000000000 -0600
++++ Python-2.7.9/Lib/distutils/command/install.py 2014-12-11 21:14:11.560186033 -0600
@@ -41,15 +41,15 @@
INSTALL_SCHEMES = {
@@ -21,10 +21,10 @@ diff -uar Python-2.7.2.orig/Lib/distutils/command/install.py Python-2.7.2/Lib/di
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-diff -uar Python-2.7.2.orig/Lib/distutils/sysconfig.py Python-2.7.2/Lib/distutils/sysconfig.py
---- Python-2.7.2.orig/Lib/distutils/sysconfig.py 2011-06-11 18:46:24.000000000 +0300
-+++ Python-2.7.2/Lib/distutils/sysconfig.py 2011-06-13 12:29:32.239106481 +0300
-@@ -115,7 +115,7 @@
+diff -Nur Python-2.7.9.orig/Lib/distutils/sysconfig.py Python-2.7.9/Lib/distutils/sysconfig.py
+--- Python-2.7.9.orig/Lib/distutils/sysconfig.py 2014-12-10 09:59:34.000000000 -0600
++++ Python-2.7.9/Lib/distutils/sysconfig.py 2014-12-11 21:14:45.394770718 -0600
+@@ -120,7 +120,7 @@
if os.name == "posix":
libpython = os.path.join(prefix,
@@ -33,10 +33,10 @@ diff -uar Python-2.7.2.orig/Lib/distutils/sysconfig.py Python-2.7.2/Lib/distutil
if standard_lib:
return libpython
else:
-diff -uar Python-2.7.2.orig/Lib/site.py Python-2.7.2/Lib/site.py
---- Python-2.7.2.orig/Lib/site.py 2011-06-11 18:46:25.000000000 +0300
-+++ Python-2.7.2/Lib/site.py 2011-06-13 12:29:32.239106481 +0300
-@@ -300,13 +300,13 @@
+diff -Nur Python-2.7.9.orig/Lib/site.py Python-2.7.9/Lib/site.py
+--- Python-2.7.9.orig/Lib/site.py 2014-12-10 09:59:40.000000000 -0600
++++ Python-2.7.9/Lib/site.py 2014-12-11 21:15:39.365108237 -0600
+@@ -288,13 +288,13 @@
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
@@ -44,7 +44,8 @@ diff -uar Python-2.7.2.orig/Lib/site.py Python-2.7.2/Lib/site.py
+ sitepackages.append(os.path.join(prefix, "lib64",
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
+- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++ sitepackages.append(os.path.join(prefix, "lib64", "site-python"))
else:
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
@@ -52,9 +53,9 @@ diff -uar Python-2.7.2.orig/Lib/site.py Python-2.7.2/Lib/site.py
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
-diff -uar Python-2.7.2.orig/Lib/sysconfig.py Python-2.7.2/Lib/sysconfig.py
---- Python-2.7.2.orig/Lib/sysconfig.py 2011-06-11 18:46:25.000000000 +0300
-+++ Python-2.7.2/Lib/sysconfig.py 2011-06-13 12:29:32.240106474 +0300
+diff -Nur Python-2.7.9.orig/Lib/sysconfig.py Python-2.7.9/Lib/sysconfig.py
+--- Python-2.7.9.orig/Lib/sysconfig.py 2014-12-10 09:59:40.000000000 -0600
++++ Python-2.7.9/Lib/sysconfig.py 2014-12-11 21:16:44.487308865 -0600
@@ -7,20 +7,20 @@
_INSTALL_SCHEMES = {
@@ -99,10 +100,10 @@ diff -uar Python-2.7.2.orig/Lib/sysconfig.py Python-2.7.2/Lib/sysconfig.py
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
-diff -uar Python-2.7.2.orig/Makefile.pre.in Python-2.7.2/Makefile.pre.in
---- Python-2.7.2.orig/Makefile.pre.in 2011-06-11 18:46:26.000000000 +0300
-+++ Python-2.7.2/Makefile.pre.in 2011-06-13 12:29:32.240106474 +0300
-@@ -97,7 +97,7 @@
+diff -Nur Python-2.7.9.orig/Makefile.pre.in Python-2.7.9/Makefile.pre.in
+--- Python-2.7.9.orig/Makefile.pre.in 2014-12-10 09:59:50.000000000 -0600
++++ Python-2.7.9/Makefile.pre.in 2014-12-11 21:16:59.515124398 -0600
+@@ -106,7 +106,7 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
@@ -111,20 +112,9 @@ diff -uar Python-2.7.2.orig/Makefile.pre.in Python-2.7.2/Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-diff -uar Python-2.7.2.orig/Modules/getpath.c Python-2.7.2/Modules/getpath.c
---- Python-2.7.2.orig/Modules/getpath.c 2011-06-11 18:46:27.000000000 +0300
-+++ Python-2.7.2/Modules/getpath.c 2011-06-13 12:29:32.240106474 +0300
-@@ -117,8 +117,8 @@
- #endif
-
- #ifndef PYTHONPATH
--#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
-- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
-+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
-+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
- #endif
-
- #ifndef LANDMARK
+diff -Nur Python-2.7.9.orig/Modules/getpath.c Python-2.7.9/Modules/getpath.c
+--- Python-2.7.9.orig/Modules/getpath.c 2014-12-10 09:59:55.000000000 -0600
++++ Python-2.7.9/Modules/getpath.c 2014-12-11 21:18:16.840175232 -0600
@@ -129,7 +129,7 @@
static char exec_prefix[MAXPATHLEN+1];
static char progpath[MAXPATHLEN+1];
@@ -134,7 +124,7 @@ diff -uar Python-2.7.2.orig/Modules/getpath.c Python-2.7.2/Modules/getpath.c
static void
reduce(char *dir)
-@@ -528,7 +528,7 @@
+@@ -543,7 +543,7 @@
}
else
strncpy(zip_path, PREFIX, MAXPATHLEN);
@@ -143,7 +133,7 @@ diff -uar Python-2.7.2.orig/Modules/getpath.c Python-2.7.2/Modules/getpath.c
bufsz = strlen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
-@@ -538,7 +538,7 @@
+@@ -553,7 +553,7 @@
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n");
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
@@ -152,19 +142,19 @@ diff -uar Python-2.7.2.orig/Modules/getpath.c Python-2.7.2/Modules/getpath.c
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
-diff -uar Python-2.7.2.orig/setup.py Python-2.7.2/setup.py
---- Python-2.7.2.orig/setup.py 2011-06-11 18:46:28.000000000 +0300
-+++ Python-2.7.2/setup.py 2011-06-13 12:29:32.241106466 +0300
-@@ -369,7 +369,7 @@
-
+diff -Nur Python-2.7.9.orig/setup.py Python-2.7.9/setup.py
+--- Python-2.7.9.orig/setup.py 2014-12-10 10:00:01.000000000 -0600
++++ Python-2.7.9/setup.py 2014-12-11 21:19:37.094190107 -0600
+@@ -440,7 +440,7 @@
def detect_modules(self):
# Ensure that /usr/local is always used
-- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- self.add_multiarch_paths()
-
-@@ -677,11 +677,11 @@
+ if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
+@@ -762,11 +762,11 @@
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
@@ -178,7 +168,7 @@ diff -uar Python-2.7.2.orig/setup.py Python-2.7.2/setup.py
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
-@@ -715,8 +715,8 @@
+@@ -801,8 +801,8 @@
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
diff --git a/source/d/rcs/rcs.SlackBuild b/source/d/rcs/rcs.SlackBuild
index 8faa20ae..7a23d2fb 100755
--- a/source/d/rcs/rcs.SlackBuild
+++ b/source/d/rcs/rcs.SlackBuild
@@ -29,7 +29,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7lh ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
diff --git a/source/d/ruby/ruby.SlackBuild b/source/d/ruby/ruby.SlackBuild
index 9a70d962..51e9edaf 100755
--- a/source/d/ruby/ruby.SlackBuild
+++ b/source/d/ruby/ruby.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,21 @@
PKGNAM=ruby
-VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+
+if echo $PKGNAM-*.tar.?z* | grep -q p ; then
+ # With patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+else
+ # Without patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+fi
+
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -41,12 +49,12 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-ruby
-if [ "$ARCH" = "i486" ]; then
+if [ "$ARCH" = "i586" ]; then
# -O3 works around a compile failure due to a miniruby segfault
# when trying to build ruby with gcc-4.4 or newer. Evidently
# -O0 also works, but...
# other distributions also use -fno-strict-aliasing which helps stability
- SLKCFLAGS="-march=i486 -mtune=i686 -O3 -fno-strict-aliasing"
+ SLKCFLAGS="-march=i586 -mtune=i686 -O3 -fno-strict-aliasing"
OPTFLAGS=-O3
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
diff --git a/source/d/scons/scons.SlackBuild b/source/d/scons/scons.SlackBuild
new file mode 100755
index 00000000..bd46d328
--- /dev/null
+++ b/source/d/scons/scons.SlackBuild
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2015 Heinz Wiesinger, Amsterdam, The Netherlands
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=scons
+VERSION=${VERSION:-$(echo scons-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "${ARCH}" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf scons-$VERSION
+tar xvf $CWD/scons-$VERSION.tar.*z* || exit 1
+cd scons-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+python setup.py install \
+ --no-version-script \
+ --standard-lib \
+ --root=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/
+cp -a \
+ *.txt MANIFEST PKG-INFO \
+ $PKG/usr/doc/$PKGNAM-$VERSION/
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source/d/scons/slack-desc b/source/d/scons/slack-desc
new file mode 100644
index 00000000..baeb5114
--- /dev/null
+++ b/source/d/scons/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# 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 customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+scons: scons (A software construction tool)
+scons:
+scons: This is SCons, a tool for building software (and other files). SCons
+scons: is implemented in Python, and its "configuration files" are actually
+scons: Python scripts, allowing you to use the full power of a real
+scons: scripting language to solve build problems. You do not, however, need
+scons: to know Python to use SCons effectively.
+scons:
+scons: Homepage: http://www.scons.org/
+scons:
+scons:
diff --git a/source/d/slacktrack/slacktrack.SlackBuild b/source/d/slacktrack/slacktrack.SlackBuild
index 6a3bcc1a..ffd6d7d3 100755
--- a/source/d/slacktrack/slacktrack.SlackBuild
+++ b/source/d/slacktrack/slacktrack.SlackBuild
@@ -5,7 +5,7 @@ if [ "$TMP" = "" ]; then
TMP=/tmp
fi
-export VERSION=2.15
+export VERSION=2.17
if [ ! -d $TMP ]; then
mkdir -p $TMP # location to build the source
diff --git a/source/d/strace/strace.SlackBuild b/source/d/strace/strace.SlackBuild
index c8d65db8..f4cb2972 100755
--- a/source/d/strace/strace.SlackBuild
+++ b/source/d/strace/strace.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/d/subversion/subversion.SlackBuild b/source/d/subversion/subversion.SlackBuild
index 114b1197..1df80312 100755
--- a/source/d/subversion/subversion.SlackBuild
+++ b/source/d/subversion/subversion.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,7 +27,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -36,8 +36,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -73,6 +73,7 @@ CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-apache-libexecdir=/usr/lib${LIBDIRSUFFIX}/httpd/modules \
--mandir=/usr/man \
--docdir=/usr/doc/subversion-$VERSION \
--enable-shared \
@@ -80,16 +81,11 @@ CFLAGS="$SLKCFLAGS" \
--with-apr=/usr \
--with-apr-util=/usr \
--with-apxs=/usr/bin/apxs \
- --with-neon=/usr \
--with-zlib=/usr \
--with-pic \
- --with-ssl \
+ --with-kwallet \
--build=$ARCH-slackware-linux
-# Not currently compiling with gcc-4.7.1, but we'll try it again later:
-# --with-kwallet \
-#
-
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
make install-tools DESTDIR=$PKG || exit 1
diff --git a/source/d/swig/swig.SlackBuild b/source/d/swig/swig.SlackBuild
index b786073f..72d3bbd2 100755
--- a/source/d/swig/swig.SlackBuild
+++ b/source/d/swig/swig.SlackBuild
@@ -28,7 +28,7 @@ BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -39,8 +39,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=${PKG:-$TMP/package-swig}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/source/d/yasm/yasm.SlackBuild b/source/d/yasm/yasm.SlackBuild
index e98878da..20c7fccd 100755
--- a/source/d/yasm/yasm.SlackBuild
+++ b/source/d/yasm/yasm.SlackBuild
@@ -23,14 +23,14 @@
# SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
-# Slackware SlackBuild script
+# Slackware SlackBuild script
# ===========================
# By: Eric Hameleers <alien@slackware.com>
# For: yasm
# Descr: complete rewrite of the NASM assembler
# URL: http://www.tortall.net/projects/yasm/
-# Needs:
-# Changelog:
+# Needs:
+# Changelog:
# 0.7.1-1: 16/Jun/2008 by Eric Hameleers <alien@slackware.com>
# * Initial build.
# 0.7.2-1: 08/dec/2008 by Eric Hameleers <alien@slackware.com>
@@ -39,17 +39,18 @@
# * Update.
# 1.1.0-1: 2010-08-31 by volkerdi@slackware.com
# * Update.
-#
+# 1.3.0-1: 2014-11-09 by Heinz Wiesinger <pprkut@slackware.com>
+# * Update.
+#
# Run 'sh yasm.SlackBuild' to build a Slackware package.
-# The package (.txz) plus descriptive .txt file are created in /tmp .
-# Install using 'installpkg'.
+# The package (.txz) file is created in /tmp .
+# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------
PKGNAM=yasm
-VERSION=${VERSION:-1.2.0}
-BUILD=${BUILD:-2}
-TAG=${TAG:-}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -75,13 +76,6 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}
-SOURCE="$SRCDIR/${PKGNAM}-${VERSION}.tar.xz"
-SRCURL="http://www.tortall.net/projects/${PKGNAM}/releases/${PKGNAM}-${VERSION}.tar.gz"
-
-##
-## --- with a little luck, you won't have to edit below this point --- ##
-##
-
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PKGNAM}.log' ERR
@@ -114,30 +108,6 @@ mkdir -p $PKG # place for the package to be built
rm -rf $PKG/* # always erase old package's contents
rm -rf $TMP/tmp-$PKGNAM/* # remove the remnants of previous build
-# Source file availability:
-if ! [ -f ${SOURCE} ]; then
- if ! [ "x${SRCURL}" == "x" ]; then
- # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
- echo "Source '$(basename ${SOURCE})' not available yet..."
- echo "Will download file to $(dirname $SOURCE)"
- wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
- if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
- echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
- mv -f "${SOURCE}" "${SOURCE}".FAIL
- exit 1
- fi
- else
- echo "File '$(basename ${SOURCE})' not available... aborting the build."
- exit 1
- fi
-fi
-
-if [ "$P1" == "--download" ]; then
- echo "Download complete."
- exit 0
-fi
-
# --- PACKAGE BUILDING ---
echo "++"
@@ -146,7 +116,7 @@ echo "++"
cd $TMP/tmp-$PKGNAM
echo "Extracting the source archive(s) for $PKGNAM..."
-tar xvf ${SOURCE}
+tar xvf $SRCDIR/$PKGNAM-$VERSION.tar.?z*
cd ${PKGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
@@ -169,23 +139,16 @@ CFLAGS="$SLKCFLAGS" \
${PYTHONSTUFF} \
--program-prefix= \
--program-suffix= \
- --build=$ARCH-slackware-linux \
- 2>&1 | tee $OUTPUT/configure-${PKGNAM}.log
-make 2>&1 | tee $OUTPUT/make-${PKGNAM}.log
-
-# Install all the needed stuff to the package dir
-# Use installwatch if available, to produce a logfile of the installation
-# process that is more easily readable:
-if $(which installwatch > /dev/null 2>&1); then
- installwatch -o $OUTPUT/install-${PKGNAM}.log make DESTDIR=$PKG install
-else
- make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PKGNAM}.log
-fi
+ --build=$ARCH-slackware-linux
+
+make
+
+make DESTDIR=$PKG install
# Add documentation:
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PKGNAM-$VERSION || true
-cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild
+rm $PKG/usr/doc/$PKGNAM-$VERSION/CMakeLists.txt
chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
@@ -208,9 +171,5 @@ cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PKGNAM}.log
-cd $OUTPUT
-md5sum ${PKGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PKGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
-cd -
-cat $PKG/install/slack-desc | grep "^${PKGNAM}" > $OUTPUT/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+makepkg --linkadd y --chown n $OUTPUT/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz