summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
author Matteo Bernardini2020-03-21 11:50:32 +0100
committer Matteo Bernardini2020-03-21 11:50:32 +0100
commit296746ee2c9b89a5b04f160cf22d7f9227330c05 (patch)
tree9813ea75d1309877871a37e478e166931812353e /development
parentf846eb1bcc13a8369ba70a1efd953b9140e56c2f (diff)
downloadslackbuilds-296746ee2c9b89a5b04f160cf22d7f9227330c05.tar.gz
20200321.1 global branch merge.current-20200321.1
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/ChezScheme/ChezScheme.SlackBuild1
-rw-r--r--development/Coin/Coin.SlackBuild3
-rw-r--r--development/Coin/memhandler-initialization.patch20
-rw-r--r--development/FreeBASIC/FreeBASIC.SlackBuild7
-rw-r--r--development/MySQL-python/MySQL-python.SlackBuild2
-rw-r--r--development/SDL2_gfx/README3
-rw-r--r--development/SDL2_gfx/SDL2_gfx.info10
-rw-r--r--development/SDL2_gfx/slack-desc19
-rw-r--r--development/acpica/acpica.SlackBuild6
-rw-r--r--development/acpica/acpica.info6
-rw-r--r--development/android-tools/README4
-rw-r--r--development/android-tools/android-tools.SlackBuild70
-rw-r--r--development/android-tools/android-tools.info36
-rw-r--r--development/android-tools/bash_completion.fastboot90
-rw-r--r--development/android-tools/fix_build_core.patch155
-rw-r--r--development/android-tools/fix_build_selinux.patch26
-rw-r--r--development/android-tools/generate_build.rb461
-rw-r--r--development/anjuta/anjuta.SlackBuild2
-rw-r--r--development/apache-log4cxx/apache-log4cxx.SlackBuild1
-rw-r--r--development/apache-log4cxx/narrowing-fixes.patch.gzbin0 -> 1631 bytes
-rw-r--r--development/autogen/autogen.SlackBuild7
-rw-r--r--development/autogen/guile-2.2.patch78
-rw-r--r--development/avr-binutils/avr-binutils.SlackBuild18
-rw-r--r--development/avr-binutils/avr-binutils.info6
-rw-r--r--development/avr-binutils/avr-size.patch385
-rw-r--r--development/avr-gcc/avr-gcc.SlackBuild48
-rw-r--r--development/avr-gcc/avr-gcc.info8
-rw-r--r--development/brotli/README6
-rw-r--r--development/brotli/brotli.SlackBuild101
-rw-r--r--development/brotli/brotli.info10
-rw-r--r--development/brotli/slack-desc19
-rw-r--r--development/camlp4/camlp4.SlackBuild18
-rw-r--r--development/camlp4/camlp4.info6
-rw-r--r--development/check/README7
-rw-r--r--development/check/check.SlackBuild104
-rw-r--r--development/check/check.info10
-rw-r--r--development/check/slack-desc19
-rw-r--r--development/coccinelle/coccinelle.SlackBuild5
-rw-r--r--development/coccinelle/coccinelle.info6
-rw-r--r--development/device-tree-compiler/device-tree-compiler.SlackBuild4
-rw-r--r--development/device-tree-compiler/device-tree-compiler.info6
-rw-r--r--development/docutils/README6
-rw-r--r--development/docutils/docutils.SlackBuild73
-rw-r--r--development/docutils/docutils.info10
-rw-r--r--development/docutils/slack-desc19
-rw-r--r--development/dune/README5
-rw-r--r--development/dune/dune.SlackBuild (renamed from development/meson/meson.SlackBuild)23
-rw-r--r--development/dune/dune.info10
-rw-r--r--development/dune/slack-desc (renamed from development/lmdb/slack-desc)22
-rw-r--r--development/freetds/freetds.SlackBuild2
-rw-r--r--development/freetds/freetds.info6
-rw-r--r--development/gcc5/README46
-rw-r--r--development/gcc5/c89.sh11
-rw-r--r--development/gcc5/c99.sh11
-rw-r--r--development/gcc5/ecj.sh5
-rw-r--r--development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch29
-rw-r--r--development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch16
-rw-r--r--development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch14
-rw-r--r--development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch102
-rw-r--r--development/gcc5/fastjar-patches/1004-fastjar-man.patch27
-rw-r--r--development/gcc5/gcc5.SlackBuild569
-rw-r--r--development/gcc5/gcc5.info17
-rw-r--r--development/gcc5/libgcj-5.pc10
-rw-r--r--development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff239
-rw-r--r--development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff72
-rw-r--r--development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff59
-rw-r--r--development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff63
-rw-r--r--development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff279
-rw-r--r--development/gcc5/patches/0005-x86-Add-mindirect-branch.diff1870
-rw-r--r--development/gcc5/patches/0006-x86-Add-mfunction-return-doc.diff300
-rw-r--r--development/gcc5/patches/0006-x86-Add-mfunction-return.diff1409
-rw-r--r--development/gcc5/patches/0007-x86-Add-mindirect-branch-register-doc.diff231
-rw-r--r--development/gcc5/patches/0007-x86-Add-mindirect-branch-register.diff812
-rw-r--r--development/gcc5/patches/0008-x86-Add-V-register-operand-modifier-doc.diff65
-rw-r--r--development/gcc5/patches/0008-x86-Add-V-register-operand-modifier.diff125
-rw-r--r--development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff275
-rw-r--r--development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff102
-rw-r--r--development/gcc5/patches/gcc-no_fixincludes.diff27
-rw-r--r--development/gcc5/patches/gcc.66782.diff124
-rw-r--r--development/gcc5/patches/gcc.69140.diff13
-rw-r--r--development/gcc5/patches/glibc2.28-ustat.diff31
-rw-r--r--development/gcc5/profile.d/gcc5.csh7
-rw-r--r--development/gcc5/profile.d/gcc5.sh7
-rw-r--r--development/gcc5/slack-desc.gcc519
-rw-r--r--development/geany-plugins/geany-plugins.SlackBuild5
-rw-r--r--development/geany-plugins/geany-plugins.info6
-rw-r--r--development/geany/geany.SlackBuild4
-rw-r--r--development/geany/geany.info6
-rw-r--r--development/gedit/gedit.SlackBuild1
-rw-r--r--development/glade/glade.SlackBuild2
-rw-r--r--development/glade/glade.info6
-rw-r--r--development/gnats/gnats.SlackBuild2
-rw-r--r--development/gnuradio/boost-1.70.0.patch36
-rw-r--r--development/gnuradio/gnuradio.SlackBuild2
-rw-r--r--development/gpsim/gpsim.SlackBuild2
-rw-r--r--development/gr-osmosdr/gr-osmosdr.SlackBuild2
-rw-r--r--development/gsoap/gsoap-libtool.patch73
-rw-r--r--development/gsoap/gsoap.SlackBuild4
-rw-r--r--development/gsoap/gsoap.info6
-rw-r--r--development/guile2.2/README10
-rw-r--r--development/guile2.2/guile2.2.SlackBuild (renamed from development/SDL2_gfx/SDL2_gfx.SlackBuild)69
-rw-r--r--development/guile2.2/guile2.2.info10
-rw-r--r--development/guile2.2/slack-desc19
-rw-r--r--development/hte/hte.SlackBuild24
-rw-r--r--development/hte/hte.info6
-rw-r--r--development/hte/hteditor-2.1.0-gcc-7.patch32
-rw-r--r--development/icecream/README12
-rw-r--r--development/icecream/doinst.sh30
-rw-r--r--development/icecream/icecream.SlackBuild133
-rw-r--r--development/icecream/icecream.info10
-rw-r--r--development/icecream/profile.d/icecream.csh2
-rw-r--r--development/icecream/profile.d/icecream.sh2
-rw-r--r--development/icecream/rc.icecc-scheduler50
-rw-r--r--development/icecream/rc.iceccd50
-rw-r--r--development/icecream/rc.icecream.conf8
-rw-r--r--development/icecream/slack-desc19
-rw-r--r--development/jdk/profile.d/jdk.csh1
-rw-r--r--development/jdk/profile.d/jdk.sh1
-rw-r--r--development/latrace/fix-scanner-config-for-flex-2.6.x.patch23
-rw-r--r--development/latrace/latrace.SlackBuild3
-rw-r--r--development/lmdb/README2
-rw-r--r--development/lmdb/lmdb.SlackBuild95
-rw-r--r--development/lmdb/lmdb.info10
-rw-r--r--development/meld3/meld3.SlackBuild4
-rw-r--r--development/meld3/meld3.info6
-rw-r--r--development/meld3/python-3.8.patch61
-rw-r--r--development/menhir/menhir.SlackBuild6
-rw-r--r--development/menhir/menhir.info6
-rw-r--r--development/meson/README9
-rw-r--r--development/meson/meson.info10
-rw-r--r--development/meson/slack-desc19
-rw-r--r--development/mozjs/README3
-rw-r--r--development/mozjs/mozjs.SlackBuild143
-rw-r--r--development/mozjs/mozjs.info10
-rw-r--r--development/mozjs/patches/moz38-dont-hardcode-libc-soname.patch15
-rw-r--r--development/mozjs/slack-desc19
-rw-r--r--development/mysql-pinba/mysql-pinba.SlackBuild2
-rw-r--r--development/mysql-workbench/mysql-workbench.SlackBuild5
-rw-r--r--development/ninja/README4
-rw-r--r--development/ninja/ninja.SlackBuild95
-rw-r--r--development/ninja/ninja.info10
-rw-r--r--development/ninja/slack-desc19
-rw-r--r--development/nvi/README5
-rw-r--r--development/nvi/nvi.SlackBuild109
-rw-r--r--development/nvi/nvi.info10
-rw-r--r--development/nvi/patches/nvi.diffs28
-rw-r--r--development/nvi/slack-desc19
-rw-r--r--development/ocaml/configure.patch25
-rw-r--r--development/ocaml/ocaml.SlackBuild15
-rw-r--r--development/ocaml/ocaml.info14
-rw-r--r--development/ocamlbuild/ocamlbuild.SlackBuild4
-rw-r--r--development/ocamlbuild/ocamlbuild.info6
-rw-r--r--development/odb/odb.SlackBuild3
-rw-r--r--development/odb/odb_gcc6.patch355
-rw-r--r--development/omake/omake-warn-error.diff11
-rw-r--r--development/omake/omake.SlackBuild32
-rw-r--r--development/omake/omake.info8
-rw-r--r--development/oniguruma/README3
-rw-r--r--development/oniguruma/oniguruma.SlackBuild104
-rw-r--r--development/oniguruma/oniguruma.info10
-rw-r--r--development/oniguruma/slack-desc19
-rw-r--r--development/opencl-headers/README3
-rw-r--r--development/opencl-headers/opencl-headers.SlackBuild57
-rw-r--r--development/opencl-headers/opencl-headers.info10
-rw-r--r--development/opencl-headers/slack-desc19
-rw-r--r--development/openocd/openocd.SlackBuild10
-rw-r--r--development/openocd/openocd.info6
-rw-r--r--development/perf/perf.SlackBuild2
-rw-r--r--development/perf/perf.info2
-rw-r--r--development/php-apcu/php-apcu.SlackBuild4
-rw-r--r--development/php-apcu/php-apcu.info6
-rw-r--r--development/poedit/poedit.SlackBuild6
-rw-r--r--development/poedit/poedit.info6
-rw-r--r--development/poedit/setvalue.diff11
-rw-r--r--development/qt-creator/clang-9.patch11
-rw-r--r--development/qt-creator/qt-creator.SlackBuild2
-rw-r--r--development/re2c/README6
-rw-r--r--development/re2c/re2c.SlackBuild111
-rw-r--r--development/re2c/re2c.info10
-rw-r--r--development/re2c/slack-desc19
-rw-r--r--development/sbcl/glibc-2.26.patch13
-rw-r--r--development/sbcl/sbcl.SlackBuild2
-rw-r--r--development/spice-protocol/spice-protocol.SlackBuild5
-rw-r--r--development/spice-protocol/spice-protocol.info6
-rw-r--r--development/swfmill/swfmill.SlackBuild2
-rw-r--r--development/tora/README2
-rw-r--r--development/tora/tora.SlackBuild14
-rw-r--r--development/tora/tora.info8
-rw-r--r--development/vala/README4
-rw-r--r--development/vala/patch_support-gtk318.diff50
-rw-r--r--development/vala/slack-desc19
-rw-r--r--development/vala/vala.SlackBuild100
-rw-r--r--development/vala/vala.info10
-rw-r--r--development/woff2/README1
-rw-r--r--development/woff2/slack-desc19
-rw-r--r--development/woff2/woff2.SlackBuild87
-rw-r--r--development/woff2/woff2.info10
197 files changed, 8838 insertions, 2774 deletions
diff --git a/development/ChezScheme/ChezScheme.SlackBuild b/development/ChezScheme/ChezScheme.SlackBuild
index 604a2dfd75..a30137c407 100644
--- a/development/ChezScheme/ChezScheme.SlackBuild
+++ b/development/ChezScheme/ChezScheme.SlackBuild
@@ -86,6 +86,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
./configure \
+ CFLAGS="-Wno-error=implicit-fallthrough=" \
$WSIZE \
$THREADS \
--installprefix=/usr \
diff --git a/development/Coin/Coin.SlackBuild b/development/Coin/Coin.SlackBuild
index 96953fa909..eb99408893 100644
--- a/development/Coin/Coin.SlackBuild
+++ b/development/Coin/Coin.SlackBuild
@@ -61,6 +61,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Thanks Fedora
+patch -p1 < $CWD/memhandler-initialization.patch
+
# Thanks Debian
patch -p1 < $CWD/coin-include_and_js.patch
diff --git a/development/Coin/memhandler-initialization.patch b/development/Coin/memhandler-initialization.patch
new file mode 100644
index 0000000000..4c346487ed
--- /dev/null
+++ b/development/Coin/memhandler-initialization.patch
@@ -0,0 +1,20 @@
+--- Coin-3.1.3/src/misc/SbHash.h.init 2010-03-02 22:20:09.000000000 +0900
++++ Coin-3.1.3/src/misc/SbHash.h 2016-04-22 16:52:39.888883757 +0900
+@@ -89,6 +89,8 @@
+ cc_memalloc_deallocate(entry->memhandler, ptr);
+ }
+ SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {}
++ SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler)
++ : key(key), obj(obj), memhandler(memhandler) {}
+
+ Key key;
+ Type obj;
+@@ -218,7 +220,7 @@
+ /* Key not already in the hash table; insert a new
+ * entry as the first element in the bucket
+ */
+- entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj);
++ entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler);
+ entry->next = this->buckets[i];
+ this->buckets[i] = entry;
+
diff --git a/development/FreeBASIC/FreeBASIC.SlackBuild b/development/FreeBASIC/FreeBASIC.SlackBuild
index b851e000e0..97ffce4878 100644
--- a/development/FreeBASIC/FreeBASIC.SlackBuild
+++ b/development/FreeBASIC/FreeBASIC.SlackBuild
@@ -89,13 +89,10 @@ if [ "$ARCH" = "x86_64" ]; then
$PKG/usr/lib/${PRGNAM,,}
fi
-# fix linking with libtinfo over libncurses
+# fix linking libtinfo over the newer version - WARNING, UGLY SHIT! -ponce
ln -sf \
- /usr/lib${LIBDIRSUFFIX}/libncurses.so.5 \
+ /usr/lib${LIBDIRSUFFIX}/libtinfo.so.6 \
$PKG/usr/lib${LIBDIRSUFFIX}/libtinfo.so.5
-ln -sf \
- /usr/lib${LIBDIRSUFFIX}/libtinfo.so.5 \
- $PKG/usr/lib${LIBDIRSUFFIX}/libtinfo.so
# gzip man page
gzip -c doc/fbc.1 > $PKG/usr/man/man1/fbc.1.gz
diff --git a/development/MySQL-python/MySQL-python.SlackBuild b/development/MySQL-python/MySQL-python.SlackBuild
index c367b99dc9..cc212f17be 100644
--- a/development/MySQL-python/MySQL-python.SlackBuild
+++ b/development/MySQL-python/MySQL-python.SlackBuild
@@ -57,7 +57,7 @@ patch -p1 < $CWD/patches/no_distribute_download.patch
# Include my_config.h first
patch -p1 < $CWD/patches/MySQL-python-1.2.4-include-my_config-first.patch
-python setup.py install --root=$PKG
+CPPFLAGS="-I/usr/include/mysql/server" python setup.py install --root=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/development/SDL2_gfx/README b/development/SDL2_gfx/README
deleted file mode 100644
index 6be21f40d1..0000000000
--- a/development/SDL2_gfx/README
+++ /dev/null
@@ -1,3 +0,0 @@
-SDL graphics drawing primitives and other support functions
-wrapped up in an addon library for the Simple Direct Media
-(SDL) cross-platform API layer.
diff --git a/development/SDL2_gfx/SDL2_gfx.info b/development/SDL2_gfx/SDL2_gfx.info
deleted file mode 100644
index 2f64868bd2..0000000000
--- a/development/SDL2_gfx/SDL2_gfx.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="SDL2_gfx"
-VERSION="1.0.4"
-HOMEPAGE="http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/"
-DOWNLOAD="http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz"
-MD5SUM="15f9866c6464ca298f28f62fe5b36d9f"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="SDL2"
-MAINTAINER="Dimitris Zlatanidis"
-EMAIL="d.zlatanidis@gmail.com"
diff --git a/development/SDL2_gfx/slack-desc b/development/SDL2_gfx/slack-desc
deleted file mode 100644
index 72864f2da7..0000000000
--- a/development/SDL2_gfx/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-SDL2_gfx: SDL2_gfx (addon library for the SDL2)
-SDL2_gfx:
-SDL2_gfx: SDL graphics drawing primitives and other support functions
-SDL2_gfx: wrapped up in an addon library for the Simple Direct Media (SDL)
-SDL2_gfx: cross-platform API layer.
-SDL2_gfx:
-SDL2_gfx: Homepage:
-SDL2_gfx: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/
-SDL2_gfx:
-SDL2_gfx:
-SDL2_gfx:
diff --git a/development/acpica/acpica.SlackBuild b/development/acpica/acpica.SlackBuild
index f3ffc6d06f..6e097577c4 100644
--- a/development/acpica/acpica.SlackBuild
+++ b/development/acpica/acpica.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for acpica
-# Copyright 2008-2017 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2018 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=acpica
-VERSION=${VERSION:-20170531}
+VERSION=${VERSION:-20180105}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -74,7 +74,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd generate/unix
- CFLAGS="$SLKCFLAGS" \
+ CFLAGS="$SLKCFLAGS -Wno-error=format-overflow -Wno-error=stringop-truncation" \
CXXFLAGS="$SLKCFLAGS" \
make BITS=$BITS
diff --git a/development/acpica/acpica.info b/development/acpica/acpica.info
index dea5cd5d50..3ac0a61986 100644
--- a/development/acpica/acpica.info
+++ b/development/acpica/acpica.info
@@ -1,8 +1,8 @@
PRGNAM="acpica"
-VERSION="20170531"
+VERSION="20180105"
HOMEPAGE="http://www.acpica.org"
-DOWNLOAD="https://acpica.org/sites/acpica/files/acpica-unix2-20170531.tar.gz"
-MD5SUM="46c4c93435ad1d8c4eb5bacde17503b8"
+DOWNLOAD="https://acpica.org/sites/acpica/files/acpica-unix2-20180105.tar.gz"
+MD5SUM="5aa086f71f4b5273c0932a1e04419a37"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/android-tools/README b/development/android-tools/README
index e7d793fe84..fa0406782b 100644
--- a/development/android-tools/README
+++ b/development/android-tools/README
@@ -1,2 +1,2 @@
-These are the adb, fastboot, mkbootimg and make_ext4fs tools from the
-android sdk.
+These are the adb, fastboot, mkbootimg, unpack_bootimg, mke2fs.android,
+e2fsdroid, avbtool and ext2simg tools from the android sdk.
diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild
index 8e141f5fbd..8fde5c30a4 100644
--- a/development/android-tools/android-tools.SlackBuild
+++ b/development/android-tools/android-tools.SlackBuild
@@ -25,13 +25,17 @@
PRGNAM=android-tools
-VERSION=${VERSION:-8.0.0_r24}
-SRC1=core-6cd85e2a89347e0a107f59e38ece61fa19e6da78.tar.gz
-SRC2=extras-af2dce5151ad478673401211dd71ae1579d2b5be.tar.gz
-SRC3=selinux-be29c2550c3ff6551a56048c075a88da01b46cab.tar.gz
-SRC4=f2fs-tools-b8baf1712d991541141bb0bdddd625f527e6d41f.tar.gz
-SRC5=boringssl-58e449904e248f34bdfc2be7a609c58bcb0257b7.tar.gz
-
+VERSION=${VERSION:-29.0.5}
+SRC1=avb-355c69ae673220da533696c44acbfa489702d1ff.tar.gz
+SRC2=base-d634d2306033599c00b83e68c9ecb60e3206d40c.tar.gz
+SRC3=boringssl-a7a75f208caea8a303615724d4cc5f4e8dfb9695.tar.gz
+SRC4=core-fa4254a53a368a8f9b6604442eace6a7b6b63b6d.tar.gz
+SRC5=e2fsprogs-5fab03bbdc3789515748af8181b9e82dd99beb3b.tar.gz
+SRC6=extras-6748c3dd53494096ffeebfeeb12e3b3efad90a83.tar.gz
+SRC7=f2fs-tools-39ec3b4c2edc136d32392ddc7a7f222b4c68e88c.tar.gz
+SRC8=mkbootimg-e29814dcf6434e8d14379062e4ea1c1b58ff11d0.tar.gz
+SRC9=native-b9005758dcf78f89c6640ffb119b5b527a417928.tar.gz
+SRC10=selinux-9e188fde016babc76150098e0ab288e053cf92e2.tar.gz
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -71,34 +75,36 @@ rm -rf $TMP/android-tools
mkdir $TMP/android-tools
cd $TMP/android-tools
+mkdir avb
+tar -xvf $CWD/$SRC1 -C avb
+mkdir base
+tar -xvf $CWD/$SRC2 -C base
+mkdir boringssl
+tar -xvf $CWD/$SRC3 -C boringssl
mkdir core
-tar -xvf $CWD/$SRC1 -C core
+tar -xvf $CWD/$SRC4 -C core
+mkdir e2fsprogs
+tar -xvf $CWD/$SRC5 -C e2fsprogs
mkdir extras
-tar -xvf $CWD/$SRC2 -C extras
-mkdir selinux
-tar -xvf $CWD/$SRC3 -C selinux
+tar -xvf $CWD/$SRC6 -C extras
mkdir f2fs-tools
-tar -xvf $CWD/$SRC4 -C f2fs-tools
-mkdir boringssl
-tar -xvf $CWD/$SRC5 -C boringssl
-
-#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/core
-#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/extras
-#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/libselinux
-#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/f2fs-tools
+tar -xvf $CWD/$SRC7 -C f2fs-tools
+mkdir mkbootimg
+tar -xvf $CWD/$SRC8 -C mkbootimg
+mkdir native
+tar -xvf $CWD/$SRC9 -C native
+mkdir selinux
+tar -xvf $CWD/$SRC10 -C selinux
+cp -a $CWD/deployagent.jar .
# generate_build.rb borrowed from Arch Linux
# And thanks to Alan Alberghini for the make_ext4fs patch.
-PKGVER=$VERSION ruby $CWD/generate_build.rb > build.ninja
+PKGVER=$VERSION LDFLAGS='-Wl,-z,relro,-z,now' ruby $CWD/generate_build.rb > build.ninja
cd core
patch -p1 < $CWD/fix_build_core.patch
cd ..
-cd selinux
-patch -p1 < $CWD/fix_build_selinux.patch
-cd ..
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -110,16 +116,22 @@ find . \
mkdir -p boringssl/build
cd boringssl/build
cmake -GNinja ..
-ninja
+ninja crypto/libcrypto.a
cd ../..
ninja
mkdir -p $PKG/usr/bin
-install -Dm 755 adb $PKG/usr/bin/adb
-install -Dm 755 fastboot $PKG/usr/bin/fastboot
-install -Dm 755 core/mkbootimg/mkbootimg $PKG/usr/bin/mkbootimg
-install -Dm 755 make_ext4fs $PKG/usr/bin/make_ext4fs
+install -D -m 0755 adb $PKG/usr/bin/adb
+install -D -m 0755 fastboot $PKG/usr/bin/fastboot
+install -D -m 0755 mke2fs.android $PKG/usr/bin/mke2fs.android
+install -D -m 0755 e2fsdroid $PKG/usr/bin/e2fsdroid
+install -D -m 0755 ext2simg $PKG/usr/bin/ext2simg
+install -D -m 0755 avb/avbtool $PKG/usr/bin/avbtool
+install -D -m 0755 mkbootimg/mkbootimg.py $PKG/usr/bin/mkbootimg
+install -D -m 0755 mkbootimg/unpack_bootimg.py $PKG/usr/bin/unpack_bootimg
+
+install -D -m 0644 $CWD/bash_completion.fastboot $PKG/usr/share/bash-completion/completions/fastboot
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/development/android-tools/android-tools.info b/development/android-tools/android-tools.info
index ba44d787e2..7d268581cd 100644
--- a/development/android-tools/android-tools.info
+++ b/development/android-tools/android-tools.info
@@ -1,18 +1,30 @@
PRGNAM="android-tools"
-VERSION="8.0.0_r24"
+VERSION="29.0.5"
HOMEPAGE="http://developer.android.com/sdk/"
-DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/core-6cd85e2a89347e0a107f59e38ece61fa19e6da78.tar.gz \
- https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/extras-af2dce5151ad478673401211dd71ae1579d2b5be.tar.gz \
- https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/f2fs-tools-b8baf1712d991541141bb0bdddd625f527e6d41f.tar.gz \
- https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/selinux-be29c2550c3ff6551a56048c075a88da01b46cab.tar.gz \
- https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/boringssl-58e449904e248f34bdfc2be7a609c58bcb0257b7.tar.gz"
-MD5SUM="b5b3857b5edae7305f5348e1db148b61 \
- 19bdc27835ed340fdbb4205d6af8e721 \
- 2ebe16bb82a5b24706d78d9e16d66f6e \
- 0599c72a1ff3142ad6baed8886d074a3 \
- 83ed1371eee7769f29b767c217e865e7"
+DOWNLOAD="http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/avb-355c69ae673220da533696c44acbfa489702d1ff.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/base-d634d2306033599c00b83e68c9ecb60e3206d40c.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/boringssl-a7a75f208caea8a303615724d4cc5f4e8dfb9695.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/core-fa4254a53a368a8f9b6604442eace6a7b6b63b6d.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/e2fsprogs-5fab03bbdc3789515748af8181b9e82dd99beb3b.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/extras-6748c3dd53494096ffeebfeeb12e3b3efad90a83.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/f2fs-tools-39ec3b4c2edc136d32392ddc7a7f222b4c68e88c.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/mkbootimg-e29814dcf6434e8d14379062e4ea1c1b58ff11d0.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/native-b9005758dcf78f89c6640ffb119b5b527a417928.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/selinux-9e188fde016babc76150098e0ab288e053cf92e2.tar.gz \
+ http://ponce.cc/slackware/sources/repo/android-tools/29.0.5/deployagent.jar"
+MD5SUM="6800e83627f1046be645fc8c7ba027d5 \
+ e816083df667905b865c248a8a20c2e7 \
+ a20c134ee4310e600384b7d0a60c2db6 \
+ 34fb01c210c7371833da14f1d7a970e6 \
+ 3b559a1c803c94079b177065b7424457 \
+ cdd9d7b4956e5da607bb1e94cb929065 \
+ 880a1708785515fe1447b1bf6b020093 \
+ f912725e4d01596c2a2d0fa3fe772d8e \
+ 3daf9cf55dceb85ca06ae116e61800b4 \
+ 28a8438bc0856def465f6456781a5275 \
+ bb500620af2f3716a61100f7b5c445fa"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="gtest ninja pcre2"
+REQUIRES="gtest ninja pcre2 protobuf3"
MAINTAINER="Philip van der Hoeven"
EMAIL="philip@vd-hoeven.nl"
diff --git a/development/android-tools/bash_completion.fastboot b/development/android-tools/bash_completion.fastboot
new file mode 100644
index 0000000000..bc59ee8636
--- /dev/null
+++ b/development/android-tools/bash_completion.fastboot
@@ -0,0 +1,90 @@
+## Bash completion for the Android SDK tools.
+##
+## Copyright (c) 2009 Matt Brubeck
+##
+## Permission is hereby granted, free of charge, to any person obtaining a copy
+## of this software and associated documentation files (the "Software"), to deal
+## in the Software without restriction, including without limitation the rights
+## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+## copies of the Software, and to permit persons to whom the Software is
+## furnished to do so, subject to the following conditions:
+##
+## The above copyright notice and this permission notice shall be included in
+## all copies or substantial portions of the Software.
+##
+## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+## THE SOFTWARE.
+
+
+function _fastboot()
+{
+ local cur prev opts cmds c subcommand device_selected
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ opts="-w -s -p -c -i -b -n"
+ cmds="update flashall flash erase getvar boot devices \
+ reboot reboot-bootloader oem continue"
+ subcommand=""
+ partition_list="boot recovery system userdata bootloader radio"
+ device_selected=""
+
+ # Look for the subcommand.
+ c=1
+ while [ $c -lt $COMP_CWORD ]; do
+ word="${COMP_WORDS[c]}"
+ if [ "$word" = "-s" ]; then
+ device_selected=true
+ fi
+ for cmd in $cmds; do
+ if [ "$cmd" = "$word" ]; then
+ subcommand="$word"
+ fi
+ done
+ c=$((++c))
+ done
+
+ case "${subcommand}" in
+ '')
+ case "${prev}" in
+ -s)
+ # Use 'fastboot devices' to list serial numbers.
+ COMPREPLY=( $(compgen -W "$(fastboot devices|cut -f1)" -- ${cur} ) )
+ return 0
+ ;;
+ esac
+ case "${cur}" in
+ -*)
+ COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ if [ -z "$device_selected" ]; then
+ local num_devices=$(( $(fastboot devices 2>/dev/null|wc -l) ))
+ if [ "$num_devices" -gt "1" ]; then
+ # With multiple devices, you must choose a device first.
+ COMPREPLY=( $(compgen -W "-s" -- ${cur}) )
+ return 0
+ fi
+ fi
+ COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
+ return 0
+ ;;
+ flash)
+ # partition name
+ COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) )
+ return 0
+ ;;
+ erase)
+ # partition name
+ COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+}
+complete -o default -F _fastboot fastboot
diff --git a/development/android-tools/fix_build_core.patch b/development/android-tools/fix_build_core.patch
index b67a540199..fede1c09cc 100644
--- a/development/android-tools/fix_build_core.patch
+++ b/development/android-tools/fix_build_core.patch
@@ -1,16 +1,49 @@
+diff --git a/adb/adb.cpp b/adb/adb.cpp
+index 1ec145b25c..b6e943f6ee 100644
+--- a/adb/adb.cpp
++++ b/adb/adb.cpp
+@@ -44,8 +44,6 @@
+ #include <android-base/parsenetaddress.h>
+ #include <android-base/stringprintf.h>
+ #include <android-base/strings.h>
+-#include <build/version.h>
+-#include <platform_tools_version.h>
+
+ #include "adb_auth.h"
+ #include "adb_io.h"
+@@ -66,10 +64,10 @@ std::string adb_version() {
+ // Don't change the format of this --- it's parsed by ddmlib.
+ return android::base::StringPrintf(
+ "Android Debug Bridge version %d.%d.%d\n"
+- "Version %s-%s\n"
++ "Version %s\n"
+ "Installed as %s\n",
+ ADB_VERSION_MAJOR, ADB_VERSION_MINOR, ADB_SERVER_VERSION,
+- PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str(),
++ PLATFORM_TOOLS_VERSION,
+ android::base::GetExecutablePath().c_str());
+ }
+
+diff --git a/adb/client/main.cpp b/adb/client/main.cpp
+index 0c5c28f1b3..b6a1281521 100644
+--- a/adb/client/main.cpp
++++ b/adb/client/main.cpp
+@@ -118,10 +118,6 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
+ init_transport_registration();
+ init_reconnect_handler();
+
+- if (!getenv("ADB_MDNS") || strcmp(getenv("ADB_MDNS"), "0") != 0) {
+- init_mdns_transport_discovery();
+- }
+-
+ if (!getenv("ADB_USB") || strcmp(getenv("ADB_USB"), "0") != 0) {
+ usb_init();
+ } else {
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
-index 7025f283c..66fad6564 100644
+index 53f01a0ce5..b4c3aadc28 100644
--- a/adb/client/usb_libusb.cpp
+++ b/adb/client/usb_libusb.cpp
-@@ -21,6 +21,7 @@
- #include <stdint.h>
-
- #include <atomic>
-+#include <condition_variable>
- #include <chrono>
- #include <memory>
- #include <mutex>
-@@ -28,7 +29,7 @@
+@@ -30,7 +30,7 @@
#include <thread>
#include <unordered_map>
@@ -19,63 +52,53 @@ index 7025f283c..66fad6564 100644
#include <android-base/file.h>
#include <android-base/logging.h>
-diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
-index 45da5af4a..516c716d9 100644
---- a/adb/sysdeps/posix/network.cpp
-+++ b/adb/sysdeps/posix/network.cpp
-@@ -16,6 +16,7 @@
-
- #include "sysdeps/network.h"
-
-+#include <cstring>
- #include <errno.h>
- #include <netinet/in.h>
- #include <sys/socket.h>
-diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
-index 296995efe..48269b675 100644
---- a/base/errors_unix.cpp
-+++ b/base/errors_unix.cpp
-@@ -17,6 +17,7 @@
- #include "android-base/errors.h"
-
- #include <errno.h>
-+#include <string.h>
+diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
+index 2fe3b1a9e0..a61b221ce3 100644
+--- a/fastboot/fastboot.cpp
++++ b/fastboot/fastboot.cpp
+@@ -59,10 +59,8 @@
+ #include <android-base/stringprintf.h>
+ #include <android-base/strings.h>
+ #include <android-base/unique_fd.h>
+-#include <build/version.h>
+ #include <libavb/libavb.h>
+ #include <liblp/liblp.h>
+-#include <platform_tools_version.h>
+ #include <sparse/sparse.h>
+ #include <ziparchive/zip_archive.h>
- namespace android {
- namespace base {
-diff --git a/base/file.cpp b/base/file.cpp
-index 2f697a1cc..81aef5758 100644
---- a/base/file.cpp
-+++ b/base/file.cpp
-@@ -22,6 +22,7 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <unistd.h>
-+#include <string.h>
+@@ -1783,7 +1781,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
+ setvbuf(stdout, nullptr, _IONBF, 0);
+ setvbuf(stderr, nullptr, _IONBF, 0);
+ } else if (name == "version") {
+- fprintf(stdout, "fastboot version %s-%s\n", PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str());
++ fprintf(stdout, "fastboot version %s\n", PLATFORM_TOOLS_VERSION);
+ fprintf(stdout, "Installed as %s\n", android::base::GetExecutablePath().c_str());
+ return 0;
+ #if !defined(_WIN32)
+diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
+index 8c0aa6bf4e..3ad5b53568 100644
+--- a/fastboot/fs.cpp
++++ b/fastboot/fs.cpp
+@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
+ static constexpr int block_size = 4096;
+ const std::string exec_dir = android::base::GetExecutableDirectory();
- #include <memory>
- #include <mutex>
-diff --git a/base/logging.cpp b/base/logging.cpp
-index 6357b4ba7..3c7dbce13 100644
---- a/base/logging.cpp
-+++ b/base/logging.cpp
-@@ -23,6 +23,7 @@
- #include <fcntl.h>
- #include <libgen.h>
- #include <time.h>
-+#include <string.h>
+- const std::string mke2fs_path = exec_dir + "/mke2fs";
++ const std::string mke2fs_path = exec_dir + "/mke2fs.android";
+ std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"};
- // For getprogname(3) or program_invocation_short_name.
- #if defined(__ANDROID__) || defined(__APPLE__)
-diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp
-index bd668735a..76cf43299 100644
---- a/libsparse/sparse_read.cpp
-+++ b/libsparse/sparse_read.cpp
-@@ -18,6 +18,7 @@
- #define _LARGEFILE64_SOURCE 1
+ std::string block_size_str = std::to_string(block_size);
+diff --git a/libcutils/include/cutils/threads.h b/libcutils/include/cutils/threads.h
+index ba4846e33b..f3fccc4895 100644
+--- a/libcutils/include/cutils/threads.h
++++ b/libcutils/include/cutils/threads.h
+@@ -33,8 +33,6 @@ extern "C" {
+ // Deprecated: use android::base::GetThreadId instead, which doesn't truncate on Mac/Windows.
+ //
- #include <algorithm>
-+#include <cstring>
- #include <inttypes.h>
- #include <fcntl.h>
- #include <stdarg.h>
+-extern pid_t gettid();
+-
+ //
+ // Deprecated: use `_Thread_local` in C or `thread_local` in C++.
+ //
diff --git a/development/android-tools/fix_build_selinux.patch b/development/android-tools/fix_build_selinux.patch
deleted file mode 100644
index 429f87ce57..0000000000
--- a/development/android-tools/fix_build_selinux.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/libsepol/src/private.h b/libsepol/src/private.h
-index b884c23b..447fa64b 100644
---- a/libsepol/src/private.h
-+++ b/libsepol/src/private.h
-@@ -14,7 +14,7 @@
- #endif
-
- #include <errno.h>
--#include <dso.h>
-+#include "dso.h"
-
- #ifdef __APPLE__
- #define __BYTE_ORDER BYTE_ORDER
-diff --git a/libsepol/src/util.c b/libsepol/src/util.c
-index b00251c6..68e7c6a0 100644
---- a/libsepol/src/util.c
-+++ b/libsepol/src/util.c
-@@ -27,7 +27,7 @@
- #include <sepol/policydb/flask_types.h>
- #include <sepol/policydb/policydb.h>
- #include <sepol/policydb/util.h>
--#include <dso.h>
-+#include "dso.h"
-
- struct val_to_name {
- unsigned int val;
diff --git a/development/android-tools/generate_build.rb b/development/android-tools/generate_build.rb
index cb3e1e685c..2c74ee00cc 100644
--- a/development/android-tools/generate_build.rb
+++ b/development/android-tools/generate_build.rb
@@ -5,57 +5,78 @@
# This script tries to mimic Android build rules.
def expand(dir, files)
- files.map{|f| File.join(dir,f)}
+ files.map { |f| File.join(dir, f) }
end
# Compiles sources to *.o files.
# Returns array of output *.o filenames
-def compile(sources, cflags)
+def compile(sources, cflags, params = {})
outputs = []
for s in sources
ext = File.extname(s)
case ext
- when '.c'
- cc = 'cc'
- lang_flags = '-std=gnu11 $CFLAGS $CPPFLAGS'
- when '.cpp', '.cc'
- cc = 'cxx'
- lang_flags = '-std=gnu++14 $CXXFLAGS $CPPFLAGS'
+ when ".c"
+ cc = "cc"
+ lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS"
+ when ".cpp", ".cc"
+ cc = "cxx"
+ lang_flags = "-std=gnu++2a $CXXFLAGS $CPPFLAGS"
else
- raise "Unknown extension #{ext}"
+ raise "Unknown extension #{ext}"
end
- output = s + '.o'
+ output = s + ".o"
outputs << output
- puts "build #{output}: #{cc} #{s}\n cflags = #{lang_flags} #{cflags}"
+ order_deps = if params[:order_deps]
+ " || " + params[:order_deps].join(" ")
+ else
+ ""
+ end
+
+ puts "build #{output}: #{cc} #{s}#{order_deps}\n cflags = #{lang_flags} #{cflags}"
end
return outputs
end
+# Generate proto and compile it
+def protoc(source)
+ basename = File.join(File.dirname(source), File.basename(source, ".proto"))
+ cfile = basename + ".pb.cc"
+ hfile = basename + ".pb.h"
+ ofile = cfile + ".o"
+ puts "build #{cfile} #{hfile}: protoc #{source}"
+ puts "build #{ofile}: cc #{cfile}\n cflags = -std=gnu++2a $CXXFLAGS $CPPFLAGS -I."
+
+ return hfile, cfile, ofile
+end
+
# dir - directory where ninja file is located
# lib - static library path relative to dir
def subninja(dir, lib)
puts "subninja #{dir}build.ninja"
- return lib.each{|l| dir + l}
+ return lib.each { |l| dir + l }
end
# Links object files
def link(output, objects, ldflags)
- puts "build #{output}: link #{objects.join(' ')}\n ldflags = #{ldflags} $LDFLAGS"
+ puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags} $LDFLAGS"
end
-puts "# This set of commands generated by generate_build.rb script\n\n"
-puts "CC = #{ENV['CC'] || 'clang'}"
-puts "CXX = #{ENV['CXX'] || 'clang++'}\n\n"
-puts "CFLAGS = #{ENV['CFLAGS']}"
-puts "CXXFLAGS = #{ENV['CXXFLAGS']}"
-puts "LDFLAGS = #{ENV['LDFLAGS']}"
-puts "PKGVER = #{ENV['PKGVER']}\n\n"
-
+def genheader(input, variable, output)
+ puts "build #{output}: genheader #{input}\n var = #{variable}"
+end
-puts """
+puts "# This set of commands generated by generate_build.rb script\n\n"
+puts "CC = #{ENV["CC"] || "clang"}"
+puts "CXX = #{ENV["CXX"] || "clang++"}\n\n"
+puts "CFLAGS = #{ENV["CFLAGS"]}"
+puts "CXXFLAGS = #{ENV["CXXFLAGS"]}"
+puts "LDFLAGS = #{ENV["LDFLAGS"]}"
+puts "PLATFORM_TOOLS_VERSION = #{ENV["PLATFORM_TOOLS_VERSION"]}\n\n"
+
+puts "" "
rule cc
command = $CC $cflags -c $in -o $out
@@ -65,8 +86,14 @@ rule cxx
rule link
command = $CXX $ldflags $LDFLAGS $in -o $out
+rule protoc
+ command = protoc --cpp_out=. $in
+
+rule genheader
+ command = (echo 'unsigned char $var[] = {' && xxd -i <$in && echo '};') > $out
-"""
+
+" ""
adbdfiles = %w(
adb.cpp
@@ -74,210 +101,366 @@ adbdfiles = %w(
adb_listeners.cpp
adb_trace.cpp
adb_utils.cpp
- bugreport.cpp
- line_printer.cpp
+ fdevent/fdevent.cpp
+ fdevent/fdevent_poll.cpp
+ fdevent/fdevent_epoll.cpp
+ shell_service_protocol.cpp
sockets.cpp
transport.cpp
transport_local.cpp
transport_usb.cpp
- transport_mdns_unsupported.cpp
- fdevent.cpp
- adb_auth_host.cpp
- shell_service_protocol.cpp
)
-libadbd = compile(expand('core/adb', adbdfiles), '-DADB_VERSION="\"$PKGVER\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include')
+libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Icore/diagnose_usb/include')
+
+apkent_h, apkent_c, apkent_o = protoc("core/adb/fastdeploy/proto/ApkEntry.proto")
+
+deployagent_inc = "core/adb/client/deployagent.inc"
+genheader("deployagent.jar", "kDeployAgent", deployagent_inc)
+
+deployagentscript_inc = "core/adb/client/deployagentscript.inc"
+genheader("core/adb/fastdeploy/deployagent/deployagent.sh", "kDeployAgentScript", deployagentscript_inc)
adbfiles = %w(
- console.cpp
- socket_spec.cpp
- commandline.cpp
- adb_client.cpp
- services.cpp
- file_sync_client.cpp
- sysdeps_unix.cpp
- sysdeps/errno.cpp
- sysdeps/posix/network.cpp
+ client/adb_client.cpp
+ client/adb_install.cpp
+ client/auth.cpp
+ client/bugreport.cpp
+ client/commandline.cpp
+ client/console.cpp
+ client/fastdeploy.cpp
+ client/fastdeploycallbacks.cpp
+ client/file_sync_client.cpp
+ client/line_printer.cpp
client/main.cpp
client/usb_dispatch.cpp
- client/usb_linux.cpp
client/usb_libusb.cpp
+ client/usb_linux.cpp
+ fastdeploy/deploypatchgenerator/apk_archive.cpp
+ fastdeploy/deploypatchgenerator/deploy_patch_generator.cpp
+ fastdeploy/deploypatchgenerator/patch_utils.cpp
+ services.cpp
+ socket_spec.cpp
+ sysdeps/errno.cpp
+ sysdeps/posix/network.cpp
+ sysdeps_unix.cpp
+)
+libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Ibase/libs/androidfw/include -Inative/include", :order_deps => [apkent_h, deployagent_inc, deployagentscript_inc])
+
+androidfwfiles = %w(
+ LocaleData.cpp
+ ResourceTypes.cpp
+ TypeWrappers.cpp
+ ZipFileRO.cpp
)
-libadb = compile(expand('core/adb', adbfiles), '-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb')
+libandroidfw = compile(expand("base/libs/androidfw", androidfwfiles), "-Icore/base/include -Ibase/libs/androidfw/include -Icore/libutils/include -Icore/liblog/include -Icore/libsystem/include -Inative/include -Icore/libcutils/include -Icore/libziparchive/include")
basefiles = %w(
+ chrono_utils.cpp
+ errors_unix.cpp
file.cpp
logging.cpp
+ mapped_file.cpp
parsenetaddress.cpp
stringprintf.cpp
strings.cpp
- errors_unix.cpp
test_utils.cpp
+ threads.cpp
)
-libbase = compile(expand('core/base', basefiles), '-DADB_HOST=1 -Icore/base/include -Icore/include')
+libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include")
logfiles = %w(
- log_event_write.c
- fake_log_device.c
- log_event_list.c
- logger_write.c
- config_write.c
- config_read.c
- logger_lock.c
- local_logger.c
- fake_writer.c
- logger_name.c
- stderr_write.c
- logprint.c
+ fake_log_device.cpp
+ fake_writer.cpp
+ log_event_list.cpp
+ log_event_write.cpp
+ logger_lock.cpp
+ logger_name.cpp
+ logger_write.cpp
+ logprint.cpp
)
-liblog = compile(expand('core/liblog', logfiles), '-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include')
+liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include")
cutilsfiles = %w(
- load_file.c
- canned_fs_config.c
+ android_get_control_file.cpp
+ canned_fs_config.cpp
fs_config.cpp
- socket_local_client_unix.c
- socket_network_client_unix.c
- socket_local_server_unix.c
- sockets_unix.cpp
- socket_inaddr_any_server_unix.c
+ load_file.cpp
+ socket_inaddr_any_server_unix.cpp
+ socket_local_client_unix.cpp
+ socket_local_server_unix.cpp
+ socket_network_client_unix.cpp
sockets.cpp
- android_get_control_file.cpp
- threads.c
+ sockets_unix.cpp
+ threads.cpp
)
-libcutils = compile(expand('core/libcutils', cutilsfiles), '-D_GNU_SOURCE -Icore/include -Icore/libcutils/include')
+libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Icore/base/include")
diagnoseusbfiles = %w(
diagnose_usb.cpp
)
-libdiagnoseusb = compile(expand('core/adb', diagnoseusbfiles), '-Icore/include -Icore/base/include')
+libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Icore/base/include -Icore/diagnose_usb/include")
libcryptofiles = %w(
android_pubkey.c
)
-libcrypto = compile(expand('core/libcrypto_utils', libcryptofiles), '-Icore/libcrypto_utils/include -Iboringssl/include')
+libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/include")
# TODO: make subninja working
#boringssl = subninja('boringssl/build/', ['crypto/libcrypto.a'])
-boringssl = ['boringssl/build/crypto/libcrypto.a']
-
-link('adb', libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, '-lpthread -lusb-1.0')
-
+boringssl = ["boringssl/build/crypto/libcrypto.a"]
fastbootfiles = %w(
- protocol.cpp
- engine.cpp
bootimg_utils.cpp
fastboot.cpp
- util.cpp
+ fastboot_driver.cpp
fs.cpp
- usb_linux.cpp
+ main.cpp
socket.cpp
tcp.cpp
udp.cpp
+ usb_linux.cpp
+ util.cpp
+)
+libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Imkbootimg/include/bootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include -Iavb')
+
+fsmgrfiles = %w(
+ liblp/images.cpp
+ liblp/partition_opener.cpp
+ liblp/reader.cpp
+ liblp/utility.cpp
+ liblp/writer.cpp
)
-libfastboot = compile(expand('core/fastboot', fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils')
+libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), "-Icore/fs_mgr/liblp/include -Icore/base/include -Iextras/ext4_utils/include -Icore/libsparse/include")
sparsefiles = %w(
- backed_block.c
- output_file.c
- sparse.c
- sparse_crc32.c
- sparse_err.c
+ backed_block.cpp
+ output_file.cpp
+ sparse.cpp
+ sparse_crc32.cpp
+ sparse_err.cpp
sparse_read.cpp
)
-libsparse = compile(expand('core/libsparse', sparsefiles), '-Icore/libsparse/include -Icore/base/include')
+libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include")
f2fsfiles = %w(
- f2fs_utils.c
- f2fs_ioutils.c
- f2fs_dlutils.c
)
-f2fs = compile(expand('extras/f2fs_utils', f2fsfiles), '-Iextras/f2fs_utils -If2fs-tools/include -If2fs-tools/mkfs -Icore/libsparse/include -Iselinux/libselinux/include')
+f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-DHAVE_LINUX_TYPES_H -If2fs-tools/include -Icore/liblog/include")
zipfiles = %w(
zip_archive.cc
)
-libzip = compile(expand('core/libziparchive', zipfiles), '-Icore/base/include -Icore/include')
+libzip = compile(expand("core/libziparchive", zipfiles), "-Icore/base/include -Icore/include -Icore/libziparchive/include")
utilfiles = %w(
FileMap.cpp
+ SharedBuffer.cpp
+ String16.cpp
+ String8.cpp
+ VectorImpl.cpp
+ Unicode.cpp
)
-libutil = compile(expand('core/libutils', utilfiles), '-Icore/include')
+libutil = compile(expand("core/libutils", utilfiles), "-Icore/include -Icore/base/include")
ext4files = %w(
- make_ext4fs.c
- ext4fixup.c
- ext4_utils.c
- allocate.c
- contents.c
- extent.c
- indirect.c
- sha1.c
- wipe.c
- crc16.c
- ext4_sb.c
-)
-libext4 = compile(expand('extras/ext4_utils', ext4files), '-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -DANDROID -DHOST=1')
-
-make_ext4files = %w(
- make_ext4fs_main.c
+ ext4_utils.cpp
+ wipe.cpp
+ ext4_sb.cpp
)
-libmake_ext4 = compile(expand('extras/ext4_utils', make_ext4files), '-DANDROID -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -DHOST=1')
+libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Icore/base/include")
selinuxfiles = %w(
+ booleans.c
callbacks.c
+ canonicalize_context.c
check_context.c
+ disable.c
+ enabled.c
freecon.c
+ getenforce.c
init.c
+ label_backends_android.c
label.c
label_file.c
label_support.c
- setrans_client.c
- regex.c
- matchpathcon.c
- selinux_config.c
- label_backends_android.c
- canonicalize_context.c
- lsetfilecon.c
- policyvers.c
lgetfilecon.c
load_policy.c
+ lsetfilecon.c
+ matchpathcon.c
+ policyvers.c
+ regex.c
+ selinux_config.c
+ setenforce.c
+ setrans_client.c
seusers.c
sha1.c
- booleans.c
- disable.c
- enabled.c
- getenforce.c
- setenforce.c
)
-libselinux = compile(expand('selinux/libselinux/src', selinuxfiles), '-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL -DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DPCRE2_CODE_UNIT_WIDTH=8 -Iselinux/libselinux/include -Iselinux/libsepol/include')
+libselinux = compile(expand("selinux/libselinux/src", selinuxfiles), "-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL -DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DPCRE2_CODE_UNIT_WIDTH=8 -Iselinux/libselinux/include -Iselinux/libsepol/include")
libsepolfiles = %w(
- policydb_public.c
- genbools.c
- debug.c
- policydb.c
- conditional.c
- services.c
- ebitmap.c
- util.c
assertion.c
+ avrule_block.c
avtab.c
- hashtab.c
- sidtab.c
+ conditional.c
+ constraint.c
context.c
- genusers.c
context_record.c
+ debug.c
+ ebitmap.c
+ expand.c
+ genbools.c
+ genusers.c
+ hashtab.c
+ hierarchy.c
+ kernel_to_common.c
mls.c
- avrule_block.c
- symtab.c
+ policydb.c
policydb_convert.c
+ policydb_public.c
+ services.c
+ sidtab.c
+ symtab.c
+ util.c
write.c
- constraint.c
- expand.c
- hierarchy.c
)
-libsepol = compile(expand('selinux/libsepol/src', libsepolfiles), '-Iselinux/libsepol/include')
+libsepol = compile(expand("selinux/libsepol/src", libsepolfiles), "-Iselinux/libsepol/include -Iselinux/libsepol/src")
+
+link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb + boringssl, "-lz -lpcre2-8 -lpthread -ldl")
+
+# mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955)
+libext2fsfiles = %w(
+ lib/blkid/cache.c
+ lib/blkid/dev.c
+ lib/blkid/devname.c
+ lib/blkid/devno.c
+ lib/blkid/getsize.c
+ lib/blkid/llseek.c
+ lib/blkid/probe.c
+ lib/blkid/read.c
+ lib/blkid/resolve.c
+ lib/blkid/save.c
+ lib/blkid/tag.c
+ lib/e2p/encoding.c
+ lib/e2p/feature.c
+ lib/e2p/hashstr.c
+ lib/e2p/mntopts.c
+ lib/e2p/ostype.c
+ lib/e2p/parse_num.c
+ lib/e2p/uuid.c
+ lib/et/com_err.c
+ lib/et/error_message.c
+ lib/et/et_name.c
+ lib/ext2fs/alloc.c
+ lib/ext2fs/alloc_sb.c
+ lib/ext2fs/alloc_stats.c
+ lib/ext2fs/alloc_tables.c
+ lib/ext2fs/atexit.c
+ lib/ext2fs/badblocks.c
+ lib/ext2fs/bb_inode.c
+ lib/ext2fs/bitmaps.c
+ lib/ext2fs/bitops.c
+ lib/ext2fs/blkmap64_ba.c
+ lib/ext2fs/blkmap64_rb.c
+ lib/ext2fs/blknum.c
+ lib/ext2fs/block.c
+ lib/ext2fs/bmap.c
+ lib/ext2fs/closefs.c
+ lib/ext2fs/crc16.c
+ lib/ext2fs/crc32c.c
+ lib/ext2fs/csum.c
+ lib/ext2fs/dirblock.c
+ lib/ext2fs/dir_iterate.c
+ lib/ext2fs/expanddir.c
+ lib/ext2fs/ext2_err.c
+ lib/ext2fs/ext_attr.c
+ lib/ext2fs/extent.c
+ lib/ext2fs/fallocate.c
+ lib/ext2fs/fileio.c
+ lib/ext2fs/freefs.c
+ lib/ext2fs/gen_bitmap64.c
+ lib/ext2fs/gen_bitmap.c
+ lib/ext2fs/get_num_dirs.c
+ lib/ext2fs/getsectsize.c
+ lib/ext2fs/getsize.c
+ lib/ext2fs/hashmap.c
+ lib/ext2fs/i_block.c
+ lib/ext2fs/ind_block.c
+ lib/ext2fs/initialize.c
+ lib/ext2fs/inline.c
+ lib/ext2fs/inline_data.c
+ lib/ext2fs/inode.c
+ lib/ext2fs/io_manager.c
+ lib/ext2fs/ismounted.c
+ lib/ext2fs/link.c
+ lib/ext2fs/llseek.c
+ lib/ext2fs/lookup.c
+ lib/ext2fs/mkdir.c
+ lib/ext2fs/mkjournal.c
+ lib/ext2fs/mmp.c
+ lib/ext2fs/namei.c
+ lib/ext2fs/newdir.c
+ lib/ext2fs/nls_utf8.c
+ lib/ext2fs/openfs.c
+ lib/ext2fs/progress.c
+ lib/ext2fs/punch.c
+ lib/ext2fs/rbtree.c
+ lib/ext2fs/read_bb.c
+ lib/ext2fs/read_bb_file.c
+ lib/ext2fs/res_gdt.c
+ lib/ext2fs/rw_bitmaps.c
+ lib/ext2fs/sha512.c
+ lib/ext2fs/sparse_io.c
+ lib/ext2fs/symlink.c
+ lib/ext2fs/undo_io.c
+ lib/ext2fs/unix_io.c
+ lib/ext2fs/valid_blk.c
+ lib/support/dict.c
+ lib/support/mkquota.c
+ lib/support/parse_qtype.c
+ lib/support/plausible.c
+ lib/support/prof_err.c
+ lib/support/profile.c
+ lib/support/quotaio.c
+ lib/support/quotaio_tree.c
+ lib/support/quotaio_v2.c
+ lib/uuid/clear.c
+ lib/uuid/gen_uuid.c
+ lib/uuid/isnull.c
+ lib/uuid/pack.c
+ lib/uuid/parse.c
+ lib/uuid/unpack.c
+ lib/uuid/unparse.c
+ misc/create_inode.c
+)
+libext2fs = compile(expand("e2fsprogs", libext2fsfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Icore/libsparse/include")
+
+mke2fsfiles = %w(
+ misc/default_profile.c
+ misc/mke2fs.c
+ misc/mk_hugefiles.c
+ misc/util.c
+)
+mke2fs = compile(expand("e2fsprogs", mke2fsfiles), "-Ie2fsprogs/lib")
+
+link("mke2fs.android", mke2fs + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lpthread -lz")
+
+e2fsdroidfiles = %w(
+ contrib/android/basefs_allocator.c
+ contrib/android/base_fs.c
+ contrib/android/block_list.c
+ contrib/android/block_range.c
+ contrib/android/e2fsdroid.c
+ contrib/android/fsmap.c
+ contrib/android/perms.c
+)
+e2fsdroid = compile(expand("e2fsprogs", e2fsdroidfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Iselinux/libselinux/include -Icore/libcutils/include -Ie2fsprogs/misc")
+
+link("e2fsdroid", e2fsdroid + libext2fs + libsparse + libbase + libzip + liblog + libutil + libselinux + libsepol + libcutils, "-lz -lpthread -lpcre2-8")
+
+ext2simgfiles = %w(
+ contrib/android/ext2simg.c
+)
+ext2simg = compile(expand("e2fsprogs", ext2simgfiles), "-Ie2fsprogs/lib -Icore/libsparse/include")
+
+link("ext2simg", ext2simg + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lz -lpthread")
-link('fastboot', libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb, '-lz -lpcre2-8 -lpthread -ldl')
-link('make_ext4fs', libmake_ext4 + libzip + libcutils + liblog + libutil + libbase + libext4 + libselinux + libsepol + libsparse, '-lz -lpcre2-8 -lpthread')
+link("adb", libbase + liblog + libcutils + libutil + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl + libandroidfw + libzip + [apkent_o], "-lpthread -lusb-1.0 -lprotobuf-lite -lz")
diff --git a/development/anjuta/anjuta.SlackBuild b/development/anjuta/anjuta.SlackBuild
index f9944de6a4..6ad50aec7b 100644
--- a/development/anjuta/anjuta.SlackBuild
+++ b/development/anjuta/anjuta.SlackBuild
@@ -69,7 +69,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -Wno-error=format-nonliteral -Wno-error=format-y2k" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/development/apache-log4cxx/apache-log4cxx.SlackBuild b/development/apache-log4cxx/apache-log4cxx.SlackBuild
index 8e1adafefb..a0971e9701 100644
--- a/development/apache-log4cxx/apache-log4cxx.SlackBuild
+++ b/development/apache-log4cxx/apache-log4cxx.SlackBuild
@@ -70,6 +70,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
zcat $CWD/fixincludes.patch.gz | patch -p1 || exit
+zcat $CWD/narrowing-fixes.patch.gz | patch -p1 || exit
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/development/apache-log4cxx/narrowing-fixes.patch.gz b/development/apache-log4cxx/narrowing-fixes.patch.gz
new file mode 100644
index 0000000000..cd79cc6971
--- /dev/null
+++ b/development/apache-log4cxx/narrowing-fixes.patch.gz
Binary files differ
diff --git a/development/autogen/autogen.SlackBuild b/development/autogen/autogen.SlackBuild
index 8318ecd660..3fdb23b320 100644
--- a/development/autogen/autogen.SlackBuild
+++ b/development/autogen/autogen.SlackBuild
@@ -70,7 +70,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+# Patched for guile 2.2.x
+patch -p1 < $CWD/guile-2.2.patch
+
+autoreconf
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-fallthrough -Wno-error=format-overflow" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -81,6 +85,7 @@ CXXFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-static=no \
+ --disable-dependency-tracking \
--build=$ARCH-slackware-linux
make
diff --git a/development/autogen/guile-2.2.patch b/development/autogen/guile-2.2.patch
new file mode 100644
index 0000000000..b3d50f4b79
--- /dev/null
+++ b/development/autogen/guile-2.2.patch
@@ -0,0 +1,78 @@
+diff --git a/agen5/guile-iface.h b/agen5/guile-iface.h
+index 0aeabb0..6ce3520 100644
+--- a/agen5/guile-iface.h
++++ b/agen5/guile-iface.h
+@@ -9,7 +9,7 @@
+ # error AutoGen does not work with this version of Guile
+ choke me.
+
+-#elif GUILE_VERSION < 201000
++#else
+ # define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p))
+ # define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l))
+ # define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p))
+@@ -24,9 +24,6 @@
+ # define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v))
+ # define AG_SCM_VEC_P(_v) scm_is_vector(_v)
+
+-#else
+-# error unknown GUILE_VERSION
+- choke me.
+ #endif
+
+ #endif /* MUTATING_GUILE_IFACE_H_GUARD */
+diff --git a/configure b/configure
+index befe20b..c4254eb 100755
+--- a/configure
++++ b/configure
+@@ -14191,7 +14191,7 @@ $as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+ fi
+- _guile_versions_to_search="2.0 1.8"
++ _guile_versions_to_search="2.2 2.0 1.8"
+ if test -n "$GUILE_EFFECTIVE_VERSION"; then
+ _guile_tmp=""
+ for v in $_guile_versions_to_search; do
+
+diff --git a/agen5/guile-iface.h b/agen5/guile-iface.h
+index 0aeabb0..6ce3520 100644
+--- autogen-5.18.12/config/guile-orig.m4 2017-11-21 15:23:45.047606700 -0500
++++ autogen-5.18.12/config/guile.m4 2017-11-21 15:24:20.414686700 -0500
+@@ -47,7 +47,7 @@
+ # for an available version of Guile.
+ #
+ # By default, this macro will search for the latest stable version of
+-# Guile (e.g. 2.0), falling back to the previous stable version
++# Guile (e.g. 2.2), falling back to the previous stable version
+ # (e.g. 1.8) if it is available. If no guile-@var{VERSION}.pc file is
+ # found, an error is signalled. The found version is stored in
+ # @var{GUILE_EFFECTIVE_VERSION}.
+@@ -61,7 +61,7 @@
+ #
+ AC_DEFUN([GUILE_PKG],
+ [PKG_PROG_PKG_CONFIG
+- _guile_versions_to_search="m4_default([$1], [2.0 1.8])"
++ _guile_versions_to_search="m4_default([$1], [2.2 1.8])"
+ if test -n "$GUILE_EFFECTIVE_VERSION"; then
+ _guile_tmp=""
+ for v in $_guile_versions_to_search; do
+@@ -184,7 +184,7 @@
+ # If @code{guile} is not found, signal an error.
+ #
+ # By default, this macro will search for the latest stable version of
+-# Guile (e.g. 2.0). x.y or x.y.z versions can be specified. If an older
++# Guile (e.g. 2.2). x.y or x.y.z versions can be specified. If an older
+ # version is found, the macro will signal an error.
+ #
+ # The effective version of the found @code{guile} is set to
+@@ -201,7 +201,7 @@
+ [AC_PATH_PROG(GUILE,guile)
+ _guile_required_version="m4_default([$1], [$GUILE_EFFECTIVE_VERSION])"
+ if test -z "$_guile_required_version"; then
+- _guile_required_version=2.0
++ _guile_required_version=2.2
+ fi
+ if test "$GUILE" = "" ; then
+ AC_MSG_ERROR([guile required but not found])
+
diff --git a/development/avr-binutils/avr-binutils.SlackBuild b/development/avr-binutils/avr-binutils.SlackBuild
index 3b31a96b3f..a3b68d60ec 100644
--- a/development/avr-binutils/avr-binutils.SlackBuild
+++ b/development/avr-binutils/avr-binutils.SlackBuild
@@ -9,13 +9,13 @@
# This file is placed in the public domain.
PRGNAM=avr-binutils
-VERSION=${VERSION:-2.25}
+VERSION=${VERSION:-2.31}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -26,8 +26,8 @@ TMP=${TMP:-/tmp/SBo}
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"
@@ -50,10 +50,10 @@ tar xvf $CWD/binutils-$VERSION.tar.bz2
cd binutils-$VERSION
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 {} \;
+ \( -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 {} \;
# Apply patch for AVR specific output of 'size' (avr-size)
patch -p0 < $CWD/avr-size.patch
@@ -95,7 +95,7 @@ rm -f $PKG/usr/man/man1/avr-dlltool.1
rm -f $PKG/usr/man/man1/avr-nlmconv.1
rm -f $PKG/usr/man/man1/avr-windres.1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
diff --git a/development/avr-binutils/avr-binutils.info b/development/avr-binutils/avr-binutils.info
index a5ea0988d2..c58398e7eb 100644
--- a/development/avr-binutils/avr-binutils.info
+++ b/development/avr-binutils/avr-binutils.info
@@ -1,8 +1,8 @@
PRGNAM="avr-binutils"
-VERSION="2.25"
+VERSION="2.31"
HOMEPAGE="http://www.gnu.org/software/binutils"
-DOWNLOAD="http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
-MD5SUM="d9f3303f802a5b6b0bb73a335ab89d66"
+DOWNLOAD="http://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.bz2"
+MD5SUM="50a489aa6d4b8630b7b89b2de6b185be"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/avr-binutils/avr-size.patch b/development/avr-binutils/avr-size.patch
index 2e01c3d31f..b36f3d6d08 100644
--- a/development/avr-binutils/avr-size.patch
+++ b/development/avr-binutils/avr-size.patch
@@ -1,8 +1,10 @@
-AVR specific only
---------------------------------------------------------------------------------
+AVR only; support -C for AVR memory usage
+
+Source: http://git.makehackvoid.com/cgi-bin/gitweb.cgi?p=mhvavrtools.git;a=blob_plain;f=mhvavrtools/patches/binutils-001-avr-size.patch;h=e80d28eae46217551d996a2253256c97d10aa4b5;hb=refs/heads/master
+===========================================================
--- binutils/size.c 2007-08-06 13:56:14.000000000 -0600
+++ binutils/size.c 2007-09-13 09:13:10.281250000 -0600
-@@ -35,10 +35,31 @@
+@@ -36,10 +36,31 @@
#include "getopt.h"
#include "bucomm.h"
@@ -36,7 +38,7 @@ AVR specific only
/* Program options. */
static enum
-@@ -47,9 +68,8 @@ static enum
+@@ -48,9 +69,8 @@ static enum
}
radix = decimal;
@@ -47,7 +49,7 @@ AVR specific only
static int show_version = 0;
static int show_help = 0;
static int show_totals = 0;
-@@ -63,6 +83,157 @@ static bfd_size_type total_textsize;
+@@ -64,6 +84,246 @@ static bfd_size_type total_textsize;
/* Program exit status. */
static int return_code = 0;
@@ -63,12 +65,18 @@ AVR specific only
+#define AVR4K 4096UL
+#define AVR8K 8192UL
+#define AVR16K 16384UL
++#define AVR20K 20480UL
+#define AVR24K 24576UL
+#define AVR32K 32768UL
++#define AVR36K 36864UL
+#define AVR40K 40960UL
+#define AVR64K 65536UL
++#define AVR68K 69632UL
+#define AVR128K 131072UL
++#define AVR136K 139264UL
++#define AVR200K 204800UL
+#define AVR256K 262144UL
++#define AVR264K 270336UL
+
+typedef struct
+{
@@ -80,123 +88,206 @@ AVR specific only
+
+avr_device_t avr[] =
+{
-+ {"atmega2560", AVR256K, AVR8K, AVR4K},
-+ {"atmega2561", AVR256K, AVR8K, AVR4K},
-+
-+ {"at43usb320", AVR128K, 608UL, 0},
-+ {"at90can128", AVR128K, AVR4K, AVR4K},
-+ {"at90usb1286", AVR128K, AVR8K, AVR4K},
-+ {"at90usb1287", AVR128K, AVR8K, AVR4K},
-+ {"atmega128", AVR128K, AVR4K, AVR4K},
-+ {"atmega1280", AVR128K, AVR8K, AVR4K},
-+ {"atmega1281", AVR128K, AVR8K, AVR4K},
-+ {"atmega1284P", AVR128K, AVR16K, AVR4K},
-+ {"atmega103", AVR128K, 4000UL, AVR4K},
-+ {"atxmega128a1",AVR128K, AVR8K, AVR2K},
-+
-+ {"at90can64", AVR64K, AVR4K, AVR2K},
-+ {"at90usb646", AVR64K, AVR4K, AVR2K},
-+ {"at90usb647", AVR64K, AVR4K, AVR2K},
-+ {"atmega64", AVR64K, AVR4K, AVR2K},
-+ {"atmega640", AVR64K, AVR8K, AVR4K},
-+ {"atmega644", AVR64K, AVR4K, AVR2K},
-+ {"atmega644p", AVR64K, AVR4K, AVR2K},
-+ {"atmega645", AVR64K, AVR4K, AVR2K},
-+ {"atmega6450", AVR64K, AVR4K, AVR2K},
-+ {"atmega649", AVR64K, AVR4K, AVR2K},
-+ {"atmega6490", AVR64K, AVR4K, AVR2K},
-+ {"atxmega64a1", AVR64K, AVR4K, AVR2K},
-+
-+ {"atmega406", AVR40K, AVR512, AVR2K},
-+
-+ {"at90can32", AVR32K, AVR2K, AVR1K},
-+ {"at94k", AVR32K, AVR4K, 0},
-+ {"atmega32", AVR32K, AVR2K, AVR1K},
-+ {"atmega323", AVR32K, AVR2K, AVR1K},
-+ {"atmega324p", AVR32K, AVR2K, AVR1K},
-+ {"atmega325", AVR32K, AVR2K, AVR1K},
-+ {"atmega325p", AVR32K, AVR2K, AVR1K},
-+ {"atmega3250", AVR32K, AVR2K, AVR1K},
-+ {"atmega3250p", AVR32K, AVR2K, AVR1K},
-+ {"atmega328p", AVR32K, AVR2K, AVR1K},
-+ {"atmega329", AVR32K, AVR2K, AVR1K},
-+ {"atmega329p", AVR32K, AVR2K, AVR1K},
-+ {"atmega3290", AVR32K, AVR2K, AVR1K},
-+ {"atmega3290p", AVR32K, AVR2K, AVR1K},
-+ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
-+ {"atmega32c1", AVR32K, AVR2K, AVR1K},
-+ {"atmega32m1", AVR32K, AVR2K, AVR1K},
-+ {"atmega32u4", AVR32K, 2560UL, AVR1K},
-+
-+ {"at43usb355", AVR24K, 1120, 0},
-+
-+ {"at76c711", AVR16K, AVR2K, 0},
-+ {"at90pwm216", AVR16K, AVR1K, AVR512},
-+ {"at90pwm316", AVR16K, AVR1K, AVR512},
-+ {"at90usb162", AVR16K, AVR512, AVR512},
-+ {"atmega16", AVR16K, AVR1K, AVR512},
-+ {"atmega161", AVR16K, AVR1K, AVR512},
-+ {"atmega162", AVR16K, AVR1K, AVR512},
-+ {"atmega163", AVR16K, AVR1K, AVR512},
-+ {"atmega164", AVR16K, AVR1K, AVR512},
-+ {"atmega164p", AVR16K, AVR1K, AVR512},
-+ {"atmega165", AVR16K, AVR1K, AVR512},
-+ {"atmega165p", AVR16K, AVR1K, AVR512},
-+ {"atmega168", AVR16K, AVR1K, AVR512},
-+ {"atmega168p", AVR16K, AVR1K, AVR512},
-+ {"atmega169", AVR16K, AVR1K, AVR512},
-+ {"atmega169p", AVR16K, AVR1K, AVR512},
-+ {"attiny167", AVR16K, AVR512, AVR512},
-+ {"atxmega16d4", AVR16K, AVR2K, AVR1K},
-+
-+ {"at90c8534", AVR8K, 352, AVR512},
-+ {"at90pwm1", AVR8K, AVR512, AVR512},
-+ {"at90pwm2", AVR8K, AVR512, AVR512},
-+ {"at90pwm2b", AVR8K, AVR512, AVR512},
-+ {"at90pwm3", AVR8K, AVR512, AVR512},
-+ {"at90pwm3b", AVR8K, AVR512, AVR512},
-+ {"at90s8515", AVR8K, AVR512, AVR512},
-+ {"at90s8535", AVR8K, AVR512, AVR512},
-+ {"at90usb82", AVR8K, AVR512, AVR512},
-+ {"atmega8", AVR8K, AVR1K, AVR512},
-+ {"atmega8515", AVR8K, AVR512, AVR512},
-+ {"atmega8535", AVR8K, AVR512, AVR512},
-+ {"atmega88", AVR8K, AVR1K, AVR512},
-+ {"atmega88p", AVR8K, AVR1K, AVR512},
-+ {"attiny84", AVR8K, AVR512, AVR512},
-+ {"attiny85", AVR8K, AVR512, AVR512},
-+ {"attiny861", AVR8K, AVR512, AVR512},
-+ {"attiny88", AVR8K, AVR256, AVR64},
-+
-+ {"at90s4414", AVR4K, 352, AVR256},
-+ {"at90s4433", AVR4K, AVR128, AVR256},
-+ {"at90s4434", AVR4K, 352, AVR256},
-+ {"atmega48", AVR4K, AVR512, AVR256},
-+ {"atmega48p", AVR4K, AVR512, AVR256},
-+ {"attiny43u", AVR4K, AVR256, AVR64},
-+ {"attiny44", AVR4K, AVR256, AVR256},
-+ {"attiny45", AVR4K, AVR256, AVR256},
-+ {"attiny461", AVR4K, AVR256, AVR256},
-+ {"attiny48", AVR4K, AVR256, AVR64},
-+
-+ {"at86rf401", AVR2K, 224, AVR128},
-+ {"at90s2313", AVR2K, AVR128, AVR128},
-+ {"at90s2323", AVR2K, AVR128, AVR128},
-+ {"at90s2333", AVR2K, 224, AVR128},
-+ {"at90s2343", AVR2K, AVR128, AVR128},
-+ {"attiny22", AVR2K, 224, AVR128},
-+ {"attiny2313", AVR2K, AVR128, AVR128},
-+ {"attiny24", AVR2K, AVR128, AVR128},
-+ {"attiny25", AVR2K, AVR128, AVR128},
-+ {"attiny26", AVR2K, AVR128, AVR128},
-+ {"attiny261", AVR2K, AVR128, AVR128},
-+ {"attiny28", AVR2K, 0, 0},
-+
-+ {"at90s1200", AVR1K, 0, AVR64},
-+ {"attiny11", AVR1K, 0, AVR64},
-+ {"attiny12", AVR1K, 0, AVR64},
-+ {"attiny13", AVR1K, AVR64, AVR64},
-+ {"attiny15", AVR1K, 0, AVR64},
++ {"atxmega256a3", AVR264K, AVR16K, AVR4K},
++ {"atxmega256a3b", AVR264K, AVR16K, AVR4K},
++ {"atxmega256d3", AVR264K, AVR16K, AVR4K},
++
++ {"atmega2560", AVR256K, AVR8K, AVR4K},
++ {"atmega2561", AVR256K, AVR8K, AVR4K},
++
++ {"atxmega192a3", AVR200K, AVR16K, AVR2K},
++ {"atxmega192d3", AVR200K, AVR16K, AVR2K},
++
++ {"atxmega128a1", AVR136K, AVR8K, AVR2K},
++ {"atxmega128a1u", AVR136K, AVR8K, AVR2K},
++ {"atxmega128a3", AVR136K, AVR8K, AVR2K},
++ {"atxmega128d3", AVR136K, AVR8K, AVR2K},
++
++ {"at43usb320", AVR128K, 608UL, 0UL},
++ {"at90can128", AVR128K, AVR4K, AVR4K},
++ {"at90usb1286", AVR128K, AVR8K, AVR4K},
++ {"at90usb1287", AVR128K, AVR8K, AVR4K},
++ {"atmega128", AVR128K, AVR4K, AVR4K},
++ {"atmega1280", AVR128K, AVR8K, AVR4K},
++ {"atmega1281", AVR128K, AVR8K, AVR4K},
++ {"atmega1284p", AVR128K, AVR16K, AVR4K},
++ {"atmega128rfa1", AVR128K, AVR16K, AVR4K},
++ {"atmega103", AVR128K, 4000UL, AVR4K},
++
++ {"atxmega64a1", AVR68K, AVR4K, AVR2K},
++ {"atxmega64a1u", AVR68K, AVR4K, AVR2K},
++ {"atxmega64a3", AVR68K, AVR4K, AVR2K},
++ {"atxmega64d3", AVR68K, AVR4K, AVR2K},
++
++ {"at90can64", AVR64K, AVR4K, AVR2K},
++ {"at90scr100", AVR64K, AVR4K, AVR2K},
++ {"at90usb646", AVR64K, AVR4K, AVR2K},
++ {"at90usb647", AVR64K, AVR4K, AVR2K},
++ {"atmega64", AVR64K, AVR4K, AVR2K},
++ {"atmega640", AVR64K, AVR8K, AVR4K},
++ {"atmega644", AVR64K, AVR4K, AVR2K},
++ {"atmega644a", AVR64K, AVR4K, AVR2K},
++ {"atmega644p", AVR64K, AVR4K, AVR2K},
++ {"atmega644pa", AVR64K, AVR4K, AVR2K},
++ {"atmega645", AVR64K, AVR4K, AVR2K},
++ {"atmega645a", AVR64K, AVR4K, AVR2K},
++ {"atmega645p", AVR64K, AVR4K, AVR2K},
++ {"atmega6450", AVR64K, AVR4K, AVR2K},
++ {"atmega6450a", AVR64K, AVR4K, AVR2K},
++ {"atmega6450p", AVR64K, AVR4K, AVR2K},
++ {"atmega649", AVR64K, AVR4K, AVR2K},
++ {"atmega649a", AVR64K, AVR4K, AVR2K},
++ {"atmega649p", AVR64K, AVR4K, AVR2K},
++ {"atmega6490", AVR64K, AVR4K, AVR2K},
++ {"atmega6490a", AVR64K, AVR4K, AVR2K},
++ {"atmega6490p", AVR64K, AVR4K, AVR2K},
++ {"atmega64c1", AVR64K, AVR4K, AVR2K},
++ {"atmega64hve", AVR64K, AVR4K, AVR1K},
++ {"atmega64m1", AVR64K, AVR4K, AVR2K},
++ {"m3000", AVR64K, AVR4K, 0UL},
++
++ {"atmega406", AVR40K, AVR2K, AVR512},
++
++ {"atxmega32a4", AVR36K, AVR4K, AVR1K},
++ {"atxmega32d4", AVR36K, AVR4K, AVR1K},
++
++ {"at90can32", AVR32K, AVR2K, AVR1K},
++ {"at94k", AVR32K, AVR4K, 0UL},
++ {"atmega32", AVR32K, AVR2K, AVR1K},
++ {"atmega323", AVR32K, AVR2K, AVR1K},
++ {"atmega324a", AVR32K, AVR2K, AVR1K},
++ {"atmega324p", AVR32K, AVR2K, AVR1K},
++ {"atmega324pa", AVR32K, AVR2K, AVR1K},
++ {"atmega325", AVR32K, AVR2K, AVR1K},
++ {"atmega325a", AVR32K, AVR2K, AVR1K},
++ {"atmega325p", AVR32K, AVR2K, AVR1K},
++ {"atmega3250", AVR32K, AVR2K, AVR1K},
++ {"atmega3250a", AVR32K, AVR2K, AVR1K},
++ {"atmega3250p", AVR32K, AVR2K, AVR1K},
++ {"atmega328", AVR32K, AVR2K, AVR1K},
++ {"atmega328p", AVR32K, AVR2K, AVR1K},
++ {"atmega329", AVR32K, AVR2K, AVR1K},
++ {"atmega329a", AVR32K, AVR2K, AVR1K},
++ {"atmega329p", AVR32K, AVR2K, AVR1K},
++ {"atmega329pa", AVR32K, AVR2K, AVR1K},
++ {"atmega3290", AVR32K, AVR2K, AVR1K},
++ {"atmega3290a", AVR32K, AVR2K, AVR1K},
++ {"atmega3290p", AVR32K, AVR2K, AVR1K},
++ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
++ {"atmega32c1", AVR32K, AVR2K, AVR1K},
++ {"atmega32hvb", AVR32K, AVR2K, AVR1K},
++ {"atmega32m1", AVR32K, AVR2K, AVR1K},
++ {"atmega32u2", AVR32K, AVR1K, AVR1K},
++ {"atmega32u4", AVR32K, 2560UL, AVR1K},
++ {"atmega32u6", AVR32K, 2560UL, AVR1K},
++
++ {"at43usb355", AVR24K, 1120UL, 0UL},
++
++ {"atxmega16a4", AVR20K, AVR2K, AVR1K},
++ {"atxmega16d4", AVR20K, AVR2K, AVR1K},
++
++ {"at76c711", AVR16K, AVR2K, 0UL},
++ {"at90pwm216", AVR16K, AVR1K, AVR512},
++ {"at90pwm316", AVR16K, AVR1K, AVR512},
++ {"at90usb162", AVR16K, AVR512, AVR512},
++ {"atmega16", AVR16K, AVR1K, AVR512},
++ {"atmega16a", AVR16K, AVR1K, AVR512},
++ {"atmega161", AVR16K, AVR1K, AVR512},
++ {"atmega162", AVR16K, AVR1K, AVR512},
++ {"atmega163", AVR16K, AVR1K, AVR512},
++ {"atmega164", AVR16K, AVR1K, AVR512},
++ {"atmega164a", AVR16K, AVR1K, AVR512},
++ {"atmega164p", AVR16K, AVR1K, AVR512},
++ {"atmega165a", AVR16K, AVR1K, AVR512},
++ {"atmega165", AVR16K, AVR1K, AVR512},
++ {"atmega165p", AVR16K, AVR1K, AVR512},
++ {"atmega168", AVR16K, AVR1K, AVR512},
++ {"atmega168a", AVR16K, AVR1K, AVR512},
++ {"atmega168p", AVR16K, AVR1K, AVR512},
++ {"atmega169", AVR16K, AVR1K, AVR512},
++ {"atmega169a", AVR16K, AVR1K, AVR512},
++ {"atmega169p", AVR16K, AVR1K, AVR512},
++ {"atmega169pa", AVR16K, AVR1K, AVR512},
++ {"atmega16hva", AVR16K, 768UL, AVR256},
++ {"atmega16hva2", AVR16K, AVR1K, AVR256},
++ {"atmega16hvb", AVR16K, AVR1K, AVR512},
++ {"atmega16m1", AVR16K, AVR1K, AVR512},
++ {"atmega16u2", AVR16K, AVR512, AVR512},
++ {"atmega16u4", AVR16K, 1280UL, AVR512},
++ {"attiny167", AVR16K, AVR512, AVR512},
++
++ {"at90c8534", AVR8K, 352UL, AVR512},
++ {"at90pwm1", AVR8K, AVR512, AVR512},
++ {"at90pwm2", AVR8K, AVR512, AVR512},
++ {"at90pwm2b", AVR8K, AVR512, AVR512},
++ {"at90pwm3", AVR8K, AVR512, AVR512},
++ {"at90pwm3b", AVR8K, AVR512, AVR512},
++ {"at90pwm81", AVR8K, AVR256, AVR512},
++ {"at90s8515", AVR8K, AVR512, AVR512},
++ {"at90s8535", AVR8K, AVR512, AVR512},
++ {"at90usb82", AVR8K, AVR512, AVR512},
++ {"ata6289", AVR8K, AVR512, 320UL},
++ {"atmega8", AVR8K, AVR1K, AVR512},
++ {"atmega8515", AVR8K, AVR512, AVR512},
++ {"atmega8535", AVR8K, AVR512, AVR512},
++ {"atmega88", AVR8K, AVR1K, AVR512},
++ {"atmega88a", AVR8K, AVR1K, AVR512},
++ {"atmega88p", AVR8K, AVR1K, AVR512},
++ {"atmega88pa", AVR8K, AVR1K, AVR512},
++ {"atmega8hva", AVR8K, 768UL, AVR256},
++ {"atmega8u2", AVR8K, AVR512, AVR512},
++ {"attiny84", AVR8K, AVR512, AVR512},
++ {"attiny84a", AVR8K, AVR512, AVR512},
++ {"attiny85", AVR8K, AVR512, AVR512},
++ {"attiny861", AVR8K, AVR512, AVR512},
++ {"attiny861a", AVR8K, AVR512, AVR512},
++ {"attiny87", AVR8K, AVR512, AVR512},
++ {"attiny88", AVR8K, AVR512, AVR64},
++
++ {"at90s4414", AVR4K, 352UL, AVR256},
++ {"at90s4433", AVR4K, AVR128, AVR256},
++ {"at90s4434", AVR4K, 352UL, AVR256},
++ {"atmega48", AVR4K, AVR512, AVR256},
++ {"atmega48a", AVR4K, AVR512, AVR256},
++ {"atmega48p", AVR4K, AVR512, AVR256},
++ {"attiny4313", AVR4K, AVR256, AVR256},
++ {"attiny43u", AVR4K, AVR256, AVR64},
++ {"attiny44", AVR4K, AVR256, AVR256},
++ {"attiny44a", AVR4K, AVR256, AVR256},
++ {"attiny45", AVR4K, AVR256, AVR256},
++ {"attiny461", AVR4K, AVR256, AVR256},
++ {"attiny461a", AVR4K, AVR256, AVR256},
++ {"attiny48", AVR4K, AVR256, AVR64},
++
++ {"at86rf401", AVR2K, 224UL, AVR128},
++ {"at90s2313", AVR2K, AVR128, AVR128},
++ {"at90s2323", AVR2K, AVR128, AVR128},
++ {"at90s2333", AVR2K, 224UL, AVR128},
++ {"at90s2343", AVR2K, AVR128, AVR128},
++ {"attiny20", AVR2K, AVR128, 0UL},
++ {"attiny22", AVR2K, 224UL, AVR128},
++ {"attiny2313", AVR2K, AVR128, AVR128},
++ {"attiny2313a", AVR2K, AVR128, AVR128},
++ {"attiny24", AVR2K, AVR128, AVR128},
++ {"attiny24a", AVR2K, AVR128, AVR128},
++ {"attiny25", AVR2K, AVR128, AVR128},
++ {"attiny26", AVR2K, AVR128, AVR128},
++ {"attiny261", AVR2K, AVR128, AVR128},
++ {"attiny261a", AVR2K, AVR128, AVR128},
++ {"attiny28", AVR2K, 0UL, 0UL},
++ {"attiny40", AVR2K, AVR256, 0UL},
++
++ {"at90s1200", AVR1K, 0UL, AVR64},
++ {"attiny9", AVR1K, 32UL, 0UL},
++ {"attiny10", AVR1K, 32UL, 0UL},
++ {"attiny11", AVR1K, 0UL, AVR64},
++ {"attiny12", AVR1K, 0UL, AVR64},
++ {"attiny13", AVR1K, AVR64, AVR64},
++ {"attiny13a", AVR1K, AVR64, AVR64},
++ {"attiny15", AVR1K, 0UL, AVR64},
++
++ {"attiny4", AVR512, 32UL, 0UL},
++ {"attiny5", AVR512, 32UL, 0UL},
+};
+
+static char *avrmcu = NULL;
@@ -205,7 +296,7 @@ AVR specific only
static char *target = NULL;
/* Forward declarations. */
-@@ -78,7 +240,8 @@ usage (FILE *stream, int status)
+@@ -79,7 +337,8 @@ usage (FILE *stream, int status)
fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
fprintf (stream, _(" The options are:\n\
@@ -215,7 +306,7 @@ AVR specific only
-o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\
-t --totals Display the total sizes (Berkeley only)\n\
--common Display total size for *COM* syms\n\
-@@ -87,11 +250,7 @@ usage (FILE *stream, int status)
+@@ -88,11 +337,7 @@ usage (FILE *stream, int status)
-h --help Display this information\n\
-v --version Display the program's version\n\
\n"),
@@ -228,7 +319,7 @@ AVR specific only
);
list_supported_targets (program_name, stream);
if (REPORT_BUGS_TO[0] && status == 0)
-@@ -102,6 +261,7 @@ usage (FILE *stream, int status)
+@@ -103,6 +359,7 @@ usage (FILE *stream, int status)
#define OPTION_FORMAT (200)
#define OPTION_RADIX (OPTION_FORMAT + 1)
#define OPTION_TARGET (OPTION_RADIX + 1)
@@ -236,7 +327,7 @@ AVR specific only
static struct option long_options[] =
{
-@@ -109,6 +269,7 @@ static struct option long_options[] =
+@@ -110,6 +368,7 @@ static struct option long_options[] =
{"format", required_argument, 0, OPTION_FORMAT},
{"radix", required_argument, 0, OPTION_RADIX},
{"target", required_argument, 0, OPTION_TARGET},
@@ -244,7 +335,7 @@ AVR specific only
{"totals", no_argument, &show_totals, 1},
{"version", no_argument, &show_version, 1},
{"help", no_argument, &show_help, 1},
-@@ -140,7 +301,7 @@ main (int argc, char **argv)
+@@ -141,7 +399,7 @@ main (int argc, char **argv)
bfd_init ();
set_default_bfd_target ();
@@ -253,7 +344,7 @@ AVR specific only
(int *) 0)) != EOF)
switch (c)
{
-@@ -149,11 +310,15 @@ main (int argc, char **argv)
+@@ -150,11 +409,15 @@ main (int argc, char **argv)
{
case 'B':
case 'b':
@@ -271,7 +362,7 @@ AVR specific only
break;
default:
non_fatal (_("invalid argument to --format: %s"), optarg);
-@@ -161,6 +326,10 @@ main (int argc, char **argv)
+@@ -162,6 +424,10 @@ main (int argc, char **argv)
}
break;
@@ -282,7 +373,7 @@ AVR specific only
case OPTION_TARGET:
target = optarg;
break;
-@@ -189,11 +358,14 @@ main (int argc, char **argv)
+@@ -190,11 +457,14 @@ main (int argc, char **argv)
break;
case 'A':
@@ -299,7 +390,7 @@ AVR specific only
case 'v':
case 'V':
show_version = 1;
-@@ -239,7 +411,7 @@ main (int argc, char **argv)
+@@ -240,7 +509,7 @@ main (int argc, char **argv)
for (; optind < argc;)
display_file (argv[optind++]);
@@ -308,7 +399,7 @@ AVR specific only
{
bfd_size_type total = total_textsize + total_datasize + total_bsssize;
-@@ -600,13 +772,117 @@ print_sysv_format (bfd *file)
+@@ -599,13 +869,117 @@ print_sysv_format (bfd *file)
printf ("\n\n");
}
@@ -341,12 +432,12 @@ AVR specific only
+ int rammax = 0;
+ int eeprommax = 0;
+ asection *section;
-+ bfd_size_type data_size = 0;
-+ bfd_size_type text_size = 0;
-+ bfd_size_type bss_size = 0;
-+ bfd_size_type bootloader_size = 0;
-+ bfd_size_type noinit_size = 0;
-+ bfd_size_type eeprom_size = 0;
++ bfd_size_type my_datasize = 0;
++ bfd_size_type my_textsize = 0;
++ bfd_size_type my_bsssize = 0;
++ bfd_size_type bootloadersize = 0;
++ bfd_size_type noinitsize = 0;
++ bfd_size_type eepromsize = 0;
+
+ avr_device_t *avrdevice = avr_find_device();
+ if (avrdevice != NULL)
@@ -358,21 +449,21 @@ AVR specific only
+ }
+
+ if ((section = bfd_get_section_by_name (file, ".data")) != NULL)
-+ data_size = bfd_section_size (file, section);
++ my_datasize = bfd_section_size (file, section);
+ if ((section = bfd_get_section_by_name (file, ".text")) != NULL)
-+ text_size = bfd_section_size (file, section);
++ my_textsize = bfd_section_size (file, section);
+ if ((section = bfd_get_section_by_name (file, ".bss")) != NULL)
-+ bss_size = bfd_section_size (file, section);
++ my_bsssize = bfd_section_size (file, section);
+ if ((section = bfd_get_section_by_name (file, ".bootloader")) != NULL)
-+ bootloader_size = bfd_section_size (file, section);
++ bootloadersize = bfd_section_size (file, section);
+ if ((section = bfd_get_section_by_name (file, ".noinit")) != NULL)
-+ noinit_size = bfd_section_size (file, section);
++ noinitsize = bfd_section_size (file, section);
+ if ((section = bfd_get_section_by_name (file, ".eeprom")) != NULL)
-+ eeprom_size = bfd_section_size (file, section);
++ eepromsize = bfd_section_size (file, section);
+
-+ bfd_size_type text = text_size + data_size + bootloader_size;
-+ bfd_size_type data = data_size + bss_size + noinit_size;
-+ bfd_size_type eeprom = eeprom_size;
++ bfd_size_type text = my_textsize + my_datasize + bootloadersize;
++ bfd_size_type data = my_datasize + my_bsssize + noinitsize;
++ bfd_size_type eeprom = eepromsize;
+
+ printf ("AVR Memory Usage\n"
+ "----------------\n"
diff --git a/development/avr-gcc/avr-gcc.SlackBuild b/development/avr-gcc/avr-gcc.SlackBuild
index a91986fe8c..ba8b2d314f 100644
--- a/development/avr-gcc/avr-gcc.SlackBuild
+++ b/development/avr-gcc/avr-gcc.SlackBuild
@@ -8,13 +8,14 @@
# This file is placed in the public domain.
PRGNAM=avr-gcc
-VERSION=${VERSION:-4.9.2}
+VERSION=${VERSION:-8.2.0}
+ISLVERSION=${ISLVERSION:-0.19}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -25,8 +26,8 @@ TMP=${TMP:-/tmp/SBo}
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"
@@ -42,21 +43,25 @@ fi
set -e
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf gcc-$VERSION avr-gcc-build-$VERSION
-tar xvf $CWD/gcc-$VERSION.tar.bz2 || exit 1
-mkdir avr-gcc-build-$VERSION
-cd avr-gcc-build-$VERSION || exit 1
-chown -R root:root .
+mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
+cd $TMP/$PRGNAM
+rm -rf $TMP/$PRGNAM/*
+tar xvf $CWD/gcc-$VERSION.tar.xz
+tar xvf $CWD/isl-$ISLVERSION.tar.bz2
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 {} \;
+ \( -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 {} \;
+cd gcc-$VERSION
+ln -s ../isl-$ISLVERSION isl
+
+mkdir ../avr-gcc-build-$VERSION
+cd ../avr-gcc-build-$VERSION
+
+export CFLAGS_FOR_TARGET="$SLKCFLAGS"
+export CXXFLAGS_FOR_TARGET="$SLKCFLAGS"
-CFLAGS_FOR_BUILD="$SLKCFLAGS" \
-CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
../gcc-$VERSION/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -71,11 +76,12 @@ CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
--disable-linker-build-id \
--disable-nls \
--disable-werror \
- --enable-__cxa_atexit \
+ --disable-__cxa_atexit \
--enable-checking=release \
--enable-clocale=gnu \
--enable-cloog-backend=isl \
--enable-gnu-unique-object \
+ --enable-gnu-indirect-function \
--enable-gold \
--enable-languages=c,c++ \
--enable-ld=default \
@@ -90,22 +96,24 @@ CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
--with-plugin-ld=ld.gold \
--with-system-zlib \
--with-dwarf2 \
+ --with-isl \
--program-prefix="avr-" \
--program-suffix="" \
--build=$ARCH-slackware-linux
make || exit 1
-make install DESTDIR=$PKG || exit 1
+make -j1 install DESTDIR=$PKG || exit 1
# Remove useless stuff
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libiberty.a
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libcc1.*
rm -rf $PKG/usr/info
rm -rf $PKG/usr/include
rm -rf $PKG/usr/share
rm -rf $PKG/usr/man/man7
rm -rf $PKG/usr/libexec/gcc/avr/$VERSION/install-tools
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
diff --git a/development/avr-gcc/avr-gcc.info b/development/avr-gcc/avr-gcc.info
index 6bd3a9b64d..a57c77698b 100644
--- a/development/avr-gcc/avr-gcc.info
+++ b/development/avr-gcc/avr-gcc.info
@@ -1,8 +1,10 @@
PRGNAM="avr-gcc"
-VERSION="4.9.2"
+VERSION="8.2.0"
HOMEPAGE="http://www.gnu.org/software/gcc/"
-DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2"
-MD5SUM="4df8ee253b7f3863ad0b86359cd39c43"
+DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz \
+ http://isl.gforge.inria.fr/isl-0.19.tar.bz2"
+MD5SUM="4ab282f414676496483b3e1793d07862 \
+ 7850d46a96e5ea31e34913190895e154"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="avr-binutils"
diff --git a/development/brotli/README b/development/brotli/README
deleted file mode 100644
index f99e98ef93..0000000000
--- a/development/brotli/README
+++ /dev/null
@@ -1,6 +0,0 @@
-Brotli is a generic-purpose lossless compression algorithm that compresses data
-using a combination of a modern variant of the LZ77 algorithm, Huffman coding
-and 2nd order context modeling, with a compression ratio comparable to the best
-currently available general-purpose compression methods.
-
-This SlackBuild will also install the Python modules.
diff --git a/development/brotli/brotli.SlackBuild b/development/brotli/brotli.SlackBuild
deleted file mode 100644
index df478c71da..0000000000
--- a/development/brotli/brotli.SlackBuild
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for brotli
-
-# Copyright 2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-# 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.
-
-PRGNAM=brotli
-VERSION=${VERSION:-1.0.7}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_TESTING=NO \
- -DCMAKE_BUILD_TYPE=Release ..
- make
- make install DESTDIR=$PKG
-cd ..
-
-python setup.py install --root=$PKG
-
-if $(python3 -c 'import sys' 2>/dev/null); then
- python3 setup.py install --root=$PKG
-fi
-
-find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a BUILD *.txt *.md LICENSE README WORKSPACE $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/brotli/brotli.info b/development/brotli/brotli.info
deleted file mode 100644
index f19b6ab380..0000000000
--- a/development/brotli/brotli.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="brotli"
-VERSION="1.0.7"
-HOMEPAGE="https://github.com/google/brotli/"
-DOWNLOAD="https://github.com/google/brotli/archive/v1.0.7/brotli-1.0.7.tar.gz"
-MD5SUM="7b6edd4f2128f22794d0ca28c53898a5"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Willy Sudiarto Raharjo"
-EMAIL="willysr@slackbuilds.org"
diff --git a/development/brotli/slack-desc b/development/brotli/slack-desc
deleted file mode 100644
index 1a6e42e258..0000000000
--- a/development/brotli/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-brotli: brotli (compression algorithm)
-brotli:
-brotli: Brotli is a generic-purpose lossless compression algorithm that
-brotli: compresses data using a combination of a modern variant of the LZ77
-brotli: algorithm, Huffman coding and 2nd order context modeling, with
-brotli: a compression ratio comparable to the best currently available
-brotli: general-purpose compression methods.
-brotli:
-brotli: Project URL: https://github.com/google/brotli
-brotli:
-brotli:
diff --git a/development/camlp4/camlp4.SlackBuild b/development/camlp4/camlp4.SlackBuild
index 932c6d73fc..cfd34f6caa 100644
--- a/development/camlp4/camlp4.SlackBuild
+++ b/development/camlp4/camlp4.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for camlp4
-# Copyright 2013 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2013-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=camlp4
-VERSION=${VERSION:-4.03_1}
+VERSION=${VERSION:-4.08_1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
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,17 +55,15 @@ else
fi
DOCS="CHANGES* LICENSE"
-TVERSION=$(echo $VERSION | tr _ +)
-CVERSION=$(echo $VERSION | tr _ -)
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$CVERSION
-tar xvf $CWD/$PRGNAM-$CVERSION.tar.?z* || tar xvf $CWD/$TVERSION.tar.?z*
-cd $PRGNAM-$CVERSION
+rm -rf $PRGNAM-$(echo $VERSION | tr _ -)
+tar xvf $CWD/$PRGNAM-$(echo $VERSION | tr _ -).tar.?z*
+cd $PRGNAM-$(echo $VERSION | tr _ -)
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
diff --git a/development/camlp4/camlp4.info b/development/camlp4/camlp4.info
index f7192e0340..1fa1c27557 100644
--- a/development/camlp4/camlp4.info
+++ b/development/camlp4/camlp4.info
@@ -1,8 +1,8 @@
PRGNAM="camlp4"
-VERSION="4.03_1"
+VERSION="4.08_1"
HOMEPAGE="http://caml.inria.fr"
-DOWNLOAD="https://github.com/ocaml/camlp4/archive/4.03+1.tar.gz"
-MD5SUM="65ece8d2c8f4b1e06d62323e78759a7c"
+DOWNLOAD="https://github.com/ocaml/camlp4/archive/4.08+1/camlp4-4.08-1.tar.gz"
+MD5SUM="7e09e32fdfb185050f69cb2f1e77bf8a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ocamlbuild"
diff --git a/development/check/README b/development/check/README
deleted file mode 100644
index 62590662e5..0000000000
--- a/development/check/README
+++ /dev/null
@@ -1,7 +0,0 @@
-Check is a unit test framework for C. It features a simple interface for
-defining unit tests, putting little in the way of the developer. Tests are
-run in a separate address space, so Check can catch both assertion failures
-and code errors that cause segmentation faults or other signals. The output
-from unit tests can be used within source code editors and IDEs.
-
-See the project's home page for more information, including a tutorial.
diff --git a/development/check/check.SlackBuild b/development/check/check.SlackBuild
deleted file mode 100644
index 8bca239852..0000000000
--- a/development/check/check.SlackBuild
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for Check
-
-# Copyright 2006-2020 Jules Villard <theblatte@loulous.org>
-# 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.
-
-# Modified by Eugene M., <damagedone at gmx dot com>
-
-PRGNAM=check
-VERSION=${VERSION:-0.14.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-check
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-rm -f $PKG/usr/info/dir
-rm -rf $PKG/usr/share/doc
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a INSTALL NEWS README THANKS TODO \
-$PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/check/check.info b/development/check/check.info
deleted file mode 100644
index f5fd97b835..0000000000
--- a/development/check/check.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="check"
-VERSION="0.14.0"
-HOMEPAGE="https://libcheck.github.io/check/"
-DOWNLOAD="https://github.com/libcheck/check/releases/download/0.14.0/check-0.14.0.tar.gz"
-MD5SUM="270e82a445be6026040267a5e11cc94b"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Eugene M"
-EMAIL="damagedone@gmx.com"
diff --git a/development/check/slack-desc b/development/check/slack-desc
deleted file mode 100644
index 5bdc8e191c..0000000000
--- a/development/check/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-check: check (unit test framework)
-check:
-check: Check is a unit test framework for C. It features a simple interface
-check: for defining unit tests, putting little in the way of the developer.
-check: Tests are run in a separate address space, so Check can catch both
-check: assertion failures and code errors that cause segmentation faults or
-check: other signals. The output from unit tests can be used within source
-check: code editors and IDEs.
-check:
-check: See http://check.sf.net for information and tutorial.
-check:
diff --git a/development/coccinelle/coccinelle.SlackBuild b/development/coccinelle/coccinelle.SlackBuild
index 9046fc3cc6..60583d10db 100644
--- a/development/coccinelle/coccinelle.SlackBuild
+++ b/development/coccinelle/coccinelle.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=coccinelle
-VERSION=${VERSION:-1.0.6}
+VERSION=${VERSION:-1.0.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tgz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -69,6 +69,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+./autogen
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/development/coccinelle/coccinelle.info b/development/coccinelle/coccinelle.info
index 02eee74e4c..6673d37227 100644
--- a/development/coccinelle/coccinelle.info
+++ b/development/coccinelle/coccinelle.info
@@ -1,8 +1,8 @@
PRGNAM="coccinelle"
-VERSION="1.0.6"
+VERSION="1.0.8"
HOMEPAGE="http://coccinelle.lip6.fr/"
-DOWNLOAD="http://coccinelle.lip6.fr/distrib/coccinelle-1.0.6.tgz"
-MD5SUM="01b6e7e471055c9af7f9ceadbd452108"
+DOWNLOAD="https://github.com/coccinelle/coccinelle/archive/1.0.8/coccinelle-1.0.8.tar.gz"
+MD5SUM="d58871107c28a970fc53e4f8124d14e1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="camlp4 menhir"
diff --git a/development/device-tree-compiler/device-tree-compiler.SlackBuild b/development/device-tree-compiler/device-tree-compiler.SlackBuild
index 58b655f1fa..26766281f5 100644
--- a/development/device-tree-compiler/device-tree-compiler.SlackBuild
+++ b/development/device-tree-compiler/device-tree-compiler.SlackBuild
@@ -25,7 +25,7 @@
# With tweaks from rworkman to use in SlackBuilds.org tree
PRGNAM=device-tree-compiler
-VERSION=${VERSION:-1.4.4}
+VERSION=${VERSION:-1.5.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.lz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
diff --git a/development/device-tree-compiler/device-tree-compiler.info b/development/device-tree-compiler/device-tree-compiler.info
index 38575f14af..93be5bab57 100644
--- a/development/device-tree-compiler/device-tree-compiler.info
+++ b/development/device-tree-compiler/device-tree-compiler.info
@@ -1,8 +1,8 @@
PRGNAM="device-tree-compiler"
-VERSION="1.4.4"
+VERSION="1.5.0"
HOMEPAGE="https://git.kernel.org/cgit/utils/dtc/dtc.git"
-DOWNLOAD="http://harrier.slackbuilds.org/misc/device-tree-compiler-1.4.4.tar.xz"
-MD5SUM="ccc3b88d50823b19791f42bc2e5c9309"
+DOWNLOAD="http://harrier.slackbuilds.org/misc/device-tree-compiler-1.5.0.tar.lz"
+MD5SUM="a609b2995f94de58fc7544a429ac0b28"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/docutils/README b/development/docutils/README
deleted file mode 100644
index 1160a389f0..0000000000
--- a/development/docutils/README
+++ /dev/null
@@ -1,6 +0,0 @@
-Docutils (Python Documentation Utilities)
-
-Docutils is a modular system for processing documentation into useful
-formats, such as HTML, XML, and LaTeX. For input Docutils supports
-reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext
-markup syntax.
diff --git a/development/docutils/docutils.SlackBuild b/development/docutils/docutils.SlackBuild
deleted file mode 100644
index b953ca5071..0000000000
--- a/development/docutils/docutils.SlackBuild
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for docutils
-
-# Copyright 2006-2019 Robby Workman Tuscaloosa, AL, 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.
-
-PRGNAM=docutils
-VERSION=${VERSION:-0.14}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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
-2to3 --write --no-diffs docutils
-python3 setup.py install --root=$PKG
-
-find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a *.txt PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/docutils/docutils.info b/development/docutils/docutils.info
deleted file mode 100644
index 5e22f0645a..0000000000
--- a/development/docutils/docutils.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="docutils"
-VERSION="0.14"
-HOMEPAGE="http://docutils.sourceforge.net"
-DOWNLOAD="http://downloads.sourceforge.net/docutils/docutils-0.14.tar.gz"
-MD5SUM="c53768d63db3873b7d452833553469de"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="python3"
-MAINTAINER="Robby Workman"
-EMAIL="rworkman@slackbuilds.org"
diff --git a/development/docutils/slack-desc b/development/docutils/slack-desc
deleted file mode 100644
index 06dc8a4d0d..0000000000
--- a/development/docutils/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-docutils: docutils (Python Document Utilities module)
-docutils:
-docutils: Docutils is an open-source text processing system for processing
-docutils: plaintext documentation into useful formats, such as HTML or LaTeX.
-docutils: It includes reStructuredText, the easy to read, easy to use,
-docutils: what-you-see-is-what-you-get plaintext markup language.
-docutils:
-docutils: Homepage: http://docutils.sourceforge.net/
-docutils:
-docutils:
-docutils:
diff --git a/development/dune/README b/development/dune/README
new file mode 100644
index 0000000000..4bee426ba6
--- /dev/null
+++ b/development/dune/README
@@ -0,0 +1,5 @@
+Dune is a build system designed for OCaml/Reason projects only.
+It focuses on providing the user with a consistent experience and
+takes care of most of the low-level details of OCaml compilation.
+All you have to do is provide a description of your project and
+dune will do the rest.
diff --git a/development/meson/meson.SlackBuild b/development/dune/dune.SlackBuild
index 79b6a73eb6..753b06d084 100644
--- a/development/meson/meson.SlackBuild
+++ b/development/dune/dune.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for meson
+# Slackware build script for dune
-# Copyright 2017-2020 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
+# Copyright 2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=meson
-VERSION=${VERSION:-0.52.1}
+PRGNAM=dune
+VERSION=${VERSION:-1.11.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,28 +60,27 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
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 \
+ -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 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-python3 setup.py install --root=$PKG
+make release
+make DESTDIR=$PKG INSTALL_ARGS="--prefix=/usr --libdir='$(ocamlfind printconf destdir)'" install
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mv $PKG/usr/share/man $PKG/usr/
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+rm -fR $PKG/usr/doc
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- COPYING README.md PKG-INFO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/dune/dune.info b/development/dune/dune.info
new file mode 100644
index 0000000000..87e20a4d06
--- /dev/null
+++ b/development/dune/dune.info
@@ -0,0 +1,10 @@
+PRGNAM="dune"
+VERSION="1.11.3"
+HOMEPAGE="http://caml.inria.fr"
+DOWNLOAD="https://github.com/ocaml/dune/archive/1.11.3/dune-1.11.3.tar.gz"
+MD5SUM="483164bdca4d0f568f4c95987737899b"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="ocaml-findlib"
+MAINTAINER="Matteo Bernardini"
+EMAIL="ponce@slackbuilds.org"
diff --git a/development/lmdb/slack-desc b/development/dune/slack-desc
index 22a92101a3..4e035d51d4 100644
--- a/development/lmdb/slack-desc
+++ b/development/dune/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-lmdb: lmdb (embedded data store)
-lmdb:
-lmdb: LMDB is an ultra-fast, ultra-compact key-value embedded data store
-lmdb: developed by Symas for the OpenLDAP Project.
-lmdb:
-lmdb: Online documentation available at:
-lmdb: http://symas.com/mdb/
-lmdb:
-lmdb:
-lmdb:
-lmdb:
+dune: dune (ocaml build system - formerly jbuilder)
+dune:
+dune: Dune is a build system designed for OCaml/Reason projects only.
+dune: It focuses on providing the user with a consistent experience and
+dune: takes care of most of the low-level details of OCaml compilation.
+dune: All you have to do is provide a description of your project and
+dune: dune will do the rest.
+dune:
+dune: homepage: https://github.com/ocaml/dune
+dune:
+dune:
diff --git a/development/freetds/freetds.SlackBuild b/development/freetds/freetds.SlackBuild
index 826125272e..64317e53d1 100644
--- a/development/freetds/freetds.SlackBuild
+++ b/development/freetds/freetds.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=freetds
-VERSION=${VERSION:-1.00.9}
+VERSION=${VERSION:-1.00.99}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/development/freetds/freetds.info b/development/freetds/freetds.info
index 530fdb3b51..81e2313fd5 100644
--- a/development/freetds/freetds.info
+++ b/development/freetds/freetds.info
@@ -1,8 +1,8 @@
PRGNAM="freetds"
-VERSION="1.00.9"
+VERSION="1.00.99"
HOMEPAGE="http://www.freetds.org/"
-DOWNLOAD="ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.9.tar.gz"
-MD5SUM="9f3518c9763f195eca119e4ee504be8d"
+DOWNLOAD="ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.99.tar.gz"
+MD5SUM="32777effeb8e45daa5890ef5ad636230"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/gcc5/README b/development/gcc5/README
new file mode 100644
index 0000000000..043d62efcf
--- /dev/null
+++ b/development/gcc5/README
@@ -0,0 +1,46 @@
+This gcc5 package can be installed alongside Slackware's gcc-7 packages.
+These version 7 compilers can sometimes be quite a bit more strict about
+what they accept as valid code. As a consequence, you will regularly run
+into compilation issues with software. Not just the software made with
+the scripts on slackbuilds.org, but also some of the software in
+the Slackware core distribution requires patches in order to get them
+to compile.
+
+Still having the gcc version 5 compilers can sometimes be a lifesaver.
+Particulars of the gcc5 package:
+- The gcc5 binaries were given a suffix '-5' to make them stand apart
+ from Slackware's default compilers.
+- The gcc5 package only contains the C, C++ and Java language compilers.
+- One all-encompassing package is built by the SlackBuild script.
+- Profile scripts are added to /etc/profile.d/. You can 'source'
+ the profile script to prefer the gcc-5 compilers over gcc-7.
+- On 64bit Slackware, the gcc5.SlackBuild will detect an existing gcc
+ multilib compiler and will then build a multilib capable gcc5.
+ If you run pure 64bit Slackware, then a pure 64bit gcc5 package is built.
+
+How to use these gcc5 compilers instead of Slackware's default C and C++?
+Simple:
+In your console or terminal, you 'source' the provided profile script,
+like this (a c-shell compatible script is available as well):
+
+ source /etc/profile.d/gcc5.sh
+
+The command 'source' is equivalent to the dot command ' . '.
+The profile script will (re-)define the common variables that are used
+by make and other programs to determine which binary to run as the compiler:
+
+export CC=gcc-5
+export CPP=cpp-5
+export CXX=g++-5
+export AR=gcc-ar-5
+export NM=gcc-nm-5
+export RANLIB=gcc-ranlib-5
+
+Nothing else needs to be done after sourcing the profile script.
+All you do next is run your compile job as usual in that same console.
+Your program will be compiled with the binaries provided by the gcc5 package.
+
+** WARNING:
+** The temporary build location used by the script (defaulting here to /tmp/SBo)
+** should *NOT* be a directory path a non-root user could create later...
+
diff --git a/development/gcc5/c89.sh b/development/gcc5/c89.sh
new file mode 100644
index 0000000000..424b1e1669
--- /dev/null
+++ b/development/gcc5/c89.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+fl="-std=c89"
+CC=${CC:-"gcc"}
+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 $CC $fl ${1+"$@"}
diff --git a/development/gcc5/c99.sh b/development/gcc5/c99.sh
new file mode 100644
index 0000000000..c33636937c
--- /dev/null
+++ b/development/gcc5/c99.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+fl="-std=c99"
+CC=${CC:-"gcc"}
+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 $CC $fl ${1+"$@"}
diff --git a/development/gcc5/ecj.sh b/development/gcc5/ecj.sh
new file mode 100644
index 0000000000..1d8b797931
--- /dev/null
+++ b/development/gcc5/ecj.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+CLASSPATH=@JAVADIR@/ecj.jar${CLASSPATH:+:}$CLASSPATH \
+ java org.eclipse.jdt.internal.compiler.batch.Main "$@"
+
diff --git a/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
new file mode 100644
index 0000000000..ab6262407a
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch
@@ -0,0 +1,29 @@
+2009-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ * jartool.c (make_manifest): Initialize current_time before
+ calling unix2dostime on it.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200
++++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100
+@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m
+ int mod_time; /* file modification time */
+ struct zipentry *ze;
+
++ current_time = time(NULL);
++ if(current_time == (time_t)-1)
++ exit_on_error("time");
++
+ mod_time = unix2dostime(&current_time);
+
+ /* If we are creating a new manifest, create a META-INF directory entry */
+@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m
+
+ memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/
+
+- current_time = time(NULL);
+- if(current_time == (time_t)-1)
+- exit_on_error("time");
+-
+ PACK_UB2(file_header, LOC_EXTRA, 0);
+ PACK_UB2(file_header, LOC_COMP, 0);
+ PACK_UB2(file_header, LOC_FNLEN, nlen);
diff --git a/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
new file mode 100644
index 0000000000..722351d334
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch
@@ -0,0 +1,16 @@
+2009-12-21 Chris Ball <cjb@laptop.org>
+
+ * jartool.c (add_file_to_jar): Test write return value against -1
+ instead of 1.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400
++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500
+@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
diff --git a/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch b/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch
new file mode 100644
index 0000000000..34a02a74f3
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch
@@ -0,0 +1,14 @@
+2010-03-01 Richard Guenther <rguenther@suse.de>
+
+ * jartool.c (read_entries): Properly zero-terminate filename.
+
+--- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59
++++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60
+@@ -790,6 +790,7 @@ int read_entries (int fd)
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
diff --git a/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch b/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch
new file mode 100644
index 0000000000..2c6e23c76c
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch
@@ -0,0 +1,102 @@
+2010-06-10 Jakub Jelinek <jakub@redhat.com>
+ Dan Rosenberg <dan.j.rosenberg@gmail.com>
+
+ * jartool.c (extract_jar): Fix up checks for traversal to parent
+ directories, disallow absolute paths, make the code slightly more
+ efficient.
+
+--- fastjar-0.97/jartool.c.jj 2009-09-07 00:10:47.000000000 +0200
++++ fastjar-0.97/jartool.c 2010-06-08 20:00:29.000000000 +0200
+@@ -1730,7 +1730,17 @@ int extract_jar(int fd, const char **fil
+ struct stat sbuf;
+ int depth = 0;
+
+- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename));
++ if(*filename == '/'){
++ fprintf(stderr, "Absolute path names are not allowed.\n");
++ exit(EXIT_FAILURE);
++ }
++
++ tmp_buff = malloc(strlen((const char *)filename));
++
++ if(tmp_buff == NULL) {
++ fprintf(stderr, "Out of memory.\n");
++ exit(EXIT_FAILURE);
++ }
+
+ for(;;){
+ const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/');
+@@ -1738,25 +1748,28 @@ int extract_jar(int fd, const char **fil
+ if(idx == NULL)
+ break;
+ else if(idx == start){
++ tmp_buff[idx - filename] = '/';
+ start++;
+ continue;
+ }
+- start = idx + 1;
+
+- strncpy(tmp_buff, (const char *)filename, (idx - filename));
+- tmp_buff[(idx - filename)] = '\0';
++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start));
++ tmp_buff[idx - filename] = '\0';
+
+ #ifdef DEBUG
+ printf("checking the existance of %s\n", tmp_buff);
+ #endif
+- if(strcmp(tmp_buff, "..") == 0){
++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){
+ --depth;
+ if (depth < 0){
+ fprintf(stderr, "Traversal to parent directories during unpacking!\n");
+ exit(EXIT_FAILURE);
+ }
+- } else if (strcmp(tmp_buff, ".") != 0)
++ } else if (idx - start != 1 || *start != '.')
+ ++depth;
++
++ start = idx + 1;
++
+ if(stat(tmp_buff, &sbuf) < 0){
+ if(errno != ENOENT)
+ exit_on_error("stat");
+@@ -1765,6 +1778,7 @@ int extract_jar(int fd, const char **fil
+ #ifdef DEBUG
+ printf("Directory exists\n");
+ #endif
++ tmp_buff[idx - filename] = '/';
+ continue;
+ }else {
+ fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n",
+@@ -1781,10 +1795,11 @@ int extract_jar(int fd, const char **fil
+ if(verbose && handle)
+ printf("%10s: %s/\n", "created", tmp_buff);
+
++ tmp_buff[idx - filename] = '/';
+ }
+
+ /* only a directory */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ dir = TRUE;
+
+ #ifdef DEBUG
+@@ -1792,7 +1807,7 @@ int extract_jar(int fd, const char **fil
+ #endif
+
+ /* If the entry was just a directory, don't write to file, etc */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ f_fd = -1;
+
+ free(tmp_buff);
+@@ -1876,7 +1891,8 @@ int extract_jar(int fd, const char **fil
+ exit(EXIT_FAILURE);
+ }
+
+- close(f_fd);
++ if (f_fd != -1)
++ close(f_fd);
+
+ if(verbose && dir == FALSE && handle)
+ printf("%10s: %s\n",
diff --git a/development/gcc5/fastjar-patches/1004-fastjar-man.patch b/development/gcc5/fastjar-patches/1004-fastjar-man.patch
new file mode 100644
index 0000000000..34bf704dbb
--- /dev/null
+++ b/development/gcc5/fastjar-patches/1004-fastjar-man.patch
@@ -0,0 +1,27 @@
+2010-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (POD2MAN): Provide --date from ChangeLog.
+ * Makefile.in: Regenerate.
+
+--- fastjar-0.97/Makefile.am.jj 2008-10-16 04:24:55.000000000 -0400
++++ fastjar-0.97/Makefile.am 2010-06-21 09:29:41.021398000 -0400
+@@ -39,7 +39,7 @@ EXTRA_DIST = \
+ texi2pod.pl
+
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+-POD2MAN = pod2man --center="GNU" --release=@VERSION@
++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog)
+
+ .pod.1:
+ -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \
+--- fastjar-0.97/Makefile.in.jj 2008-10-16 04:15:16.000000000 -0400
++++ fastjar-0.97/Makefile.in 2010-06-21 09:30:15.882810000 -0400
+@@ -515,7 +515,7 @@ EXTRA_DIST = \
+ texi2pod.pl
+
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+-POD2MAN = pod2man --center="GNU" --release=@VERSION@
++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog)
+
+ #SPLINT_FLAGS=-I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H +posixlib +weak
+ SPLINT_FLAGS = -I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H -DPRIx32= -warnposix +weak
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild
new file mode 100644
index 0000000000..a96e4541cd
--- /dev/null
+++ b/development/gcc5/gcc5.SlackBuild
@@ -0,0 +1,569 @@
+#!/bin/sh
+# 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, 2014, 2015, 2016, 2017, 2018 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.
+#
+
+# Modified 2011 by Eric Hameleers <alien at slackware.com> for OpenJDK.
+# Modified 2017, 2018 by Eric Hameleers <alien at slackware.com> for gcc5.
+
+# Some notes, Fri May 16 12:31:32 PDT 2003:
+#
+# Why i486 and not i386? Because the shared C++ libraries in gcc-3.2.x will
+# require 486 opcodes even when a 386 target is used (so we already weren't
+# compatible with the i386 for Slackware 9.0, didn't notice, and nobody
+# complained :-). gcc-3.3 fixes this issue and allows you to build a 386
+# compiler, but the fix is done in a way that produces binaries that are not
+# compatible with gcc-3.2.x compiled binaries. To retain compatibility with
+# Slackware 9.0, we'll have to use i486 (or better) as the compiler target
+# for gcc-3.3.
+#
+# It's time to say goodbye to i386 support in Slackware. I've surveyed 386
+# usage online, and the most common thing I see people say when someone asks
+# about running Linux on a 386 is to "run Slackware", but then they also
+# usually go on to say "be sure to get an OLD version, like 4.0, before glibc,
+# because it'll be more efficient." Now, if that's the general advice, then
+# 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).
+
+PRGNAM=gcc5
+VERSION=${VERSION:-5.5.0}
+MAJVER=$(echo ${VERSION} |cut -d. -f1)
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ 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
+ export ARCH
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=s390
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=armv7hl
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+# What do we want to build
+LANGS=${LANGS:-'c,c++,java'}
+
+echo "Building these compilers: $LANGS"
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+if [ "$ARCH" = "x86_64" ]; then
+ if [ -f /usr/lib/libc.a ]; then
+ # If we find a 32bit C library on 64bit Slackware, assume multilib:
+ GCC_ARCHOPTS="--enable-multilib"
+ MULTILIB="YES"
+ else
+ GCC_ARCHOPTS="--disable-multilib"
+ MULTILIB="NO"
+ fi
+else
+ GCC_ARCHOPTS="--with-arch=$ARCH"
+ MULTILIB="NO"
+fi
+
+# Clear the build locations:
+rm -fr $TMP/fastjar-* $TMP/gcc-$VERSION $TMP/gcc.build.lnx $TMP/gcc.build.log $TMP/package-$PRGNAM
+
+mkdir -p $PKG/usr/doc/gcc-$VERSION
+
+# Insert package description:
+mkdir -p $PKG/install
+if [ ${MULTILIB} = "YES" ]; then
+ SLDESC=" The compilers support multilib."
+else
+ SLDESC=""
+fi
+cat $CWD/slack-desc.gcc5 | sed -e "s/@MULTILIB@/${SLDESC}/" \
+ > $PKG/install/slack-desc
+
+# Unpack the gcc sources:
+cd $TMP
+tar xvf $CWD/gcc-$VERSION.tar.?z || exit 1
+
+# Patches based inside the gcc directory go here:
+#( cd gcc-$VERSION/gcc
+# #cat $CWD/patches/gcc.66782.diff | patch -p0 --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.9.jar gcc-$VERSION/ecj.jar
+
+# Use an antlr runtime to compile javadoc.
+# The runtime can be obtained from:
+#https://oss.sonatype.org/content/repositories/releases/org/antlr/antlr-runtime/
+ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
+
+# install docs
+( cd gcc-$VERSION
+ # Smite the fixincludes:
+ cat $CWD/patches/gcc-no_fixincludes.diff | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+ # Add retpoline support:
+ cat $CWD/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0005-x86-Add-mindirect-branch-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0005-x86-Add-mindirect-branch.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0006-x86-Add-mfunction-return-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0006-x86-Add-mfunction-return.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0007-x86-Add-mindirect-branch-register-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0007-x86-Add-mindirect-branch-register.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0008-x86-Add-V-register-operand-modifier-doc.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0008-x86-Add-V-register-operand-modifier.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff | patch -p2 --verbose || exit 1
+ cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff | patch -p2 --verbose || exit 1
+
+ # Fix build with glibc 2.28, which no longer makes available header file <sys/ustat.h>
+ cat $CWD/patches/glibc2.28-ustat.diff | patch -p0 --verbose || exit 1
+
+ # Fix perms/owners
+ chown -R root:root .
+ find . -perm 777 -exec chmod 755 {} \;
+ find . -perm 775 -exec chmod 755 {} \;
+ find . -perm 754 -exec chmod 755 {} \;
+ find . -perm 664 -exec chmod 644 {} \;
+ mkdir -p $PKG/usr/doc/gcc-$VERSION
+ cp -a \
+ COPYING* ChangeLog* FAQ INSTALL \
+ LAST_UPDATED MAINTAINERS NEWS \
+ README* *.html \
+ $PKG/usr/doc/gcc-$VERSION
+
+ # We will keep part of these, but they are really big...
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/gcc-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/gcc-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+ fi
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/gcc
+ ( cd gcc
+ cp -a \
+ ABOUT* COPYING* DATESTAMP DEV-PHASE LANG* ONEWS README* SERVICE \
+ $PKG/usr/doc/gcc-$VERSION/gcc
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/gcc/java
+ ( cd java
+ cp -a \
+ ChangeLog.tree-ssa \
+ $PKG/usr/doc/gcc-${VERSION}/gcc/java
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog
+ fi
+ )
+
+ ) || exit 1
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/libffi
+ ( cd libffi
+ cp -a \
+ ChangeLog.libgcj ChangeLog.v1 \
+ LICENSE* README* \
+ $PKG/usr/doc/gcc-${VERSION}/libffi
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libffi/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libffi/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/libjava
+ ( cd libjava
+ cp -a \
+ COPYING* HACKING LIBGCJ_LICENSE \
+ NEWS README* THANKS \
+ $PKG/usr/doc/gcc-${VERSION}/libjava
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libjava/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libjava/ChangeLog
+ fi
+ )
+
+ if [ -d libmudflap ]; then
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/libmudflap
+ ( cd libmudflap
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog
+ fi
+ )
+ fi
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/libgomp
+ ( cd libgomp
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3
+ ( cd libstdc++-v3
+ cp -a \
+ README* \
+ doc/html/faq.html \
+ $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ fi
+ )
+)
+
+# Add fastjar to the gcc5 package:
+( cd $TMP
+ FASTJARVER=$(echo $CWD/fastjar-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+ echo
+ echo "Building fastjar-$FASTJARVER first"
+ echo
+ rm -rf fastjar-$FASTJARVER
+ tar xvf $CWD/fastjar-$FASTJARVER.tar.?z* || exit 1
+ cd fastjar-$FASTJARVER || 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 {} \;
+ for patch in $CWD/fastjar-patches/* ; do
+ cat $patch | patch -p1 --verbose || exit 1
+ done
+ LDFLAGS="$SLKLDFLAGS" \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --build=$TARGET
+ make || exit 1
+ make install DESTDIR=$PKG || exit 1
+ mkdir -p $PKG/usr/doc/fastjar-$FASTJARVER
+ cp -a \
+ AUTHORS CHANGES COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/fastjar-$FASTJARVER
+ # 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/fastjar-$FASTJARVER)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ # Compress and if needed symlink the man pages:
+ 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) ; 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
+ echo
+) || exit 1
+
+# build gcc
+( mkdir gcc.build.lnx;
+ cd gcc.build.lnx;
+
+ # I think it's incorrect to include this option (as it'll end up set
+ # 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.
+ # --with-cpu=$ARCH
+
+ # 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.
+
+ LDFLAGS="$SLKLDFLAGS" \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ../gcc-$VERSION/configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --enable-bootstrap \
+ --enable-languages=${LANGS} \
+ --enable-threads=posix \
+ --enable-checking=release \
+ --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 \
+ --without-isl \
+ --verbose \
+ --enable-java-home \
+ --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \
+ --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \
+ --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \
+ --with-arch-directory=$LIB_ARCH \
+ --with-antlr-jar=$ANTLJAR \
+ --program-suffix=-${MAJVER} \
+ --enable-version-specific-runtime-libs \
+ $GCC_ARCHOPTS \
+ --target=${TARGET} \
+ --build=${TARGET} \
+ --host=${TARGET} || exit 1
+ #--enable-java-awt=gtk \
+ #--disable-gtktest \
+
+ # Start the build:
+
+ # Include all debugging info (for now):
+ make bootstrap
+ make info
+ make install DESTDIR=$PKG
+
+# KLUDGE ALERT
+# These *gdb.py files are causing ldconfig to complain, so they are going
+# to be REMOVED for now... at some point, they might be moved somewhere
+# else, in which case things should Just Work(tm). Keep an eye on it.
+rm -f $PKG/usr/lib*/*gdb.py
+
+# Be sure the "specs" file is installed.
+if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs ]; then
+ cat stage1-gcc/specs > $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+fi
+
+if [ ${MULTILIB} = "NO" ]; then
+ # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
+ # (only needed if gcc was compiled with disable-multilib)
+ if [ "$ARCH" = "x86_64" ]; then
+ sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
+ $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+ fi
+fi
+
+make -i install-info DESTDIR=$PKG
+
+# Move potentially conflicting stuff to version specific subdirectory:
+if [ -d $PKG/usr/lib${LIBDIRSUFFIX} ]; then
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/lib* $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/
+fi
+if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/lib${LIBDIRSUFFIX}/ ]; then
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/lib${LIBDIRSUFFIX}/lib* $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/
+fi
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/libgcc_s.so.1
+if [ ${MULTILIB} = "YES" ]; then
+ if [ -d $PKG/usr/lib ]; then
+ mv $PKG/usr/lib/lib* $PKG/usr/lib/gcc/${TARGET}/${VERSION}/
+ fi
+ if [ -d $PKG/usr/lib/gcc/${TARGET}/lib/ ]; then
+ mv $PKG/usr/lib/gcc/${TARGET}/lib/lib* $PKG/usr/lib/gcc/${TARGET}/${VERSION}/
+ fi
+ chmod 755 $PKG/usr/lib/gcc/${TARGET}/${VERSION}/libgcc_s.so.1
+fi
+
+# The (huge) static GNU java libraries are not packaged. In nearly all
+# cases one or more dependencies will not be available as static anyway.
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libgcj.a
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a
+rm -f $PKG/usr/lib/libgcj.a
+rm -f $PKG/usr/lib/libgcj-tools.a
+
+# Fix stuff up:
+( cd $PKG/usr/info
+ rm dir
+ for eachinfo in *.info ; do
+ mv $eachinfo $(basename $eachinfo .info)-${MAJVER}.info
+ done
+ gzip -9 *
+)
+
+( cd $PKG/usr/bin
+ ln -sf g++-${MAJVER} c++-${MAJVER}
+ ln -sf gcc-${MAJVER} cc-${MAJVER}
+ # Improved versions of the Slackware c?9 scripts,
+ # it is safe to overwrite the originals:
+ cat $CWD/c89.sh > c89
+ cat $CWD/c99.sh > c99
+ chmod 755 c89 c99
+)
+
+( cd $PKG/usr/man
+ rm -r man7 # Part of the system gcc package
+ gzip -9 */*
+ cd man1
+ ln -sf g++-${MAJVER}.1.gz c++-${MAJVER}.1.gz
+ ln -sf gcc-${MAJVER}.1.gz cc-${MAJVER}.1.gz
+)
+
+# keep a log
+) 2>&1 | tee $TMP/gcc.build.log
+
+# Add profile scripts (non-executable by default) to make it easier
+# to set the environment for compiling with gcc5:
+mkdir -p $PKG/etc/profile.d
+cat $CWD/profile.d/gcc5.sh > $PKG/etc/profile.d/gcc5.sh
+cat $CWD/profile.d/gcc5.csh > $PKG/etc/profile.d/gcc5.csh
+chmod 644 $PKG/etc/profile.d/*
+
+# The ecj wrapper script:
+cat $CWD/ecj.sh | sed -e "s,@JAVADIR@,/usr/share/java," > $PKG/usr/bin/ecj
+chmod 755 $PKG/usr/bin/ecj
+# Some compatibility links.
+for JAVAPROG in gcj gcjh gcj-dbtool gjar gjarsigner gjavah ; do
+ ln -s ${JAVAPROG}-${MAJVER} $PKG/usr/bin/${JAVAPROG}
+done
+( cd $PKG
+ for JAVALIB in usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/libgcj* ; do
+ ln -s /${JAVALIB} $PKG/usr/lib${LIBDIRSUFFIX}/
+ done
+)
+# And add the missing javac symlink:
+ln -s ../../../bin/ecj $PKG/usr/lib$LIBDIRSUFFIX/jvm/bin/javac
+# Don't package libffi stuff anymore. GCC will link the internal version
+# statically, and we'll need a newer one elsewhere.
+find . -name "ffi*.h" | xargs rm -f
+find . -name "libffi*" | xargs rm -f
+rm -f usr/man/man3/ffi*
+rm -f usr/info/libffi*
+# Install a proper pkgconfig file for libgcj:
+rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/pkgconfig/libgcj*pc
+rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/32/pkgconfig/libgcj*pc
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat $CWD/libgcj-5.pc \
+ | sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX}," \
+ | sed -e "s,@TARGET@,${TARGET}," \
+ | sed -e "s,@VERSION@,${VERSION}," \
+ > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/libgcj-5.pc
+
+# Filter all .la files (thanks much to Mark Post for the sed script):
+( cd $PKG
+ for file in $(find . -type f -name "*.la") ; do
+ cat $file | sed -e 's%-L'${TMP}'[[:graph:]]* % %g' > $TMP/tmp-la-file
+ cat $TMP/tmp-la-file > $file
+ done
+ rm $TMP/tmp-la-file
+)
+
+## Strip bloated binaries and libraries:
+( cd $PKG
+ find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
+ find . -name "lib*a" -exec strip -g "{}" \;
+ strip --strip-unneeded usr/bin/* 2> /dev/null
+ 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
+)
+
+# Remove localizations overlapping with Slackware's gcc
+rm -rf $PKG/usr/share/locale
+
+( cd $PKG
+ if [ ${MULTILIB} = "YES" ]; then
+ /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}_multilib-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+ else
+ /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+ fi
+)
diff --git a/development/gcc5/gcc5.info b/development/gcc5/gcc5.info
new file mode 100644
index 0000000000..cb7d761a98
--- /dev/null
+++ b/development/gcc5/gcc5.info
@@ -0,0 +1,17 @@
+PRGNAM="gcc5"
+VERSION="5.5.0"
+HOMEPAGE="https://gcc.gnu.org/"
+DOWNLOAD="https://ftp.gnu.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.xz \
+ http://www.antlr3.org/download/antlr-runtime-3.4.jar \
+ https://sourceware.org/pub/java/ecj-4.9.jar \
+ https://download.savannah.gnu.org/releases/fastjar/fastjar-0.97.tar.gz"
+MD5SUM="0f70424213b4a1113c04ba66ddda0c1f \
+ 0e0318be407e51fdf7ba6777eabfdf73 \
+ 7339f199ba11c941890031fd9981d7be \
+ 2659f09c2e43ef8b7d4406321753f1b2"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Eric Hameleers"
+EMAIL="alien@slackware.com"
+
diff --git a/development/gcc5/libgcj-5.pc b/development/gcc5/libgcj-5.pc
new file mode 100644
index 0000000000..e2eb293209
--- /dev/null
+++ b/development/gcc5/libgcj-5.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=/usr/lib@LIBDIRSUFFIX@/gcc/@TARGET@/@VERSION@
+includedir=$(libdir)/include/
+
+Name: libgcj
+Description: libgcj
+Version: @VERSION@
+Libs: -L${libdir} -lgcj
+Cflags: -I${includedir}
diff --git a/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff b/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff
new file mode 100644
index 0000000000..413d75697f
--- /dev/null
+++ b/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff
@@ -0,0 +1,239 @@
+From 11a3b9034935080b9996caf07fca6353309006f1 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:27:24 +0000
+Subject: [PATCH 1/9] i386: Move struct ix86_frame to machine_function
+
+Make ix86_frame available to i386 code generation. This is needed to
+backport the patch set of -mindirect-branch= to mitigate variant #2 of
+the speculative execution vulnerabilities on x86 processors identified
+by CVE-2017-5715, aka Spectre.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_frame): Moved to ...
+ * config/i386/i386.h (ix86_frame): Here.
+ (machine_function): Add frame.
+ * config/i386/i386.c (ix86_compute_frame_layout): Repace the
+ frame argument with &cfun->machine->frame.
+ (ix86_can_use_return_insn_p): Don't pass &frame to
+ ix86_compute_frame_layout. Copy frame from cfun->machine->frame.
+ (ix86_can_eliminate): Likewise.
+ (ix86_expand_prologue): Likewise.
+ (ix86_expand_epilogue): Likewise.
+ (ix86_expand_split_stack_prologue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256691 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ src/gcc/config/i386/i386.c | 68 ++++++++-------------------------------------
+ src/gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++-
+ 2 files changed, 65 insertions(+), 56 deletions(-)
+
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -2306,53 +2306,6 @@ struct GTY(()) stack_local_entry {
+ struct stack_local_entry *next;
+ };
+
+-/* Structure describing stack frame layout.
+- Stack grows downward:
+-
+- [arguments]
+- <- ARG_POINTER
+- saved pc
+-
+- saved static chain if ix86_static_chain_on_stack
+-
+- saved frame pointer if frame_pointer_needed
+- <- HARD_FRAME_POINTER
+- [saved regs]
+- <- regs_save_offset
+- [padding0]
+-
+- [saved SSE regs]
+- <- sse_regs_save_offset
+- [padding1] |
+- | <- FRAME_POINTER
+- [va_arg registers] |
+- |
+- [frame] |
+- |
+- [padding2] | = to_allocate
+- <- STACK_POINTER
+- */
+-struct ix86_frame
+-{
+- int nsseregs;
+- int nregs;
+- int va_arg_size;
+- int red_zone_size;
+- int outgoing_arguments_size;
+-
+- /* The offsets relative to ARG_POINTER. */
+- HOST_WIDE_INT frame_pointer_offset;
+- HOST_WIDE_INT hard_frame_pointer_offset;
+- HOST_WIDE_INT stack_pointer_offset;
+- HOST_WIDE_INT hfp_save_offset;
+- HOST_WIDE_INT reg_save_offset;
+- HOST_WIDE_INT sse_reg_save_offset;
+-
+- /* When save_regs_using_mov is set, emit prologue using
+- move instead of push instructions. */
+- bool save_regs_using_mov;
+-};
+-
+ /* Which cpu are we scheduling for. */
+ enum attr_cpu ix86_schedule;
+
+@@ -2443,7 +2396,7 @@ static unsigned int ix86_function_arg_bo
+ const_tree);
+ static rtx ix86_static_chain (const_tree, bool);
+ static int ix86_function_regparm (const_tree, const_tree);
+-static void ix86_compute_frame_layout (struct ix86_frame *);
++static void ix86_compute_frame_layout (void);
+ static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
+ rtx, rtx, int);
+ static void ix86_add_new_builtins (HOST_WIDE_INT);
+@@ -9664,7 +9617,8 @@ ix86_can_use_return_insn_p (void)
+ if (crtl->args.pops_args && crtl->args.size >= 32768)
+ return 0;
+
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = cfun->machine->frame;
+ return (frame.stack_pointer_offset == UNITS_PER_WORD
+ && (frame.nregs + frame.nsseregs) == 0);
+ }
+@@ -10073,8 +10027,8 @@ ix86_can_eliminate (const int from, cons
+ HOST_WIDE_INT
+ ix86_initial_elimination_offset (int from, int to)
+ {
+- struct ix86_frame frame;
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ struct ix86_frame frame = cfun->machine->frame;
+
+ if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
+ return frame.hard_frame_pointer_offset;
+@@ -10113,8 +10067,9 @@ ix86_builtin_setjmp_frame_value (void)
+ /* Fill structure ix86_frame about frame of currently computed function. */
+
+ static void
+-ix86_compute_frame_layout (struct ix86_frame *frame)
++ix86_compute_frame_layout (void)
+ {
++ struct ix86_frame *frame = &cfun->machine->frame;
+ unsigned HOST_WIDE_INT stack_alignment_needed;
+ HOST_WIDE_INT offset;
+ unsigned HOST_WIDE_INT preferred_alignment;
+@@ -11417,7 +11372,8 @@ ix86_expand_prologue (void)
+ m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
+ m->fs.sp_valid = true;
+
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = m->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -12083,7 +12039,8 @@ ix86_expand_epilogue (int style)
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = m->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+@@ -12546,7 +12503,8 @@ ix86_expand_split_stack_prologue (void)
+ gcc_assert (flag_split_stack && reload_completed);
+
+ ix86_finalize_stack_realign_flags ();
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = cfun->machine->frame;
+ allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
+
+ /* This is the label we will branch to if we have enough stack
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -2409,9 +2409,56 @@ enum avx_u128_state
+
+ #define FASTCALL_PREFIX '@'
+
++#ifndef USED_FOR_TARGET
++/* Structure describing stack frame layout.
++ Stack grows downward:
++
++ [arguments]
++ <- ARG_POINTER
++ saved pc
++
++ saved static chain if ix86_static_chain_on_stack
++
++ saved frame pointer if frame_pointer_needed
++ <- HARD_FRAME_POINTER
++ [saved regs]
++ <- regs_save_offset
++ [padding0]
++
++ [saved SSE regs]
++ <- sse_regs_save_offset
++ [padding1] |
++ | <- FRAME_POINTER
++ [va_arg registers] |
++ |
++ [frame] |
++ |
++ [padding2] | = to_allocate
++ <- STACK_POINTER
++ */
++struct GTY(()) ix86_frame
++{
++ int nsseregs;
++ int nregs;
++ int va_arg_size;
++ int red_zone_size;
++ int outgoing_arguments_size;
++
++ /* The offsets relative to ARG_POINTER. */
++ HOST_WIDE_INT frame_pointer_offset;
++ HOST_WIDE_INT hard_frame_pointer_offset;
++ HOST_WIDE_INT stack_pointer_offset;
++ HOST_WIDE_INT hfp_save_offset;
++ HOST_WIDE_INT reg_save_offset;
++ HOST_WIDE_INT sse_reg_save_offset;
++
++ /* When save_regs_using_mov is set, emit prologue using
++ move instead of push instructions. */
++ bool save_regs_using_mov;
++};
++
+ /* Machine specific frame tracking during prologue/epilogue generation. */
+
+-#ifndef USED_FOR_TARGET
+ struct GTY(()) machine_frame_state
+ {
+ /* This pair tracks the currently active CFA as reg+offset. When reg
+@@ -2457,6 +2504,9 @@ struct GTY(()) machine_function {
+ int varargs_fpr_size;
+ int optimize_mode_switching[MAX_386_ENTITIES];
+
++ /* Cached initial frame layout for the current function. */
++ struct ix86_frame frame;
++
+ /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
+ has been computed for. */
+ int use_fast_prologue_epilogue_nregs;
+@@ -2524,6 +2574,7 @@ struct GTY(()) machine_function {
+ #define ix86_current_function_calls_tls_descriptor \
+ (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
+ #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
++#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
+
+ /* Control behavior of x86_file_start. */
+ #define X86_FILE_START_VERSION_DIRECTIVE false
diff --git a/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff b/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff
new file mode 100644
index 0000000000..7b928df765
--- /dev/null
+++ b/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff
@@ -0,0 +1,72 @@
+From 18202ba32cb8de22fc43a5839235a751d0f5c4d9 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:28:44 +0000
+Subject: [PATCH 2/9] i386: Use reference of struct ix86_frame to avoid copy
+
+When there is no need to make a copy of ix86_frame, we can use reference
+of struct ix86_frame to avoid copy.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
+ of struct ix86_frame.
+ (ix86_initial_elimination_offset): Likewise.
+ (ix86_expand_split_stack_prologue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256692 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/i386/i386.c | 9 +++------
+ gcc/testsuite/ChangeLog | 8 ++++++++
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 8133372..397ef7c 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -11843,8 +11843,6 @@ symbolic_reference_mentioned_p (rtx op)
+ bool
+ ix86_can_use_return_insn_p (void)
+ {
+- struct ix86_frame frame;
+-
+ if (! reload_completed || frame_pointer_needed)
+ return 0;
+
+@@ -11857,7 +11855,7 @@ ix86_can_use_return_insn_p (void)
+ return 0;
+
+ ix86_compute_frame_layout ();
+- frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+ return (frame.stack_pointer_offset == UNITS_PER_WORD
+ && (frame.nregs + frame.nsseregs) == 0);
+ }
+@@ -12344,7 +12342,7 @@ HOST_WIDE_INT
+ ix86_initial_elimination_offset (int from, int to)
+ {
+ ix86_compute_frame_layout ();
+- struct ix86_frame frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
+ return frame.hard_frame_pointer_offset;
+@@ -14860,7 +14858,6 @@ static GTY(()) rtx split_stack_fn_large;
+ void
+ ix86_expand_split_stack_prologue (void)
+ {
+- struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ unsigned HOST_WIDE_INT args_size;
+ rtx_code_label *label;
+@@ -14873,7 +14870,7 @@ ix86_expand_split_stack_prologue (void)
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+ allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
+
+ /* This is the label we will branch to if we have enough stack
+--
+2.7.4
+
diff --git a/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff b/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff
new file mode 100644
index 0000000000..f6f30d1d22
--- /dev/null
+++ b/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff
@@ -0,0 +1,59 @@
+From 839ca2d69157ef03c8df0ab912dacdb991738694 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:33:42 +0000
+Subject: [PATCH 3/9] i386: More use reference of struct ix86_frame to avoid copy
+
+When there is no need to make a copy of ix86_frame, we can use reference
+of struct ix86_frame to avoid copy.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_expand_prologue): Use reference of
+ struct ix86_frame.
+ (ix86_expand_epilogue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256695 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 7 +++++++
+ gcc/config/i386/i386.c | 6 ++----
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 397ef7c..986e6d7 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -13667,7 +13667,6 @@ ix86_expand_prologue (void)
+ {
+ struct machine_function *m = cfun->machine;
+ rtx insn, t;
+- struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ bool int_registers_saved;
+ bool sse_registers_saved;
+@@ -13691,7 +13690,7 @@ ix86_expand_prologue (void)
+ m->fs.sp_valid = true;
+
+ ix86_compute_frame_layout ();
+- frame = m->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -14354,13 +14353,12 @@ ix86_expand_epilogue (int style)
+ {
+ struct machine_function *m = cfun->machine;
+ struct machine_frame_state frame_state_save = m->fs;
+- struct ix86_frame frame;
+ bool restore_regs_via_mov;
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- frame = m->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+--
+2.7.4
+
diff --git a/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff b/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff
new file mode 100644
index 0000000000..7678444cd7
--- /dev/null
+++ b/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff
@@ -0,0 +1,63 @@
+From c25b81ba01fa9ac0c1baa3aabd64190c47928f03 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 12:49:29 +0000
+Subject: [PATCH 4/9] i386: Don't use reference of struct ix86_frame
+
+Use reference of struct ix86_frame in ix86_expand_prologue and
+ix86_expand_epilogue caused:
+
+raised STORAGE_ERROR : stack overflow or erroneous memory access
+make[5]: *** [/export/gnu/import/git/sources/gcc/gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 1
+
+on trunk when bootstrapping GCC with ada on x86-64.
+
+ * config/i386/i386.c (ix86_expand_prologue): Don't use reference
+ of struct ix86_frame.
+ (ix86_expand_epilogue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256742 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 6 ++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index e758387..ba2abc5 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -14061,6 +14061,7 @@ ix86_expand_prologue (void)
+ {
+ struct machine_function *m = cfun->machine;
+ rtx insn, t;
++ struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ bool int_registers_saved;
+ bool sse_registers_saved;
+@@ -14084,7 +14085,7 @@ ix86_expand_prologue (void)
+ m->fs.sp_valid = true;
+
+ ix86_compute_frame_layout ();
+- struct ix86_frame &frame = cfun->machine->frame;
++ frame = m->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -14747,12 +14748,13 @@ ix86_expand_epilogue (int style)
+ {
+ struct machine_function *m = cfun->machine;
+ struct machine_frame_state frame_state_save = m->fs;
++ struct ix86_frame frame;
+ bool restore_regs_via_mov;
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- struct ix86_frame &frame = cfun->machine->frame;
++ frame = m->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+--
+2.7.4
+
diff --git a/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff b/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff
new file mode 100644
index 0000000000..bcaf572b1e
--- /dev/null
+++ b/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff
@@ -0,0 +1,279 @@
+From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 10:59:42 +0000
+Subject: [PATCH 5/9] x86: Add -mindirect-branch= (documentation)
+
+Add -mindirect-branch= option to convert indirect call and jump to call
+and return thunks. The default is 'keep', which keeps indirect call and
+jump unmodified. 'thunk' converts indirect call and jump to call and
+return thunk. 'thunk-inline' converts indirect call and jump to inlined
+call and return thunk. 'thunk-extern' converts indirect call and jump to
+external call and return thunk provided in a separate object file. You
+can control this behavior for a specific function by using the function
+attribute indirect_branch.
+
+2 kinds of thunks are geneated. Memory thunk where the function address
+is at the top of the stack:
+
+__x86_indirect_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+Indirect jmp via memory, "jmp mem", is converted to
+
+ push memory
+ jmp __x86_indirect_thunk
+
+Indirect call via memory, "call mem", is converted to
+
+ jmp L2
+L1:
+ push [mem]
+ jmp __x86_indirect_thunk
+L2:
+ call L1
+
+Register thunk where the function address is in a register, reg:
+
+__x86_indirect_thunk_reg:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ movq %reg, (%rsp)|movl %reg, (%esp)
+ ret
+
+where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
+(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
+
+Indirect jmp via register, "jmp reg", is converted to
+
+ jmp __x86_indirect_thunk_reg
+
+Indirect call via register, "call reg", is converted to
+
+ call __x86_indirect_thunk_reg
+
+gcc/
+
+ Backport from mainline
+ * config/i386/i386-opts.h (indirect_branch): New.
+ * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
+ * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
+ with local indirect jump when converting indirect call and jump.
+ (ix86_set_indirect_branch_type): New.
+ (ix86_set_current_function): Call ix86_set_indirect_branch_type.
+ (indirectlabelno): New.
+ (indirect_thunk_needed): Likewise.
+ (indirect_thunk_bnd_needed): Likewise.
+ (indirect_thunks_used): Likewise.
+ (indirect_thunks_bnd_used): Likewise.
+ (INDIRECT_LABEL): Likewise.
+ (indirect_thunk_name): Likewise.
+ (output_indirect_thunk): Likewise.
+ (output_indirect_thunk_function): Likewise.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (ix86_output_indirect_branch): Likewise.
+ (ix86_output_indirect_jmp): Likewise.
+ (ix86_code_end): Call output_indirect_thunk_function if needed.
+ (ix86_output_call_insn): Call ix86_output_indirect_branch if
+ needed.
+ (ix86_handle_fndecl_attribute): Handle indirect_branch.
+ (ix86_attribute_table): Add indirect_branch.
+ * config/i386/i386.h (machine_function): Add indirect_branch_type
+ and has_local_indirect_jump.
+ * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
+ to true.
+ (tablejump): Likewise.
+ (*indirect_jump): Use ix86_output_indirect_jmp.
+ (*tablejump_1): Likewise.
+ (simple_return_indirect_internal): Likewise.
+ * config/i386/i386.opt (mindirect-branch=): New option.
+ (indirect_branch): New.
+ (keep): Likewise.
+ (thunk): Likewise.
+ (thunk-inline): Likewise.
+ (thunk-extern): Likewise.
+ * doc/extend.texi: Document indirect_branch function attribute.
+ * doc/invoke.texi: Document -mindirect-branch= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ * gcc.target/i386/indirect-thunk-1.c: New test.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[UBUNTU NOTES: Updated for gcc-5.4 to include defines for
+ FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in
+ https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269.
+ Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie, tyhicks]
+---
+ src/gcc/config/i386/i386-opts.h | 13
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 621 +++++++++++-
+ src/gcc/config/i386/i386.h | 12
+ src/gcc/config/i386/i386.md | 26
+ src/gcc/config/i386/i386.opt | 20
+ src/gcc/doc/extend.texi | 10
+ src/gcc/doc/invoke.texi | 14
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44
+ 33 files changed, 1334 insertions(+), 15 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+
+Index: b/src/gcc/doc/extend.texi
+===================================================================
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -4119,6 +4119,16 @@ Specify which floating-point unit to use
+ @code{target("fpmath=sse,387")} option must be specified as
+ @code{target("fpmath=sse+387")} because the comma would separate
+ different options.
++
++@item indirect_branch("@var{choice}")
++@cindex @code{indirect_branch} function attribute, x86
++On x86 targets, the @code{indirect_branch} attribute causes the compiler
++to convert indirect call and jump with @var{choice}. @samp{keep}
++keeps indirect call and jump unmodified. @samp{thunk} converts indirect
++call and jump to call and return thunk. @samp{thunk-inline} converts
++indirect call and jump to inlined call and return thunk.
++@samp{thunk-extern} converts indirect call and jump to external call
++and return thunk provided in a separate object file.
+ @end table
+
+ On the PowerPC, the following options are allowed:
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1090,7 +1090,8 @@ See RS/6000 and PowerPC Options.
+ -m32 -m64 -mx32 -m16 -mlarge-data-threshold=@var{num} @gol
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+--malign-data=@var{type} -mstack-protector-guard=@var{guard}}
++-malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
++-mindirect-branch=@var{choice}}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24017,6 +24018,17 @@ The default value of this option is enab
+ of the option is @option{-fno-sync-libcalls}. This option is used in
+ the implementation of the @file{libatomic} runtime library.
+
++@item -mindirect-branch=@var{choice}
++@opindex -mindirect-branch
++Convert indirect call and jump with @var{choice}. The default is
++@samp{keep}, which keeps indirect call and jump unmodified.
++@samp{thunk} converts indirect call and jump to call and return thunk.
++@samp{thunk-inline} converts indirect call and jump to inlined call
++and return thunk. @samp{thunk-extern} converts indirect call and jump
++to external call and return thunk provided in a separate object file.
++You can control this behavior for a specific function by using the
++function attribute @code{indirect_branch}. @xref{Function Attributes}.
++
+ @end table
+
+ @c man end
diff --git a/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff b/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff
new file mode 100644
index 0000000000..db9690ccc1
--- /dev/null
+++ b/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff
@@ -0,0 +1,1870 @@
+From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 10:59:42 +0000
+Subject: [PATCH 5/9] x86: Add -mindirect-branch=
+
+Add -mindirect-branch= option to convert indirect call and jump to call
+and return thunks. The default is 'keep', which keeps indirect call and
+jump unmodified. 'thunk' converts indirect call and jump to call and
+return thunk. 'thunk-inline' converts indirect call and jump to inlined
+call and return thunk. 'thunk-extern' converts indirect call and jump to
+external call and return thunk provided in a separate object file. You
+can control this behavior for a specific function by using the function
+attribute indirect_branch.
+
+2 kinds of thunks are geneated. Memory thunk where the function address
+is at the top of the stack:
+
+__x86_indirect_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+Indirect jmp via memory, "jmp mem", is converted to
+
+ push memory
+ jmp __x86_indirect_thunk
+
+Indirect call via memory, "call mem", is converted to
+
+ jmp L2
+L1:
+ push [mem]
+ jmp __x86_indirect_thunk
+L2:
+ call L1
+
+Register thunk where the function address is in a register, reg:
+
+__x86_indirect_thunk_reg:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ movq %reg, (%rsp)|movl %reg, (%esp)
+ ret
+
+where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
+(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
+
+Indirect jmp via register, "jmp reg", is converted to
+
+ jmp __x86_indirect_thunk_reg
+
+Indirect call via register, "call reg", is converted to
+
+ call __x86_indirect_thunk_reg
+
+gcc/
+
+ Backport from mainline
+ * config/i386/i386-opts.h (indirect_branch): New.
+ * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
+ * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
+ with local indirect jump when converting indirect call and jump.
+ (ix86_set_indirect_branch_type): New.
+ (ix86_set_current_function): Call ix86_set_indirect_branch_type.
+ (indirectlabelno): New.
+ (indirect_thunk_needed): Likewise.
+ (indirect_thunk_bnd_needed): Likewise.
+ (indirect_thunks_used): Likewise.
+ (indirect_thunks_bnd_used): Likewise.
+ (INDIRECT_LABEL): Likewise.
+ (indirect_thunk_name): Likewise.
+ (output_indirect_thunk): Likewise.
+ (output_indirect_thunk_function): Likewise.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (ix86_output_indirect_branch): Likewise.
+ (ix86_output_indirect_jmp): Likewise.
+ (ix86_code_end): Call output_indirect_thunk_function if needed.
+ (ix86_output_call_insn): Call ix86_output_indirect_branch if
+ needed.
+ (ix86_handle_fndecl_attribute): Handle indirect_branch.
+ (ix86_attribute_table): Add indirect_branch.
+ * config/i386/i386.h (machine_function): Add indirect_branch_type
+ and has_local_indirect_jump.
+ * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
+ to true.
+ (tablejump): Likewise.
+ (*indirect_jump): Use ix86_output_indirect_jmp.
+ (*tablejump_1): Likewise.
+ (simple_return_indirect_internal): Likewise.
+ * config/i386/i386.opt (mindirect-branch=): New option.
+ (indirect_branch): New.
+ (keep): Likewise.
+ (thunk): Likewise.
+ (thunk-inline): Likewise.
+ (thunk-extern): Likewise.
+ * doc/extend.texi: Document indirect_branch function attribute.
+ * doc/invoke.texi: Document -mindirect-branch= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ * gcc.target/i386/indirect-thunk-1.c: New test.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[UBUNTU NOTES: Updated for gcc-5.4 to include defines for
+ FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in
+ https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269.
+ Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie, tyhicks]
+---
+ src/gcc/config/i386/i386-opts.h | 13
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 621 +++++++++++-
+ src/gcc/config/i386/i386.h | 12
+ src/gcc/config/i386/i386.md | 26
+ src/gcc/config/i386/i386.opt | 20
+ src/gcc/doc/extend.texi | 10
+ src/gcc/doc/invoke.texi | 14
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44
+ 33 files changed, 1334 insertions(+), 15 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+
+Index: b/src/gcc/config/i386/i386-opts.h
+===================================================================
+--- a/src/gcc/config/i386/i386-opts.h
++++ b/src/gcc/config/i386/i386-opts.h
+@@ -99,4 +99,17 @@ enum stack_protector_guard {
+ SSP_GLOBAL /* global canary */
+ };
+
++/* This is used to mitigate variant #2 of the speculative execution
++ vulnerabilities on x86 processors identified by CVE-2017-5715, aka
++ Spectre. They convert indirect branches and function returns to
++ call and return thunks to avoid speculative execution via indirect
++ call, jmp and ret. */
++enum indirect_branch {
++ indirect_branch_unset = 0,
++ indirect_branch_keep,
++ indirect_branch_thunk,
++ indirect_branch_thunk_inline,
++ indirect_branch_thunk_extern
++};
++
+ #endif
+Index: b/src/gcc/config/i386/i386-protos.h
+===================================================================
+--- a/src/gcc/config/i386/i386-protos.h
++++ b/src/gcc/config/i386/i386-protos.h
+@@ -306,6 +306,7 @@ extern enum attr_cpu ix86_schedule;
+ #endif
+
+ extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
++extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
+
+ #ifdef RTX_CODE
+ /* Target data for multipass lookahead scheduling.
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -2554,12 +2554,23 @@ make_pass_insert_vzeroupper (gcc::contex
+ return new pass_insert_vzeroupper (ctxt);
+ }
+
+-/* Return true if a red-zone is in use. */
++/* Return true if a red-zone is in use. We can't use red-zone when
++ there are local indirect jumps, like "indirect_jump" or "tablejump",
++ which jumps to another place in the function, since "call" in the
++ indirect thunk pushes the return address onto stack, destroying
++ red-zone.
++
++ TODO: If we can reserve the first 2 WORDs, for PUSH and, another
++ for CALL, in red-zone, we can allow local indirect jumps with
++ indirect thunk. */
+
+ static inline bool
+ ix86_using_red_zone (void)
+ {
+- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
++ return (TARGET_RED_ZONE
++ && !TARGET_64BIT_MS_ABI
++ && (!cfun->machine->has_local_indirect_jump
++ || cfun->machine->indirect_branch_type == indirect_branch_keep));
+ }
+
+ /* Return a string that documents the current -m options. The caller is
+@@ -5126,6 +5137,37 @@ ix86_reset_previous_fndecl (void)
+ ix86_previous_fndecl = NULL_TREE;
+ }
+
++/* Set the indirect_branch_type field from the function FNDECL. */
++
++static void
++ix86_set_indirect_branch_type (tree fndecl)
++{
++ if (cfun->machine->indirect_branch_type == indirect_branch_unset)
++ {
++ tree attr = lookup_attribute ("indirect_branch",
++ DECL_ATTRIBUTES (fndecl));
++ if (attr != NULL)
++ {
++ tree args = TREE_VALUE (attr);
++ if (args == NULL)
++ gcc_unreachable ();
++ tree cst = TREE_VALUE (args);
++ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_keep;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
++ else
++ gcc_unreachable ();
++ }
++ else
++ cfun->machine->indirect_branch_type = ix86_indirect_branch;
++ }
++}
++
+ /* Establish appropriate back-end context for processing the function
+ FNDECL. The argument might be NULL to indicate processing at top
+ level, outside of any function scope. */
+@@ -5136,7 +5178,11 @@ ix86_set_current_function (tree fndecl)
+ several times in the course of compiling a function, and we don't want to
+ slow things down too much or call target_reinit when it isn't safe. */
+ if (fndecl == ix86_previous_fndecl)
+- return;
++ {
++ if (fndecl != NULL_TREE)
++ ix86_set_indirect_branch_type (fndecl);
++ return;
++ }
+
+ tree old_tree;
+ if (ix86_previous_fndecl == NULL_TREE)
+@@ -5153,6 +5199,8 @@ ix86_set_current_function (tree fndecl)
+ return;
+ }
+
++ ix86_set_indirect_branch_type (fndecl);
++
+ tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
+ if (new_tree == NULL_TREE)
+ new_tree = target_option_default_node;
+@@ -9681,6 +9729,220 @@ ix86_setup_frame_addresses (void)
+ # endif
+ #endif
+
++/* Label count for call and return thunks. It is used to make unique
++ labels in call and return thunks. */
++static int indirectlabelno;
++
++/* True if call and return thunk functions are needed. */
++static bool indirect_thunk_needed = false;
++/* True if call and return thunk functions with the BND prefix are
++ needed. */
++static bool indirect_thunk_bnd_needed = false;
++
++/* Bit masks of integer registers, which contain branch target, used
++ by call and return thunks functions. */
++static int indirect_thunks_used;
++/* Bit masks of integer registers, which contain branch target, used
++ by call and return thunks functions with the BND prefix. */
++static int indirect_thunks_bnd_used;
++
++#ifndef INDIRECT_LABEL
++# define INDIRECT_LABEL "LIND"
++#endif
++
++/* Fills in the label name that should be used for the indirect thunk. */
++
++static void
++indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
++{
++ if (USE_HIDDEN_LINKONCE)
++ {
++ const char *bnd = need_bnd_p ? "_bnd" : "";
++ if (regno >= 0)
++ {
++ const char *reg_prefix;
++ if (LEGACY_INT_REGNO_P (regno))
++ reg_prefix = TARGET_64BIT ? "r" : "e";
++ else
++ reg_prefix = "";
++ sprintf (name, "__x86_indirect_thunk%s_%s%s",
++ bnd, reg_prefix, reg_names[regno]);
++ }
++ else
++ sprintf (name, "__x86_indirect_thunk%s", bnd);
++ }
++ else
++ {
++ if (regno >= 0)
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
++ }
++ else
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ }
++ }
++}
++
++/* Output a call and return thunk for indirect branch. If BND_P is
++ true, the BND prefix is needed. If REGNO != -1, the function
++ address is in REGNO and the call and return thunk looks like:
++
++ call L2
++ L1:
++ pause
++ jmp L1
++ L2:
++ mov %REG, (%sp)
++ ret
++
++ Otherwise, the function address is on the top of stack and the
++ call and return thunk looks like:
++
++ call L2
++ L1:
++ pause
++ jmp L1
++ L2:
++ lea WORD_SIZE(%sp), %sp
++ ret
++ */
++
++static void
++output_indirect_thunk (bool need_bnd_p, int regno)
++{
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Call */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ /* Pause + lfence. */
++ fprintf (asm_out_file, "\tpause\n\tlfence\n");
++
++ /* Jump. */
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ if (regno >= 0)
++ {
++ /* MOV. */
++ rtx xops[2];
++ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
++ xops[1] = gen_rtx_REG (word_mode, regno);
++ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
++ }
++ else
++ {
++ /* LEA. */
++ rtx xops[2];
++ xops[0] = stack_pointer_rtx;
++ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
++ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
++ }
++
++ if (need_bnd_p)
++ fputs ("\tbnd ret\n", asm_out_file);
++ else
++ fputs ("\tret\n", asm_out_file);
++}
++
++/* Output a funtion with a call and return thunk for indirect branch.
++ If BND_P is true, the BND prefix is needed. If REGNO != -1, the
++ function address is in REGNO. Otherwise, the function address is
++ on the top of stack. */
++
++static void
++output_indirect_thunk_function (bool need_bnd_p, int regno)
++{
++ char name[32];
++ tree decl;
++
++ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
++ indirect_thunk_name (name, regno, need_bnd_p);
++ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
++ get_identifier (name),
++ build_function_type_list (void_type_node, NULL_TREE));
++ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
++ NULL_TREE, void_type_node);
++ TREE_PUBLIC (decl) = 1;
++ TREE_STATIC (decl) = 1;
++ DECL_IGNORED_P (decl) = 1;
++
++#if TARGET_MACHO
++ if (TARGET_MACHO)
++ {
++ switch_to_section (darwin_sections[picbase_thunk_section]);
++ fputs ("\t.weak_definition\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ fputs ("\n\t.private_extern\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ putc ('\n', asm_out_file);
++ ASM_OUTPUT_LABEL (asm_out_file, name);
++ DECL_WEAK (decl) = 1;
++ }
++ else
++#endif
++ if (USE_HIDDEN_LINKONCE)
++ {
++ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
++
++ targetm.asm_out.unique_section (decl, 0);
++ switch_to_section (get_named_section (decl, NULL, 0));
++
++ targetm.asm_out.globalize_label (asm_out_file, name);
++ fputs ("\t.hidden\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ putc ('\n', asm_out_file);
++ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
++ }
++ else
++ {
++ switch_to_section (text_section);
++ ASM_OUTPUT_LABEL (asm_out_file, name);
++ }
++
++ DECL_INITIAL (decl) = make_node (BLOCK);
++ current_function_decl = decl;
++ allocate_struct_function (decl, false);
++ init_function_start (decl);
++ /* We're about to hide the function body from callees of final_* by
++ emitting it directly; tell them we're a thunk, if they care. */
++ cfun->is_thunk = true;
++ first_function_block_is_cold = false;
++ /* Make sure unwind info is emitted for the thunk if needed. */
++ final_start_function (emit_barrier (), asm_out_file, 1);
++
++ output_indirect_thunk (need_bnd_p, regno);
++
++ final_end_function ();
++ init_insn_lengths ();
++ free_after_compilation (cfun);
++ set_cfun (NULL);
++ current_function_decl = NULL;
++}
++
+ static int pic_labels_used;
+
+ /* Fills in the label name that should be used for a pc thunk for
+@@ -9707,11 +9969,32 @@ ix86_code_end (void)
+ rtx xops[2];
+ int regno;
+
++ if (indirect_thunk_needed)
++ output_indirect_thunk_function (false, -1);
++ if (indirect_thunk_bnd_needed)
++ output_indirect_thunk_function (true, -1);
++
++ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
++ {
++ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
++ if ((indirect_thunks_used & (1 << i)))
++ output_indirect_thunk_function (false, regno);
++
++ if ((indirect_thunks_bnd_used & (1 << i)))
++ output_indirect_thunk_function (true, regno);
++ }
++
+ for (regno = AX_REG; regno <= SP_REG; regno++)
+ {
+ char name[32];
+ tree decl;
+
++ if ((indirect_thunks_used & (1 << regno)))
++ output_indirect_thunk_function (false, regno);
++
++ if ((indirect_thunks_bnd_used & (1 << regno)))
++ output_indirect_thunk_function (true, regno);
++
+ if (!(pic_labels_used & (1 << regno)))
+ continue;
+
+@@ -25805,12 +26088,292 @@ ix86_expand_call (rtx retval, rtx fnaddr
+ return call;
+ }
+
++/* Output indirect branch via a call and return thunk. CALL_OP is a
++ register which contains the branch target. XASM is the assembly
++ template for CALL_OP. Branch is a tail call if SIBCALL_P is true.
++ A normal call is converted to:
++
++ call __x86_indirect_thunk_reg
++
++ and a tail call is converted to:
++
++ jmp __x86_indirect_thunk_reg
++ */
++
++static void
++ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
++{
++ char thunk_name_buf[32];
++ char *thunk_name;
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++ int regno = REGNO (call_op);
++
++ if (cfun->machine->indirect_branch_type
++ != indirect_branch_thunk_inline)
++ {
++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
++ {
++ int i = regno;
++ if (i >= FIRST_REX_INT_REG)
++ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
++ if (need_bnd_p)
++ indirect_thunks_bnd_used |= 1 << i;
++ else
++ indirect_thunks_used |= 1 << i;
++ }
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ thunk_name = thunk_name_buf;
++ }
++ else
++ thunk_name = NULL;
++
++ if (sibcall_p)
++ {
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++ }
++ else
++ {
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
++ return;
++ }
++
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Jump. */
++ if (need_bnd_p)
++ fputs ("\tbnd jmp\t", asm_out_file);
++ else
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ /* Call. */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++ }
++}
++
++/* Output indirect branch via a call and return thunk. CALL_OP is
++ the branch target. XASM is the assembly template for CALL_OP.
++ Branch is a tail call if SIBCALL_P is true. A normal call is
++ converted to:
++
++ jmp L2
++ L1:
++ push CALL_OP
++ jmp __x86_indirect_thunk
++ L2:
++ call L1
++
++ and a tail call is converted to:
++
++ push CALL_OP
++ jmp __x86_indirect_thunk
++ */
++
++static void
++ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
++ bool sibcall_p)
++{
++ char thunk_name_buf[32];
++ char *thunk_name;
++ char push_buf[64];
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++ int regno = -1;
++
++ if (cfun->machine->indirect_branch_type
++ != indirect_branch_thunk_inline)
++ {
++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
++ {
++ if (need_bnd_p)
++ indirect_thunk_bnd_needed = true;
++ else
++ indirect_thunk_needed = true;
++ }
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ thunk_name = thunk_name_buf;
++ }
++ else
++ thunk_name = NULL;
++
++ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
++ TARGET_64BIT ? 'q' : 'l', xasm);
++
++ if (sibcall_p)
++ {
++ output_asm_insn (push_buf, &call_op);
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++ }
++ else
++ {
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Jump. */
++ if (need_bnd_p)
++ fputs ("\tbnd jmp\t", asm_out_file);
++ else
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ /* An external function may be called via GOT, instead of PLT. */
++ if (MEM_P (call_op))
++ {
++ struct ix86_address parts;
++ rtx addr = XEXP (call_op, 0);
++ if (ix86_decompose_address (addr, &parts)
++ && parts.base == stack_pointer_rtx)
++ {
++ /* Since call will adjust stack by -UNITS_PER_WORD,
++ we must convert "disp(stack, index, scale)" to
++ "disp+UNITS_PER_WORD(stack, index, scale)". */
++ if (parts.index)
++ {
++ addr = gen_rtx_MULT (Pmode, parts.index,
++ GEN_INT (parts.scale));
++ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
++ addr);
++ }
++ else
++ addr = stack_pointer_rtx;
++
++ rtx disp;
++ if (parts.disp != NULL_RTX)
++ disp = plus_constant (Pmode, parts.disp,
++ UNITS_PER_WORD);
++ else
++ disp = GEN_INT (UNITS_PER_WORD);
++
++ addr = gen_rtx_PLUS (Pmode, addr, disp);
++ call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
++ }
++ }
++
++ output_asm_insn (push_buf, &call_op);
++
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ /* Call. */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++ }
++}
++
++/* Output indirect branch via a call and return thunk. CALL_OP is
++ the branch target. XASM is the assembly template for CALL_OP.
++ Branch is a tail call if SIBCALL_P is true. */
++
++static void
++ix86_output_indirect_branch (rtx call_op, const char *xasm,
++ bool sibcall_p)
++{
++ if (REG_P (call_op))
++ ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
++ else
++ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
++}
++/* Output indirect jump. CALL_OP is the jump target. Jump is a
++ function return if RET_P is true. */
++
++const char *
++ix86_output_indirect_jmp (rtx call_op, bool ret_p)
++{
++ if (cfun->machine->indirect_branch_type != indirect_branch_keep)
++ {
++ /* We can't have red-zone if this isn't a function return since
++ "call" in the indirect thunk pushes the return address onto
++ stack, destroying red-zone. */
++ if (!ret_p && ix86_red_zone_size != 0)
++ gcc_unreachable ();
++
++ ix86_output_indirect_branch (call_op, "%0", true);
++ return "";
++ }
++ else
++ return "%!jmp\t%A0";
++}
++
+ /* Output the assembly for a call instruction. */
+
+ const char *
+ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
+ {
+ bool direct_p = constant_call_address_operand (call_op, VOIDmode);
++ bool output_indirect_p
++ = (!TARGET_SEH
++ && cfun->machine->indirect_branch_type != indirect_branch_keep);
+ bool seh_nop_p = false;
+ const char *xasm;
+
+@@ -25823,9 +26386,17 @@ ix86_output_call_insn (rtx_insn *insn, r
+ else if (TARGET_SEH)
+ xasm = "%!rex.W jmp %A0";
+ else
+- xasm = "%!jmp\t%A0";
++ {
++ if (output_indirect_p)
++ xasm = "%0";
++ else
++ xasm = "%!jmp\t%A0";
++ }
+
+- output_asm_insn (xasm, &call_op);
++ if (output_indirect_p && !direct_p)
++ ix86_output_indirect_branch (call_op, xasm, true);
++ else
++ output_asm_insn (xasm, &call_op);
+ return "";
+ }
+
+@@ -25862,9 +26433,17 @@ ix86_output_call_insn (rtx_insn *insn, r
+ if (direct_p)
+ xasm = "%!call\t%P0";
+ else
+- xasm = "%!call\t%A0";
++ {
++ if (output_indirect_p)
++ xasm = "%0";
++ else
++ xasm = "%!call\t%A0";
++ }
+
+- output_asm_insn (xasm, &call_op);
++ if (output_indirect_p && !direct_p)
++ ix86_output_indirect_branch (call_op, xasm, false);
++ else
++ output_asm_insn (xasm, &call_op);
+
+ if (seh_nop_p)
+ return "nop";
+@@ -43014,7 +43593,7 @@ ix86_handle_struct_attribute (tree *node
+ }
+
+ static tree
+-ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
++ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
+ bool *no_add_attrs)
+ {
+ if (TREE_CODE (*node) != FUNCTION_DECL)
+@@ -43023,6 +43602,29 @@ ix86_handle_fndecl_attribute (tree *node
+ name);
+ *no_add_attrs = true;
+ }
++
++ if (is_attribute_p ("indirect_branch", name))
++ {
++ tree cst = TREE_VALUE (args);
++ if (TREE_CODE (cst) != STRING_CST)
++ {
++ warning (OPT_Wattributes,
++ "%qE attribute requires a string constant argument",
++ name);
++ *no_add_attrs = true;
++ }
++ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
++ {
++ warning (OPT_Wattributes,
++ "argument to %qE attribute is not "
++ "(keep|thunk|thunk-inline|thunk-extern)", name);
++ *no_add_attrs = true;
++ }
++ }
++
+ return NULL_TREE;
+ }
+
+@@ -46915,6 +47517,9 @@ static const struct attribute_spec ix86_
+ false },
+ { "callee_pop_aggregate_return", 1, 1, false, true, true,
+ ix86_handle_callee_pop_aggregate_return, true },
++ { "indirect_branch", 1, 1, true, false, false,
++ ix86_handle_fndecl_attribute, false },
++
+ /* End element. */
+ { NULL, 0, 0, false, false, false, NULL, false }
+ };
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -1229,6 +1229,9 @@ extern const char *host_detect_local_cpu
+ /* Base register for access to local variables of the function. */
+ #define FRAME_POINTER_REGNUM 20
+
++#define FIRST_INT_REG AX_REG
++#define LAST_INT_REG SP_REG
++
+ /* First floating point reg */
+ #define FIRST_FLOAT_REG 8
+
+@@ -1465,6 +1468,8 @@ enum reg_class
+ registers. */
+ #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
+
++#define LEGACY_INT_REGNO_P(N) (IN_RANGE ((N), FIRST_INT_REG, LAST_INT_REG))
++
+ #define QI_REG_P(X) (REG_P (X) && QI_REGNO_P (REGNO (X)))
+ #define QI_REGNO_P(N) IN_RANGE ((N), AX_REG, BX_REG)
+
+@@ -2550,6 +2555,13 @@ struct GTY(()) machine_function {
+ /* If true, it is safe to not save/restore DRAP register. */
+ BOOL_BITFIELD no_drap_save_restore : 1;
+
++ /* How to generate indirec branch. */
++ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
++
++ /* If true, the current function has local indirect jumps, like
++ "indirect_jump" or "tablejump". */
++ BOOL_BITFIELD has_local_indirect_jump : 1;
++
+ /* During prologue/epilogue generation, the current frame state.
+ Otherwise, the frame state at the end of the prologue. */
+ struct machine_frame_state fs;
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -11556,13 +11556,18 @@
+ {
+ if (TARGET_X32)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
++ cfun->machine->has_local_indirect_jump = true;
+ })
+
+ (define_insn "*indirect_jump"
+ [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
+ ""
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], false);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ (define_expand "tablejump"
+@@ -11604,14 +11609,19 @@
+
+ if (TARGET_X32)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
++ cfun->machine->has_local_indirect_jump = true;
+ })
+
+ (define_insn "*tablejump_1"
+ [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
+ (use (label_ref (match_operand 1)))]
+ ""
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], false);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ ;; Convert setcc + movzbl to xor + setcc if operands don't overlap.
+@@ -12198,8 +12208,12 @@
+ [(simple_return)
+ (use (match_operand:SI 0 "register_operand" "r"))]
+ "reload_completed"
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], true);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ (define_insn "nop"
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -876,3 +876,23 @@ Enum(stack_protector_guard) String(tls)
+
+ EnumValue
+ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
++
++mindirect-branch=
++Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
++Convert indirect call and jump to call and return thunks.
++
++Enum
++Name(indirect_branch) Type(enum indirect_branch)
++Known indirect branch choices (for use with the -mindirect-branch= option):
++
++EnumValue
++Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
++
++EnumValue
++Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
++
++EnumValue
++Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
++
++EnumValue
++Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++extern void male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk")));
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk")))
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++extern int male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk-inline")));
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk-inline")))
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++extern int male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk-extern")));
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk-extern")))
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++__attribute__ ((indirect_branch("thunk-extern")))
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+@@ -0,0 +1,42 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++__attribute__ ((indirect_branch("keep")))
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile { target { ! x32 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++
++void (*dispatch) (char *);
++char buf[10];
++
++void
++foo (void)
++{
++ dispatch (buf);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd ret" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile { target { ! x32 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++
++void (*dispatch) (char *);
++char buf[10];
++
++int
++foo (void)
++{
++ dispatch (buf);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd ret" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -0,0 +1,43 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
diff --git a/development/gcc5/patches/0006-x86-Add-mfunction-return-doc.diff b/development/gcc5/patches/0006-x86-Add-mfunction-return-doc.diff
new file mode 100644
index 0000000000..b40d524892
--- /dev/null
+++ b/development/gcc5/patches/0006-x86-Add-mfunction-return-doc.diff
@@ -0,0 +1,300 @@
+From 357311dd400f7f72d2132f2f94161ece39bf08c6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:10:44 +0000
+Subject: [PATCH 6/9] x86: Add -mfunction-return=
+
+Add -mfunction-return= option to convert function return to call and
+return thunks. The default is 'keep', which keeps function return
+unmodified. 'thunk' converts function return to call and return thunk.
+'thunk-inline' converts function return to inlined call and return thunk.
+'thunk-extern' converts function return to external call and return
+thunk provided in a separate object file. You can control this behavior
+for a specific function by using the function attribute function_return.
+
+Function return thunk is the same as memory thunk for -mindirect-branch=
+where the return address is at the top of the stack:
+
+__x86_return_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+and function return becomes
+
+ jmp __x86_return_thunk
+
+-mindirect-branch= tests are updated with -mfunction-return=keep to
+avoid false test failures when -mfunction-return=thunk is added to
+RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-protos.h (ix86_output_function_return): New.
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Also
+ set function_return_type.
+ (indirect_thunk_name): Add ret_p to indicate thunk for function
+ return.
+ (output_indirect_thunk_function): Pass false to
+ indirect_thunk_name.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (output_indirect_thunk_function): Create alias for function
+ return thunk if regno < 0.
+ (ix86_output_function_return): New function.
+ (ix86_handle_fndecl_attribute): Handle function_return.
+ (ix86_attribute_table): Add function_return.
+ * config/i386/i386.h (machine_function): Add
+ function_return_type.
+ * config/i386/i386.md (simple_return_internal): Use
+ ix86_output_function_return.
+ (simple_return_internal_long): Likewise.
+ * config/i386/i386.opt (mfunction-return=): New option.
+ (indirect_branch): Mention -mfunction-return=.
+ * doc/extend.texi: Document function_return function attribute.
+ * doc/invoke.texi: Document -mfunction-return= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mfunction-return=keep.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-1.c: New test.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-16.c: Likewise.
+ * gcc.target/i386/ret-thunk-2.c: Likewise.
+ * gcc.target/i386/ret-thunk-3.c: Likewise.
+ * gcc.target/i386/ret-thunk-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-5.c: Likewise.
+ * gcc.target/i386/ret-thunk-6.c: Likewise.
+ * gcc.target/i386/ret-thunk-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-8.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+
+i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
+
+ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
+generate the __x86_return_thunk label, instead of the set directive.
+Update testcase to remove the __x86_return_thunk label check. Since
+-fno-pic is ignored on Darwin, update testcases to sscan or "push"
+only on Linux.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * config/i386/i386.c (output_indirect_thunk_function): Use
+ ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
+ for __x86.return_thunk.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
+ Linux.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Don't check the
+ __x86_return_thunk label.
+ Scan for "push" only for Linux.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256734 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+
+---
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 152 +++++++++++-
+ src/gcc/config/i386/i386.h | 3
+ src/gcc/config/i386/i386.md | 9
+ src/gcc/config/i386/i386.opt | 6
+ src/gcc/doc/extend.texi | 9
+ src/gcc/doc/invoke.texi | 13 -
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 +
+ 48 files changed, 507 insertions(+), 66 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+
+Index: b/src/gcc/doc/extend.texi
+===================================================================
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -4129,6 +4129,15 @@ call and jump to call and return thunk.
+ indirect call and jump to inlined call and return thunk.
+ @samp{thunk-extern} converts indirect call and jump to external call
+ and return thunk provided in a separate object file.
++
++@item function_return("@var{choice}")
++@cindex @code{function_return} function attribute, x86
++On x86 targets, the @code{function_return} attribute causes the compiler
++to convert function return with @var{choice}. @samp{keep} keeps function
++return unmodified. @samp{thunk} converts function return to call and
++return thunk. @samp{thunk-inline} converts function return to inlined
++call and return thunk. @samp{thunk-extern} converts function return to
++external call and return thunk provided in a separate object file.
+ @end table
+
+ On the PowerPC, the following options are allowed:
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1091,7 +1091,7 @@ See RS/6000 and PowerPC Options.
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+ -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
+--mindirect-branch=@var{choice}}
++-mindirect-branch=@var{choice} -mfunction-return=@var{choice}}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24029,6 +24029,17 @@ to external call and return thunk provid
+ You can control this behavior for a specific function by using the
+ function attribute @code{indirect_branch}. @xref{Function Attributes}.
+
++@item -mfunction-return=@var{choice}
++@opindex -mfunction-return
++Convert function return with @var{choice}. The default is @samp{keep},
++which keeps function return unmodified. @samp{thunk} converts function
++return to call and return thunk. @samp{thunk-inline} converts function
++return to inlined call and return thunk. @samp{thunk-extern} converts
++function return to external call and return thunk provided in a separate
++object file. You can control this behavior for a specific function by
++using the function attribute @code{function_return}.
++@xref{Function Attributes}.
++
+ @end table
+
+ @c man end
diff --git a/development/gcc5/patches/0006-x86-Add-mfunction-return.diff b/development/gcc5/patches/0006-x86-Add-mfunction-return.diff
new file mode 100644
index 0000000000..1883cc6a51
--- /dev/null
+++ b/development/gcc5/patches/0006-x86-Add-mfunction-return.diff
@@ -0,0 +1,1409 @@
+From 357311dd400f7f72d2132f2f94161ece39bf08c6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:10:44 +0000
+Subject: [PATCH 6/9] x86: Add -mfunction-return=
+
+Add -mfunction-return= option to convert function return to call and
+return thunks. The default is 'keep', which keeps function return
+unmodified. 'thunk' converts function return to call and return thunk.
+'thunk-inline' converts function return to inlined call and return thunk.
+'thunk-extern' converts function return to external call and return
+thunk provided in a separate object file. You can control this behavior
+for a specific function by using the function attribute function_return.
+
+Function return thunk is the same as memory thunk for -mindirect-branch=
+where the return address is at the top of the stack:
+
+__x86_return_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+and function return becomes
+
+ jmp __x86_return_thunk
+
+-mindirect-branch= tests are updated with -mfunction-return=keep to
+avoid false test failures when -mfunction-return=thunk is added to
+RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-protos.h (ix86_output_function_return): New.
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Also
+ set function_return_type.
+ (indirect_thunk_name): Add ret_p to indicate thunk for function
+ return.
+ (output_indirect_thunk_function): Pass false to
+ indirect_thunk_name.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (output_indirect_thunk_function): Create alias for function
+ return thunk if regno < 0.
+ (ix86_output_function_return): New function.
+ (ix86_handle_fndecl_attribute): Handle function_return.
+ (ix86_attribute_table): Add function_return.
+ * config/i386/i386.h (machine_function): Add
+ function_return_type.
+ * config/i386/i386.md (simple_return_internal): Use
+ ix86_output_function_return.
+ (simple_return_internal_long): Likewise.
+ * config/i386/i386.opt (mfunction-return=): New option.
+ (indirect_branch): Mention -mfunction-return=.
+ * doc/extend.texi: Document function_return function attribute.
+ * doc/invoke.texi: Document -mfunction-return= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mfunction-return=keep.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-1.c: New test.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-16.c: Likewise.
+ * gcc.target/i386/ret-thunk-2.c: Likewise.
+ * gcc.target/i386/ret-thunk-3.c: Likewise.
+ * gcc.target/i386/ret-thunk-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-5.c: Likewise.
+ * gcc.target/i386/ret-thunk-6.c: Likewise.
+ * gcc.target/i386/ret-thunk-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-8.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+
+i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
+
+ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
+generate the __x86_return_thunk label, instead of the set directive.
+Update testcase to remove the __x86_return_thunk label check. Since
+-fno-pic is ignored on Darwin, update testcases to sscan or "push"
+only on Linux.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * config/i386/i386.c (output_indirect_thunk_function): Use
+ ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
+ for __x86.return_thunk.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
+ Linux.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Don't check the
+ __x86_return_thunk label.
+ Scan for "push" only for Linux.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256734 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+
+---
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 152 +++++++++++-
+ src/gcc/config/i386/i386.h | 3
+ src/gcc/config/i386/i386.md | 9
+ src/gcc/config/i386/i386.opt | 6
+ src/gcc/doc/extend.texi | 9
+ src/gcc/doc/invoke.texi | 13 -
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 +
+ 48 files changed, 507 insertions(+), 66 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+
+Index: b/src/gcc/config/i386/i386-protos.h
+===================================================================
+--- a/src/gcc/config/i386/i386-protos.h
++++ b/src/gcc/config/i386/i386-protos.h
+@@ -307,6 +307,7 @@ extern enum attr_cpu ix86_schedule;
+
+ extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
+ extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
++extern const char * ix86_output_function_return (bool long_p);
+
+ #ifdef RTX_CODE
+ /* Target data for multipass lookahead scheduling.
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -5166,6 +5166,31 @@ ix86_set_indirect_branch_type (tree fnde
+ else
+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
+ }
++
++ if (cfun->machine->function_return_type == indirect_branch_unset)
++ {
++ tree attr = lookup_attribute ("function_return",
++ DECL_ATTRIBUTES (fndecl));
++ if (attr != NULL)
++ {
++ tree args = TREE_VALUE (attr);
++ if (args == NULL)
++ gcc_unreachable ();
++ tree cst = TREE_VALUE (args);
++ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
++ cfun->machine->function_return_type = indirect_branch_keep;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk_inline;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk_extern;
++ else
++ gcc_unreachable ();
++ }
++ else
++ cfun->machine->function_return_type = ix86_function_return;
++ }
+ }
+
+ /* Establish appropriate back-end context for processing the function
+@@ -9753,8 +9778,12 @@ static int indirect_thunks_bnd_used;
+ /* Fills in the label name that should be used for the indirect thunk. */
+
+ static void
+-indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
++indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
++ bool ret_p)
+ {
++ if (regno >= 0 && ret_p)
++ gcc_unreachable ();
++
+ if (USE_HIDDEN_LINKONCE)
+ {
+ const char *bnd = need_bnd_p ? "_bnd" : "";
+@@ -9769,7 +9798,10 @@ indirect_thunk_name (char name[32], int
+ bnd, reg_prefix, reg_names[regno]);
+ }
+ else
+- sprintf (name, "__x86_indirect_thunk%s", bnd);
++ {
++ const char *ret = ret_p ? "return" : "indirect";
++ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
++ }
+ }
+ else
+ {
+@@ -9782,10 +9814,20 @@ indirect_thunk_name (char name[32], int
+ }
+ else
+ {
+- if (need_bnd_p)
+- ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ if (ret_p)
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
++ }
+ else
+- ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ }
+ }
+ }
+ }
+@@ -9880,7 +9922,7 @@ output_indirect_thunk_function (bool nee
+ tree decl;
+
+ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
+- indirect_thunk_name (name, regno, need_bnd_p);
++ indirect_thunk_name (name, regno, need_bnd_p, false);
+ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
+ get_identifier (name),
+ build_function_type_list (void_type_node, NULL_TREE));
+@@ -9923,6 +9965,36 @@ output_indirect_thunk_function (bool nee
+ ASM_OUTPUT_LABEL (asm_out_file, name);
+ }
+
++ if (regno < 0)
++ {
++ /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
++ char alias[32];
++
++ indirect_thunk_name (alias, regno, need_bnd_p, true);
++#if TARGET_MACHO
++ if (TARGET_MACHO)
++ {
++ fputs ("\t.weak_definition\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ fputs ("\n\t.private_extern\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ ASM_OUTPUT_LABEL (asm_out_file, alias);
++ }
++#else
++ ASM_OUTPUT_DEF (asm_out_file, alias, name);
++ if (USE_HIDDEN_LINKONCE)
++ {
++ fputs ("\t.globl\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ fputs ("\t.hidden\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ }
++#endif
++ }
++
+ DECL_INITIAL (decl) = make_node (BLOCK);
+ current_function_decl = decl;
+ allocate_struct_function (decl, false);
+@@ -26121,7 +26193,7 @@ ix86_output_indirect_branch_via_reg (rtx
+ else
+ indirect_thunks_used |= 1 << i;
+ }
+- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
+ thunk_name = thunk_name_buf;
+ }
+ else
+@@ -26230,7 +26302,7 @@ ix86_output_indirect_branch_via_push (rt
+ else
+ indirect_thunk_needed = true;
+ }
+- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
+ thunk_name = thunk_name_buf;
+ }
+ else
+@@ -26365,6 +26437,46 @@ ix86_output_indirect_jmp (rtx call_op, b
+ return "%!jmp\t%A0";
+ }
+
++/* Output function return. CALL_OP is the jump target. Add a REP
++ prefix to RET if LONG_P is true and function return is kept. */
++
++const char *
++ix86_output_function_return (bool long_p)
++{
++ if (cfun->machine->function_return_type != indirect_branch_keep)
++ {
++ char thunk_name[32];
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++
++ if (cfun->machine->function_return_type
++ != indirect_branch_thunk_inline)
++ {
++ bool need_thunk = (cfun->machine->function_return_type
++ == indirect_branch_thunk);
++ indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
++ if (need_bnd_p)
++ {
++ indirect_thunk_bnd_needed |= need_thunk;
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ }
++ else
++ {
++ indirect_thunk_needed |= need_thunk;
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ }
++ else
++ output_indirect_thunk (need_bnd_p, -1);
++
++ return "";
++ }
++
++ if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
++ return "%!ret";
++
++ return "rep%; ret";
++}
++
+ /* Output the assembly for a call instruction. */
+
+ const char *
+@@ -43625,6 +43737,28 @@ ix86_handle_fndecl_attribute (tree *node
+ }
+ }
+
++ if (is_attribute_p ("function_return", name))
++ {
++ tree cst = TREE_VALUE (args);
++ if (TREE_CODE (cst) != STRING_CST)
++ {
++ warning (OPT_Wattributes,
++ "%qE attribute requires a string constant argument",
++ name);
++ *no_add_attrs = true;
++ }
++ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
++ {
++ warning (OPT_Wattributes,
++ "argument to %qE attribute is not "
++ "(keep|thunk|thunk-inline|thunk-extern)", name);
++ *no_add_attrs = true;
++ }
++ }
++
+ return NULL_TREE;
+ }
+
+@@ -47519,6 +47653,8 @@ static const struct attribute_spec ix86_
+ ix86_handle_callee_pop_aggregate_return, true },
+ { "indirect_branch", 1, 1, true, false, false,
+ ix86_handle_fndecl_attribute, false },
++ { "function_return", 1, 1, true, false, false,
++ ix86_handle_fndecl_attribute, false },
+
+ /* End element. */
+ { NULL, 0, 0, false, false, false, NULL, false }
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -2562,6 +2562,9 @@ struct GTY(()) machine_function {
+ "indirect_jump" or "tablejump". */
+ BOOL_BITFIELD has_local_indirect_jump : 1;
+
++ /* How to generate function return. */
++ ENUM_BITFIELD(indirect_branch) function_return_type : 3;
++
+ /* During prologue/epilogue generation, the current frame state.
+ Otherwise, the frame state at the end of the prologue. */
+ struct machine_frame_state fs;
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -12169,7 +12169,7 @@
+ (define_insn "simple_return_internal"
+ [(simple_return)]
+ "reload_completed"
+- "%!ret"
++ "* return ix86_output_function_return (false);"
+ [(set_attr "length_nobnd" "1")
+ (set_attr "atom_unit" "jeu")
+ (set_attr "length_immediate" "0")
+@@ -12182,12 +12182,7 @@
+ [(simple_return)
+ (unspec [(const_int 0)] UNSPEC_REP)]
+ "reload_completed"
+-{
+- if (ix86_bnd_prefixed_insn_p (insn))
+- return "%!ret";
+-
+- return "rep%; ret";
+-}
++ "* return ix86_output_function_return (true);"
+ [(set_attr "length" "2")
+ (set_attr "atom_unit" "jeu")
+ (set_attr "length_immediate" "0")
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -881,9 +881,13 @@ mindirect-branch=
+ Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
+ Convert indirect call and jump to call and return thunks.
+
++mfunction-return=
++Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
++Convert function return to call and return thunk.
++
+ Enum
+ Name(indirect_branch) Type(enum indirect_branch)
+-Known indirect branch choices (for use with the -mindirect-branch= option):
++Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
+
+ EnumValue
+ Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -36,7 +36,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+@@ -10,7 +10,7 @@ foo (void)
+ dispatch (buf);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+@@ -11,7 +11,7 @@ foo (void)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times {\tpause} 1 } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times {\tpause} 1 } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++
++extern void (*bar) (void);
++extern int foo (void) __attribute__ ((function_return("thunk")));
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("thunk-inline")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("keep"), indirect_branch("keep")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+@@ -0,0 +1,12 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+@@ -0,0 +1,12 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++extern void foo (void) __attribute__ ((function_return("thunk")));
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++__attribute__ ((function_return("thunk-inline")))
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++__attribute__ ((function_return("thunk-extern")))
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
++
++extern void foo (void) __attribute__ ((function_return("keep")));
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+@@ -0,0 +1,24 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
diff --git a/development/gcc5/patches/0007-x86-Add-mindirect-branch-register-doc.diff b/development/gcc5/patches/0007-x86-Add-mindirect-branch-register-doc.diff
new file mode 100644
index 0000000000..9780bfc918
--- /dev/null
+++ b/development/gcc5/patches/0007-x86-Add-mindirect-branch-register-doc.diff
@@ -0,0 +1,231 @@
+From 86118fbdbafe6af54b2da467e1073c49e1742116 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:17:49 +0000
+Subject: [PATCH 7/9] x86: Add -mindirect-branch-register (documentation)
+
+Add -mindirect-branch-register to force indirect branch via register.
+This is implemented by disabling patterns of indirect branch via memory,
+similar to TARGET_X32.
+
+-mindirect-branch= and -mfunction-return= tests are updated with
+-mno-indirect-branch-register to avoid false test failures when
+-mindirect-branch-register is added to RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Disallow memory operand for
+ -mindirect-branch-register.
+ (Bw): Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+ * config/i386/i386.md (indirect_jump): Call convert_memory_address
+ for -mindirect-branch-register.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Disallow peepholes of indirect call and jump via memory for
+ -mindirect-branch-register.
+ (*call_pop): Replace m with Bw.
+ (*call_value_pop): Likewise.
+ (*sibcall_pop_memory): Replace m with Bs.
+ * config/i386/i386.opt (mindirect-branch-register): New option.
+ * doc/invoke.texi: Document -mindirect-branch-register option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mno-indirect-branch-register.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: New test.
+ * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+
+i386: Rename to ix86_indirect_branch_register
+
+Rename the variable for -mindirect-branch-register to
+ix86_indirect_branch_register to match the command-line option name.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Replace
+ ix86_indirect_branch_thunk_register with
+ ix86_indirect_branch_register.
+ (Bw): Likewise.
+ * config/i386/i386.md (indirect_jump): Likewise.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Peepholes of indirect call and jump via memory: Likewise.
+ * config/i386/i386.opt: Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+
+x86: Rewrite ix86_indirect_branch_register logic
+
+Rewrite ix86_indirect_branch_register logic with
+
+(and (not (match_test "ix86_indirect_branch_register"))
+ (original condition before r256662))
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (constant_call_address_operand):
+ Rewrite ix86_indirect_branch_register logic.
+ (sibcall_insn_operand): Likewise.
+
+Don't check ix86_indirect_branch_register for GOT operand
+
+Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
+matches, don't check ix86_indirect_branch_register here. If needed,
+-mindirect-branch= will convert indirect branch via GOT slot to a call
+and return thunk.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Update
+ ix86_indirect_branch_register check. Don't check
+ ix86_indirect_branch_register with GOT_memory_operand.
+ (Bw): Likewise.
+ * config/i386/predicates.md (GOT_memory_operand): Don't check
+ ix86_indirect_branch_register here.
+ (GOT32_symbol_operand): Likewise.
+
+i386: Rewrite indirect_branch_operand logic
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (indirect_branch_operand): Rewrite
+ ix86_indirect_branch_register logic.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256735 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+---
+ src/gcc/config/i386/constraints.md | 6 +
+ src/gcc/config/i386/i386.md | 34 ++++++----
+ src/gcc/config/i386/i386.opt | 4 +
+ src/gcc/config/i386/predicates.md | 9 +-
+ src/gcc/doc/invoke.texi | 7 +-
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c | 20 +++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c | 19 +++++
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2
+ 39 files changed, 134 insertions(+), 49 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1091,7 +1091,8 @@ See RS/6000 and PowerPC Options.
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+ -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
+--mindirect-branch=@var{choice} -mfunction-return=@var{choice}}
++-mindirect-branch=@var{choice} -mfunction-return=@var{choice} @gol
++-mindirect-branch-register}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24040,6 +24041,10 @@ object file. You can control this behav
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.
+
++@item -mindirect-branch-register
++@opindex -mindirect-branch-register
++Force indirect call and jump via register.
++
+ @end table
+
+ @c man end
diff --git a/development/gcc5/patches/0007-x86-Add-mindirect-branch-register.diff b/development/gcc5/patches/0007-x86-Add-mindirect-branch-register.diff
new file mode 100644
index 0000000000..211368991f
--- /dev/null
+++ b/development/gcc5/patches/0007-x86-Add-mindirect-branch-register.diff
@@ -0,0 +1,812 @@
+From 86118fbdbafe6af54b2da467e1073c49e1742116 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:17:49 +0000
+Subject: [PATCH 7/9] x86: Add -mindirect-branch-register
+
+Add -mindirect-branch-register to force indirect branch via register.
+This is implemented by disabling patterns of indirect branch via memory,
+similar to TARGET_X32.
+
+-mindirect-branch= and -mfunction-return= tests are updated with
+-mno-indirect-branch-register to avoid false test failures when
+-mindirect-branch-register is added to RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Disallow memory operand for
+ -mindirect-branch-register.
+ (Bw): Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+ * config/i386/i386.md (indirect_jump): Call convert_memory_address
+ for -mindirect-branch-register.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Disallow peepholes of indirect call and jump via memory for
+ -mindirect-branch-register.
+ (*call_pop): Replace m with Bw.
+ (*call_value_pop): Likewise.
+ (*sibcall_pop_memory): Replace m with Bs.
+ * config/i386/i386.opt (mindirect-branch-register): New option.
+ * doc/invoke.texi: Document -mindirect-branch-register option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mno-indirect-branch-register.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: New test.
+ * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+
+i386: Rename to ix86_indirect_branch_register
+
+Rename the variable for -mindirect-branch-register to
+ix86_indirect_branch_register to match the command-line option name.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Replace
+ ix86_indirect_branch_thunk_register with
+ ix86_indirect_branch_register.
+ (Bw): Likewise.
+ * config/i386/i386.md (indirect_jump): Likewise.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Peepholes of indirect call and jump via memory: Likewise.
+ * config/i386/i386.opt: Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+
+x86: Rewrite ix86_indirect_branch_register logic
+
+Rewrite ix86_indirect_branch_register logic with
+
+(and (not (match_test "ix86_indirect_branch_register"))
+ (original condition before r256662))
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (constant_call_address_operand):
+ Rewrite ix86_indirect_branch_register logic.
+ (sibcall_insn_operand): Likewise.
+
+Don't check ix86_indirect_branch_register for GOT operand
+
+Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
+matches, don't check ix86_indirect_branch_register here. If needed,
+-mindirect-branch= will convert indirect branch via GOT slot to a call
+and return thunk.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Update
+ ix86_indirect_branch_register check. Don't check
+ ix86_indirect_branch_register with GOT_memory_operand.
+ (Bw): Likewise.
+ * config/i386/predicates.md (GOT_memory_operand): Don't check
+ ix86_indirect_branch_register here.
+ (GOT32_symbol_operand): Likewise.
+
+i386: Rewrite indirect_branch_operand logic
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (indirect_branch_operand): Rewrite
+ ix86_indirect_branch_register logic.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256735 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+---
+ src/gcc/config/i386/constraints.md | 6 +
+ src/gcc/config/i386/i386.md | 34 ++++++----
+ src/gcc/config/i386/i386.opt | 4 +
+ src/gcc/config/i386/predicates.md | 9 +-
+ src/gcc/doc/invoke.texi | 7 +-
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c | 20 +++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c | 19 +++++
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2
+ 39 files changed, 134 insertions(+), 49 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+
+Index: b/src/gcc/config/i386/constraints.md
+===================================================================
+--- a/src/gcc/config/i386/constraints.md
++++ b/src/gcc/config/i386/constraints.md
+@@ -157,12 +157,14 @@
+
+ (define_constraint "Bs"
+ "@internal Sibcall memory operand."
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "sibcall_memory_operand")))
+
+ (define_constraint "Bw"
+ "@internal Call memory operand."
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand")))
+
+ (define_constraint "Bz"
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -11554,7 +11554,7 @@
+ [(set (pc) (match_operand 0 "indirect_branch_operand"))]
+ ""
+ {
+- if (TARGET_X32)
++ if (TARGET_X32 || ix86_indirect_branch_register)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
+ cfun->machine->has_local_indirect_jump = true;
+ })
+@@ -11607,7 +11607,7 @@
+ OPTAB_DIRECT);
+ }
+
+- if (TARGET_X32)
++ if (TARGET_X32 || ix86_indirect_branch_register)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
+ cfun->machine->has_local_indirect_jump = true;
+ })
+@@ -11764,7 +11764,7 @@
+ [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
+ (match_operand 1))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+- "!TARGET_X32"
++ "!TARGET_X32 && !ix86_indirect_branch_register"
+ "* return ix86_output_call_insn (insn, operands[0]);"
+ [(set_attr "type" "call")])
+
+@@ -11773,7 +11773,9 @@
+ (match_operand:W 1 "memory_operand"))
+ (call (mem:QI (match_dup 0))
+ (match_operand 3))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (1))
+ && peep2_reg_dead_p (2, operands[0])"
+ [(parallel [(call (mem:QI (match_dup 1))
+ (match_dup 3))
+@@ -11785,7 +11787,9 @@
+ (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (2))
+ && peep2_reg_dead_p (3, operands[0])"
+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (parallel [(call (mem:QI (match_dup 1))
+@@ -11806,7 +11810,7 @@
+ })
+
+ (define_insn "*call_pop"
+- [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
++ [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
+ (match_operand 1))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+@@ -11826,7 +11830,7 @@
+ [(set_attr "type" "call")])
+
+ (define_insn "*sibcall_pop_memory"
+- [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
++ [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
+ (match_operand 1))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+@@ -11878,7 +11882,9 @@
+ [(set (match_operand:W 0 "register_operand")
+ (match_operand:W 1 "memory_operand"))
+ (set (pc) (match_dup 0))]
+- "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && peep2_reg_dead_p (2, operands[0])"
+ [(set (pc) (match_dup 1))])
+
+ ;; Call subroutine, returning value in operand 0
+@@ -11928,7 +11934,7 @@
+ (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
+ (match_operand 2)))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+- "!TARGET_X32"
++ "!TARGET_X32 && !ix86_indirect_branch_register"
+ "* return ix86_output_call_insn (insn, operands[1]);"
+ [(set_attr "type" "callv")])
+
+@@ -11938,7 +11944,9 @@
+ (set (match_operand 2)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3)))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (1))
+ && peep2_reg_dead_p (2, operands[0])"
+ [(parallel [(set (match_dup 2)
+ (call (mem:QI (match_dup 1))
+@@ -11952,7 +11960,9 @@
+ (set (match_operand 2)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3)))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (2))
+ && peep2_reg_dead_p (3, operands[0])"
+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (parallel [(set (match_dup 2)
+@@ -11976,7 +11986,7 @@
+
+ (define_insn "*call_value_pop"
+ [(set (match_operand 0)
+- (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
++ (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
+ (match_operand 2)))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -900,3 +900,7 @@ Enum(indirect_branch) String(thunk-inlin
+
+ EnumValue
+ Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
++
++mindirect-branch-register
++Target Report Var(ix86_indirect_branch_register) Init(0)
++Force indirect call and jump via register.
+Index: b/src/gcc/config/i386/predicates.md
+===================================================================
+--- a/src/gcc/config/i386/predicates.md
++++ b/src/gcc/config/i386/predicates.md
+@@ -607,7 +607,8 @@
+ ;; Test for a valid operand for indirect branch.
+ (define_predicate "indirect_branch_operand"
+ (ior (match_operand 0 "register_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand"))))
+
+ ;; Test for a valid operand for a call instruction.
+@@ -616,7 +617,8 @@
+ (ior (match_test "constant_call_address_operand
+ (op, mode == VOIDmode ? mode : Pmode)")
+ (match_operand 0 "call_register_no_elim_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand"))))
+
+ ;; Similarly, but for tail calls, in which we cannot allow memory references.
+@@ -624,7 +626,8 @@
+ (ior (match_test "constant_call_address_operand
+ (op, mode == VOIDmode ? mode : Pmode)")
+ (match_operand 0 "register_no_elim_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "sibcall_memory_operand"))))
+
+ ;; Match exactly zero.
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ extern void (*bar) (void);
+ extern int foo (void) __attribute__ ((function_return("thunk")));
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
diff --git a/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier-doc.diff b/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier-doc.diff
new file mode 100644
index 0000000000..b3bd93a218
--- /dev/null
+++ b/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier-doc.diff
@@ -0,0 +1,65 @@
+From 8a47615dd04a02fdae9691f5ad73fd5a5530c156 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:19:51 +0000
+Subject: [PATCH 8/9] x86: Add 'V' register operand modifier (documentation)
+
+Add 'V', a special modifier which prints the name of the full integer
+register without '%'. For
+
+extern void (*func_p) (void);
+
+void
+foo (void)
+{
+ asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
+}
+
+it generates:
+
+foo:
+ movq func_p(%rip), %rax
+ call __x86_indirect_thunk_rax
+ ret
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (print_reg): Print the name of the full
+ integer register without '%'.
+ (ix86_print_operand): Handle 'V'.
+ * doc/extend.texi: Document 'V' modifier.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-register-4.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256736 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 13 ++++++++++++-
+ gcc/doc/extend.texi | 3 +++
+ gcc/testsuite/ChangeLog | 7 +++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
+ 5 files changed, 45 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+
+diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
+index 46e0a36..9db9e0e 100644
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -8778,6 +8778,9 @@ The table below shows the list of supported modifiers and their effects.
+ @tab @code{2}
+ @end multitable
+
++@code{V} is a special modifier which prints the name of the full integer
++register without @code{%}.
++
+ @anchor{x86floatingpointasmoperands}
+ @subsubsection x86 Floating-Point @code{asm} Operands
+
diff --git a/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier.diff b/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier.diff
new file mode 100644
index 0000000000..fb1ccd9883
--- /dev/null
+++ b/development/gcc5/patches/0008-x86-Add-V-register-operand-modifier.diff
@@ -0,0 +1,125 @@
+From 8a47615dd04a02fdae9691f5ad73fd5a5530c156 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:19:51 +0000
+Subject: [PATCH 8/9] x86: Add 'V' register operand modifier
+
+Add 'V', a special modifier which prints the name of the full integer
+register without '%'. For
+
+extern void (*func_p) (void);
+
+void
+foo (void)
+{
+ asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
+}
+
+it generates:
+
+foo:
+ movq func_p(%rip), %rax
+ call __x86_indirect_thunk_rax
+ ret
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (print_reg): Print the name of the full
+ integer register without '%'.
+ (ix86_print_operand): Handle 'V'.
+ * doc/extend.texi: Document 'V' modifier.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-register-4.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256736 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 13 ++++++++++++-
+ gcc/doc/extend.texi | 3 +++
+ gcc/testsuite/ChangeLog | 7 +++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
+ 5 files changed, 45 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 8fb8902..1bbdd0c 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -17941,6 +17941,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
+ If CODE is 'h', pretend the reg is the 'high' byte register.
+ If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
+ If CODE is 'd', duplicate the operand for AVX instruction.
++ If CODE is 'V', print naked full integer register name without %.
+ */
+
+ void
+@@ -17951,7 +17952,7 @@ print_reg (rtx x, int code, FILE *file)
+ unsigned int regno;
+ bool duplicated = code == 'd' && TARGET_AVX;
+
+- if (ASSEMBLER_DIALECT == ASM_ATT)
++ if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
+ putc ('%', file);
+
+ if (x == pc_rtx)
+@@ -17999,6 +18000,14 @@ print_reg (rtx x, int code, FILE *file)
+ else
+ code = GET_MODE_SIZE (GET_MODE (x));
+
++ if (code == 'V')
++ {
++ if (GENERAL_REGNO_P (regno))
++ code = GET_MODE_SIZE (word_mode);
++ else
++ error ("'V' modifier on non-integer register");
++ }
++
+ /* Irritatingly, AMD extended registers use different naming convention
+ from the normal registers: "r%d[bwd]" */
+ if (REX_INT_REGNO_P (regno))
+@@ -18118,6 +18127,7 @@ print_reg (rtx x, int code, FILE *file)
+ & -- print some in-use local-dynamic symbol name.
+ H -- print a memory address offset by 8; used for sse high-parts
+ Y -- print condition for XOP pcom* instruction.
++ V -- print naked full integer register name without %.
+ + -- print a branch hint as 'cs' or 'ds' prefix
+ ; -- print a semicolon (after prefixes due to bug in older gas).
+ ~ -- print "i" if TARGET_AVX2, "f" otherwise.
+@@ -18342,6 +18352,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
+ case 'X':
+ case 'P':
+ case 'p':
++ case 'V':
+ break;
+
+ case 's':
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+new file mode 100644
+index 0000000..f0cd9b7
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
++
++extern void (*func_p) (void);
++
++void
++foo (void)
++{
++ asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
++}
++
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
+--
+2.7.4
+
diff --git a/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff b/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff
new file mode 100644
index 0000000000..fdaab625ab
--- /dev/null
+++ b/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff
@@ -0,0 +1,275 @@
+From 5d1c53c6fd593de2360c1a2ae44ebf5fa3c5263b Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:22:01 +0000
+Subject: [PATCH 9/9] x86: Disallow -mindirect-branch=/-mfunction-return= with
+ -mcmodel=large
+
+Since the thunk function may not be reachable in large code model,
+-mcmodel=large is incompatible with -mindirect-branch=thunk,
+-mindirect-branch=thunk-extern, -mfunction-return=thunk and
+-mfunction-return=thunk-extern. Issue an error when they are used with
+-mcmodel=large.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
+ -mcmodel=large with -mindirect-branch=thunk,
+ -mindirect-branch=thunk-extern, -mfunction-return=thunk and
+ -mfunction-return=thunk-extern.
+ * doc/invoke.texi: Document -mcmodel=large is incompatible with
+ -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
+ -mfunction-return=thunk and -mfunction-return=thunk-extern.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-10.c: New test.
+ * gcc.target/i386/indirect-thunk-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
+ * gcc.target/i386/ret-thunk-17.c: Likewise.
+ * gcc.target/i386/ret-thunk-18.c: Likewise.
+ * gcc.target/i386/ret-thunk-19.c: Likewise.
+ * gcc.target/i386/ret-thunk-20.c: Likewise.
+ * gcc.target/i386/ret-thunk-21.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256737 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 13 +++++++++++
+ gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
+ gcc/doc/invoke.texi | 11 +++++++++
+ gcc/testsuite/ChangeLog | 17 ++++++++++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
+ .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
+ 15 files changed, 156 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 1bbdd0c..e758387 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -7187,6 +7187,19 @@ ix86_set_indirect_branch_type (tree fndecl)
+ }
+ else
+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
++
++ /* -mcmodel=large is not compatible with -mindirect-branch=thunk
++ nor -mindirect-branch=thunk-extern. */
++ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
++ && ((cfun->machine->indirect_branch_type
++ == indirect_branch_thunk_extern)
++ || (cfun->machine->indirect_branch_type
++ == indirect_branch_thunk)))
++ error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
++ "compatible",
++ ((cfun->machine->indirect_branch_type
++ == indirect_branch_thunk_extern)
++ ? "thunk-extern" : "thunk"));
+ }
+
+ if (cfun->machine->function_return_type == indirect_branch_unset)
+@@ -7212,6 +7225,19 @@ ix86_set_indirect_branch_type (tree fndecl)
+ }
+ else
+ cfun->machine->function_return_type = ix86_function_return;
++
++ /* -mcmodel=large is not compatible with -mfunction-return=thunk
++ nor -mfunction-return=thunk-extern. */
++ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
++ && ((cfun->machine->function_return_type
++ == indirect_branch_thunk_extern)
++ || (cfun->machine->function_return_type
++ == indirect_branch_thunk)))
++ error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
++ "compatible",
++ ((cfun->machine->function_return_type
++ == indirect_branch_thunk_extern)
++ ? "thunk-extern" : "thunk"));
+ }
+ }
+
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+new file mode 100644
+index 0000000..a0674bd
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+new file mode 100644
+index 0000000..7a80a89
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+new file mode 100644
+index 0000000..d4d45c5
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+new file mode 100644
+index 0000000..3a2aead
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk-extern")))
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+new file mode 100644
+index 0000000..8e52f03
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk-inline")))
++void
++bar (void)
++{
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+new file mode 100644
+index 0000000..bdaa4f6
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk")))
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+new file mode 100644
+index 0000000..0605e2c
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+new file mode 100644
+index 0000000..307019d
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+@@ -0,0 +1,8 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+new file mode 100644
+index 0000000..772617f
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+@@ -0,0 +1,8 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++
++__attribute__ ((function_return("thunk")))
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+new file mode 100644
+index 0000000..1e9f9bd
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((function_return("thunk-extern")))
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+new file mode 100644
+index 0000000..eea07f7
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((function_return("thunk-inline")))
++void
++bar (void)
++{
++}
+--
+2.7.4
+
diff --git a/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff b/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff
new file mode 100644
index 0000000000..c107900552
--- /dev/null
+++ b/development/gcc5/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff
@@ -0,0 +1,102 @@
+From 5d1c53c6fd593de2360c1a2ae44ebf5fa3c5263b Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:22:01 +0000
+Subject: [PATCH 9/9] x86: Disallow -mindirect-branch=/-mfunction-return= with
+ -mcmodel=large
+
+Since the thunk function may not be reachable in large code model,
+-mcmodel=large is incompatible with -mindirect-branch=thunk,
+-mindirect-branch=thunk-extern, -mfunction-return=thunk and
+-mfunction-return=thunk-extern. Issue an error when they are used with
+-mcmodel=large.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
+ -mcmodel=large with -mindirect-branch=thunk,
+ -mindirect-branch=thunk-extern, -mfunction-return=thunk and
+ -mfunction-return=thunk-extern.
+ * doc/invoke.texi: Document -mcmodel=large is incompatible with
+ -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
+ -mfunction-return=thunk and -mfunction-return=thunk-extern.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-10.c: New test.
+ * gcc.target/i386/indirect-thunk-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
+ * gcc.target/i386/ret-thunk-17.c: Likewise.
+ * gcc.target/i386/ret-thunk-18.c: Likewise.
+ * gcc.target/i386/ret-thunk-19.c: Likewise.
+ * gcc.target/i386/ret-thunk-20.c: Likewise.
+ * gcc.target/i386/ret-thunk-21.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256737 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 13 +++++++++++
+ gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
+ gcc/doc/invoke.texi | 11 +++++++++
+ gcc/testsuite/ChangeLog | 17 ++++++++++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
+ .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
+ 15 files changed, 156 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 1e572b1..6f3c344 100644
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -25699,6 +25699,11 @@ to external call and return thunk provided in a separate object file.
+ You can control this behavior for a specific function by using the
+ function attribute @code{indirect_branch}. @xref{Function Attributes}.
+
++Note that @option{-mcmodel=large} is incompatible with
++@option{-mindirect-branch=thunk} nor
++@option{-mindirect-branch=thunk-extern} since the thunk function may
++not be reachable in large code model.
++
+ @item -mfunction-return=@var{choice}
+ @opindex -mfunction-return
+ Convert function return with @var{choice}. The default is @samp{keep},
+@@ -25710,6 +25715,12 @@ object file. You can control this behavior for a specific function by
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.
+
++Note that @option{-mcmodel=large} is incompatible with
++@option{-mfunction-return=thunk} nor
++@option{-mfunction-return=thunk-extern} since the thunk function may
++not be reachable in large code model.
++
++
+ @item -mindirect-branch-register
+ @opindex -mindirect-branch-register
+ Force indirect call and jump via register.
diff --git a/development/gcc5/patches/gcc-no_fixincludes.diff b/development/gcc5/patches/gcc-no_fixincludes.diff
new file mode 100644
index 0000000000..52b661613d
--- /dev/null
+++ b/development/gcc5/patches/gcc-no_fixincludes.diff
@@ -0,0 +1,27 @@
+--- ./gcc/Makefile.in.orig 2010-04-02 02:49:06.000000000 -0500
++++ ./gcc/Makefile.in 2010-08-01 16:55:30.088318841 -0500
+@@ -3864,9 +3864,9 @@
+ chmod a+r $${fix_dir}/limits.h; \
+ done
+ # Install the README
+- rm -f include-fixed/README
+- cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
+- chmod a+r include-fixed/README
++# rm -f include-fixed/README
++# cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
++# chmod a+r include-fixed/README
+ $(STAMP) $@
+
+ .PHONY: install-gcc-tooldir
+@@ -3947,10 +3947,7 @@
+ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
+ SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
+ gcc_dir=`${PWD_COMMAND}` ; \
+- export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+- cd $(build_objdir)/fixincludes && \
+- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+- $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
++ export TARGET_MACHINE srcdir SHELL MACRO_LIST ); \
+ rm -f $${fix_dir}/syslimits.h; \
+ if [ -f $${fix_dir}/limits.h ]; then \
+ mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
diff --git a/development/gcc5/patches/gcc.66782.diff b/development/gcc5/patches/gcc.66782.diff
new file mode 100644
index 0000000000..0743f8853b
--- /dev/null
+++ b/development/gcc5/patches/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/development/gcc5/patches/gcc.69140.diff b/development/gcc5/patches/gcc.69140.diff
new file mode 100644
index 0000000000..ace60ebdd0
--- /dev/null
+++ b/development/gcc5/patches/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/development/gcc5/patches/glibc2.28-ustat.diff b/development/gcc5/patches/glibc2.28-ustat.diff
new file mode 100644
index 0000000000..c7d71d0677
--- /dev/null
+++ b/development/gcc5/patches/glibc2.28-ustat.diff
@@ -0,0 +1,31 @@
+--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/04/25 07:39:32 259630
++++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/05/24 20:07:25 260687
+@@ -138,7 +138,6 @@
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -231,7 +230,19 @@
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+- unsigned struct_ustat_sz = sizeof(struct ustat);
++ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
++ // has been removed from glibc 2.28.
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
++ || defined(__x86_64__)
++#define SIZEOF_STRUCT_USTAT 32
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
++ || defined(__powerpc__) || defined(__s390__)
++#define SIZEOF_STRUCT_USTAT 20
++#else
++#error Unknown size of struct ustat
++#endif
++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
+ unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+ unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
diff --git a/development/gcc5/profile.d/gcc5.csh b/development/gcc5/profile.d/gcc5.csh
new file mode 100644
index 0000000000..25f9dc1342
--- /dev/null
+++ b/development/gcc5/profile.d/gcc5.csh
@@ -0,0 +1,7 @@
+setenv CC gcc-5
+setenv CPP cpp-5
+setenv CXX g++-5
+setenv AR gcc-ar-5
+setenv NM gcc-nm-5
+setenv RANLIB gcc-ranlib-5
+
diff --git a/development/gcc5/profile.d/gcc5.sh b/development/gcc5/profile.d/gcc5.sh
new file mode 100644
index 0000000000..7143b5d0e9
--- /dev/null
+++ b/development/gcc5/profile.d/gcc5.sh
@@ -0,0 +1,7 @@
+export CC=gcc-5
+export CPP=cpp-5
+export CXX=g++-5
+export AR=gcc-ar-5
+export NM=gcc-nm-5
+export RANLIB=gcc-ranlib-5
+
diff --git a/development/gcc5/slack-desc.gcc5 b/development/gcc5/slack-desc.gcc5
new file mode 100644
index 0000000000..d9d965846b
--- /dev/null
+++ b/development/gcc5/slack-desc.gcc5
@@ -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------------------------------------------------------|
+gcc5: gcc5 (Co-installable GCC-5 package with C, C++ and Java support)
+gcc5:
+gcc5: GCC is the GNU Compiler Collection.
+gcc5:
+gcc5: This package contains those parts of the compiler collection needed to
+gcc5: compile C and C++ code and programs written in the Java programming
+gcc5: language.@MULTILIB@
+gcc5:
+gcc5: This gcc5 package must be co-installed with Slackware's gcc7 compiler.
+gcc5:
+gcc5:
diff --git a/development/geany-plugins/geany-plugins.SlackBuild b/development/geany-plugins/geany-plugins.SlackBuild
index f83d24874f..ead50f0428 100644
--- a/development/geany-plugins/geany-plugins.SlackBuild
+++ b/development/geany-plugins/geany-plugins.SlackBuild
@@ -26,7 +26,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=geany-plugins
-VERSION=${VERSION:-1.34.0}
+VERSION=${VERSION:-1.36.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -72,10 +72,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-./configure \
+./autogen.sh \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
diff --git a/development/geany-plugins/geany-plugins.info b/development/geany-plugins/geany-plugins.info
index 06c67e8dd8..a1b4ae4ed5 100644
--- a/development/geany-plugins/geany-plugins.info
+++ b/development/geany-plugins/geany-plugins.info
@@ -1,8 +1,8 @@
PRGNAM="geany-plugins"
-VERSION="1.34.0"
+VERSION="1.36.0"
HOMEPAGE="https://plugins.geany.org/"
-DOWNLOAD="https://github.com/geany/geany-plugins/archive/1.34.0/geany-plugins-1.34.0.tar.gz"
-MD5SUM="64a0bfa6d44b4996cf9d33b01e13c6e4"
+DOWNLOAD="https://github.com/geany/geany-plugins/archive/1.36.0/geany-plugins-1.36.0.tar.gz"
+MD5SUM="ef26e47c73a2502a636fccf323ae990a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="geany"
diff --git a/development/geany/geany.SlackBuild b/development/geany/geany.SlackBuild
index a2e1deee07..245e63388b 100644
--- a/development/geany/geany.SlackBuild
+++ b/development/geany/geany.SlackBuild
@@ -31,7 +31,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=geany
-VERSION=${VERSION:-1.34.1}
+VERSION=${VERSION:-1.36.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -90,7 +90,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-static \
- --disable-html-docs \
+ --enable-gtk3 \
--build=$ARCH-slackware-linux
make
diff --git a/development/geany/geany.info b/development/geany/geany.info
index ec46e04d62..cc772da644 100644
--- a/development/geany/geany.info
+++ b/development/geany/geany.info
@@ -1,8 +1,8 @@
PRGNAM="geany"
-VERSION="1.34.1"
+VERSION="1.36.0"
HOMEPAGE="https://www.geany.org/"
-DOWNLOAD="https://github.com/geany/geany/archive/1.34.1/geany-1.34.1.tar.gz"
-MD5SUM="d36ad44844c8721f2ef9b5398260de3b"
+DOWNLOAD="https://github.com/geany/geany/archive/1.36.0/geany-1.36.0.tar.gz"
+MD5SUM="dece8f7b7e8c42c8a6724b10809c6d5c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/gedit/gedit.SlackBuild b/development/gedit/gedit.SlackBuild
index 9ed2ab95c6..264611aaa0 100644
--- a/development/gedit/gedit.SlackBuild
+++ b/development/gedit/gedit.SlackBuild
@@ -70,6 +70,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+export LDFLAGS="-lgmodule-2.0 -lICE"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/development/glade/glade.SlackBuild b/development/glade/glade.SlackBuild
index 1741b2a9cb..5c24535173 100644
--- a/development/glade/glade.SlackBuild
+++ b/development/glade/glade.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=glade
-VERSION=${VERSION:-3.18.3}
+VERSION=${VERSION:-3.22.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/development/glade/glade.info b/development/glade/glade.info
index fff72106e7..d6132c1dfc 100644
--- a/development/glade/glade.info
+++ b/development/glade/glade.info
@@ -1,8 +1,8 @@
PRGNAM="glade"
-VERSION="3.18.3"
+VERSION="3.22.1"
HOMEPAGE="https://glade.gnome.org"
-DOWNLOAD="https://ftp.gnome.org/pub/GNOME/sources/glade/3.18/glade-3.18.3.tar.xz"
-MD5SUM="6852d6286683728e0ea40ca9b5d2416f"
+DOWNLOAD="https://ftp.gnome.org/pub/GNOME/sources/glade/3.22/glade-3.22.1.tar.xz"
+MD5SUM="226802cf3b06861240524805aa6fe6ff"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/gnats/gnats.SlackBuild b/development/gnats/gnats.SlackBuild
index da9575aaa1..18ca2b30d7 100644
--- a/development/gnats/gnats.SlackBuild
+++ b/development/gnats/gnats.SlackBuild
@@ -69,7 +69,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -Wno-error=pointer-compare -Wno-error=implicit-fallthrough=" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/development/gnuradio/boost-1.70.0.patch b/development/gnuradio/boost-1.70.0.patch
new file mode 100644
index 0000000000..6d46598525
--- /dev/null
+++ b/development/gnuradio/boost-1.70.0.patch
@@ -0,0 +1,36 @@
+From c01473bf00b73ba1dd72813fbc4c4c5d0f66d339 Mon Sep 17 00:00:00 2001
+From: Michael Dickens <michael.dickens@ettus.com>
+Date: Thu, 23 May 2019 10:26:00 -0400
+Subject: [PATCH] blocks: simple fix for Boost 1.70.0 in socket_pdu
+
+NOTE: There have been multiple fixes proposed, such as
+https://github.com/gnuradio/gnuradio/pull/2451 .
+This one is the simplest and most compatible.
+---
+ gr-blocks/lib/socket_pdu_impl.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc
+index e20f1478f0..168d74ebb2 100644
+--- a/gr-blocks/lib/socket_pdu_impl.cc
++++ b/gr-blocks/lib/socket_pdu_impl.cc
+@@ -1,6 +1,6 @@
+ /* -*- c++ -*- */
+ /*
+- * Copyright 2013 Free Software Foundation, Inc.
++ * Copyright 2013,2019 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+@@ -165,7 +165,11 @@ namespace gr {
+ void
+ socket_pdu_impl::start_tcp_accept()
+ {
++#if (BOOST_VERSION >= 107000)
++ tcp_connection::sptr new_connection = tcp_connection::make(d_io_service, d_rxbuf.size(), d_tcp_no_delay);
++#else
+ tcp_connection::sptr new_connection = tcp_connection::make(d_acceptor_tcp->get_io_service(), d_rxbuf.size(), d_tcp_no_delay);
++#endif
+
+ d_acceptor_tcp->async_accept(new_connection->socket(),
+ boost::bind(&socket_pdu_impl::handle_tcp_accept, this,
diff --git a/development/gnuradio/gnuradio.SlackBuild b/development/gnuradio/gnuradio.SlackBuild
index 0c395d8a07..8b42897f6f 100644
--- a/development/gnuradio/gnuradio.SlackBuild
+++ b/development/gnuradio/gnuradio.SlackBuild
@@ -73,6 +73,8 @@ find -L . \
# install docs in the right place
sed -i "s|\${GR_DATA_DIR}/doc|doc|" CMakeLists.txt
+patch -p1 < $CWD/boost-1.70.0.patch
+
mkdir -p build
cd build
cmake \
diff --git a/development/gpsim/gpsim.SlackBuild b/development/gpsim/gpsim.SlackBuild
index 787ddc0e29..25822ab265 100644
--- a/development/gpsim/gpsim.SlackBuild
+++ b/development/gpsim/gpsim.SlackBuild
@@ -70,7 +70,7 @@ find -L . \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -fpermissive" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/development/gr-osmosdr/gr-osmosdr.SlackBuild b/development/gr-osmosdr/gr-osmosdr.SlackBuild
index 8ec9fc13df..4643d36347 100644
--- a/development/gr-osmosdr/gr-osmosdr.SlackBuild
+++ b/development/gr-osmosdr/gr-osmosdr.SlackBuild
@@ -70,6 +70,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+sed -i "s|gr_osmosdr_libs}|gr_osmosdr_libs} -lboost_chrono|" lib/CMakeLists.txt
+
mkdir -p build
cd build
cmake \
diff --git a/development/gsoap/gsoap-libtool.patch b/development/gsoap/gsoap-libtool.patch
index 87a9fcefdf..d87defacb8 100644
--- a/development/gsoap/gsoap-libtool.patch
+++ b/development/gsoap/gsoap-libtool.patch
@@ -1,6 +1,6 @@
diff -ur gsoap-2.8.orig/configure.ac gsoap-2.8/configure.ac
---- gsoap-2.8.orig/configure.ac 2015-11-10 18:52:20.000000000 +0100
-+++ gsoap-2.8/configure.ac 2015-11-22 09:28:38.711054796 +0100
+--- gsoap-2.8.orig/configure.ac 2017-10-26 14:01:08.000000000 +0200
++++ gsoap-2.8/configure.ac 2017-12-03 15:29:52.878661826 +0100
@@ -16,8 +16,7 @@
AM_PROG_LEX
AC_PROG_YACC
@@ -11,7 +11,7 @@ diff -ur gsoap-2.8.orig/configure.ac gsoap-2.8/configure.ac
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_INSTALL
-@@ -236,16 +235,16 @@
+@@ -259,15 +258,15 @@
WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} -lgnutls -lgcrypt -lgpg-error -lz"
SAMPLE_INCLUDES=
SAMPLE_SSL_LIBS="-lgnutls -lgcrypt -lgpg-error -lz"
@@ -20,76 +20,75 @@ diff -ur gsoap-2.8.orig/configure.ac gsoap-2.8/configure.ac
else
AC_MSG_RESULT(no)
WSDL2H_EXTRA_FLAGS="-DWITH_OPENSSL -DWITH_GZIP"
- # an ugly hack to get httpda and smdevp plugins to conditionally
# compile with wsdl2h when OPENSSL is available
-- WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lssl -lcrypto -lz"
-+ WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} ../plugin/httpda.c ../plugin/smdevp.c ../plugin/threads.c -lcrypto"
+- WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} -lssl -lcrypto -lz"
++ WSDL2H_EXTRA_LIBS="${WSDL2H_EXTRA_LIBS} -lcrypto"
SAMPLE_INCLUDES=
SAMPLE_SSL_LIBS="-lssl -lcrypto -lz"
- WSDL2H_SOAP_CPP_LIB="libgsoapssl++.a"
+ WSDL2H_SOAP_CPP_LIB="libgsoapssl++.la"
fi
- if test -n "$OPENSSL"; then
- WSDL2H_EXTRA_FLAGS="-I${OPENSSL}/include ${WSDL2H_EXTRA_FLAGS}"
-@@ -258,7 +257,7 @@
+ if test -n "$ZLIB"; then
+ WSDL2H_EXTRA_FLAGS="-I${ZLIB}/include ${WSDL2H_EXTRA_FLAGS}"
+@@ -286,7 +285,7 @@
WSDL2H_EXTRA_FLAGS=
SAMPLE_SSL_LIBS=
SAMPLE_INCLUDES=
- WSDL2H_SOAP_CPP_LIB="libgsoap++.a"
+ WSDL2H_SOAP_CPP_LIB="libgsoap++.la"
fi
- AC_SUBST(WSDL2H_EXTRA_FLAGS)
- AC_SUBST(WSDL2H_EXTRA_LIBS)
+ AM_CONDITIONAL(WITH_OPENSSL, test "x$with_openssl" = "xyes" -a "x$with_gnutls" != "xyes")
+ AC_SUBST(WITH_OPENSSL)
diff -ur gsoap-2.8.orig/gsoap/Makefile.am gsoap-2.8/gsoap/Makefile.am
---- gsoap-2.8.orig/gsoap/Makefile.am 2015-11-10 18:52:22.000000000 +0100
-+++ gsoap-2.8/gsoap/Makefile.am 2015-11-22 09:24:43.198046409 +0100
+--- gsoap-2.8.orig/gsoap/Makefile.am 2017-10-26 14:01:08.000000000 +0200
++++ gsoap-2.8/gsoap/Makefile.am 2017-12-03 15:34:29.556641119 +0100
@@ -34,20 +34,30 @@
dom_cpp.cpp: dom.cpp
- $(LN_S) -f $(srcdir)/dom.cpp dom_cpp.cpp
+ $(LN_S) -f $(top_srcdir)/gsoap/dom.cpp dom_cpp.cpp
-lib_LIBRARIES = libgsoap.a libgsoap++.a libgsoapck.a libgsoapck++.a libgsoapssl.a libgsoapssl++.a
+lib_LTLIBRARIES = libgsoap.la libgsoap++.la libgsoapck.la libgsoapck++.la libgsoapssl.la libgsoapssl++.la
-libgsoap_a_SOURCES = stdsoap2.c dom.c
--libgsoap_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform)
+-libgsoap_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform)
-libgsoap___a_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp
--libgsoap___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform)
+-libgsoap___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform)
-libgsoapck_a_SOURCES = stdsoap2_ck.c dom.c
--libgsoapck_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
+-libgsoapck_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
-libgsoapck___a_SOURCES = stdsoap2_ck_cpp.cpp dom_cpp.cpp
--libgsoapck___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
+-libgsoapck___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
-libgsoapssl_a_SOURCES = stdsoap2_ssl.c dom.c
--libgsoapssl_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
+-libgsoapssl_a_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
-libgsoapssl___a_SOURCES = stdsoap2_ssl_cpp.cpp dom_cpp.cpp
--libgsoapssl___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
+-libgsoapssl___a_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
+SOVERSION = 0
+
+libgsoap_la_SOURCES = stdsoap2.c dom.c
-+libgsoap_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform)
++libgsoap_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform)
+libgsoap_la_LDFLAGS = -version-info $(SOVERSION)
+libgsoap___la_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp
-+libgsoap___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform)
++libgsoap___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform)
+libgsoap___la_LDFLAGS = -version-info $(SOVERSION)
+libgsoapck_la_SOURCES = stdsoap2_ck.c dom.c
-+libgsoapck_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
++libgsoapck_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
+libgsoapck_la_LDFLAGS = -version-info $(SOVERSION)
+libgsoapck___la_SOURCES = stdsoap2_ck_cpp.cpp dom_cpp.cpp
-+libgsoapck___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
++libgsoapck___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) -DWITH_COOKIES
+libgsoapck___la_LDFLAGS = -version-info $(SOVERSION)
+libgsoapssl_la_SOURCES = stdsoap2_ssl.c dom.c
-+libgsoapssl_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
++libgsoapssl_la_CFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
+libgsoapssl_la_LDFLAGS = -version-info $(SOVERSION)
+libgsoapssl_la_LIBADD = -lssl -lcrypto -lz
+libgsoapssl___la_SOURCES = stdsoap2_ssl_cpp.cpp dom_cpp.cpp
-+libgsoapssl___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
++libgsoapssl___la_CXXFLAGS = $(SOAPCPP2_DEBUG) $(SOAPCPP2_NONAMESPACES) $(SOAPCPP2_NO_C_LOCALE) $(SOAPCPP2_IPV6) -D$(platform) $(WSDL2H_EXTRA_FLAGS) -DWITH_DOM -DWITH_COOKIES
+libgsoapssl___la_LDFLAGS = -version-info $(SOVERSION)
+libgsoapssl___la_LIBADD = -lssl -lcrypto -lz
- BUILT_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp $(lib_LIBRARIES)
+ BUILT_SOURCES = stdsoap2_cpp.cpp dom_cpp.cpp stdsoap2_ck.c stdsoap2_ck_cpp.cpp stdsoap2_ssl.c stdsoap2_ssl_cpp.cpp
diff -ur gsoap-2.8.orig/gsoap/samples/Makefile.defines gsoap-2.8/gsoap/samples/Makefile.defines
---- gsoap-2.8.orig/gsoap/samples/Makefile.defines 2015-11-10 18:52:26.000000000 +0100
-+++ gsoap-2.8/gsoap/samples/Makefile.defines 2015-11-22 09:22:54.369042534 +0100
+--- gsoap-2.8.orig/gsoap/samples/Makefile.defines 2017-10-26 14:01:10.000000000 +0200
++++ gsoap-2.8/gsoap/samples/Makefile.defines 2017-12-03 15:35:07.477638281 +0100
@@ -13,13 +13,13 @@
SOAP_C_CORE=soapC.c
SOAP_C_CLIENT=soapClient.c $(SOAP_C_CORE)
@@ -111,11 +110,11 @@ diff -ur gsoap-2.8.orig/gsoap/samples/Makefile.defines gsoap-2.8/gsoap/samples/M
+SOAP_CPP_LIB_CK=$(top_builddir)/gsoap/libgsoapck++.la
+SOAP_CPP_LIB_SSL=$(top_builddir)/gsoap/libgsoapssl++.la
diff -ur gsoap-2.8.orig/gsoap/samples/autotest/Makefile.am gsoap-2.8/gsoap/samples/autotest/Makefile.am
---- gsoap-2.8.orig/gsoap/samples/autotest/Makefile.am 2015-11-10 18:52:26.000000000 +0100
-+++ gsoap-2.8/gsoap/samples/autotest/Makefile.am 2015-11-22 09:22:54.368042534 +0100
+--- gsoap-2.8.orig/gsoap/samples/autotest/Makefile.am 2017-10-26 14:01:10.000000000 +0200
++++ gsoap-2.8/gsoap/samples/autotest/Makefile.am 2017-12-03 15:35:30.202636580 +0100
@@ -14,7 +14,7 @@
- WSDLINPUT=$(srcdir)/examples.wsdl
- SOAPHEADER=$(srcdir)/examples.h
+ WSDLINPUT=$(top_srcdir)/gsoap/samples/autotest/examples.wsdl
+ SOAPHEADER=$(top_srcdir)/gsoap/samples/autotest/examples.h
SOAP_CPP_SRC=soapC.cpp soapServer.cpp
-SOAP_CPP_LIB=$(top_builddir)/gsoap/libgsoap++.a
+SOAP_CPP_LIB=$(top_builddir)/gsoap/libgsoap++.la
@@ -123,11 +122,11 @@ diff -ur gsoap-2.8.orig/gsoap/samples/autotest/Makefile.am gsoap-2.8/gsoap/sampl
$(SOAP_CPP_SRC) : $(WSDLINPUT)
$(WSDL) $(WSDL_FLAGS) $(WSDLINPUT)
diff -ur gsoap-2.8.orig/gsoap/samples/databinding/Makefile.am gsoap-2.8/gsoap/samples/databinding/Makefile.am
---- gsoap-2.8.orig/gsoap/samples/databinding/Makefile.am 2015-11-10 18:52:26.000000000 +0100
-+++ gsoap-2.8/gsoap/samples/databinding/Makefile.am 2015-11-22 09:22:54.368042534 +0100
+--- gsoap-2.8.orig/gsoap/samples/databinding/Makefile.am 2017-10-26 14:01:10.000000000 +0200
++++ gsoap-2.8/gsoap/samples/databinding/Makefile.am 2017-12-03 15:35:50.071635093 +0100
@@ -14,7 +14,7 @@
- WSDLINPUT=$(srcdir)/address.xsd
- SOAPHEADER=$(srcdir)/address.h
+ WSDLINPUT=$(top_srcdir)/gsoap/samples/databinding/address.xsd
+ SOAPHEADER=$(top_srcdir)/gsoap/samples/databinding/address.h
SOAP_CPP_SRC=addressC.cpp
-SOAP_CPP_LIB=$(top_builddir)/gsoap/libgsoap++.a
+SOAP_CPP_LIB=$(top_builddir)/gsoap/libgsoap++.la
diff --git a/development/gsoap/gsoap.SlackBuild b/development/gsoap/gsoap.SlackBuild
index a92cd16d6a..58e9a2532b 100644
--- a/development/gsoap/gsoap.SlackBuild
+++ b/development/gsoap/gsoap.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for gsoap
-# Copyright 2009-2017 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2009-2018 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gsoap
-VERSION=${VERSION:-2.8.46}
+VERSION=${VERSION:-2.8.59}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/development/gsoap/gsoap.info b/development/gsoap/gsoap.info
index 1f3e52d4cd..8e3c8ca5d4 100644
--- a/development/gsoap/gsoap.info
+++ b/development/gsoap/gsoap.info
@@ -1,8 +1,8 @@
PRGNAM="gsoap"
-VERSION="2.8.46"
+VERSION="2.8.59"
HOMEPAGE="http://gsoap2.sourceforge.net/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/gsoap_2.8.46.zip"
-MD5SUM="e7ff6c940730371dcb90079ca56a8551"
+DOWNLOAD="http://downloads.sourceforge.net/gsoap2/gsoap_2.8.59.zip"
+MD5SUM="af00304f7c9345ce83b32d45e7e601b1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/guile2.2/README b/development/guile2.2/README
new file mode 100644
index 0000000000..51a9d3e5b0
--- /dev/null
+++ b/development/guile2.2/README
@@ -0,0 +1,10 @@
+Guile is the GNU Ubiquitous Intelligent Language for Extensions.
+
+Guile is an interpreter for Scheme, packaged as a library that you
+can link into your applications to give them their own scripting
+language. Guile will eventually support other languages as well,
+giving users of Guile-based applications a choice of languages.
+
+This is Guile 2.2 (legacy version) needed by some packages in SBo.
+
+This package can be installed alongside with Slackware's Guile
diff --git a/development/SDL2_gfx/SDL2_gfx.SlackBuild b/development/guile2.2/guile2.2.SlackBuild
index cdf7a8fb56..2774bd1d86 100644
--- a/development/SDL2_gfx/SDL2_gfx.SlackBuild
+++ b/development/guile2.2/guile2.2.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for SDL2_gfx
+# Slackware build script for guile2.2
-# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece
+# Copyright 2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,7 +11,7 @@
# 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
+# 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,
@@ -22,8 +22,9 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRGNAM=SDL2_gfx
-VERSION=${VERSION:-1.0.4}
+PRGNAM=guile2.2
+SRCNAM=guile
+VERSION=${VERSION:-2.2.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -59,9 +60,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -69,31 +70,69 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./autogen.sh
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
+ --infodir=/usr/info \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --program-suffix=2.2 \
+ --with-threads \
+ --disable-error-on-warning \
--disable-static \
+ --disable-rpath \
--build=$ARCH-slackware-linux
-make
+make -j1
make install DESTDIR=$PKG
+# 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
+
+# Change timestamps on *.go and *.scm files, otherwise on multilib systems
+# the compiled (go) files may be detected as older than the source (scm)
+# files, causing guile to attempt to recompile itself with every use:
+find $PKG/usr/lib${LIBDIRSUFFIX} -name "*.go" -exec touch -r $CWD/guile.SlackBuild "{}" \;
+find $PKG/usr/share -name "*.scm" -exec touch -r $CWD/guile.SlackBuild "{}" \;
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Compress info files
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ # rename it so that it will not overwrite Slackware's guile 3.0 package
+ for i in {1..10}
+ do
+ mv guile.info-$i.gz guile2.2.info-$i.gz
+ done
+ mv guile.info.gz guile2.2.info.gz
+ mv r5rs.info.gz r5rs2.2.info.gz
+ )
+fi
+
+# Avoid duplicate with Slackware's guile.m4
+# It can detect newer and older versions of guile installed on system
+mv $PKG/usr/share/aclocal/guile.m4 $PKG/usr/share/aclocal/guile22.m4
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING* GUILE-VERSION HACKING INSTALL LICENSE NEWS README* THANKS \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Fix guile-config2.2 info
+sed -i '1s/guile/guile2.2/' -i $PKG/usr/bin/guile-config2.2
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/development/guile2.2/guile2.2.info b/development/guile2.2/guile2.2.info
new file mode 100644
index 0000000000..3f1c79c884
--- /dev/null
+++ b/development/guile2.2/guile2.2.info
@@ -0,0 +1,10 @@
+PRGNAM="guile2.2"
+VERSION="2.2.6"
+HOMEPAGE="https://www.gnu.org/software/guile"
+DOWNLOAD="ftp://ftp.gnu.org/gnu/guile/guile-2.2.6.tar.xz"
+MD5SUM="e946a685e782685f6ebb97026131a315"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Matteo Bernardini"
+EMAIL="ponce@slackbuilds.org"
diff --git a/development/guile2.2/slack-desc b/development/guile2.2/slack-desc
new file mode 100644
index 0000000000..5a799c15c1
--- /dev/null
+++ b/development/guile2.2/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------------------------------------------------------|
+guile2.2: guile2.2 (GNU's extension language library)
+guile2.2:
+guile2.2: Guile is the GNU Ubiquitous Intelligent Language for Extensions.
+guile2.2: Guile is an interpreter for Scheme, packaged as a library that you
+guile2.2: can link into your applications to give them their own scripting
+guile2.2: language. Guile will eventually support other languages as well,
+guile2.2: giving users of Guile-based applications a choice of languages.
+guile2.2:
+guile2.2: This is Guile 2.2 (legacy version) needed by some packages in SBo.
+guile2.2:
+guile2.2:
diff --git a/development/hte/hte.SlackBuild b/development/hte/hte.SlackBuild
index 97058415df..519c03db13 100644
--- a/development/hte/hte.SlackBuild
+++ b/development/hte/hte.SlackBuild
@@ -24,13 +24,13 @@
SRCNAM=ht
PRGNAM=hte
-VERSION=${VERSION:-2.0.18}
+VERSION=${VERSION:-2.1.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
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 @@ TMP=${TMP:-/tmp/SBo}
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"
@@ -61,14 +61,20 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.*z?
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z*
cd $SRCNAM-$VERSION
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 {} \;
+ \( -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 {} \;
+
+# Thanks gentoo!
+patch -p1 < $CWD/hteditor-2.1.0-gcc-7.patch
+
+# Respect our CFLAGS
+sed -i "s|-O3 -fomit-frame-pointer -Wall -fsigned-char|$SLKCFLAGS|" configure
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
diff --git a/development/hte/hte.info b/development/hte/hte.info
index e12fb4f8eb..1a2a2cd461 100644
--- a/development/hte/hte.info
+++ b/development/hte/hte.info
@@ -1,8 +1,8 @@
PRGNAM="hte"
-VERSION="2.0.18"
+VERSION="2.1.0"
HOMEPAGE="http://hte.sourceforge.net/"
-DOWNLOAD="http://downloads.sourceforge.net/hte/ht-2.0.18.tar.bz2"
-MD5SUM="9cd5c52bb3fbae5c631875cd0de3318c"
+DOWNLOAD="https://downloads.sf.net/hte/ht-2.1.0.tar.bz2"
+MD5SUM="09b2a4461d75e9cd03af1cd67fadc1ec"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/hte/hteditor-2.1.0-gcc-7.patch b/development/hte/hteditor-2.1.0-gcc-7.patch
new file mode 100644
index 0000000000..ebcc3c0aa4
--- /dev/null
+++ b/development/hte/hteditor-2.1.0-gcc-7.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/show_bug.cgi?id=620732
+
+Fixes build failure on gcc-7:
+
+ htapp.cc: In function 'uint isqr(uint)':
+ htapp.cc:3026:18: error: call of overloaded 'abs(uint)' is ambiguous
+ while (abs(a - b) > 1) {
+ ^
+
+Picked upstream patch that fixes it:
+
+commit 3b62f2f7e49e024ec9d3c5ffc8ff9cd87a107af6
+Author: Sebastian Biallas <sb@biallas.net>
+Date: Sun Nov 13 15:25:26 2016 +0100
+
+ use unsigned variables
+
+diff --git a/htapp.cc b/htapp.cc
+index 53d8725..03236e2 100644
+--- a/htapp.cc
++++ b/htapp.cc
+@@ -3021,8 +3021,8 @@ void do_modal_resize()
+
+ static uint isqr(uint u)
+ {
+- uint a = 2;
+- uint b = u/a;
++ int a = 2;
++ int b = u/a;
+ while (abs(a - b) > 1) {
+ a = (a+b)/2;
+ b = u/a;
diff --git a/development/icecream/README b/development/icecream/README
deleted file mode 100644
index 50daacb2d4..0000000000
--- a/development/icecream/README
+++ /dev/null
@@ -1,12 +0,0 @@
-Icecream is a distributed compile system. It allows parallel compiling by
-distributing the compile jobs to several nodes of a compile network running the
-icecc daemon. The icecc scheduler routes the jobs and provides status and
-statistics information to the icecc monitor. Each compile node can accept one
-or more compile jobs depending on the number of processors and the settings of
-the daemon. Link jobs and other jobs which cannot be distributed are executed
-locally on the node where the compilation is started.
-Note that upon installation of the resulting package, all your software
-will be compiled by icecream by default.
-
-For information on how to use icecream in combination with ccache see
-https://github.com/icecc/icecream#how-to-combine-icecream-with-ccache
diff --git a/development/icecream/doinst.sh b/development/icecream/doinst.sh
deleted file mode 100644
index 9685b60dea..0000000000
--- a/development/icecream/doinst.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-config() {
- NEW="$1"
- OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
- if [ ! -r $OLD ]; then
- mv $NEW $OLD
- elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
- rm $NEW
- fi
- # Otherwise, we leave the .new copy for the admin to consider...
-}
-
-# Keep same perms on rc.iceccd.new:
-if [ -e etc/rc.d/rc.iceccd ]; then
- cp -a etc/rc.d/rc.iceccd etc/rc.d/rc.iceccd.new.incoming
- cat etc/rc.d/rc.iceccd.new > etc/rc.d/rc.iceccd.new.incoming
- mv etc/rc.d/rc.iceccd.new.incoming etc/rc.d/rc.iceccd.new
-fi
-
-# Keep same perms on rc.icecc-scheduler.new:
-if [ -e etc/rc.d/rc.icecc-scheduler ]; then
- cp -a etc/rc.d/rc.icecc-scheduler etc/rc.d/rc.icecc-scheduler.new.incoming
- cat etc/rc.d/rc.icecc-scheduler.new > etc/rc.d/rc.icecc-scheduler.new.incoming
- mv etc/rc.d/rc.icecc-scheduler.new.incoming etc/rc.d/rc.icecc-scheduler.new
-fi
-
-config etc/rc.d/rc.iceccd.new
-config etc/rc.d/rc.icecream.conf.new
-config etc/rc.d/rc.icecc-scheduler.new
-
diff --git a/development/icecream/icecream.SlackBuild b/development/icecream/icecream.SlackBuild
deleted file mode 100644
index 4afe8dabd3..0000000000
--- a/development/icecream/icecream.SlackBuild
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for icecream
-
-# Copyright 2009-2018 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.
-
-PRGNAM=icecream
-VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-if ! grep ^icecream: /etc/group 2>&1 > /dev/null; then
- echo " Must have a icecream group to run this script."
- echo " # groupadd -g 283 icecream"
- echo " Or something similar."
- exit 1
-elif ! grep ^icecream: /etc/passwd 2>&1 > /dev/null; then
- echo " Must have a icecream user to run this script."
- echo " # useradd -u 283 -g icecream -d /var/cache/icecream icecream"
- echo " Or something similar."
- exit 1
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-./autogen.sh
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --enable-clang-rewrite-includes \
- --enable-clang-wrappers \
- --enable-shared \
- --disable-static \
- --build=$ARCH-slackware-linux
-
-make
-make install-strip DESTDIR=$PKG
-
-mkdir -p $PKG/etc/profile.d/
-cp $CWD/profile.d/* $PKG/etc/profile.d/
-chmod 0755 $PKG/etc/profile.d/*
-
-# Install init script
-mkdir -p $PKG/etc/rc.d
-install -m 0755 $CWD/rc.iceccd $PKG/etc/rc.d/rc.iceccd.new
-install -m 0755 $CWD/rc.icecc-scheduler $PKG/etc/rc.d/rc.icecc-scheduler.new
-install -m 0644 $CWD/rc.icecream.conf $PKG/etc/rc.d/rc.icecream.conf.new
-
-for i in $ARCH-slackware-linux-c++ $ARCH-slackware-linux-g++ \
- $ARCH-slackware-linux-gcc $ARCH-slackware-linux-clang \
- $ARCH-slackware-linux-clang++; do
- ln -s /usr/bin/icecc $PKG/usr/libexec/icecc/bin/$i
-done
-
-mkdir -p $PKG/var/{cache,log}/icecream
-chown icecream:icecream $PKG/var/{cache,log}/icecream
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a COPYING NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/icecream/icecream.info b/development/icecream/icecream.info
deleted file mode 100644
index 430743d46a..0000000000
--- a/development/icecream/icecream.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="icecream"
-VERSION="1.1"
-HOMEPAGE="https://github.com/icecc/icecream"
-DOWNLOAD="https://github.com/icecc/icecream/archive/1.1/icecream-1.1.tar.gz"
-MD5SUM="bd33e21fa25ccedeb5c94be9c6f034e1"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Heinz Wiesinger"
-EMAIL="pprkut@liwjatan.at"
diff --git a/development/icecream/profile.d/icecream.csh b/development/icecream/profile.d/icecream.csh
deleted file mode 100644
index 386d9242a8..0000000000
--- a/development/icecream/profile.d/icecream.csh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/csh
-setenv PATH /usr/libexec/icecc/bin:${PATH}
diff --git a/development/icecream/profile.d/icecream.sh b/development/icecream/profile.d/icecream.sh
deleted file mode 100644
index c0c3d179ee..0000000000
--- a/development/icecream/profile.d/icecream.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-export PATH=/usr/libexec/icecc/bin:$PATH
diff --git a/development/icecream/rc.icecc-scheduler b/development/icecream/rc.icecc-scheduler
deleted file mode 100644
index 633661bebe..0000000000
--- a/development/icecream/rc.icecc-scheduler
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-# Start/stop/restart scheduler.
-# $Id: rc.scheduler,v 1.0 2009/04/18
-# Author: Heinz Wiesinger <pprkut@liwjatan.at>
-# ---------------------------------------------------------------------------
-
-PID=$(/sbin/pidof -o %PPID icecc-scheduler)
-
-# Get the configuration information from /etc/rc.d/rc.icecream.conf:
-. /etc/rc.d/rc.icecream.conf
-
-# Start scheduler:
-scheduler_start() {
- if [ -n "$PID" ]; then
- echo "Distributed compiler scheduler already running"
- exit
- fi
- if [ -x /usr/sbin/icecc-scheduler ]; then
- echo "Starting distributed compiler scheduler: /usr/sbin/icecc-scheduler "
- /usr/sbin/icecc-scheduler -n $NETWORK -d -u icecream \
- -l /var/log/icecream/icecc-scheduler.log
- fi
-}
-
-# Stop scheduler:
-scheduler_stop() {
- echo "Stopping distributed compiler scheduler"
- killall icecc-scheduler 1> /dev/null 2> /dev/null
-}
-
-# Restart scheduler:
-scheduler_restart() {
- scheduler_stop
- sleep 1
- scheduler_start
-}
-
-case "$1" in
-'start')
- scheduler_start
- ;;
-'stop')
- scheduler_stop
- ;;
-'restart')
- scheduler_restart
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac
diff --git a/development/icecream/rc.iceccd b/development/icecream/rc.iceccd
deleted file mode 100644
index 776de18a15..0000000000
--- a/development/icecream/rc.iceccd
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-# Start/stop/restart iceccd.
-# $Id: rc.iceccd,v 1.0 2009/04/18
-# Author: Heinz Wiesinger <pprkut@liwjatan.at>
-# ---------------------------------------------------------------------------
-
-PID=$(/sbin/pidof -o %PPID iceccd)
-
-# Get the configuration information from /etc/rc.d/rc.icecream.conf:
-. /etc/rc.d/rc.icecream.conf
-
-# Start iceccd:
-iceccd_start() {
- if [ -n "$PID" ]; then
- echo "Distributed compiler daemon already running"
- exit
- fi
- if [ -x /usr/sbin/iceccd ]; then
- echo "Starting distributed compiler daemon: /usr/sbin/iceccd "
- /usr/sbin/iceccd -n $NETWORK -d -u icecream \
- -l /var/log/icecream/iceccd.log
- fi
-}
-
-# Stop iceccd:
-iceccd_stop() {
- echo "Stopping distributed compiler daemon"
- killall iceccd 1> /dev/null 2> /dev/null
-}
-
-# Restart iceccd:
-iceccd_restart() {
- iceccd_stop
- sleep 1
- iceccd_start
-}
-
-case "$1" in
-'start')
- iceccd_start
- ;;
-'stop')
- iceccd_stop
- ;;
-'restart')
- iceccd_restart
- ;;
-*)
- echo "usage $0 start|stop|restart"
-esac
diff --git a/development/icecream/rc.icecream.conf b/development/icecream/rc.icecream.conf
deleted file mode 100644
index f422fde174..0000000000
--- a/development/icecream/rc.icecream.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/rc.d/rc.icecream.conf
-#
-# This file contains the configuration settings for both iceccd and scheduler
-
-# Defines the network name used to determine which nodes can be used for
-# the compile processes. That way you can have several icecream clusters
-# in the same network
-NETWORK=$(hostname -d)
diff --git a/development/icecream/slack-desc b/development/icecream/slack-desc
deleted file mode 100644
index a435b5c2cd..0000000000
--- a/development/icecream/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-icecream: icecream (network-distributed compilation)
-icecream:
-icecream: Icecream is a distributed compile system. It allows parallel
-icecream: compiling by distributing the compile jobs to several nodes of a
-icecream: compile network running the statistics information to the icecc
-icecream: monitor. Each compile node can accept one or more compile jobs
-icecream: depending on the number of processors and the settings of icecc
-icecream: daemon. The icecc scheduler routes the jobs and provides status
-icecream: and the daemon. Link jobs and other jobs which cannot be
-icecream: distributed are executed locally on the node where the compilation
-icecream: is started.
diff --git a/development/jdk/profile.d/jdk.csh b/development/jdk/profile.d/jdk.csh
index 3a1ec7be8b..24580311a3 100644
--- a/development/jdk/profile.d/jdk.csh
+++ b/development/jdk/profile.d/jdk.csh
@@ -1,4 +1,3 @@
#!/bin/csh
setenv JAVA_HOME /usr/lib/java
-setenv MANPATH ${MANPATH}:${JAVA_HOME}/man
setenv PATH ${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin
diff --git a/development/jdk/profile.d/jdk.sh b/development/jdk/profile.d/jdk.sh
index ed0bc73d4d..66815e299f 100644
--- a/development/jdk/profile.d/jdk.sh
+++ b/development/jdk/profile.d/jdk.sh
@@ -1,4 +1,3 @@
#!/bin/sh
export JAVA_HOME=/usr/lib/java
-export MANPATH="${MANPATH}:${JAVA_HOME}/man"
export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
diff --git a/development/latrace/fix-scanner-config-for-flex-2.6.x.patch b/development/latrace/fix-scanner-config-for-flex-2.6.x.patch
new file mode 100644
index 0000000000..301f4c5a96
--- /dev/null
+++ b/development/latrace/fix-scanner-config-for-flex-2.6.x.patch
@@ -0,0 +1,23 @@
+--- src/config-flex.l.orig 2011-07-25 07:18:18.000000000 -0400
++++ src/config-flex.l 2017-07-02 13:52:20.048382500 -0400
+@@ -106,19 +106,17 @@ OPTIONS { BEGIN(options); return OPTI
+ <options>"\n" { NEW_LINE(); }
+ <options>. { ; }
+
+ %%
+
+-#ifndef yywrap
+-int yywrap()
++int lt_config_wrap()
+ {
+ return 1;
+ /* XXX not to get the compiler 'not used' warning */
+ yyunput(0, NULL);
+ input();
+ }
+-#endif
+
+ void lt_config_error(const char *m)
+ {
+ printf("conf file [%s] line %d: %s\n",
+ lt_inc_stack(lt_config_sinc)->file,
diff --git a/development/latrace/latrace.SlackBuild b/development/latrace/latrace.SlackBuild
index 899601c4e5..bf2208d214 100644
--- a/development/latrace/latrace.SlackBuild
+++ b/development/latrace/latrace.SlackBuild
@@ -54,6 +54,9 @@ find -L . \
-type d -exec chmod 0755 {} \; -o \
-type f -exec chmod u+rw,go+r-w,a-s {} \;
+# Thanks archlinux!
+patch -p0 < $CWD/fix-scanner-config-for-flex-2.6.x.patch
+
autoconf
CFLAGS="$SLKCFLAGS" \
diff --git a/development/lmdb/README b/development/lmdb/README
deleted file mode 100644
index 9e2c8df0ff..0000000000
--- a/development/lmdb/README
+++ /dev/null
@@ -1,2 +0,0 @@
-LMDB is an ultra-fast, ultra-compact key-value embedded data store
-developed by Symas for the OpenLDAP Project.
diff --git a/development/lmdb/lmdb.SlackBuild b/development/lmdb/lmdb.SlackBuild
deleted file mode 100644
index b7c2e3e2fb..0000000000
--- a/development/lmdb/lmdb.SlackBuild
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for LMDB
-
-# Copyright 2015 Jack Hunt, United Kingdom
-# 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.
-
-PRGNAM=lmdb
-VERSION=${VERSION:-0.9.14}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
-cd liblmdb
-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 {} \;
-
-#Manually create dest dir's as there is no configure script.
-mkdir $PKG/usr
-mkdir $PKG/usr/man
-mkdir $PKG/usr/lib
-mkdir $PKG/usr/include
-
-sed -i '/^prefix/d' Makefile
-make prefix=/usr DESTDIR=$PKG
-make install prefix=/usr DESTDIR=$PKG
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGES LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/lmdb/lmdb.info b/development/lmdb/lmdb.info
deleted file mode 100644
index f27e78bd6e..0000000000
--- a/development/lmdb/lmdb.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="lmdb"
-VERSION="0.9.14"
-HOMEPAGE="http://symas.com/mdb/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/lmdb-0.9.14.tar.gz"
-MD5SUM="5808c3822595960f8e965754f84ee99e"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Jack Hunt"
-EMAIL="jackmileshunt[at]gmail.com"
diff --git a/development/meld3/meld3.SlackBuild b/development/meld3/meld3.SlackBuild
index 7dc06d9f16..3ef67e1459 100644
--- a/development/meld3/meld3.SlackBuild
+++ b/development/meld3/meld3.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=meld3
SRCNAM=meld
-VERSION=${VERSION:-3.18.3}
+VERSION=${VERSION:-3.20.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,6 +70,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/python-3.8.patch
+
python3 setup.py install --root=$PKG
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/development/meld3/meld3.info b/development/meld3/meld3.info
index d311d6f413..abbb038df6 100644
--- a/development/meld3/meld3.info
+++ b/development/meld3/meld3.info
@@ -1,8 +1,8 @@
PRGNAM="meld3"
-VERSION="3.18.3"
+VERSION="3.20.1"
HOMEPAGE="http://meldmerge.org/"
-DOWNLOAD="https://download.gnome.org/sources/meld/3.18/meld-3.18.3.tar.xz"
-MD5SUM="81ab217622f856ee014f6b6c47a198f2"
+DOWNLOAD="https://download.gnome.org/sources/meld/3.20/meld-3.20.1.tar.xz"
+MD5SUM="0a2419d75fc8f8677fa6b4ce31ca8adc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gtksourceview3 pygobject3-python3"
diff --git a/development/meld3/python-3.8.patch b/development/meld3/python-3.8.patch
new file mode 100644
index 0000000000..36ff4bcf7c
--- /dev/null
+++ b/development/meld3/python-3.8.patch
@@ -0,0 +1,61 @@
+commit 9cb590f9804a89d8914d0d7d6c89c336f6d86d86
+Author: Kai Willadsen <kai.willadsen@gmail.com>
+Date: Mon May 6 08:15:23 2019 +1000
+
+ Update build helpers for Python 3.8 compatibility (#322)
+
+ The `linux_distribution` helper for the platform module has been removed
+ in Python 3.8, so we need an additional helper to check for the Debian-
+ style packaging layout.
+
+ Really this should be an `install_requires`, but moving our build
+ helpers to `setuptools` is a not-insignificant risk that I'd rather not
+ take when we're looking at moving to Meson.
+
+diff --git a/meld/build_helpers.py b/meld/build_helpers.py
+index 5977b3cd..f9fb302b 100644
+--- a/meld/build_helpers.py
++++ b/meld/build_helpers.py
+@@ -31,6 +31,15 @@ import platform
+ import sys
+ from distutils.log import info
+
++try:
++ import distro
++except ImportError:
++ python_version = tuple(int(x) for x in platform.python_version_tuple())
++ if python_version >= (3, 8):
++ print(
++ 'Missing build requirement "distro" Python module; '
++ 'install paths may be incorrect', file=sys.stderr)
++
+
+ def has_help(self):
+ return "build_help" in self.distribution.cmdclass and os.name != 'nt'
+@@ -404,11 +413,21 @@ class install(distutils.command.install.install):
+
+ def finalize_options(self):
+ special_cases = ('debian', 'ubuntu', 'linuxmint')
+- if (platform.system() == 'Linux' and
+- platform.linux_distribution()[0].lower() in special_cases):
+- # Maintain an explicit install-layout, but use deb by default
+- specified_layout = getattr(self, 'install_layout', None)
+- self.install_layout = specified_layout or 'deb'
++ if platform.system() == 'Linux':
++ # linux_distribution has been removed in Python 3.8; we require
++ # the third-party distro package for future handling.
++ try:
++ distribution = platform.linux_distribution()[0].lower()
++ except AttributeError:
++ try:
++ distribution = distro.id()
++ except NameError:
++ distribution = 'unknown'
++
++ if distribution in special_cases:
++ # Maintain an explicit install-layout, but use deb by default
++ specified_layout = getattr(self, 'install_layout', None)
++ self.install_layout = specified_layout or 'deb'
+
+ distutils.command.install.install.finalize_options(self)
+
diff --git a/development/menhir/menhir.SlackBuild b/development/menhir/menhir.SlackBuild
index 094a29eba9..62336c4021 100644
--- a/development/menhir/menhir.SlackBuild
+++ b/development/menhir/menhir.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=menhir
-VERSION=${VERSION:-20170101}
+VERSION=${VERSION:-20190924}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -93,7 +93,9 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS CHANGES INSTALLATION LICENSE manual.pdf $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION/
+rm -fR $PKG/usr/doc/$PRGNAM
+cp -a *.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/menhir/menhir.info b/development/menhir/menhir.info
index 1926acc370..5ce37a9367 100644
--- a/development/menhir/menhir.info
+++ b/development/menhir/menhir.info
@@ -1,8 +1,8 @@
PRGNAM="menhir"
-VERSION="20170101"
+VERSION="20190924"
HOMEPAGE="http://cristal.inria.fr/~fpottier/menhir/"
-DOWNLOAD="http://cristal.inria.fr/~fpottier/menhir/menhir-20170101.tar.gz"
-MD5SUM="78128bc6935d7c40d5da919c502678c0"
+DOWNLOAD="https://gitlab.inria.fr/fpottier/menhir/-/archive/20190924/menhir-20190924.tar.gz"
+MD5SUM="69b2cbcfb12ca0ca09ad0096c8716265"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ocamlbuild ocaml-findlib"
diff --git a/development/meson/README b/development/meson/README
deleted file mode 100644
index 6ead00c876..0000000000
--- a/development/meson/README
+++ /dev/null
@@ -1,9 +0,0 @@
-meson (The Meson Build System)
-
-Meson is an open source build system meant to be both extremely fast,
-and, even more importantly, as user friendly as possible.
-
-The main design point of Meson is that every moment a developer spends
-writing or debugging build definitions is a second wasted. So is every
-second spent waiting for the build system to actually start compiling
-code.
diff --git a/development/meson/meson.info b/development/meson/meson.info
deleted file mode 100644
index ec493ba95e..0000000000
--- a/development/meson/meson.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="meson"
-VERSION="0.52.1"
-HOMEPAGE="http://mesonbuild.com"
-DOWNLOAD="https://github.com/mesonbuild/meson/releases/download/0.52.1/meson-0.52.1.tar.gz"
-MD5SUM="a5f0c99567d772508f649a28ded7f8ad"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="python3 ninja"
-MAINTAINER="Jeremy Hansen"
-EMAIL="jebrhansen+SBo@gmail.com"
diff --git a/development/meson/slack-desc b/development/meson/slack-desc
deleted file mode 100644
index e3e1d45d83..0000000000
--- a/development/meson/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-meson: meson (The Meson Build System)
-meson:
-meson: Meson is an open source build system meant to be both extremely fast,
-meson: and, even more importantly, as user friendly as possible.
-meson:
-meson: The main design point of Meson is that every moment a developer spends
-meson: writing or debugging build definitions is a second wasted. So is every
-meson: second spent waiting for the build system to actually start compiling
-meson: code.
-meson:
-meson: HOMEPAGE: http://mesonbuild.com
diff --git a/development/mozjs/README b/development/mozjs/README
deleted file mode 100644
index bd78678034..0000000000
--- a/development/mozjs/README
+++ /dev/null
@@ -1,3 +0,0 @@
-SpiderMonkey is Mozilla's JavaScript engine written in C and C++. It
-is used in various Mozilla products, including Firefox, and is
-available under the MPL2.
diff --git a/development/mozjs/mozjs.SlackBuild b/development/mozjs/mozjs.SlackBuild
deleted file mode 100644
index 036763d89f..0000000000
--- a/development/mozjs/mozjs.SlackBuild
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for mozjs
-# Copyright 2018 David Woodfall <dave@slackbuilds.org>
-# 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.
-
-PRGNAM=mozjs
-VERSION=${VERSION:-45.0.2}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
-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 {} \;
-
-patch -p1 --verbose <$CWD/patches/moz38-dont-hardcode-libc-soname.patch
-
-cd js/src
-
-# Going with the gentoo ebuild options. They completely disable all
-# optimisation so we'll see how that works out.
-# --enable-optimize="-O2" \
-# They have also enabled thread safety.
-
-MOZ_MAKE_FLAGS="$SLKCFLAGS" \
-MOZ_OPTIMIZE_FLAGS="" \
-MOZ_DEBUG_FLAGS="" \
-HOST_OPTIMIZE_FLAGS="" \
-MODULE_OPTIMIZE_FLAGS="" \
-MOZ_PGO_OPTIMIZE_FLAGS="" \
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --enable-jemalloc \
- --enable-threadsafe \
- --with-system-nspr \
- --enable-system-ffi \
- --enable-readline \
- --disable-optimize \
- --with-intl-api \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
-
-# Get rid of any static libs
-find $PKG -iname '*.a' -o -iname '*.ajs' -delete
-
-# We don't want to clobber the stock js185 so we'll rename 'js' to 'mozjs' etc.
-(
- cd $PKG/usr/bin
- for bin in *
- do
- mv -v $bin moz$bin
- done
-)
-
-# Thanks to Arch
-# Resolve symlinks so they donʼt point to $srcdir
-for l in $(find "$PKG/usr/include/" -type l); do
- cp --remove-destination $(readlink $l) $l
-done
-
-# Fix to get elinks to build against it. Disabled for now.
-#sed -i "s%<cmath>%<cmath.h>%" $PKG/usr/include/mozjs-45/mozilla/MathAlgorithms.h
-#sed -i "s%<limits>%<limits.h>%" $PKG/usr/include/mozjs-45/js/Value.h
-#sed -i "/#include <new>/d" $PKG/usr/include/mozjs-45/js/Utility.h
-#sed -i "/#include <new>/d" $PKG/usr/include/mozjs-45/mozilla/Vector.h
-
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-cd ../..
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- INSTALL LICENSE README \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/mozjs/mozjs.info b/development/mozjs/mozjs.info
deleted file mode 100644
index f8415c2950..0000000000
--- a/development/mozjs/mozjs.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="mozjs"
-VERSION="45.0.2"
-HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
-DOWNLOAD="https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2"
-MD5SUM="2ca34f998d8b5ea79d8616dd26b5fbab"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="David Woodfall"
-EMAIL="dave@slackbuilds.org"
diff --git a/development/mozjs/patches/moz38-dont-hardcode-libc-soname.patch b/development/mozjs/patches/moz38-dont-hardcode-libc-soname.patch
deleted file mode 100644
index 708c749697..0000000000
--- a/development/mozjs/patches/moz38-dont-hardcode-libc-soname.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py 2018-01-12 12:21:16.764318254 -0500
-+++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py 2018-01-12 12:22:23.392069398 -0500
-@@ -93,10 +93,11 @@
-
- if info['os'] == 'linux':
- import ctypes
-+ import ctypes.util
- import errno
- PR_SET_SECCOMP = 22
- SECCOMP_MODE_FILTER = 2
-- ctypes.CDLL("libc.so.6", use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
-+ ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True).prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, 0)
- info['has_sandbox'] = ctypes.get_errno() == errno.EFAULT
- else:
- info['has_sandbox'] = True
diff --git a/development/mozjs/slack-desc b/development/mozjs/slack-desc
deleted file mode 100644
index 0f9f7248d2..0000000000
--- a/development/mozjs/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------------------------------------------------------|
-mozjs: mozjs (Mozilla's JavaScript engine)
-mozjs:
-mozjs: SpiderMonkey is Mozilla's JavaScript engine written in C and C++. It
-mozjs: is used in various Mozilla products, including Firefox, and is
-mozjs: available under the MPL2.
-mozjs:
-mozjs:
-mozjs:
-mozjs:
-mozjs:
-mozjs:
diff --git a/development/mysql-pinba/mysql-pinba.SlackBuild b/development/mysql-pinba/mysql-pinba.SlackBuild
index cdf19f5036..e6f3bf0ebd 100644
--- a/development/mysql-pinba/mysql-pinba.SlackBuild
+++ b/development/mysql-pinba/mysql-pinba.SlackBuild
@@ -95,7 +95,7 @@ sed -i "s|sql/structs.h|structs.h|" src/ha_pinba.cc
sed -i "s|sql/handler.h|handler.h|" src/ha_pinba.cc
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS -fpermissive" \
LIBS="$malloc_lib" \
./configure \
--prefix=/usr \
diff --git a/development/mysql-workbench/mysql-workbench.SlackBuild b/development/mysql-workbench/mysql-workbench.SlackBuild
index b2344f4ef3..b0d607b78f 100644
--- a/development/mysql-workbench/mysql-workbench.SlackBuild
+++ b/development/mysql-workbench/mysql-workbench.SlackBuild
@@ -74,6 +74,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# From Archlinux: GCC 7.x complains about an unsupported flag; it also
+# introduced some new warnings, remove '-Werror' for the build to complete
+sed -i 's|-Wno-deprecated-register||' ext/scintilla/gtk/CMakeLists.txt
+sed -i '/^set/s|-Werror -Wall|-Wall|' CMakeLists.txt
+
# Patch from Ponce
patch -p1 < $CWD/config_and_ifconfig_paths.patch
diff --git a/development/ninja/README b/development/ninja/README
deleted file mode 100644
index 4881393f6e..0000000000
--- a/development/ninja/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Ninja is a small build system with a focus on speed. It differs from other
-build systems in two major respects: it is designed to have its input files
-generated by a higher-level build system, and it is designed to run builds as
-fast as possible.
diff --git a/development/ninja/ninja.SlackBuild b/development/ninja/ninja.SlackBuild
deleted file mode 100644
index 1dda766002..0000000000
--- a/development/ninja/ninja.SlackBuild
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for ninja
-
-# Copyright 2015 Markus Rinne Finland
-# 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.
-
-PRGNAM=ninja
-VERSION=${VERSION:-1.10.0}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-CXXFLAGS="$SLKCFLAGS" \
-CFLAGS="$SLKCFLAGS" \
- python configure.py --bootstrap
-
-install -D -m0755 ninja $PKG/usr/bin/ninja
-install -D -m0644 misc/bash-completion $PKG/usr/share/bash-completion/completions/ninja
-install -D -m0644 misc/zsh-completion $PKG/usr/share/zsh/site-functions/_ninja
-install -D -m0644 misc/ninja.vim $PKG/usr/share/vim/vimfiles/syntax/ninja.vim
-install -D -m0644 misc/ninja-mode.el $PKG/usr/share/emacs/site-lisp/ninja-mode.el
-
-find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a \
- COPYING* README* RELEASING \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/ninja/ninja.info b/development/ninja/ninja.info
deleted file mode 100644
index efd76d698f..0000000000
--- a/development/ninja/ninja.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="ninja"
-VERSION="1.10.0"
-HOMEPAGE="https://ninja-build.org/"
-DOWNLOAD="https://github.com/ninja-build/ninja/archive/v1.10.0/ninja-1.10.0.tar.gz"
-MD5SUM="cf1d964113a171da42a8940e7607e71a"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Markus Rinne"
-EMAIL="markus.ka.rinne@gmail.com"
diff --git a/development/ninja/slack-desc b/development/ninja/slack-desc
deleted file mode 100644
index 35a65f0947..0000000000
--- a/development/ninja/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-ninja: ninja (build system with a focus on speed)
-ninja:
-ninja: Ninja is a small build system with a focus on speed. It differs from
-ninja: other build systems in two major respects: it is designed to have its
-ninja: input files generated by a higher-level build system, and it is
-ninja: designed to run builds as fast as possible.
-ninja:
-ninja:
-ninja:
-ninja:
-ninja:
diff --git a/development/nvi/README b/development/nvi/README
deleted file mode 100644
index b44e27d365..0000000000
--- a/development/nvi/README
+++ /dev/null
@@ -1,5 +0,0 @@
-Nvi is an implementation of the ex/vi text editor.
-Nvi supports all the historic ex/vi features except for open mode and the
-lisp edit option (it has a fully implemented underlying ex mode). Some
-additional features are: extended regular expressions, infinite undo, and
-multiple edit buffers. Nvi has a very small memory footprint.
diff --git a/development/nvi/nvi.SlackBuild b/development/nvi/nvi.SlackBuild
deleted file mode 100644
index 6ee6d5cb8b..0000000000
--- a/development/nvi/nvi.SlackBuild
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for nvi
-
-# Copyright 2008-2012 Robby Workman Northport, 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.
-
-PRGNAM=nvi
-VERSION=${VERSION:-1.81.6}
-BUILD=${BUILD:-3}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
-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 {} \;
-
-# Apply patches to eliminate bogus "DB_CREATE must be specified to create databases." error message on exit
-patch -p1 < $CWD/patches/nvi.diffs
-
-cd build.unix
- CFLAGS="$SLKCFLAGS" \
- ../dist/configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-widechar \
- --disable-static \
- --program-prefix="n" \
- --build=$ARCH-slackware-linux
- make -j1
- make -j1 install DESTDIR=$PKG
-cd ..
-
-# These are better as softlinks instead of hardlinks
-rm -f $PKG/usr/man/man1/{nex,nview}.1
-ln -s nvi.1 $PKG/usr/man/man1/nex.1
-ln -s nvi.1 $PKG/usr/man/man1/nview.1
-
-rm -rf $PKG/usr/man/cat*
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a Changes LICENSE README* TODO docs/html $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/nvi/nvi.info b/development/nvi/nvi.info
deleted file mode 100644
index 358c0fa50b..0000000000
--- a/development/nvi/nvi.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="nvi"
-VERSION="1.81.6"
-HOMEPAGE="http://freecode.com/projects/nvi"
-DOWNLOAD="http://harrier.slackbuilds.org/misc/nvi-1.81.6.tar.bz2"
-MD5SUM="88d1e23115ee9f2961186b62e55f5704"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Don Allen"
-EMAIL="donaldcallen@gmail.com"
diff --git a/development/nvi/patches/nvi.diffs b/development/nvi/patches/nvi.diffs
deleted file mode 100644
index 98a45861e7..0000000000
--- a/development/nvi/patches/nvi.diffs
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -up nvi-1.81.6/common/db.h patched-nvi-1.81.6/common/db.h
---- nvi-1.81.6/common/db.h 2007-11-18 11:41:42.000000000 -0500
-+++ patched-nvi-1.81.6/common/db.h 2014-10-04 08:53:11.000000000 -0400
-@@ -16,7 +16,10 @@
- (env)->remove(env, path, NULL, flags)
- #endif
-
--#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
-+# if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 4) || DB_VERSION_MAJOR > 4
-+#define db_open(db,file,type,flags,mode) \
-+ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode)
-+#elif DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1
- #define db_open(db,file,type,flags,mode) \
- (db)->open(db, NULL, file, NULL, type, flags, mode)
- #else
-diff -up nvi-1.81.6/common/msg.c patched-nvi-1.81.6/common/msg.c
---- nvi-1.81.6/common/msg.c 2007-11-18 11:41:42.000000000 -0500
-+++ patched-nvi-1.81.6/common/msg.c 2014-10-04 08:55:13.000000000 -0400
-@@ -724,7 +724,8 @@ msg_open(SCR *sp, char *file)
- p = buf;
- } else
- p = file;
-- if ((sp->db_error = db_create(&db, 0, 0)) != 0 ||
-+ if (access(p, R_OK) != 0 ||
-+ (sp->db_error = db_create(&db, 0, 0)) != 0 ||
- (sp->db_error = db->set_re_source(db, p)) != 0 ||
- (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) {
- if (first) {
diff --git a/development/nvi/slack-desc b/development/nvi/slack-desc
deleted file mode 100644
index 07d0586601..0000000000
--- a/development/nvi/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-nvi: nvi (an implementation of the ex/vi text editor)
-nvi:
-nvi: Nvi is an implementation of the ex/vi text editor.
-nvi: Nvi supports all the historic ex/vi features except for open
-nvi: mode and the lisp edit option (it has a fully implemented
-nvi: underlying ex mode). Some additional features are:
-nvi: extended regular expressions, infinite undo, and multiple edit
-nvi: buffers. Nvi has a very small memory footprint.
-nvi:
-nvi: Homepage: http://www.bostic.com/vi/
-nvi:
diff --git a/development/ocaml/configure.patch b/development/ocaml/configure.patch
index a57b19fb56..31309d3511 100644
--- a/development/ocaml/configure.patch
+++ b/development/ocaml/configure.patch
@@ -1,13 +1,12 @@
---- configure_old 2014-05-23 22:45:22.000000000 +0200
-+++ configure 2014-05-23 22:45:31.000000000 +0200
-@@ -1612,6 +1612,10 @@
- nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
- esac
-
-+# Add additional flags from the environment
-+bytecccompopts="$bytecccompopts $CFLAGS"
-+nativecccompopts="$nativecccompopts $CFLAGS"
-+
- # Finish generated files
-
- cclibs="$cclibs $mathlib"
+diff -Naur ocaml-4.08.1.orig/configure ocaml-4.08.1/configure
+--- ocaml-4.08.1.orig/configure 2019-08-05 19:32:44.000000000 +0200
++++ ocaml-4.08.1/configure 2019-09-06 10:35:25.454923040 +0200
+@@ -12424,7 +12424,7 @@
+ -fno-builtin-memcmp";
+ internal_cflags="$gcc_warnings" ;; #(
+ gcc-*) :
+- common_cflags="-O2 -fno-strict-aliasing -fwrapv";
++ common_cflags="@CFLAGS@ -fno-strict-aliasing -fwrapv";
+ internal_cflags="$gcc_warnings" ;; #(
+ msvc-*) :
+ common_cflags="-nologo -O2 -Gy- -MD"
diff --git a/development/ocaml/ocaml.SlackBuild b/development/ocaml/ocaml.SlackBuild
index 1f0ea4e709..6b081b9a08 100644
--- a/development/ocaml/ocaml.SlackBuild
+++ b/development/ocaml/ocaml.SlackBuild
@@ -24,7 +24,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ocaml
-VERSION=${VERSION:-4.03.0}
+VERSION=${VERSION:-4.08.1}
+MANVER=${MANVER:-4.08}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,17 +71,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch < $CWD/configure.patch
+sed "s|@CFLAGS@|$SLKCFLAGS|" $CWD/configure.patch | patch -p1
-CFLAGS="$SLKCFLAGS" ./configure \
+./configure \
--prefix /usr \
--libdir /usr/lib${LIBDIRSUFFIX}/ocaml \
- --host $ARCH-slackware-linux
+ --mandir /usr/man
make -j1 world.opt
-make -j1 install \
- PREFIX=$PKG/usr \
- LIBDIR=$PKG/usr/lib${LIBDIRSUFFIX}/ocaml
+make -j1 DESTDIR=$PKG install
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -90,7 +89,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a Changes INSTALL* LICENSE README* VERSION \
$PKG/usr/doc/$PRGNAM-$VERSION
-tar -xvf $CWD/ocaml-4.03-refman-html.tar.gz --no-same-owner -C $PKG/usr/doc/$PRGNAM-$VERSION/
+tar -xvf $CWD/ocaml-$MANVER-refman-html.tar.gz --no-same-owner -C $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/ocaml/ocaml.info b/development/ocaml/ocaml.info
index 620db74149..0747f3b19c 100644
--- a/development/ocaml/ocaml.info
+++ b/development/ocaml/ocaml.info
@@ -1,12 +1,12 @@
PRGNAM="ocaml"
-VERSION="4.03.0"
+VERSION="4.08.1"
HOMEPAGE="http://caml.inria.fr"
-DOWNLOAD="http://caml.inria.fr/pub/distrib/ocaml-4.03/ocaml-4.03.0.tar.xz \
- http://caml.inria.fr/pub/distrib/ocaml-4.03/ocaml-4.03-refman-html.tar.gz"
-MD5SUM="89f62881e03dfad0cf04991fbc03f955 \
- d3e44d3984d029d2e88ba219ad8e24c2"
+DOWNLOAD="http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-4.08.1.tar.xz \
+ http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-4.08-refman-html.tar.gz"
+MD5SUM="519f095a563323cdaa68301d58bf099d \
+ 20cbe4bd141f175d723f58cb9e89b215"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Markus Hutmacher"
-EMAIL="mailing@markhu.de"
+MAINTAINER="Matteo Bernardini"
+EMAIL="ponce@slackbuilds.org"
diff --git a/development/ocamlbuild/ocamlbuild.SlackBuild b/development/ocamlbuild/ocamlbuild.SlackBuild
index e28405a292..b9b187aefa 100644
--- a/development/ocamlbuild/ocamlbuild.SlackBuild
+++ b/development/ocamlbuild/ocamlbuild.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for ocamlbuild
-# Copyright 2016-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
+# Copyright 2016-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ocamlbuild
-VERSION=${VERSION:-0.12.0}
+VERSION=${VERSION:-0.14.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/development/ocamlbuild/ocamlbuild.info b/development/ocamlbuild/ocamlbuild.info
index 62fb240875..4012566025 100644
--- a/development/ocamlbuild/ocamlbuild.info
+++ b/development/ocamlbuild/ocamlbuild.info
@@ -1,8 +1,8 @@
PRGNAM="ocamlbuild"
-VERSION="0.12.0"
+VERSION="0.14.0"
HOMEPAGE="http://caml.inria.fr"
-DOWNLOAD="https://github.com/ocaml/ocamlbuild/archive/0.12.0/ocamlbuild-0.12.0.tar.gz"
-MD5SUM="442baa19470bd49150f153122e22907b"
+DOWNLOAD="https://github.com/ocaml/ocamlbuild/archive/0.14.0/ocamlbuild-0.14.0.tar.gz"
+MD5SUM="a7bf2fe594cd16907807c756b14d501f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ocaml"
diff --git a/development/odb/odb.SlackBuild b/development/odb/odb.SlackBuild
index ae2edf5919..a51dea0e5e 100644
--- a/development/odb/odb.SlackBuild
+++ b/development/odb/odb.SlackBuild
@@ -69,6 +69,9 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Thanks archlinux!
+patch -p1 < $CWD/odb_gcc6.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/development/odb/odb_gcc6.patch b/development/odb/odb_gcc6.patch
new file mode 100644
index 0000000000..6f7c9005c4
--- /dev/null
+++ b/development/odb/odb_gcc6.patch
@@ -0,0 +1,355 @@
+From 511dcf67322ad87fb32f97d1cf7725c129e83898 Mon Sep 17 00:00:00 2001
+From: Boris Kolpackov <boris@codesynthesis.com>
+Date: Fri, 5 Feb 2016 16:01:42 +0200
+Subject: [PATCH] Initial work to make ODB compatible with GCC 6
+
+---
+ odb/cxx-lexer.cxx | 4 ++++
+ odb/gcc-fwd.hxx | 23 ++++++++++++++++++++++-
+ odb/gcc.hxx | 10 ++++++++++
+ odb/include.cxx | 31 +++++++++++++++++++++----------
+ odb/parser.cxx | 8 ++++----
+ odb/plugin.cxx | 29 +++++++++++++++++++++++++++--
+ odb/semantics/elements.cxx | 4 ++--
+ 7 files changed, 90 insertions(+), 19 deletions(-)
+
+diff --git a/odb/cxx-lexer.cxx b/odb/cxx-lexer.cxx
+index 7029c7e..64df296 100644
+--- a/odb/cxx-lexer.cxx
++++ b/odb/cxx-lexer.cxx
+@@ -135,8 +135,12 @@ cpp_error_callback (
+ #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 5
+ int /*reason*/, // Added in GCC 4.6.0.
+ #endif
++#if BUILDING_GCC_MAJOR <= 5
+ location_t,
+ unsigned int,
++#else
++ rich_location*,
++#endif
+ char const* msg,
+ va_list *ap)
+ {
+diff --git a/odb/gcc-fwd.hxx b/odb/gcc-fwd.hxx
+index a120f05..618b106 100644
+--- a/odb/gcc-fwd.hxx
++++ b/odb/gcc-fwd.hxx
+@@ -7,6 +7,24 @@
+
+ #include <bversion.h>
+
++#if BUILDING_GCC_MAJOR >= 6
++
++// If we include <system.h> here, it pulls in all kinds of GCC trouble that
++// "poisons" standard C/C++ declarations; see safe-ctype.h. So instead we
++// are going to "exclude" safe-ctype.h. To compensate, however, we will
++// include it first thing in gcc.hxx.
++//
++# include <config.h>
++# define SAFE_CTYPE_H
++# include <system.h>
++# undef SAFE_CTYPE_H
++# include <coretypes.h>
++
++typedef unsigned int source_location; // <line-map.h>
++typedef source_location location_t; // <input.h>
++
++#else // GCC < 6
++
+ #if BUILDING_GCC_MAJOR > 4 || BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR > 8
+ # include <limits.h> // CHAR_BIT
+ # include <config.h>
+@@ -33,6 +51,9 @@ extern "C"
+
+ typedef unsigned int source_location; // <line-map.h>
+ typedef source_location location_t; // <input.h>
+-}
++
++} // extern "C"
++
++#endif
+
+ #endif // ODB_GCC_FWD_HXX
+diff --git a/odb/gcc.hxx b/odb/gcc.hxx
+index c953047..858d685 100644
+--- a/odb/gcc.hxx
++++ b/odb/gcc.hxx
+@@ -7,6 +7,10 @@
+
+ #include <odb/gcc-fwd.hxx>
+
++#if BUILDING_GCC_MAJOR >= 6
++# include <safe-ctype.h> // See gcc-fwd.hxx.
++#endif
++
+ // GCC header includes to get the plugin and parse tree declarations.
+ // The order is important and doesn't follow any kind of logic.
+ //
+@@ -145,4 +149,10 @@ gcc_tree_code_name (gcc_tree_code_type tc) {return tree_code_name[tc];}
+ #define DECL_CHAIN(x) TREE_CHAIN(x)
+ #endif
+
++// In GCC 6, ANON_AGGRNAME_P became anon_aggrname_p().
++//
++#if BUILDING_GCC_MAJOR < 6
++# define anon_aggrname_p(X) ANON_AGGRNAME_P(X)
++#endif
++
+ #endif // ODB_GCC_HXX
+diff --git a/odb/include.cxx b/odb/include.cxx
+index 9c03f99..32d50a6 100644
+--- a/odb/include.cxx
++++ b/odb/include.cxx
+@@ -30,9 +30,18 @@ namespace
+ path path_;
+ };
+
++#if BUILDING_GCC_MAJOR >= 6
++ typedef line_map_ordinary line_map_type;
++#else
++ typedef line_map line_map_type;
++# ifndef linemap_check_ordinary
++# define linemap_check_ordinary(X) (X)
++# endif
++#endif
++
+ struct includes
+ {
+- typedef std::map<line_map const*, include_directive> map_type;
++ typedef std::map<line_map_type const*, include_directive> map_type;
+ bool trailing; // Included at the beginning or at the end of the main file.
+ map_type map;
+ };
+@@ -146,7 +155,9 @@ namespace
+ //
+ if (l > BUILTINS_LOCATION)
+ {
+- line_map const* lm (linemap_lookup (line_table, l));
++ line_map_type const* lm (
++ linemap_check_ordinary (
++ linemap_lookup (line_table, l)));
+
+ if (lm != 0 && !MAIN_FILE_P (lm))
+ {
+@@ -539,20 +550,20 @@ namespace
+ //
+ #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6
+ size_t used (line_table->used);
+- line_map const* maps (line_table->maps);
++ line_map_type const* maps (line_table->maps);
+ #else
+ size_t used (line_table->info_ordinary.used);
+- line_map const* maps (line_table->info_ordinary.maps);
++ line_map_type const* maps (line_table->info_ordinary.maps);
+ #endif
+
+ for (size_t i (0); i < used; ++i)
+ {
+- line_map const* m (maps + i);
++ line_map_type const* m (maps + i);
+
+ if (MAIN_FILE_P (m) || m->reason != LC_ENTER)
+ continue;
+
+- line_map const* ifm (INCLUDED_FROM (line_table, m));
++ line_map_type const* ifm (INCLUDED_FROM (line_table, m));
+
+ #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6
+ path f (m->to_file);
+@@ -582,7 +593,7 @@ namespace
+ for (includes::iterator j (i->second.begin ());
+ j != i->second.end (); ++j)
+ {
+- line_map const* lm (j->first);
++ line_map_type const* lm (j->first);
+ cerr << '\t' << lm->to_file << ":" << LAST_SOURCE_LINE (lm) << endl;
+ }
+ */
+@@ -591,13 +602,13 @@ namespace
+ // it is preferred over all others. Use the first one if there are
+ // several.
+ //
+- line_map const* main_lm (0);
++ line_map_type const* main_lm (0);
+ include_directive* main_inc (0);
+
+ for (includes::map_type::iterator j (i->second.map.begin ());
+ j != i->second.map.end (); ++j)
+ {
+- line_map const* lm (j->first);
++ line_map_type const* lm (j->first);
+
+ if (MAIN_FILE_P (lm))
+ {
+@@ -638,7 +649,7 @@ namespace
+ for (includes::map_type::iterator j (i->second.map.begin ());
+ j != i->second.map.end (); ++j)
+ {
+- line_map const* lm (j->first);
++ line_map_type const* lm (j->first);
+
+ #if BUILDING_GCC_MAJOR == 4 && BUILDING_GCC_MINOR <= 6
+ string f (lm->to_file);
+diff --git a/odb/parser.cxx b/odb/parser.cxx
+index 275da33..842611f 100644
+--- a/odb/parser.cxx
++++ b/odb/parser.cxx
+@@ -1070,14 +1070,14 @@ emit_type_decl (tree decl)
+ // says that in typedef struct {} S; S becomes struct's
+ // name.
+ //
+- if (ANON_AGGRNAME_P (decl_name))
++ if (anon_aggrname_p (decl_name))
+ {
+ tree d (TYPE_NAME (t));
+
+ if (d != NULL_TREE &&
+ !DECL_ARTIFICIAL (d) &&
+ DECL_NAME (d) != NULL_TREE &&
+- !ANON_AGGRNAME_P (DECL_NAME (d)))
++ !anon_aggrname_p (DECL_NAME (d)))
+ {
+ decl = d;
+ decl_name = DECL_NAME (decl);
+@@ -1694,7 +1694,7 @@ create_type (tree t,
+ ts << "start anon/stub " << gcc_tree_code_name(tc) << " at "
+ << file << ":" << line << endl;
+
+- if (d == NULL_TREE || ANON_AGGRNAME_P (DECL_NAME (d)))
++ if (d == NULL_TREE || anon_aggrname_p (DECL_NAME (d)))
+ {
+ if (tc == RECORD_TYPE)
+ r = &emit_class<class_> (t, file, line, clmn);
+@@ -1791,7 +1791,7 @@ create_type (tree t,
+ ts << "start anon/stub " << gcc_tree_code_name(tc) << " at "
+ << file << ":" << line << endl;
+
+- if (d == NULL_TREE || ANON_AGGRNAME_P (DECL_NAME (d)))
++ if (d == NULL_TREE || anon_aggrname_p (DECL_NAME (d)))
+ {
+ r = &emit_enum (t, access, file, line, clmn);
+ }
+diff --git a/odb/plugin.cxx b/odb/plugin.cxx
+index fbbfe46..bc98f3e 100644
+--- a/odb/plugin.cxx
++++ b/odb/plugin.cxx
+@@ -45,14 +45,28 @@ path file_; // File being compiled.
+ paths inputs_; // List of input files in at-once mode or just file_.
+
+ bool (*cpp_error_prev) (
+- cpp_reader*, int, int, location_t, unsigned int, const char*, va_list*);
++ cpp_reader*,
++ int,
++ int,
++#if BUILDING_GCC_MAJOR >= 6
++ rich_location*,
++#else
++ location_t,
++ unsigned int,
++#endif
++ const char*,
++ va_list*);
+
+ static bool
+ cpp_error_filter (cpp_reader* r,
+ int level,
+ int reason,
++#if BUILDING_GCC_MAJOR >= 6
++ rich_location* l,
++#else
+ location_t l,
+ unsigned int column_override,
++#endif
+ const char* msg,
+ va_list* ap)
+ {
+@@ -66,7 +80,18 @@ cpp_error_filter (cpp_reader* r,
+ if (strstr (msg, "#pragma once") != 0)
+ return true;
+
+- return cpp_error_prev (r, level, reason, l, column_override, msg, ap);
++ return cpp_error_prev (
++ r,
++ level,
++ reason,
++#if BUILDING_GCC_MAJOR >= 6
++ l,
++#else
++ l,
++ column_override,
++#endif
++ msg,
++ ap);
+ }
+
+ // A prefix of the _cpp_file struct. This struct is not part of the
+diff --git a/odb/semantics/elements.cxx b/odb/semantics/elements.cxx
+index 43fb379..ae9e906 100644
+--- a/odb/semantics/elements.cxx
++++ b/odb/semantics/elements.cxx
+@@ -76,7 +76,7 @@ namespace semantics
+ if (tree decl = TYPE_NAME (n))
+ name = DECL_NAME (decl);
+
+- return name != 0 && ANON_AGGRNAME_P (name);
++ return name != 0 && anon_aggrname_p (name);
+ }
+
+ return true;
+@@ -125,7 +125,7 @@ namespace semantics
+ if (tree decl = TYPE_NAME (type))
+ {
+ name = DECL_NAME (decl);
+- if (name != 0 && ANON_AGGRNAME_P (name))
++ if (name != 0 && anon_aggrname_p (name))
+ return true;
+
+ tree s (CP_DECL_CONTEXT (decl));
+--
+1.7.10.4
+
+m 61d13eb53ade9f30a64892a901401bda5e42c335 Mon Sep 17 00:00:00 2001
+From: Boris Kolpackov <boris@codesynthesis.com>
+Date: Mon, 8 Feb 2016 18:39:21 +0200
+Subject: [PATCH] Make compilable with GCC 6 in C++14 mode
+
+---
+ odb/gcc.hxx | 9 ++++++---
+ odb/parser.cxx | 2 ++
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/odb/gcc.hxx b/odb/gcc.hxx
+index 858d685..a22357d 100644
+--- a/odb/gcc.hxx
++++ b/odb/gcc.hxx
+@@ -7,9 +7,12 @@
+
+ #include <odb/gcc-fwd.hxx>
+
+-#if BUILDING_GCC_MAJOR >= 6
+-# include <safe-ctype.h> // See gcc-fwd.hxx.
+-#endif
++// Actually, let's keep it out. With it included we can compile in C++98
++// but not in C++14 (GCC 6 default).
++//
++// #if BUILDING_GCC_MAJOR >= 6
++// # include <safe-ctype.h> // See gcc-fwd.hxx.
++// #endif
+
+ // GCC header includes to get the plugin and parse tree declarations.
+ // The order is important and doesn't follow any kind of logic.
+diff --git a/odb/parser.cxx b/odb/parser.cxx
+index 842611f..6dfff6f 100644
+--- a/odb/parser.cxx
++++ b/odb/parser.cxx
+@@ -1857,6 +1857,8 @@ create_type (tree t,
+ // the array type. In other words, we view it as "constant array"
+ // rather than "array of constant elements".
+ //
++ using semantics::array; // vs std::array.
++
+ tree bt (TREE_TYPE (t));
+ tree bt_mv (TYPE_MAIN_VARIANT (bt));
+ type& bt_node (emit_type (bt_mv, access::public_, file, line, clmn));
+--
+1.7.10.4
diff --git a/development/omake/omake-warn-error.diff b/development/omake/omake-warn-error.diff
deleted file mode 100644
index 3392c8f311..0000000000
--- a/development/omake/omake-warn-error.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- orig/lib/build/OCaml.om 2010-03-30 10:18:37 +0000
-+++ work/lib/build/OCaml.om 2010-03-30 12:41:33 +0000
-@@ -170,7 +170,7 @@
- #
- declare OCAMLDEPFLAGS
- public.OCAMLPPFLAGS =
--public.OCAMLFLAGS = -warn-error A
-+public.OCAMLFLAGS =
- public.OCAMLCFLAGS = -g
- public.OCAMLOPTFLAGS =
- public.OCAMLCPPFLAGS =
diff --git a/development/omake/omake.SlackBuild b/development/omake/omake.SlackBuild
index 32931e5db7..7bcea6cfbd 100644
--- a/development/omake/omake.SlackBuild
+++ b/development/omake/omake.SlackBuild
@@ -23,15 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=omake
-VERSION=${VERSION:-0.9.8.6}
+VERSION=${VERSION:-0.10.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCVER=${VERSION}-0.rc1
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -42,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
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"
@@ -61,9 +59,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
-cd $PRGNAM-$VERSION
+rm -rf $PRGNAM-$PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -71,22 +69,16 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fix things for newer OCaml
-patch -p1 <$CWD/omake-warn-error.diff
-
-# No configure, manual it is..
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-PREFIX=/usr \
-LIBDIR=/usr/lib${LIBDIRSUFFIX} \
-INSTALL_ROOT=$PKG \
-make install
+# the newer omake doesn't want to respect our LIBDIRSUFFIX
+./configure --prefix /usr
+make -j1 all
+make -j1 install INSTALL_ROOT=$PKG
find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a CHANGELOG.txt COMMENTS INSTALL LICENSE LICENSE.OMake doc/* \
+cp -a ChangeLog COMMENTS INSTALL LICENSE LICENSE.OMake doc/* \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/development/omake/omake.info b/development/omake/omake.info
index b33d0a1ce2..1721b9dd8f 100644
--- a/development/omake/omake.info
+++ b/development/omake/omake.info
@@ -1,8 +1,8 @@
PRGNAM="omake"
-VERSION="0.9.8.6"
-HOMEPAGE="http://omake.metaprl.org/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/omake-0.9.8.6-0.rc1.tar.gz"
-MD5SUM="fe39a476ef4e33b7ba2ca77a6bcaded2"
+VERSION="0.10.3"
+HOMEPAGE="http://projects.camlcity.org/projects/omake.html"
+DOWNLOAD="https://github.com/ocaml-omake/omake/archive/omake-0.10.3/omake-0.10.3.tar.gz"
+MD5SUM="134b1ea51a5cd90d32fec7ad27e82aa5"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="ocaml-findlib"
diff --git a/development/oniguruma/README b/development/oniguruma/README
deleted file mode 100644
index 8eb7bf9091..0000000000
--- a/development/oniguruma/README
+++ /dev/null
@@ -1,3 +0,0 @@
-Oniguruma is a regular expressions library. The characteristics of
-this library is that different character encoding for every regular
-expression object can be specified.
diff --git a/development/oniguruma/oniguruma.SlackBuild b/development/oniguruma/oniguruma.SlackBuild
deleted file mode 100644
index 1b6d6fd240..0000000000
--- a/development/oniguruma/oniguruma.SlackBuild
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for oniguruma
-
-# Copyright 2015-2016 Eugene Wissner, Dachau, Germany
-# Copyright 2008, 2009, 2010, 2011 Phantom X, Goiania, Brazil.
-# Copyright 2006 Martijn Dekker, Groningen, 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.
-
-PRGNAM=oniguruma
-VERSION=${VERSION:-5.9.6_p1}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-SRCNAM=onig-5.9.6
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $SRCNAM
-tar xvf $CWD/onig-$VERSION.tar.gz
-cd $SRCNAM
-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 {} \;
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --disable-static \
- --with-rubydir=/usr/bin \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=${PKG}
-
-find ${PKG} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
-
-find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING HISTORY README* index*.html doc/{API,FAQ,RE}* \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/oniguruma/oniguruma.info b/development/oniguruma/oniguruma.info
deleted file mode 100644
index d32eacccbd..0000000000
--- a/development/oniguruma/oniguruma.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="oniguruma"
-VERSION="5.9.6_p1"
-HOMEPAGE="https://github.com/kkos/oniguruma"
-DOWNLOAD="https://github.com/kkos/oniguruma/releases/download/v5.9.6_p1/onig-5.9.6_p1.tar.gz"
-MD5SUM="b751cbb68d411076f400e40d413ed69b"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Eugene Wissner"
-EMAIL="belka@caraus.de"
diff --git a/development/oniguruma/slack-desc b/development/oniguruma/slack-desc
deleted file mode 100644
index b8185a7c43..0000000000
--- a/development/oniguruma/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-oniguruma: oniguruma (Regular expressions library)
-oniguruma:
-oniguruma: Oniguruma is a regular expressions library. The characteristics of
-oniguruma: this library is that different character encoding for every regular
-oniguruma: expression object can be specified.
-oniguruma:
-oniguruma:
-oniguruma:
-oniguruma:
-oniguruma:
-oniguruma:
diff --git a/development/opencl-headers/README b/development/opencl-headers/README
deleted file mode 100644
index 4e432b6b4d..0000000000
--- a/development/opencl-headers/README
+++ /dev/null
@@ -1,3 +0,0 @@
-opencl-headers (headers file for OpenCL)
-
-This is a repackaging of the header files from khronos.org.
diff --git a/development/opencl-headers/opencl-headers.SlackBuild b/development/opencl-headers/opencl-headers.SlackBuild
deleted file mode 100644
index 930d45982e..0000000000
--- a/development/opencl-headers/opencl-headers.SlackBuild
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for opencl-headers
-# simply a repack of the original headers from khronos.org
-# tarballed by me for easy maintenance.
-# Copyright Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy, 2012
-# 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.
-
-PRGNAM=opencl-headers
-VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-ARCH=noarch
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG/usr/include/CL $OUTPUT
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -C $PKG/usr/include/CL/
-chown -R root.root $PKG/usr/include/CL/*
-find $PKG/usr/include/CL \
- \( -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 {} \;
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/opencl-headers/opencl-headers.info b/development/opencl-headers/opencl-headers.info
deleted file mode 100644
index 067b5f9261..0000000000
--- a/development/opencl-headers/opencl-headers.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="opencl-headers"
-VERSION="1.1"
-HOMEPAGE="https://www.khronos.org/opencl/"
-DOWNLOAD="http://ponce.cc/slackware/sources/repo/opencl-headers-1.1.tar.xz"
-MD5SUM="3b9b4c49b3ddf37e275c5c22f94aa80a"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Matteo Bernardini"
-EMAIL="ponce@slackbuilds.org"
diff --git a/development/opencl-headers/slack-desc b/development/opencl-headers/slack-desc
deleted file mode 100644
index 456cf19c4f..0000000000
--- a/development/opencl-headers/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-opencl-headers: opencl-headers (headers file for OpenCL)
-opencl-headers:
-opencl-headers: This is a repackaging of the header files from khronos.org.
-opencl-headers:
-opencl-headers: homepage: https://www.khronos.org/opencl/
-opencl-headers:
-opencl-headers:
-opencl-headers:
-opencl-headers:
-opencl-headers:
-opencl-headers:
diff --git a/development/openocd/openocd.SlackBuild b/development/openocd/openocd.SlackBuild
index c75a62622a..e34954da41 100644
--- a/development/openocd/openocd.SlackBuild
+++ b/development/openocd/openocd.SlackBuild
@@ -5,13 +5,13 @@
# Written by thorsten johannvorderbrueggen <thorsten.johannvorderbrueggen@t-online.de>
PRGNAM=openocd
-VERSION=${VERSION:-0.8.0}
+VERSION=${VERSION:-0.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -22,8 +22,8 @@ TMP=${TMP:-/tmp/SBo}
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"
@@ -51,7 +51,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -Wno-error=implicit-fallthrough= -Wno-error=format-truncation= -Wno-error=format-overflow=" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/development/openocd/openocd.info b/development/openocd/openocd.info
index 95d6cade91..a1d7add762 100644
--- a/development/openocd/openocd.info
+++ b/development/openocd/openocd.info
@@ -1,8 +1,8 @@
PRGNAM="openocd"
-VERSION="0.8.0"
+VERSION="0.10.0"
HOMEPAGE="http://openocd.sourceforge.net/"
-DOWNLOAD="http://sourceforge.net/projects/openocd/files/openocd/0.8.0/openocd-0.8.0.tar.gz"
-MD5SUM="271086c0efe0c454db7ddb0f55ace218"
+DOWNLOAD="http://downloads.sourceforge.net/openocd/openocd-0.10.0.tar.gz"
+MD5SUM="8971d16aee5c2642b33ee55fc6c86239"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/perf/perf.SlackBuild b/development/perf/perf.SlackBuild
index ea6dc3c3dc..ad19318fdd 100644
--- a/development/perf/perf.SlackBuild
+++ b/development/perf/perf.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=perf
-VERSION=${VERSION:-4.4.190}
+VERSION=${VERSION:-4.19.72}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
diff --git a/development/perf/perf.info b/development/perf/perf.info
index c5ce02f80d..34f8b652a0 100644
--- a/development/perf/perf.info
+++ b/development/perf/perf.info
@@ -1,5 +1,5 @@
PRGNAM="perf"
-VERSION="4.4.190"
+VERSION="4.19.72"
HOMEPAGE="https://perf.wiki.kernel.org/index.php/Main_Page"
DOWNLOAD="http://www.pastemobile.org/static/perf.dummy"
MD5SUM="9cba6c70fb57a22a155073d54748b614"
diff --git a/development/php-apcu/php-apcu.SlackBuild b/development/php-apcu/php-apcu.SlackBuild
index 62019f9258..99cd064bb3 100644
--- a/development/php-apcu/php-apcu.SlackBuild
+++ b/development/php-apcu/php-apcu.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=php-apcu
SRCNAM=apcu
-VERSION=${VERSION:-4.0.11}
+VERSION=${VERSION:-5.1.17}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -99,7 +99,7 @@ mkdir -p $PKG/etc/php.d
cp $CWD/apcu.ini $PKG/etc/php.d/apcu.ini.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a LICENSE README.md NOTICE TECHNOTES.txt TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.md NOTICE TECHNOTES.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/development/php-apcu/php-apcu.info b/development/php-apcu/php-apcu.info
index a2c510b6cc..85ef5cd464 100644
--- a/development/php-apcu/php-apcu.info
+++ b/development/php-apcu/php-apcu.info
@@ -1,8 +1,8 @@
PRGNAM="php-apcu"
-VERSION="4.0.11"
+VERSION="5.1.17"
HOMEPAGE="http://pecl.php.net/package/APCu/"
-DOWNLOAD="https://pecl.php.net/get/apcu-4.0.11.tgz"
-MD5SUM="13c0c0dd676e5a7905d54fa985d0ee62"
+DOWNLOAD="https://pecl.php.net/get/apcu-5.1.17.tgz"
+MD5SUM="8d60ffd6dcec221f8bce957a09511f87"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/poedit/poedit.SlackBuild b/development/poedit/poedit.SlackBuild
index 2319aba3bb..36f2fae14e 100644
--- a/development/poedit/poedit.SlackBuild
+++ b/development/poedit/poedit.SlackBuild
@@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=poedit
-VERSION=${VERSION:-1.8.12}
+VERSION=${VERSION:-2.0.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,8 +70,6 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-patch --verbose -p1 < $CWD/setvalue.diff
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -80,7 +78,7 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--build=$ARCH-slackware-linux \
-make
+make CPPFLAGS+=' -DUCHAR_TYPE=uint16_t'
make install-strip DESTDIR=$PKG
find $PKG/usr/man -type f -exec gzip -9 {} \;
diff --git a/development/poedit/poedit.info b/development/poedit/poedit.info
index b8391a4535..58048d5895 100644
--- a/development/poedit/poedit.info
+++ b/development/poedit/poedit.info
@@ -1,8 +1,8 @@
PRGNAM="poedit"
-VERSION="1.8.12"
+VERSION="2.0.6"
HOMEPAGE="https://www.poedit.net"
-DOWNLOAD="https://github.com/vslavik/poedit/releases/download/v1.8.12-oss/poedit-1.8.12.tar.gz"
-MD5SUM="7c16257fc8757fe658295b0e3a677670"
+DOWNLOAD="https://github.com/vslavik/poedit/releases/download/v2.0.6-oss/poedit-2.0.6.tar.gz"
+MD5SUM="1134fef2997884291083875506a922ed"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="wxGTK3 LucenePlusPlus gtkspell3"
diff --git a/development/poedit/setvalue.diff b/development/poedit/setvalue.diff
deleted file mode 100644
index 1c66943cea..0000000000
--- a/development/poedit/setvalue.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/fileviewer.cpp 2013-11-10 17:38:50.161359501 +0400
-+++ b/src/fileviewer.cpp 2013-11-10 17:37:59.958987117 +0400
-@@ -286,7 +286,7 @@
- linenum = 0;
-
- m_text->SetReadOnly(false);
-- m_text->SetValue(data);
-+ m_text->SetText(data);
- m_text->SetReadOnly(true);
-
- m_text->MarkerDeleteAll(1);
diff --git a/development/qt-creator/clang-9.patch b/development/qt-creator/clang-9.patch
new file mode 100644
index 0000000000..d3e18b6a04
--- /dev/null
+++ b/development/qt-creator/clang-9.patch
@@ -0,0 +1,11 @@
+--- a/src/plugins/clangformat/clangformatutils.cpp 2019-09-23 22:09:30.394472064 +1000
++++ a/src/plugins/clangformat/clangformatutils.cpp 2019-09-23 22:11:54.426645315 +1000
+@@ -60,7 +60,7 @@
+ style.AllowShortBlocksOnASingleLine = false;
+ style.AllowShortCaseLabelsOnASingleLine = false;
+ style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
+- style.AllowShortIfStatementsOnASingleLine = false;
++ style.AllowShortIfStatementsOnASingleLine = FormatStyle::SIS_Never;
+ style.AllowShortLoopsOnASingleLine = false;
+ style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_None;
+ style.AlwaysBreakBeforeMultilineStrings = false;
diff --git a/development/qt-creator/qt-creator.SlackBuild b/development/qt-creator/qt-creator.SlackBuild
index e088f2281f..2b35b37e97 100644
--- a/development/qt-creator/qt-creator.SlackBuild
+++ b/development/qt-creator/qt-creator.SlackBuild
@@ -94,6 +94,8 @@ fi
patch -p0 < $CWD/remove-w-error-unguarded-availability-new.patch
+patch -p1 < $CWD/clang-9.patch
+
# Fix for https://lists.qt-project.org/pipermail/qt-creator/2019-May/008050.html
QMAKE_LFLAGS="$QMAKE_LFLAGS -L/usr/lib$LIBDIRSUFFIX"
diff --git a/development/re2c/README b/development/re2c/README
deleted file mode 100644
index 227f25951c..0000000000
--- a/development/re2c/README
+++ /dev/null
@@ -1,6 +0,0 @@
-re2c is a tool for writing very fast and very flexible scanners. Unlike
-any other such tool, re2c focuses on generating high efficient code for
-regular expression matching. As a result this allows a much broader
-range of use than any traditional lexer offers. And last but not least
-re2c generates warning free code that is equal to hand-written code in
-terms of size, speed and quality.
diff --git a/development/re2c/re2c.SlackBuild b/development/re2c/re2c.SlackBuild
deleted file mode 100644
index 62ed7ff0ae..0000000000
--- a/development/re2c/re2c.SlackBuild
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for re2c
-
-# Copyright 2008-2015 LukenShiro, Italy
-# Copyright 2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
-# 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.
-
-PRGNAM=re2c
-VERSION=${VERSION:-1.3}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-# .html file needs to be manually installed
-DOCFILES="README.md CHANGELOG LICENSE NO_WARRANTY"
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
-cd $PRGNAM-$VERSION
-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 {} \;
-
-# --htmldir= is ignored
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --mandir=/usr/man \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --docdir=/usr/doc/$PRGNAM-$VERSION
-
-make
-# in order to regenerate scanner.cc file
-rm -f scanner.cc
-
-make install-strip DESTDIR=$PKG
-
-# compress man pages
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-# remove windows-only files
-rm -rf lessons/001_upn_calculator/windows/
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION
-
-# copy other doc files
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples
-cp -R examples/* /$PKG/usr/doc/$PRGNAM-$VERSION/examples/
-
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/re2c/re2c.info b/development/re2c/re2c.info
deleted file mode 100644
index e539cb6a48..0000000000
--- a/development/re2c/re2c.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="re2c"
-VERSION="1.3"
-HOMEPAGE="http://re2c.org/"
-DOWNLOAD="https://github.com/skvadrik/re2c/releases/download/1.3/re2c-1.3.tar.xz"
-MD5SUM="03a0579eb69ee949889a63cad91223b9"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Matteo Bernardini"
-EMAIL="ponce@slackbuilds.org"
diff --git a/development/re2c/slack-desc b/development/re2c/slack-desc
deleted file mode 100644
index 3c90f77767..0000000000
--- a/development/re2c/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-re2c: re2c (regular expressions to C/C++ conversion tool)
-re2c:
-re2c: It is a tool for writing very fast and very flexible scanners. Unlike
-re2c: any other such tool, re2c focuses on generating high efficient code
-re2c: for regular expression matching. As a result this allows a much
-re2c: broader range of use than any traditional lexer offers. And last but
-re2c: not least re2c generates warning free code that is equal to
-re2c: hand-written code in terms of size, speed and quality
-re2c:
-re2c: Homepage: http://re2c.org
-re2c:
diff --git a/development/sbcl/glibc-2.26.patch b/development/sbcl/glibc-2.26.patch
new file mode 100644
index 0000000000..3df2b03958
--- /dev/null
+++ b/development/sbcl/glibc-2.26.patch
@@ -0,0 +1,13 @@
+--- a/src/runtime/x86-64-linux-os.h.ORIG 2017-08-31 11:40:51.000000000 +0200
++++ b/src/runtime/x86-64-linux-os.h 2017-08-31 18:56:10.447100144 +0200
+@@ -1,7 +1,9 @@
+ #ifndef _X86_64_LINUX_OS_H
+ #define _X86_64_LINUX_OS_H
+
+-typedef struct ucontext os_context_t;
++#include <sys/ucontext.h>
++
++typedef struct ucontext_t os_context_t;
+ typedef long os_context_register_t;
+
+ static inline os_context_t *arch_os_get_context(void **void_context)
diff --git a/development/sbcl/sbcl.SlackBuild b/development/sbcl/sbcl.SlackBuild
index 9dd7647909..d3a2335bfd 100644
--- a/development/sbcl/sbcl.SlackBuild
+++ b/development/sbcl/sbcl.SlackBuild
@@ -71,6 +71,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 < $CWD/glibc-2.26.patch
+
sh make.sh clisp --prefix=/usr --fancy
make -C doc/manual info
diff --git a/development/spice-protocol/spice-protocol.SlackBuild b/development/spice-protocol/spice-protocol.SlackBuild
index 1f7aa817c5..db12ac575f 100644
--- a/development/spice-protocol/spice-protocol.SlackBuild
+++ b/development/spice-protocol/spice-protocol.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
# Slackware build script for spice-protocol
+
# Copyright 2013-2019 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
@@ -22,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=spice-protocol
-VERSION=${VERSION:-0.12.15}
+VERSION=${VERSION:-0.14.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -33,7 +34,7 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README"
+DOCS="AUTHORS COPYING CHANGELOG.md README.md"
set -e
diff --git a/development/spice-protocol/spice-protocol.info b/development/spice-protocol/spice-protocol.info
index 5dcc44acff..9bec7adafc 100644
--- a/development/spice-protocol/spice-protocol.info
+++ b/development/spice-protocol/spice-protocol.info
@@ -1,8 +1,8 @@
PRGNAM="spice-protocol"
-VERSION="0.12.15"
+VERSION="0.14.0"
HOMEPAGE="https://www.spice-space.org"
-DOWNLOAD="https://www.spice-space.org/download/releases/spice-protocol-0.12.15.tar.bz2"
-MD5SUM="e1db63e3ff0cb1f1c98277283356dc51"
+DOWNLOAD="https://www.spice-space.org/download/releases/spice-protocol-0.14.0.tar.bz2"
+MD5SUM="773a6b31df105a6b3c470eba201bed34"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/development/swfmill/swfmill.SlackBuild b/development/swfmill/swfmill.SlackBuild
index 5881f08825..910f31fa33 100644
--- a/development/swfmill/swfmill.SlackBuild
+++ b/development/swfmill/swfmill.SlackBuild
@@ -54,7 +54,7 @@ find -L . \
export CFLAGS=""
-export CXXFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS -Wno-error=narrowing"
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/development/tora/README b/development/tora/README
index e1c08a248a..b109aec98a 100644
--- a/development/tora/README
+++ b/development/tora/README
@@ -5,3 +5,5 @@ through Qt's ODBC support.
For Oracle DBMS support, run the script like this,
ORACLE_HOME=/path/to/oracle/home ./tora.Slackbuild
+
+postgresql is an autodetected dependency.
diff --git a/development/tora/tora.SlackBuild b/development/tora/tora.SlackBuild
index 9245687cbb..e0150dab62 100644
--- a/development/tora/tora.SlackBuild
+++ b/development/tora/tora.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=tora
-VERSION=${VERSION:-2.1.3}
+VERSION=${VERSION:-20170725_d9fddb8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -60,11 +60,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
cd $PRGNAM-$VERSION
-
-patch -Np1 -i "${CWD}/include_unistd.patch"
-
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -79,12 +76,13 @@ cd build
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DWANT_INTERNAL_QSCINTILLA=0 \
+ -DWANT_INTERNAL_QSCINTILLA=1 \
+ -DWANT_INTERNAL_LOKI=1 \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
-
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -94,7 +92,7 @@ mkdir -p $PKG/usr/share/icons/hicolor/{32x32,16x16}/apps
mkdir -p $PKG/usr/share/applications
( cd $TMP/$PRGNAM-$VERSION
- cp -a AUTHORS BUGS ChangeLog COPYING* README* TODO NEWS $PKG/usr/doc/$PRGNAM-$VERSION
+ cp -a AUTHORS ChangeLog COPYING* README* TODO NEWS $PKG/usr/doc/$PRGNAM-$VERSION
cp -a src/help/*.html $PKG/usr/doc/$PRGNAM-$VERSION/help
cp -a src/help/images/*.png $PKG/usr/doc/$PRGNAM-$VERSION/help/images
cp -a src/icons/tora.xpm $PKG/usr/share/icons/hicolor/32x32/apps
diff --git a/development/tora/tora.info b/development/tora/tora.info
index a03ef294b4..c90540fffe 100644
--- a/development/tora/tora.info
+++ b/development/tora/tora.info
@@ -1,10 +1,10 @@
PRGNAM="tora"
-VERSION="2.1.3"
+VERSION="3.2"
HOMEPAGE="http://torasql.com"
-DOWNLOAD="http://sourceforge.net/projects/tora/files/tora/2.1.3/tora-2.1.3.tar.bz2"
-MD5SUM="b3a4b5c827c300e75eea53874634e8a2"
+DOWNLOAD="http://ponce.cc/slackware/sources/repo/tora-20170725_d9fddb8.tar.xz"
+MD5SUM="0ebe7f9420b719d3062cf6598c9b8fc6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="qt5"
MAINTAINER="Giuseppe Di Terlizzi"
EMAIL="giuseppe.diterlizzi@gmail.com"
diff --git a/development/vala/README b/development/vala/README
deleted file mode 100644
index 8c6d4c8a21..0000000000
--- a/development/vala/README
+++ /dev/null
@@ -1,4 +0,0 @@
-Vala is a new programming language that aims to bring modern programming
-language features to GNOME developers without imposing any additional
-runtime requirements and without using a different ABI compared to
-applications and libraries written in C.
diff --git a/development/vala/patch_support-gtk318.diff b/development/vala/patch_support-gtk318.diff
deleted file mode 100644
index cace5971c7..0000000000
--- a/development/vala/patch_support-gtk318.diff
+++ /dev/null
@@ -1,50 +0,0 @@
---- vala-0.34.2/vapi/gtk+-3.0.vapi.orig 2016-09-27 22:44:37.000000000 +1000
-+++ vala-0.34.2/vapi/gtk+-3.0.vapi 2016-11-14 16:24:16.635334244 +1000
-@@ -840,6 +840,7 @@
- [CCode (has_construct_function = false, type = "GtkWidget*")]
- public Button.with_mnemonic (string label);
- public bool always_show_image { get; set construct; }
-+ public bool focus_on_click { get; set; }
- public Gtk.Widget image { get; set; }
- public Gtk.PositionType image_position { get; set; }
- public string label { get; set construct; }
-@@ -1573,6 +1574,7 @@
- public Gtk.CellArea cell_area { owned get; construct; }
- public int column_span_column { get; set; }
- public int entry_text_column { get; set; }
-+ public bool focus_on_click { get; set; }
- public bool has_entry { get; construct; }
- [NoAccessorMethod]
- public bool has_frame { get; set; }
-@@ -2080,6 +2082,7 @@
- [CCode (has_construct_function = false, type = "GtkWidget*")]
- public FileChooserButton.with_dialog (Gtk.Dialog dialog);
- public Gtk.FileChooser dialog { construct; }
-+ public bool focus_on_click { get; set; }
- public string title { get; set; }
- public int width_chars { get; set; }
- public virtual signal void file_set ();
-@@ -6692,7 +6695,6 @@
- public unowned Gdk.Display get_display ();
- public bool get_double_buffered ();
- public int get_events ();
-- public bool get_focus_on_click ();
- public unowned Pango.FontMap? get_font_map ();
- public unowned Cairo.FontOptions? get_font_options ();
- public unowned Gdk.FrameClock? get_frame_clock ();
-@@ -6859,7 +6861,6 @@
- public void set_direction (Gtk.TextDirection dir);
- public void set_double_buffered (bool double_buffered);
- public void set_events (int events);
-- public void set_focus_on_click (bool focus_on_click);
- public void set_font_map (Pango.FontMap? font_map);
- public void set_font_options (Cairo.FontOptions? options);
- public void set_halign (Gtk.Align align);
-@@ -6927,7 +6928,6 @@
- public Gdk.EventMask events { get; set; }
- [NoAccessorMethod]
- public bool expand { get; set; }
-- public bool focus_on_click { get; set; }
- public Gtk.Align halign { get; set; }
- [NoAccessorMethod]
- public bool has_default { get; set; }
diff --git a/development/vala/slack-desc b/development/vala/slack-desc
deleted file mode 100644
index 77e7b20230..0000000000
--- a/development/vala/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-vala: vala (Compiler for the GObject type system)
-vala:
-vala: Vala is a new programming language that aims to bring modern
-vala: programming language features to GNOME developers without imposing
-vala: any additional runtime requirements and without using a different
-vala: ABI compared to applications and libraries written in C.
-vala:
-vala:
-vala:
-vala:
-vala:
diff --git a/development/vala/vala.SlackBuild b/development/vala/vala.SlackBuild
deleted file mode 100644
index b1a58fde29..0000000000
--- a/development/vala/vala.SlackBuild
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for Vala
-
-# Copyright 2009-2016 Erik W. Hanson, Minneapolis, MN, USA
-# Copyright 2016 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-# 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.
-
-PRGNAM=vala
-VERSION=${VERSION:-0.34.9}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -eu
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-# Patch to support older GTK+3
-patch -p1 < $CWD/patch_support-gtk318.diff
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --mandir=/usr/man/ \
- --disable-static \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --build=$ARCH-slackware-linux
-
-make
-make install-strip DESTDIR=$PKG
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README THANKS \
- $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/vala/vala.info b/development/vala/vala.info
deleted file mode 100644
index a3db035038..0000000000
--- a/development/vala/vala.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="vala"
-VERSION="0.34.9"
-HOMEPAGE="https://wiki.gnome.org/Projects/Vala"
-DOWNLOAD="https://download.gnome.org/sources/vala/0.34/vala-0.34.9.tar.xz"
-MD5SUM="f8bb81971065d7208447ad2437883a0d"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Willy Sudiarto Raharjo"
-EMAIL="willysr@slackbuilds.org"
diff --git a/development/woff2/README b/development/woff2/README
deleted file mode 100644
index ab5a471f4a..0000000000
--- a/development/woff2/README
+++ /dev/null
@@ -1 +0,0 @@
-woff2 is a font compression reference code
diff --git a/development/woff2/slack-desc b/development/woff2/slack-desc
deleted file mode 100644
index 526392fda2..0000000000
--- a/development/woff2/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 ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-woff2: woff2 (Web Open Font Format 2 reference implementation)
-woff2:
-woff2: woff2 is a font compression reference code
-woff2:
-woff2:
-woff2:
-woff2:
-woff2:
-woff2: Project URL: https://github.com/google/woff2
-woff2:
-woff2:
diff --git a/development/woff2/woff2.SlackBuild b/development/woff2/woff2.SlackBuild
deleted file mode 100644
index 2b10ec23cc..0000000000
--- a/development/woff2/woff2.SlackBuild
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/bin/sh
-
-# Slackware build script for woff2
-
-# Copyright 2018 Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-# 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.
-
-PRGNAM=woff2
-VERSION=${VERSION:-1.0.2}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-
-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/SBo}
-PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp}
-
-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
-
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $PRGNAM-$VERSION
-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 {} \;
-
-sed -i "s/NOT BUILD_SHARED_LIBS/TRUE/" CMakeLists.txt
-cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} .
-DESTDIR="$PKG" ninja install
-
-find $PKG -print0 | xargs -0 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/$PRGNAM-$VERSION
-cp -a *.txt *.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/woff2/woff2.info b/development/woff2/woff2.info
deleted file mode 100644
index d05a989518..0000000000
--- a/development/woff2/woff2.info
+++ /dev/null
@@ -1,10 +0,0 @@
-PRGNAM="woff2"
-VERSION="1.0.2"
-HOMEPAGE="https://github.com/google/woff2/"
-DOWNLOAD="https://github.com/google/woff2/archive/v1.0.2/woff2-1.0.2.tar.gz"
-MD5SUM="793c8844845351cb80730a74937e411b"
-DOWNLOAD_x86_64=""
-MD5SUM_x86_64=""
-REQUIRES="brotli ninja"
-MAINTAINER="Willy Sudiarto Raharjo"
-EMAIL="willysr@slackbuilds.org"