Skip to contentSkip to conversation

package/kexec: add optional support for xz

PATCH New Bernd Kuhls 2 participants 2 messages Feb 20, 2016 – Feb 21, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/kexec: add optional support for xz

When xz was compiled before, kexec will use it as optional dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/sbin/kdump | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [liblzma.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
---
 package/kexec/kexec.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)
package/kexec/kexec.mk +11 -0
index d158406..7264a1c 100644
@@ -17,6 +17,17 @@ else
 KEXEC_CONF_OPTS += --without-zlib
 endif
 
+ifeq ($(BR2_PACKAGE_XZ),y)
+# fixes broken check for xz when cross-compiling:
+# checking for lzma_code in -llzma...
+# ./configure: line 4712: ac_fn_c_try_link: command not found
+KEXEC_CONF_ENV += ac_cv_lib_lzma_lzma_code=yes
+KEXEC_CONF_OPTS += --with-lzma
+KEXEC_DEPENDENCIES += xz
+else
+KEXEC_CONF_OPTS += --without-lzma
+endif
+
 define KEXEC_REMOVE_LIB_TOOLS
 	rm -rf $(TARGET_DIR)/usr/lib/kexec-tools
 endef
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 package/kexec: add optional support for xz

Dear Bernd Kuhls,

package/kexec/kexec.mk else · line 24

Quoted 5 lines · Bernd Kuhls
package/kexec/kexec.mk +5 -0
+ifeq ($(BR2_PACKAGE_XZ),y)
+# fixes broken check for xz when cross-compiling:
+# checking for lzma_code in -llzma...
+# ./configure: line 4712: ac_fn_c_try_link: command not found
+KEXEC_CONF_ENV += ac_cv_lib_lzma_lzma_code=yes

Instead of this, I've added a bump to version 2.0.11, which contains an upstream commit that fixes this issue. Yes, it's a version bump on master, but it's a minor version bump, so I think it's reasonable.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com