diff options
Diffstat (limited to 'sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch')
-rw-r--r-- | sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch new file mode 100644 index 000000000000..80b6bc7a023f --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.03.12-dynamic-static-ldflags.patch @@ -0,0 +1,76 @@ +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 ++ + daemons/dmeventd/Makefile.in | 2 +- + make.tmpl.in | 1 + + tools/Makefile.in | 2 +- + 4 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1a49e7fe7e..354b53b5ec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -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" +@@ -1860,6 +1861,7 @@ AC_SUBST(SYSCONFDIR) + AC_SUBST(SYSTEMD_LIBS) + AC_SUBST(SNAPSHOTS) + AC_SUBST(STATICDIR) ++AC_SUBST(STATIC_LDFLAGS) + AC_SUBST(STATIC_LINK) + AC_SUBST(TESTSUITE_DATA) + AC_SUBST(THIN) +diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in +index af51198aae..f7896e581e 100644 +--- a/daemons/dmeventd/Makefile.in ++++ b/daemons/dmeventd/Makefile.in +@@ -76,7 +76,7 @@ dmeventd: $(LIB_SHARED) dmeventd.o + + dmeventd.static: $(LIB_STATIC) dmeventd.o + @echo " [CC] $@" +- $(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 200ea2e05f..99f02e8b77 100644 +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -69,6 +69,7 @@ DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@ + LDFLAGS ?= @LDFLAGS@ ++STATIC_LDFLAGS += @STATIC_LDFLAGS@ + CLDFLAGS += @CLDFLAGS@ + ELDFLAGS += @ELDFLAGS@ + LDDEPS += @LDDEPS@ +diff --git a/tools/Makefile.in b/tools/Makefile.in +index ec546ca632..cdede2a058 100644 +--- a/tools/Makefile.in ++++ b/tools/Makefile.in +@@ -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) \ ++ $(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.31.1 + |