diff options
Diffstat (limited to 'sys-fs/lvm2/files')
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch (renamed from sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch) | 35 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch | 25 | ||||
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch | 117 |
3 files changed, 160 insertions, 17 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch index 2b9a5dd945c5..80b6bc7a023f 100644 --- a/sys-fs/lvm2/files/lvm2-2.03.05-dynamic-static-ldflags.patch +++ b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch @@ -1,9 +1,10 @@ -From 93101699f5e1190184c00c99ab7b6e9717e5019a Mon Sep 17 00:00:00 2001 +From 4bdd215fd84e83a8119d0b971904221743a87a23 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" <robbat2@gentoo.org> Date: Wed, 24 Jul 2019 11:11:35 +0200 Subject: [PATCH] Add dynamic static ldflags Forward-ported from 2.02.178 to 2.03.05 +Forward-ported from 2.03.05 to 2.03.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> --- configure.ac | 2 ++ @@ -13,18 +14,18 @@ Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac -index 1e45c0edcb..cc2625294a 100644 +index 1a49e7fe7e..354b53b5ec 100644 --- a/configure.ac +++ b/configure.ac -@@ -33,6 +33,7 @@ case "$host_os" in - CLDFLAGS="${CLDFLAGS:"$LDFLAGS"} -Wl,--version-script,.export.sym" +@@ -32,6 +32,7 @@ case "$host_os" in + linux*) # equivalent to -rdynamic ELDFLAGS="-Wl,--export-dynamic" + STATIC_LDFLAGS="-Wl,--no-export-dynamic" # FIXME Generate list and use --dynamic-list=.dlopen.sym CLDWHOLEARCHIVE="-Wl,-whole-archive" CLDNOWHOLEARCHIVE="-Wl,-no-whole-archive" -@@ -1758,6 +1759,7 @@ AC_SUBST(SYSCONFDIR) +@@ -1860,6 +1861,7 @@ AC_SUBST(SYSCONFDIR) AC_SUBST(SYSTEMD_LIBS) AC_SUBST(SNAPSHOTS) AC_SUBST(STATICDIR) @@ -33,23 +34,23 @@ index 1e45c0edcb..cc2625294a 100644 AC_SUBST(TESTSUITE_DATA) AC_SUBST(THIN) diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in -index 6bd36d0325..a3c30ec1a0 100644 +index af51198aae..f7896e581e 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in -@@ -66,7 +66,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o +@@ -76,7 +76,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o dmeventd.static: $(LIB_STATIC) dmeventd.o @echo " [CC] $@" -- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ -+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \ +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static dmeventd.o \ -o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS) ifeq ("@PKGCONFIG@", "yes") diff --git a/make.tmpl.in b/make.tmpl.in -index f3332e91c1..1489c2afad 100644 +index 200ea2e05f..99f02e8b77 100644 --- a/make.tmpl.in +++ b/make.tmpl.in -@@ -68,6 +68,7 @@ DEFS += @DEFS@ +@@ -69,6 +69,7 @@ DEFS += @DEFS@ # FIXME set this only where it's needed, not globally? CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ LDFLAGS ?= @LDFLAGS@ @@ -58,18 +59,18 @@ index f3332e91c1..1489c2afad 100644 ELDFLAGS += @ELDFLAGS@ LDDEPS += @LDDEPS@ diff --git a/tools/Makefile.in b/tools/Makefile.in -index 2620daa17c..e5fc9c4ae4 100644 +index ec546ca632..cdede2a058 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in -@@ -136,7 +136,7 @@ man-generator: man-generator.o +@@ -137,7 +137,7 @@ man-generator: man-generator.o lvm.static: $(OBJECTS) lvm-static.o $(LVMINTERNAL_LIBS) @echo " [CC] $@" -- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \ -+ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) -o $@ $+ \ - $(DMEVENT_LIBS) $(STATIC_LIBS) $(LVMLIBS) +- $(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L$(interfacebuilddir) \ ++ $(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(STATIC_LDFLAGS) -static -L$(interfacebuilddir) \ + -o $@ $+ $(LVMLIBS) $(STATIC_LIBS) liblvm2cmd.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib.o lvm2cmd.o -- -2.22.0 +2.31.1 diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch b/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch new file mode 100644 index 000000000000..5bb776c9b5ed --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.12-static-libm.patch @@ -0,0 +1,25 @@ +From 4917d9c8b6227256a4a83ff937119d6aa53d654e Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" <robbat2@gentoo.org> +Date: Sun, 9 May 2021 11:02:54 +0200 +Subject: [PATCH] Add libm to static libs + +--- + make.tmpl.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/make.tmpl.in b/make.tmpl.in +index ae189546d0..8ee00bd9e8 100644 +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -64,7 +64,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile + LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) + LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) + # Extra libraries always linked with static binaries +-STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) ++STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) $(M_LIBS) + DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ +-- +2.31.1 + diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch new file mode 100644 index 000000000000..083a7327c6a6 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.12-static-pkgconfig-libs.patch @@ -0,0 +1,117 @@ +From 88aeb306dfd1e0174bf02cc208d46f0d722204dc Mon Sep 17 00:00:00 2001 +From: "Robin H. Johnson" <robbat2@gentoo.org> +Date: Sun, 9 May 2021 11:00:22 +0200 +Subject: [PATCH] Use pkgconfig to detect static libs + +--- + configure.ac | 20 ++++++++++++++++++-- + make.tmpl.in | 5 ++++- + 2 files changed, 22 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 354b53b5ec..e872d70256 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1097,6 +1097,7 @@ if test "$BLKID_WIPING" != no; then + PKG_CHECK_MODULES(BLKID, blkid >= 2.24, + [ BLKID_WIPING=yes + BLKID_PC="blkid" ++ BLKID_STATIC_LIBS=`$PKG_CONFIG --static --libs $BLKID_PC` + DEFAULT_USE_BLKID_WIPING=1 + AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.]) + ], [if test "$BLKID_WIPING" = maybe; then +@@ -1145,6 +1146,7 @@ AC_MSG_RESULT($UDEV_SYNC) + if test "$UDEV_SYNC" = yes; then + pkg_config_init + PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) ++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev` + AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) + + AC_CHECK_LIB(udev, udev_device_get_is_initialized, AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1, +@@ -1369,19 +1371,30 @@ dnl -- Check for selinux + if test "$SELINUX" = yes; then + AC_CHECK_LIB([sepol], [sepol_check_context], [ + AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) +- SELINUX_LIBS="-lsepol"]) ++ SEPOL_LIBS="-lsepol"]) ++ ++ dnl -- init pkgconfig if required ++ AS_IF([test x$PKGCONFIG_INIT != x1], [pkg_config_init]) ++ PKG_CHECK_MODULES(SELINUX, libselinux, [ ++ SELINUX_PC="libselinux" ++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux` ++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS" ++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) ++ ], [ ++ dnl -- old non-pkgconfig method, is buggy with static builds + + AC_CHECK_LIB([selinux], [is_selinux_enabled], [ + AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) + AC_CHECK_HEADERS([selinux/label.h]) + AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) +- SELINUX_LIBS="-lselinux $SELINUX_LIBS" ++ SELINUX_LIBS="-lselinux $SEPOL_LIBS" + SELINUX_PC="libselinux" + HAVE_SELINUX=yes ], [ + AC_MSG_WARN(Disabling selinux) + SELINUX_LIBS= + SELINUX_PC= + HAVE_SELINUX=no ]) ++ ]) + fi + + ################################################################################ +@@ -1755,6 +1768,7 @@ AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command lin + ################################################################################ + AC_SUBST(AWK) + AC_SUBST(BLKID_PC) ++AC_SUBST(BLKID_STATIC_LIBS) + AC_SUBST(BUILD_CMIRRORD) + AC_SUBST(BUILD_DMEVENTD) + AC_SUBST(BUILD_LVMDBUSD) +@@ -1857,6 +1871,7 @@ AC_SUBST(SALCK_LIBS) + AC_SUBST(SBINDIR) + AC_SUBST(SELINUX_LIBS) + AC_SUBST(SELINUX_PC) ++AC_SUBST(SELINUX_STATIC_LIBS) + AC_SUBST(SYSCONFDIR) + AC_SUBST(SYSTEMD_LIBS) + AC_SUBST(SNAPSHOTS) +@@ -1875,6 +1890,7 @@ AC_SUBST(CACHE_REPAIR_CMD) + AC_SUBST(CACHE_RESTORE_CMD) + AC_SUBST(UDEV_PC) + AC_SUBST(UDEV_RULES) ++AC_SUBST(UDEV_STATIC_LIBS) + AC_SUBST(UDEV_SYNC) + AC_SUBST(UDEV_SYSTEMD_BACKGROUND_JOBS) + AC_SUBST(UDEV_RULE_EXEC_DETECTION) +diff --git a/make.tmpl.in b/make.tmpl.in +index 99f02e8b77..ae189546d0 100644 +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -64,7 +64,7 @@ PYCOMPILE = $(top_srcdir)/autoconf/py-compile + LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS) + LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS) + # Extra libraries always linked with static binaries +-STATIC_LIBS = $(PTHREAD_LIBS) ++STATIC_LIBS = $(PTHREAD_LIBS) $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) $(BLKID_STATIC_LIBS) + DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ +@@ -83,10 +83,13 @@ PTHREAD_LIBS = @PTHREAD_LIBS@ + READLINE_LIBS = @READLINE_LIBS@ + EDITLINE_LIBS = @EDITLINE_LIBS@ + SELINUX_LIBS = @SELINUX_LIBS@ ++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@ + UDEV_CFLAGS = @UDEV_CFLAGS@ + UDEV_LIBS = @UDEV_LIBS@ ++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@ + BLKID_CFLAGS = @BLKID_CFLAGS@ + BLKID_LIBS = @BLKID_LIBS@ ++BLKID_STATIC_LIBS = @BLKID_STATIC_LIBS@ + SYSTEMD_LIBS = @SYSTEMD_LIBS@ + VALGRIND_CFLAGS = @VALGRIND_CFLAGS@ + USE_TRACKING = @USE_TRACKING@ +-- +2.31.1 + |