Skip to content

Commit de278d6

Browse files
Revert "package/xz: convert to cmake build"
The conversion to cmake was supposed to be an RFC, and was not supposed to be applied [0], as the cmake support is not yet complete, while the autotools buildsystem is still functional [1]. The host-xz uses the target options, which is plain wrong. The target options forcubly disable shared libraries for no apparent reason, which causes the host build to also disable shared libs, which in turn causes host-python3 to fails to build. host-python3 has no dependency on host-xz, but it autodetects its presence, so if the build order caused host-xz to be built before host-python3, its presence will be detected (this needs to be fixed in host-python3 anyway, though) [2]. It also creates build issues in our reference envirnoment [3] Finally, there was a typo in the CXX override: -DCMAKE_CXX_COMPILER_LAUNCHER=="" This reverts commit 3f464c2. Fixes: buildroot#5 [0] https://lore.kernel.org/buildroot/20240626103623.7d7412c0@gmx.net/ [1] https://tukaani.org/xz/#_building_from_xz_git [2] https://gitlab.com/buildroot.org/buildroot/-/issues/5 [3] https://lore.kernel.org/buildroot/ZnqUPBAcDbB7ND64@tl-lnx-nyma7486-2/ Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
1 parent 4f1b7d0 commit de278d6

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

package/xz/xz.mk

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,60 @@ XZ_VERSION = 5.6.2
88
XZ_SOURCE = xz-$(XZ_VERSION).tar.bz2
99
XZ_SITE = https://github.com/tukaani-project/xz/releases/download/v$(XZ_VERSION)
1010
XZ_INSTALL_STAGING = YES
11+
XZ_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
1112
XZ_LICENSE = Public Domain, BSD-0-Clause, GPL-2.0+, GPL-3.0+, LGPL-2.1+
1213
XZ_LICENSE_FILES = COPYING COPYING.0BSD COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1
1314
XZ_CPE_ID_VENDOR = tukaani
1415

1516
XZ_CONF_OPTS = \
16-
-DENCODERS="lzma1;lzma2;delta;x86;powerpc;ia64;arm;armthumb;arm64;sparc;riscv" \
17-
-DDECODERS="lzma1;lzma2;delta;x86;powerpc;ia64;arm;armthumb;arm64;sparc;riscv" \
18-
-DMATCH_FINDERS="hc3;hc4;bt2;bt3;bt4" \
19-
-DADDITIONAL_CHECK_TYPES="crc64;sha256" \
20-
-DMICROLZMA_ENCODER=ON \
21-
-DMICROLZMA_DECODER=ON \
22-
-DLZIP_DECODER=ON \
23-
-DALLOW_CLMUL_CRC=ON \
24-
-DALLOW_ARM64_CRC32=ON \
25-
-DENABLE_SMALL=OFF \
26-
-DENABLE_SANDBOX=ON \
27-
-DCREATE_XZ_SYMLINKS=ON \
28-
-DCREATE_LZMA_SYMLINKS=ON \
29-
-DBUILD_SHARED_LIBS=OFF
17+
--enable-encoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv \
18+
--enable-decoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc,riscv \
19+
--enable-match-finders=hc3,hc4,bt2,bt3,bt4 \
20+
--enable-checks=crc32,crc64,sha256 \
21+
--disable-external-sha256 \
22+
--enable-microlzma \
23+
--enable-lzip-decoder \
24+
--enable-assembler \
25+
--enable-clmul-crc \
26+
--enable-arm64-crc32 \
27+
--disable-small \
28+
--enable-assume-ram=128 \
29+
--enable-xz \
30+
--enable-xzdec \
31+
--enable-lzmadec \
32+
--enable-lzmainfo \
33+
--enable-lzma-links \
34+
--enable-scripts \
35+
--enable-sandbox=auto \
36+
--enable-symbol-versions \
37+
--enable-rpath \
38+
--enable-largfile \
39+
--enable-unaligned-access=auto \
40+
--disable-unsafe-type-punning \
41+
--disable-werror \
42+
--enable-year2038
3043

3144
ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
32-
XZ_CONF_OPTS += -DENABLE_NLS=ON
45+
XZ_CONF_OPTS += --enable-nls
3346
else
34-
XZ_CONF_OPTS += -DENABLE_NLS=OFF
47+
XZ_CONF_OPTS += --disable-nls
3548
endif
3649

3750
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
38-
XZ_CONF_OPTS += -DENABLE_THREADS=ON
51+
XZ_CONF_OPTS += --enable-threads
3952
else
40-
XZ_CONF_OPTS += -DENABLE_THREADS=OFF
53+
XZ_CONF_OPTS += --disable-threads
4154
endif
4255

43-
# we are built before ccache
4456
HOST_XZ_CONF_OPTS = \
4557
$(XZ_CONF_OPTS) \
46-
-DENABLE_NLS=ON \
47-
-DENABLE_THREADS=ON \
48-
-DCMAKE_C_COMPILER_LAUNCHER="" \
49-
-DCMAKE_CXX_COMPILER_LAUNCHER==""
58+
--enable-nls \
59+
--enable-threads
60+
61+
# we are built before ccache
62+
HOST_XZ_CONF_ENV = \
63+
CC="$(HOSTCC_NOCCACHE)" \
64+
CXX="$(HOSTCXX_NOCCACHE)"
5065

51-
$(eval $(cmake-package))
52-
$(eval $(host-cmake-package))
66+
$(eval $(autotools-package))
67+
$(eval $(host-autotools-package))

0 commit comments

Comments
 (0)