commit:     9dea735590ebfff278710148fa8743777a18c4bd
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 30 16:26:34 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Aug 30 20:41:34 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=9dea7355

Add support for LVM thin provisioning

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/software.sh                               | 28 ++++++++
 gen_initramfs.sh                                   |  5 ++
 gkbuilds/boost-build.gkbuild                       | 68 ++++++++++++++++++
 gkbuilds/boost.gkbuild                             | 80 +++++++++++++++++++++
 gkbuilds/expat.gkbuild                             | 18 +++++
 gkbuilds/lvm.gkbuild                               |  7 ++
 gkbuilds/thin-provisioning-tools.gkbuild           | 33 +++++++++
 .../boost-build-1.50.0-respect-c_ld-flags.patch    | 53 ++++++++++++++
 .../1.70.0/boost-build-1.55.0-ppc-aix.patch        | 13 ++++
 ...boost-build-1.62.0-sparc-no-default-flags.patch | 47 ++++++++++++
 ...ost-build-1.66.0-add-none-feature-options.patch | 26 +++++++
 ...thin-provisioning-tools-0.7.0-build-fixes.patch | 34 +++++++++
 ...n-provisioning-tools-0.8.5-libaio-0.3.112.patch | 84 ++++++++++++++++++++++
 13 files changed, 496 insertions(+)

diff --git a/defaults/software.sh b/defaults/software.sh
index ec4dc78..363013f 100644
--- a/defaults/software.sh
+++ b/defaults/software.sh
@@ -9,6 +9,20 @@
 # - This file should not override previously defined variables, as their 
values may
 #   originate from user changes to /etc/genkernel.conf .
 
+GKPKG_BOOST_PN="boost"
+GKPKG_BOOST_PV="${GKPKG_BOOST_PV:-VERSION_BOOST}"
+GKPKG_BOOST_DEPS="boost-build"
+GKPKG_BOOST_SRCTAR="${GKPKG_BOOST_SRCTAR:-${DISTDIR}/boost_${GKPKG_BOOST_PV//./_}.tar.bz2}"
+GKPKG_BOOST_SRCDIR="${GKPKG_BOOST_SRCDIR:-boost_${GKPKG_BOOST_PV//./_}}"
+GKPKG_BOOST_BINPKG="${GKPKG_BOOST_BINPKG:-%%CACHE%%/boost-${GKPKG_BOOST_PV}-%%ARCH%%.tar.xz}"
+
+GKPKG_BOOST_BUILD_PN="boost-build"
+GKPKG_BOOST_BUILD_PV="${GKPKG_BOOST_PV}"
+GKPKG_BOOST_BUILD_DEPS=""
+GKPKG_BOOST_BUILD_SRCTAR="${GKPKG_BOOST_SRCTAR}"
+GKPKG_BOOST_BUILD_SRCDIR="${GKPKG_BOOST_SRCDIR}"
+GKPKG_BOOST_BUILD_BINPKG="${GKPKG_BOOST_BUILD_BINPKG:-%%CACHE%%/boost-build-${GKPKG_BOOST_BUILD_PV}.tar.xz}"
+
 GKPKG_BTRFS_PROGS_PN="btrfs-progs"
 GKPKG_BTRFS_PROGS_PV="${GKPKG_BTRFS_PROGS_PV:-VERSION_BTRFS_PROGS}"
 GKPKG_BTRFS_PROGS_DEPS="util-linux zlib zstd lzo"
@@ -51,6 +65,13 @@ 
GKPKG_EUDEV_SRCTAR="${GKPKG_EUDEV_SRCTAR:-${DISTDIR}/eudev-${GKPKG_EUDEV_PV}.tar
 GKPKG_EUDEV_SRCDIR="${GKPKG_EUDEV_SRCDIR:-eudev-${GKPKG_EUDEV_PV}}"
 
GKPKG_EUDEV_BINPKG="${GKPKG_EUDEV_BINPKG:-%%CACHE%%/eudev-${GKPKG_EUDEV_PV}-%%ARCH%%.tar.xz}"
 
+GKPKG_EXPAT_PN="expat"
+GKPKG_EXPAT_PV="${GKPKG_EXPAT_PV:-VERSION_EXPAT}"
+GKPKG_EXPAT_DEPS=""
+GKPKG_EXPAT_SRCTAR="${GKPKG_EXPAT_SRCTAR:-${DISTDIR}/expat-${GKPKG_EXPAT_PV}.tar.xz}"
+GKPKG_EXPAT_SRCDIR="${GKPKG_EXPAT_SRCDIR:-expat-${GKPKG_EXPAT_PV}}"
+GKPKG_EXPAT_BINPKG="${GKPKG_EXPAT_BINPKG:-%%CACHE%%/expat-${GKPKG_EXPAT_PV}-%%ARCH%%.tar.xz}"
+
 GKPKG_E2FSPROGS_PN="e2fsprogs"
 GKPKG_E2FSPROGS_PV="${GKPKG_E2FSPROGS_PV:-VERSION_E2FSPROGS}"
 GKPKG_E2FSPROGS_DEPS="util-linux"
@@ -149,6 +170,13 @@ 
GKPKG_STRACE_SRCTAR="${GKPKG_STRACE_SRCTAR:-${DISTDIR}/strace-${GKPKG_STRACE_PV}
 GKPKG_STRACE_SRCDIR="${GKPKG_STRACE_SRCDIR:-strace-${GKPKG_STRACE_PV}}"
 
GKPKG_STRACE_BINPKG="${GKPKG_STRACE_BINPKG:-%%CACHE%%/strace-${GKPKG_STRACE_PV}-%%ARCH%%.tar.xz}"
 
+GKPKG_THIN_PROVISIONING_TOOLS_PN="thin-provisioning-tools"
+GKPKG_THIN_PROVISIONING_TOOLS_PV="${GKPKG_THIN_PROVISIONING_TOOLS_PV:-VERSION_THIN_PROVISIONING_TOOLS}"
+GKPKG_THIN_PROVISIONING_TOOLS_DEPS="boost libaio expat"
+GKPKG_THIN_PROVISIONING_TOOLS_SRCTAR="${GKPKG_THIN_PROVISIONING_TOOLS_SRCTAR:-${DISTDIR}/thin-provisioning-tools-${GKPKG_THIN_PROVISIONING_TOOLS_PV}.tar.gz}"
+GKPKG_THIN_PROVISIONING_TOOLS_SRCDIR="${GKPKG_THIN_PROVISIONING_TOOLS_SRCDIR:-thin-provisioning-tools-${GKPKG_THIN_PROVISIONING_TOOLS_PV}}"
+GKPKG_THIN_PROVISIONING_TOOLS_BINPKG="${GKPKG_THIN_PROVISIONING_TOOLS_BINPKG:-%%CACHE%%/thin-provisioning-tools-${GKPKG_THIN_PROVISIONING_TOOLS_PV}-%%ARCH%%.tar.xz}"
+
 GKPKG_UNIONFS_FUSE_PN="unionfs-fuse"
 GKPKG_UNIONFS_FUSE_PV="${GKPKG_UNIONFS_FUSE_PV:-VERSION_UNIONFS_FUSE}"
 GKPKG_UNIONFS_FUSE_DEPS="fuse"

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 23ed9dc..e007fde 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -578,10 +578,12 @@ append_lvm() {
        fi
 
        populate_binpkg ${PN}
+       populate_binpkg thin-provisioning-tools
 
        mkdir "${TDIR}" || gen_die "Failed to create '${TDIR}'!"
 
        unpack "$(get_gkpkg_binpkg "${PN}")" "${TDIR}"
+       unpack "$(get_gkpkg_binpkg "thin-provisioning-tools")" "${TDIR}"
 
        cd "${TDIR}" || gen_die "Failed to chdir to '${TDIR}'!"
 
@@ -630,6 +632,9 @@ append_lvm() {
                        -e '/^[[:space:]]*monitoring/s,=.*,= 0,g' \
                        -e '/^[[:space:]]*external_device_info_source/s,=.*,= 
"none",g' \
                        -e '/^[[:space:]]*units/s,=.*"r",= "h",g' \
+                       -e '/^[[:space:]]*thin_repair_executable/s,=.*,= 
/usr/sbin/thin_repair,g' \
+                       -e '/^[[:space:]]*thin_dump_executable/s,=.*,= 
/usr/sbin/thin_dump,g' \
+                       -e '/^[[:space:]]*thin_check_executable/s,=.*,= 
/usr/sbin/thin_check,g' \
                        "${TDIR}"/etc/lvm/lvm.conf \
                                || gen_die 'Could not sed lvm.conf!'
        fi

diff --git a/gkbuilds/boost-build.gkbuild b/gkbuilds/boost-build.gkbuild
new file mode 100644
index 0000000..17673c1
--- /dev/null
+++ b/gkbuilds/boost-build.gkbuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+MY_PV="${PV//./_}"
+S="${WORKDIR}/boost_${MY_PV}/tools/build/src"
+QA_IGNORE_DYNAMICALLY_LINKED_PROGRAM='(bjam|b2)$'
+
+src_prepare() {
+       default
+
+       # Force regeneration
+       rm engine/jambase.c \
+               || die "Failed to remove 'engine/jambase.c'!"
+
+       # This patch allows us to fully control optimization
+       # and stripping flags when bjam is used as build-system
+       # We simply extend the optimization and debug-symbols feature
+       # with empty dummies called 'none'
+       sed -i \
+               -e 's/\(off speed space\)/\1 none/' \
+               -e 's/\(debug-symbols      : on off\)/\1 none/' \
+               tools/builtin.jam \
+               || die "sed failed"
+}
+
+src_compile() {
+       cd engine || die "Failed to chdir to '${S}/engine'!"
+
+       local myargs=(
+               ./build.sh
+               cc
+               -d+2
+               --without-python
+       )
+
+       CC=$(tc-getBUILD_CC) gkexec "${myargs[*]}"
+}
+
+src_install() {
+       mkdir -p "${D}"/usr/bin \
+               || die "Failed to create '${D}/usr/bin'!"
+
+       cp --target-directory="${D}/usr/bin" engine/bin.*/{bjam,b2} \
+               || die "Failed to install 'engine/bin.*/{bjam,b2}' to 
'${D}/usr/bin'!"
+
+       mkdir -p "${D}"/usr/share/boost-build \
+               || die "Failed to create '${D}/usr/share/boost-build'!"
+
+       cp \
+               --recursive \
+               --target-directory="${D}/usr/share/boost-build" \
+               ../boost-build.jam \
+               bootstrap.jam \
+               build-system.jam \
+               ../example/user-config.jam \
+               build \
+               kernel \
+               options \
+               tools \
+               util \
+               || die "Failed to copy *.jam files to 
'${D}/usr/share/boost-build'!"
+
+       find "${D}/usr/share/boost-build" -iname "*.py" -delete \
+               || die "Failed to remove python files"
+
+       echo 'variant gentoorelease : release : <optimization>none 
<debug-symbols>none <runtime-link>shared ;' > 
"${D}/usr/share/boost-build/site-config.jam" \
+               || die "Failed to create 
'${D}/usr/share/boost-build/site-config.jam'!"
+}

diff --git a/gkbuilds/boost.gkbuild b/gkbuilds/boost.gkbuild
new file mode 100644
index 0000000..8b1012b
--- /dev/null
+++ b/gkbuilds/boost.gkbuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+create_user-config.jam() {
+       local user_config_jam="${S}"/user-config.jam
+       if [[ -s ${user_config_jam} ]]; then
+               return
+       fi
+
+       local compiler compiler_version compiler_executable="$(tc-getCXX)"
+       compiler="gcc"
+       compiler_version="$(gcc-version)"
+
+       cat > "${user_config_jam}" <<- __EOF__ || die
+               using ${compiler} : ${compiler_version} : 
${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" 
<linkflags>"${LDFLAGS}" ;
+       __EOF__
+}
+
+ejam() {
+       create_user-config.jam
+
+       local myargs=(
+               b2
+               "--user-config=${S}/user-config.jam"
+               --without-python
+               "$@"
+       )
+
+       gkexec "${myargs[*]}"
+}
+
+src_configure() {
+       # Workaround for too many parallel processes requested, bug #506064
+       [[ "$(makeopts_jobs)" -gt 64 ]] && MAKEOPTS="${MAKEOPTS} -j64"
+
+       OPTIONS=(
+               gentoorelease
+               "-j$(makeopts_jobs)"
+               -q
+               -d+2
+               pch=off
+               --disable-icu boost.locale.icu=off
+               --without-mpi
+               --without-locale
+               --without-context --without-coroutine --without-fiber
+               --without-stacktrace
+               --boost-build="${BROOT}"/usr/share/boost-build
+               --prefix="/usr"
+               --layout=system
+               --no-cmake-config
+               threading=multi
+               link=shared,static
+               # this seems to be the only way to disable compression 
algorithms
+               # 
https://www.boost.org/doc/libs/1_70_0/libs/iostreams/doc/installation.html#boost-build
+               -sNO_BZIP2=1
+               -sNO_LZMA=1
+               -sNO_ZLIB=1
+               -sNO_ZSTD=1
+       )
+
+       # bug 298489
+       if [[ "${CHOST}" == powerpc* ]]; then
+               [[ $(gcc-version) > 4.3 ]] && append-flags -mno-altivec
+       fi
+
+       # Use C++14 globally as of 1.62
+       append-cxxflags -std=c++14
+}
+
+src_compile() {
+       ejam "${OPTIONS[@]}" || die "Compilation of Boot libraries failed!"
+}
+
+src_install() {
+       ejam \
+               "${OPTIONS[@]}" \
+               --includedir="${D}/usr/include" \
+               --libdir="${D}/usr/lib" \
+               install || die "Installation of Boost libraries failed!"
+}

diff --git a/gkbuilds/expat.gkbuild b/gkbuilds/expat.gkbuild
new file mode 100644
index 0000000..e280846
--- /dev/null
+++ b/gkbuilds/expat.gkbuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_configure() {
+       local myconf=(
+               --enable-static
+       )
+
+       gkconf "${myconf[@]}"
+}
+
+src_install() {
+       default
+
+       rm -rf \
+               "${D}"/usr/bin \
+               "${D}"/usr/share
+}

diff --git a/gkbuilds/lvm.gkbuild b/gkbuilds/lvm.gkbuild
index 05fd087..9cedead 100644
--- a/gkbuilds/lvm.gkbuild
+++ b/gkbuilds/lvm.gkbuild
@@ -27,6 +27,13 @@ src_configure() {
                --disable-udev_rules
        )
 
+       local texec
+       for texec in check dump repair restore
+       do
+               myconf+=( --with-thin-${texec}=/usr/sbin/thin_${texec} )
+               myconf+=( --with-cache-${texec}=/usr/sbin/cache_${texec} )
+       done
+
        gkconf "${myconf[@]}"
 }
 

diff --git a/gkbuilds/thin-provisioning-tools.gkbuild 
b/gkbuilds/thin-provisioning-tools.gkbuild
new file mode 100644
index 0000000..64500c9
--- /dev/null
+++ b/gkbuilds/thin-provisioning-tools.gkbuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+src_prepare() {
+       default
+       gkautoreconf
+}
+
+src_configure() {
+       append-ldflags -static
+
+       local myconf=(
+               --with-optimisation=''
+               --disable-testing
+       )
+
+       gkconf "${myconf[@]}"
+}
+
+src_compile() {
+       gkmake
+}
+
+src_install() {
+       local MYMAKEOPTS=( "DESTDIR=${D}" )
+       MYMAKEOPTS+=( "DATADIR=${D}/usr/share" )
+       MYMAKEOPTS+=( "install" )
+
+       gkmake "${MYMAKEOPTS[@]}"
+
+       rm -rf \
+               "${D}"/usr/share
+}

diff --git 
a/patches/boost-build/1.70.0/boost-build-1.50.0-respect-c_ld-flags.patch 
b/patches/boost-build/1.70.0/boost-build-1.50.0-respect-c_ld-flags.patch
new file mode 100644
index 0000000..8775583
--- /dev/null
+++ b/patches/boost-build/1.70.0/boost-build-1.50.0-respect-c_ld-flags.patch
@@ -0,0 +1,53 @@
+--- a/engine/build.jam
++++ b/engine/build.jam
+@@ -3,7 +3,7 @@
+ #~ (See accompanying file LICENSE_1_0.txt or 
http://www.boost.org/LICENSE_1_0.txt)
+ 
+ # Clean env vars of any "extra" empty values.
+-for local v in ARGV CC CFLAGS LIBS
++for local v in ARGV CC CFLAGS LDFLAGS LIBS
+ {
+       local values ;
+       for local x in $($(v))
+@@ -179,10 +179,10 @@
+ if ! $(CC) { CC = cc ; }
+ toolset cc $(CC) : "-o " : -D
+     : $(CFLAGS)
+-    [ opt --release : -s -O ]
++    [ opt --release : ]
+     [ opt --debug : -g ]
+     -I$(--python-include) -I$(--extra-include)
+-    : $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
++    : $(LDFLAGS) $(LIBS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+ ## Comeau C/C++ 4.x
+ toolset como como : "-o " : -D
+     : --c
+@@ -201,11 +201,11 @@
+ ## MacOSX Darwin, using GCC 2.9.x, 3.x
+ toolset darwin cc :  "-o " : -D
+     :
+-    [ opt --release : -Wl,-x -O3 -finline-functions ]
++    [ opt --release : -Wl,-x -finline-functions ]
+     [ opt --debug : -g -O0 -fno-inline -pg ]
+     [ opt --profile : -Wl,-x -O3 -finline-functions -g -pg ]
+     -I$(--python-include) -I$(--extra-include)
+-    : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
++    : $(LDFLAGS) -L$(--python-lib[1]) -l$(--python-lib[2]) ;
+ ## GCC 2.x, 3.x, 4.x
+ toolset gcc gcc : "-o " : -D
+     : -pedantic -fno-strict-aliasing
+--- a/engine/build.sh
++++ b/engine/build.sh
+@@ -224,9 +224,9 @@
+     cc)
+     if test -z "$CC" ; then CC=cc ; fi
+     BOOST_JAM_CC=$CC
+-    BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM $CFLAGS $LIBS"
+-    BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE $CFLAGS $LIBS"
+-    BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS $LIBS"
++    BOOST_JAM_OPT_JAM="$BOOST_JAM_OPT_JAM $CFLAGS $LDFLAGS $LIBS"
++    BOOST_JAM_OPT_MKJAMBASE="$BOOST_JAM_OPT_MKJAMBASE $CFLAGS $LDFLAGS $LIBS"
++    BOOST_JAM_OPT_YYACC="$BOOST_JAM_OPT_YYACC $CFLAGS $LDFLAGS $LIBS"
+     ;;
+ 
+     qcc)

diff --git a/patches/boost-build/1.70.0/boost-build-1.55.0-ppc-aix.patch 
b/patches/boost-build/1.70.0/boost-build-1.55.0-ppc-aix.patch
new file mode 100644
index 0000000..d8b6a5a
--- /dev/null
+++ b/patches/boost-build/1.70.0/boost-build-1.55.0-ppc-aix.patch
@@ -0,0 +1,13 @@
+https://svn.boost.org/trac/boost/ticket/10122
+
+--- a/engine/mem.h
++++ b/engine/mem.h
+@@ -8,6 +8,8 @@
+ #ifndef BJAM_MEM_H
+ #define BJAM_MEM_H
+ 
++#include "jam.h"
++
+ #ifdef OPT_BOEHM_GC
+ 
+     /* Use Boehm GC memory allocator. */

diff --git 
a/patches/boost-build/1.70.0/boost-build-1.62.0-sparc-no-default-flags.patch 
b/patches/boost-build/1.70.0/boost-build-1.62.0-sparc-no-default-flags.patch
new file mode 100644
index 0000000..a3f450b
--- /dev/null
+++ b/patches/boost-build/1.70.0/boost-build-1.62.0-sparc-no-default-flags.patch
@@ -0,0 +1,47 @@
+--- a/tools/gcc.py     2018-09-07 17:44:59.668796217 +0200
++++ b/tools/gcc.py     2018-09-07 17:45:56.378794314 +0200
+@@ -811,20 +811,6 @@
+ # Sparc
+ flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>32'], ['-m32'])
+ flags('gcc', 'OPTIONS', ['<architecture>sparc/<address-model>64'], ['-m64'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'v7', ['-mcpu=v7'], default=True)
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'cypress', ['-mcpu=cypress'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'v8', ['-mcpu=v8'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'supersparc', ['-mcpu=supersparc'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclite', ['-mcpu=sparclite'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'hypersparc', ['-mcpu=hypersparc'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclite86x', ['-mcpu=sparclite86x'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'f930', ['-mcpu=f930'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'f934', ['-mcpu=f934'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'sparclet', ['-mcpu=sparclet'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'tsc701', ['-mcpu=tsc701'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'v9', ['-mcpu=v9'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'ultrasparc', ['-mcpu=ultrasparc'])
+-cpu_flags('gcc', 'OPTIONS', 'sparc', 'ultrasparc3', ['-mcpu=ultrasparc3'])
+ # RS/6000 & PowerPC
+ flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>32'], ['-m32'])
+ flags('gcc', 'OPTIONS', ['<architecture>power/<address-model>64'], ['-m64'])
+--- a/tools/gcc.jam    2018-09-07 17:45:12.168795797 +0200
++++ b/tools/gcc.jam    2018-09-07 17:46:25.498793337 +0200
+@@ -1134,21 +1134,6 @@
+ cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
+ ##
+ cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
+-# Sparc
+-cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
+-cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
+-cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
+-cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
+-cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
+-cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
+-cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
+-cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
+-cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
+-cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
+ # RS/6000 & PowerPC
+ cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
+ cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;

diff --git 
a/patches/boost-build/1.70.0/boost-build-1.66.0-add-none-feature-options.patch 
b/patches/boost-build/1.70.0/boost-build-1.66.0-add-none-feature-options.patch
new file mode 100644
index 0000000..fd86c9e
--- /dev/null
+++ 
b/patches/boost-build/1.70.0/boost-build-1.66.0-add-none-feature-options.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/features/debug-feature.jam 
b/tools/features/debug-feature.jam
+index 04958f9a..38b6acf1 100644
+--- a/tools/features/debug-feature.jam
++++ b/tools/features/debug-feature.jam
+@@ -8,7 +8,7 @@
+ import feature ;
+ 
+ feature.feature debug-symbols
+-    : on off
++    : on off none
+     : propagated ;
+ 
+ feature.feature profiling
+diff --git a/tools/features/optimization-feature.jam 
b/tools/features/optimization-feature.jam
+index 761f76f1..fb2a5dec 100644
+--- a/tools/features/optimization-feature.jam
++++ b/tools/features/optimization-feature.jam
+@@ -8,7 +8,7 @@
+ import feature ;
+ 
+ feature.feature optimization
+-    : off speed space
++    : off none speed space
+     : propagated ;
+ 
+ feature.feature inlining

diff --git 
a/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.7.0-build-fixes.patch
 
b/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.7.0-build-fixes.patch
new file mode 100644
index 0000000..df0831f
--- /dev/null
+++ 
b/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.7.0-build-fixes.patch
@@ -0,0 +1,34 @@
+--- thin-provisioning-tools-0.7.0/Makefile.in
++++ thin-provisioning-tools-0.7.0/Makefile.in
+@@ -142,9 +142,9 @@
+ 
+ TOP_DIR:=@top_srcdir@
+ TOP_BUILDDIR:=@top_builddir@
+-CFLAGS+=-g -Wall -O3 -fPIC
++CFLAGS+=-fPIC
+ CFLAGS+=@LFS_FLAGS@
+-CXXFLAGS+=-g -Wall -fPIC -fno-strict-aliasing -std=c++11
++CXXFLAGS+=-fPIC -fno-strict-aliasing -std=c++11
+ 
+ ifeq ("@DEVTOOLS@", "yes")
+ CXXFLAGS+=-DDEV_TOOLS
+--- thin-provisioning-tools-0.7.0/unit-tests/Makefile.in
++++ thin-provisioning-tools-0.7.0/unit-tests/Makefile.in
+@@ -25,7 +25,7 @@
+       -Wno-unused-local-typedefs
+ 
+ GMOCK_LIBS=\
+-      -Llib -lpdata -lgmock -lpthread -laio
++      -Llib -lpdata -lgmock -lpthread -laio -lgtest
+ 
+ GMOCK_DEPS=\
+       $(wildcard $(GMOCK_DIR)/googlemock/include/*.h) \
+@@ -83,7 +83,7 @@
+       sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > 
$*.d; \
+       $(RM) $*.$$$$
+ 
+-unit-tests/unit_tests: $(TEST_OBJECTS) lib/libgmock.a lib/libpdata.a
++unit-tests/unit_tests: $(TEST_OBJECTS) lib/libpdata.a
+       @echo "    [LD]  $<"
+       $(V)g++ $(CXXFLAGS) $(LDFLAGS) -o $@ $(TEST_OBJECTS) $(LIBS) 
$(GMOCK_LIBS) $(LIBEXPAT)
+ 

diff --git 
a/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch
 
b/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch
new file mode 100644
index 0000000..af31b90
--- /dev/null
+++ 
b/patches/thin-provisioning-tools/0.8.5/thin-provisioning-tools-0.8.5-libaio-0.3.112.patch
@@ -0,0 +1,84 @@
+From 6332962ee866f5289de87ab70cd3db863298982c Mon Sep 17 00:00:00 2001
+From: Joe Thornber <e...@redhat.com>
+Date: Wed, 5 Jun 2019 15:02:05 +0100
+Subject: [PATCH] [ft-lib/bcache] rename raise() -> raise_()
+
+Name clash with signal.h on Debian and Gentoo.
+---
+ ft-lib/bcache.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/ft-lib/bcache.c b/ft-lib/bcache.c
+index 0dca5031..ee5b6c59 100644
+--- a/ft-lib/bcache.c
++++ b/ft-lib/bcache.c
+@@ -31,7 +31,7 @@ static void warn(const char *fmt, ...)
+ }
+ 
+ // FIXME: raise a condition somehow?
+-static void raise(const char *fmt, ...)
++static void raise_(const char *fmt, ...)
+ {
+       va_list ap;
+ 
+@@ -51,7 +51,7 @@ static inline struct list_head *list_pop(struct list_head 
*head)
+       struct list_head *l;
+ 
+       if (head->next == head)
+-              raise("list is empty\n");
++              raise_("list is empty\n");
+ 
+       l = head->next;
+       list_del(l);
+@@ -98,7 +98,7 @@ static struct cb_set *cb_set_create(unsigned nr)
+ static void cb_set_destroy(struct cb_set *cbs)
+ {
+       if (!list_empty(&cbs->allocated))
+-              raise("async io still in flight");
++              raise_("async io still in flight");
+ 
+       free(cbs->vec);
+       free(cbs);
+@@ -713,13 +713,13 @@ struct bcache *bcache_simple(const char *path, unsigned 
nr_cache_blocks)
+       uint64_t s;
+ 
+       if (fd < 0) {
+-              raise("couldn't open cache file");
++              raise_("couldn't open cache file");
+               return NULL;
+       }
+ 
+       r = fstat(fd, &info);
+       if (r < 0) {
+-              raise("couldn't stat cache file");
++              raise_("couldn't stat cache file");
+               return NULL;
+       }
+ 
+@@ -751,7 +751,7 @@ void bcache_destroy(struct bcache *cache)
+ static void check_index(struct bcache *cache, block_address index)
+ {
+       if (index >= cache->nr_data_blocks)
+-              raise("block out of bounds (%llu >= %llu)",
++              raise_("block out of bounds (%llu >= %llu)",
+                     (unsigned long long) index,
+                     (unsigned long long) cache->nr_data_blocks);
+ }
+@@ -802,7 +802,7 @@ static struct block *lookup_or_read_block(struct bcache 
*cache,
+               // FIXME: this is insufficient.  We need to also catch a read
+               // lock of a write locked block.  Ref count needs to 
distinguish.
+               if (b->ref_count && (flags & (GF_DIRTY | GF_ZERO)))
+-                      raise("concurrent write lock attempt");
++                      raise_("concurrent write lock attempt");
+ 
+               if (test_flags(b, BF_IO_PENDING)) {
+                       miss(cache, flags);
+@@ -858,7 +858,7 @@ struct block *get_block(struct bcache *cache, 
block_address index, unsigned flag
+               return b;
+       }
+ 
+-      raise("couldn't get block");
++      raise_("couldn't get block");
+       return NULL;
+ }
+ 

Reply via email to