Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -0,0 +1,277 @@
From f563334a76e31442f7b8693d2d350e6981c51c46 Mon Sep 17 00:00:00 2001
From: Marcin Niestroj <m.niestroj@grinn-global.com>
Date: Fri, 20 Jul 2018 14:26:44 +0200
Subject: [PATCH] configure: Introduce --enable-symvers option
Only few libc (e.g. glibc) libraries support full symbol version
resolution in runtime. There are lot of standard libraries that do not
support that, such as dietlibc, musl and uclibc. Hence there is no
reason to generate symbol versions when compiling against them.
Additionally libdevmapper.so was broken when compiled against
uclibc. Runtime linker loader caused calling dm_task_get_info_base()
function recursively, leading to segmentation fault.
Introduce --enable-symvers[=STYLE] option, which allows to choose
between gnu and disabled symbol versioning. By default gnu symbol
versioning is used to provide backward compatibility.
__GNUC__ check is replaced now with GNU_SYMVER, which is generated by
configure script. Additionally ld version script is included only in
case of gnu option, which slightly reduces output size.
Providing --disable-symvers to configure script when building against
uclibc library fixes segmentation fault error described above, due to
lack of several versions of the same symbol in libdevmapper.so
library.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
configure | 32 ++++++++++++++++++++++++++++++--
configure.in | 28 +++++++++++++++++++++++++---
include/configure.h.in | 3 +++
lib/misc/lib.h | 10 +++++-----
libdm/datastruct/bitset.c | 5 +----
libdm/ioctl/libdm-iface.c | 2 +-
libdm/libdm-deptree.c | 2 +-
libdm/libdm-stats.c | 2 +-
8 files changed, 67 insertions(+), 17 deletions(-)
diff --git a/configure b/configure
index e1ae0e884..c5d11c1b6 100755
--- a/configure
+++ b/configure
@@ -985,6 +985,7 @@ enable_fsadm
enable_blkdeactivate
enable_dmeventd
enable_selinux
+enable_symvers
enable_nls
with_localedir
with_confdir
@@ -1729,6 +1730,9 @@ Optional Features:
--disable-blkdeactivate disable blkdeactivate
--enable-dmeventd enable the device-mapper event daemon
--disable-selinux disable selinux support
+ --enable-symvers[=STYLE]
+ enables symbol versioning of the shared library
+ [default=gnu]
--enable-nls enable Native Language Support
Optional Packages:
@@ -3169,7 +3173,6 @@ if test -z "$CFLAGS"; then :
fi
case "$host_os" in
linux*)
- CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
@@ -3190,7 +3193,6 @@ case "$host_os" in
;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
- CLDFLAGS="$CLDFLAGS"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
@@ -14609,6 +14611,32 @@ done
LIBS=$lvm_saved_libs
fi
+################################################################################
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable symbol versioning" >&5
+$as_echo_n "checking whether to enable symbol versioning... " >&6; }
+# Check whether --enable-symvers was given.
+if test "${enable_symvers+set}" = set; then :
+ enableval=$enable_symvers;
+ case "$enableval" in
+ gnu|no) ;;
+ *) as_fn_error $? "Unknown argument to enable/disable symvers" "$LINENO" 5 ;;
+ esac
+else
+ enable_symvers=gnu
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_symvers" >&5
+$as_echo "$enable_symvers" >&6; }
+
+if test x$GCC = xyes && test x$enable_symvers = xgnu ; then
+
+$as_echo "#define GNU_SYMVER 1" >>confdefs.h
+
+ case "$host_os" in
+ linux*) CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym" ;;
+ esac
+fi
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable internationalisation" >&5
$as_echo_n "checking whether to enable internationalisation... " >&6; }
diff --git a/configure.in b/configure.in
index 2e5e015c8..09c390850 100644
--- a/configure.in
+++ b/configure.in
@@ -30,12 +30,10 @@ AC_CANONICAL_TARGET([])
AS_IF([test -z "$CFLAGS"], [COPTIMISE_FLAG="-O2"])
case "$host_os" in
linux*)
- CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
ELDFLAGS="-Wl,--export-dynamic"
# FIXME Generate list and use --dynamic-list=.dlopen.sym
CLDWHOLEARCHIVE="-Wl,-whole-archive"
CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive"
- LDDEPS="$LDDEPS .export.sym"
LIB_SUFFIX=so
DEVMAPPER=yes
BUILD_LVMETAD=no
@@ -51,7 +49,6 @@ case "$host_os" in
;;
darwin*)
CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
- CLDFLAGS="$CLDFLAGS"
ELDFLAGS=
CLDWHOLEARCHIVE="-all_load"
CLDNOWHOLEARCHIVE=
@@ -1742,6 +1739,31 @@ package as well (which may be called readline-devel or something similar).])
LIBS=$lvm_saved_libs
fi
+################################################################################
+dnl -- Symbol versioning
+AC_MSG_CHECKING(whether to enable symbol versioning)
+AC_ARG_ENABLE(symvers,
+ AC_HELP_STRING([--enable-symvers[[[=STYLE]]]],
+ [enables symbol versioning of the shared library [default=gnu]]),
+ [
+ case "$enableval" in
+ gnu|no) ;;
+ *) AC_MSG_ERROR(Unknown argument to enable/disable symvers) ;;
+ esac],
+ enable_symvers=gnu)
+AC_MSG_RESULT($enable_symvers)
+
+if test x$GCC = xyes && test x$enable_symvers = xgnu ; then
+ AC_DEFINE(GNU_SYMVER, 1,
+ [Define to use GNU versioning in the shared library.])
+ case "$host_os" in
+ linux*)
+ CLDFLAGS="$CLDFLAGS -Wl,--version-script,.export.sym"
+ LDDEPS="$LDDEPS .export.sym"
+ ;;
+ esac
+fi
+
################################################################################
dnl -- Internationalisation stuff
AC_MSG_CHECKING(whether to enable internationalisation)
diff --git a/include/configure.h.in b/include/configure.h.in
index 51726506c..3fc181b1e 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -151,6 +151,9 @@
/* Path to fsadm binary. */
#undef FSADM_PATH
+/* Define to use GNU versioning in the shared library. */
+#undef GNU_SYMVER
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
diff --git a/lib/misc/lib.h b/lib/misc/lib.h
index 8ed06f81d..9b3ce8a03 100644
--- a/lib/misc/lib.h
+++ b/lib/misc/lib.h
@@ -42,16 +42,16 @@
* macro DM_EXPORT_SYMBOL to export the function and bind it to the
* specified version string.
*
- * Since versioning is only available when compiling with GCC the entire
- * compatibility version should be enclosed in '#if defined(__GNUC__)',
- * for example:
+ * Since versioning is only available when compiling with GCC
+ * and GLIBC the entire compatibility version should be enclosed
+ * in '#if defined(GNU_SYMVER)', for example:
*
* int dm_foo(int bar)
* {
* return bar;
* }
*
- * #if defined(__GNUC__)
+ * #if defined(GNU_SYMVER)
* // Backward compatible dm_foo() version 1.02.104
* int dm_foo_v1_02_104(void);
* int dm_foo_v1_02_104(void)
@@ -68,7 +68,7 @@
* versions of library symbols prior to the introduction of symbol
* versioning: it must never be used for new symbols.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
#define DM_EXPORT_SYMBOL_BASE(func) \
diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c
index b0826e1eb..2ec3f8f84 100644
--- a/libdm/datastruct/bitset.c
+++ b/libdm/datastruct/bitset.c
@@ -242,7 +242,7 @@ bad:
return NULL;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Maintain backward compatibility with older versions that did not
* accept a 'min_num_bits' argument to dm_bitset_parse_list().
@@ -253,7 +253,4 @@ dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
return dm_bitset_parse_list(str, mem, 0);
}
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129);
-
-#else /* if defined(__GNUC__) */
-
#endif
diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c
index c47e08467..b98afb15d 100644
--- a/libdm/ioctl/libdm-iface.c
+++ b/libdm/ioctl/libdm-iface.c
@@ -2137,7 +2137,7 @@ void dm_lib_exit(void)
_version_checked = 0;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Maintain binary backward compatibility.
* Version script mechanism works with 'gcc' compatible compilers only.
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index cf4fd62e7..474871da5 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -4110,7 +4110,7 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
dnode->callback_data = data;
}
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
/*
* Backward compatible implementations.
*
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index bc498675f..d424928c7 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -5064,7 +5064,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
* current dm_stats_create_region() version.
*/
-#if defined(__GNUC__)
+#if defined(GNU_SYMVER)
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, const char *program_id,
--
2.18.0

View File

@@ -3,39 +3,51 @@ config BR2_PACKAGE_LVM2
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # needs fork()
depends on !BR2_STATIC_LIBS # It fails to build statically
# http://lists.busybox.net/pipermail/buildroot/2016-August/170592.html
depends on !BR2_TOOLCHAIN_USES_MUSL
help
This is LVM2, the rewrite of The Linux Logical Volume Manager.
LVM supports enterprise level volume management of disk and disk
subsystems by grouping arbitrary disks into volume groups. The total
capacity of volume groups can be allocated to logical volumes, which
are accessed as regular block devices.
LVM supports enterprise level volume management of disk and
disk subsystems by grouping arbitrary disks into volume
groups. The total capacity of volume groups can be allocated
to logical volumes, which are accessed as regular block
devices.
The Linux Kernel Device Mapper is the LVM
(Linux Logical Volume Management) Team's implementation of a
minimalistic kernel-space driver that handles volume management,
while keeping knowledge of the underlying device layout in
user-space. This makes it useful for not only LVM, but EVMS,
software raid, and other drivers that create "virtual" block devices.
minimalistic kernel-space driver that handles volume
management, while keeping knowledge of the underlying device
layout in user-space. This makes it useful for not only LVM,
but EVMS, software raid, and other drivers that create
"virtual" block devices.
http://www.sourceware.org/lvm2/
if BR2_PACKAGE_LVM2
config BR2_PACKAGE_LVM2_STANDARD_INSTALL
bool "standard install instead of only dmsetup"
default y if !BR2_PACKAGE_LVM2_DMSETUP_ONLY # legacy 2013.11
# http://lists.busybox.net/pipermail/buildroot/2016-August/170592.html
depends on !BR2_TOOLCHAIN_USES_MUSL
help
Install the standard suite of lvm2 programs. When this option is not
set, only dmsetup is installed.
Install the standard suite of lvm2 programs. When this option
is not set, only dmsetup is installed.
comment "lvm2 standard install needs a glibc or uClibc toolchain"
depends on BR2_TOOLCHAIN_USES_MUSL
config BR2_PACKAGE_LVM2_APP_LIBRARY
bool "install application library"
# http://lists.busybox.net/pipermail/buildroot/2016-August/170592.html
depends on !BR2_TOOLCHAIN_USES_MUSL
select BR2_PACKAGE_LVM2_STANDARD_INSTALL
help
Install application library (liblvm2app).
comment "lvm2 application library needs a glibc or uClibc toolchain"
depends on BR2_TOOLCHAIN_USES_MUSL
endif
comment "lvm2 needs a glibc or uClibc toolchain w/ threads, dynamic library"
comment "lvm2 needs a toolchain w/ threads, dynamic library"
depends on BR2_USE_MMU
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL
depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -1,2 +1,5 @@
# From ftp://sources.redhat.com/pub/lvm2/releases/sha512.sum
sha512 ebff909e1c81919967373c55c7a95ba13ef4e0536b8ef1c28ed7e1c1eb9b9fd406a649d93b141822b24675ebece5a722247737c4e869fb7fb5eeb881a7f9102d LVM2.2.02.168.tgz
sha512 c2ea8beafe006abf9282f51ec98600fd0ebff816d53c10ecbb19bbf336ada4825135cf9c92ccd364afb18f8b1d7e163eff5bdec8dfdd70dfb9ba45db2f6bdd5e LVM2.2.02.173.tgz
# Locally computed sha256 checksums
sha256 e76fbcd2fb97cf202da330301327754d2db5c58b5b4bebd3a8a749393e7603d1 COPYING
sha256 5df07007198989c622f5d41de8d703e7bef3d0e79d62e24332ee739a452af62a COPYING.LIB

View File

@@ -4,20 +4,25 @@
#
################################################################################
LVM2_VERSION = 2.02.168
LVM2_VERSION = 2.02.173
LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz
LVM2_SITE = ftp://sources.redhat.com/pub/lvm2/releases
LVM2_INSTALL_STAGING = YES
LVM2_LICENSE = GPLv2, LGPLv2.1
LVM2_LICENSE = GPL-2.0, LGPL-2.1
LVM2_LICENSE_FILES = COPYING COPYING.LIB
# Make sure that binaries and libraries are installed with write
# permissions for the owner.
# permissions for the owner. We disable NLS because it's broken, and
# the package anyway doesn't provide any translation files.
LVM2_CONF_OPTS += \
--enable-write_install \
--enable-pkgconfig \
--enable-cmdlib \
--enable-dmeventd
--enable-dmeventd \
--disable-nls \
--disable-symvers
LVM2_DEPENDENCIES += host-pkgconf
# LVM2 uses autoconf, but not automake, and the build system does not
# take into account the toolchain passed at configure time.
@@ -31,6 +36,13 @@ else
LVM2_CONF_OPTS += --disable-readline
endif
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
LVM2_CONF_OPTS += --enable-selinux
LVM2_DEPENDENCIES += libselinux
else
LVM2_CONF_OPTS += --disable-selinux
endif
ifeq ($(BR2_PACKAGE_LVM2_STANDARD_INSTALL),)
LVM2_MAKE_OPTS = device-mapper
LVM2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install_device-mapper
@@ -47,4 +59,18 @@ ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
LVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no
endif
HOST_LVM2_DEPENDENCIES = host-pkgconf
HOST_LVM2_CONF_OPTS = \
--enable-write_install \
--enable-pkgconfig \
--disable-cmdlib \
--disable-dmeventd \
--disable-applib \
--disable-fsadm \
--disable-readline \
--disable-selinux
HOST_LVM2_MAKE_OPTS = device-mapper
HOST_LVM2_INSTALL_OPTS = install_device-mapper
$(eval $(autotools-package))
$(eval $(host-autotools-package))