aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/btrfs-progs/5.11')
-rw-r--r--patches/btrfs-progs/5.11/btrfs-honor-LDFLAGS.patch12
-rw-r--r--patches/btrfs-progs/5.11/btrfs-lzo-via-pkgconfig.patch22
-rw-r--r--patches/btrfs-progs/5.11/btrfs-m4.patch15
3 files changed, 49 insertions, 0 deletions
diff --git a/patches/btrfs-progs/5.11/btrfs-honor-LDFLAGS.patch b/patches/btrfs-progs/5.11/btrfs-honor-LDFLAGS.patch
new file mode 100644
index 0000000..48e967d
--- /dev/null
+++ b/patches/btrfs-progs/5.11/btrfs-honor-LDFLAGS.patch
@@ -0,0 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -130,7 +130,7 @@ LIBBTRFS_LIBS = $(LIBS_BASE) $(LIBS_CRYPTO)
+
+ # Static compilation flags
+ STATIC_CFLAGS = $(CFLAGS) -ffunction-sections -fdata-sections
+-STATIC_LDFLAGS = -static -Wl,--gc-sections
++STATIC_LDFLAGS = $(LDFLAGS) -static -Wl,--gc-sections
+ STATIC_LIBS = $(STATIC_LIBS_BASE)
+
+ # don't use FORTIFY with sparse because glibc with FORTIFY can
+
diff --git a/patches/btrfs-progs/5.11/btrfs-lzo-via-pkgconfig.patch b/patches/btrfs-progs/5.11/btrfs-lzo-via-pkgconfig.patch
new file mode 100644
index 0000000..b1bf436
--- /dev/null
+++ b/patches/btrfs-progs/5.11/btrfs-lzo-via-pkgconfig.patch
@@ -0,0 +1,22 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -304,16 +304,8 @@ if ${PKG_CONFIG} udev --atleast-version 190; then
+ fi
+ AC_SUBST(UDEVDIR)
+
+-dnl lzo library does not provide pkg-config, let use classic way
+-AC_CHECK_LIB([lzo2], [lzo_version], [
+- LZO2_LIBS="-llzo2"
+- LZO2_CFLAGS=""
+- LZO2_LIBS_STATIC="-llzo2"],[
+- AC_MSG_ERROR([cannot find lzo2 library])
+-])
+-AC_SUBST([LZO2_LIBS])
+-AC_SUBST([LZO2_LIBS_STATIC])
+-AC_SUBST([LZO2_CFLAGS])
++PKG_CHECK_MODULES(LZO2, [lzo2])
++PKG_STATIC(LZO2_LIBS_STATIC, [lzo2])
+
+ dnl call PKG_INSTALLDIR from pkg.m4 to set pkgconfigdir
+ m4_ifdef([PKG_INSTALLDIR], [PKG_INSTALLDIR], [AC_MSG_ERROR([please install pkgconf])])
+
diff --git a/patches/btrfs-progs/5.11/btrfs-m4.patch b/patches/btrfs-progs/5.11/btrfs-m4.patch
new file mode 100644
index 0000000..7543640
--- /dev/null
+++ b/patches/btrfs-progs/5.11/btrfs-m4.patch
@@ -0,0 +1,15 @@
+Fixes
+
+./configure: line 4077: BTRFS_DETECT_CSTD: command not found
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,6 +18,7 @@ AC_SUBST([CFLAGS])
+ AC_PREREQ([2.60])
+
+ AC_CONFIG_AUX_DIR([config])
++AC_CONFIG_MACRO_DIR([m4])
+ dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
+ dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
+ AC_USE_SYSTEM_EXTENSIONS
+