From 5a8163e07baa09440ca9304d00f5cc1cdb980d5b Mon Sep 17 00:00:00 2001 From: lovehackintosh <92633080+lovehackintosh@users.noreply.github.com> Date: Thu, 8 Dec 2022 14:20:57 +0800 Subject: [PATCH] sync with upstream (#10562) * package: sync with upstream Removed: package/libs/libselinux/bcm27xx-userland (Already in package/utils/bcm27xx-userland) Signed-off-by: Linhui Liu * uclibc++: remove No package here depends on it. Furthermore, uClibc++ is a fairly buggy C++ library and seems to be relatively inactive upstream. It also lacks proper support for modern C++11 features. The main benefit of it is size: 66.6 KB vs 287.3 KB on mips24kc. Static linking and LTO can help bring the size down of packages that need it. Added warning message to uclibc++.mk Signed-off-by: Rosen Penev Acked-by: Hauke Mehrtens * target: sync with upstream Signed-off-by: Linhui Liu * toolchain: gcc: Remove gcc 10.x support This compiler is old and was never used by default in OpenWrt. Signed-off-by: Hauke Mehrtens * ucode: update to latest Git HEAD 46d93c9 tests: fixup testcases 4c654df types: adjust double printing format eac2add compiler: fix bytecode for logical assignments of properties 3903b18 fs: add `realpath()` function 8366102 math: add isnan() function eef83d3 tests: relax sleep() test 394e901 lib: uc_json(): accept trailing whitespace when parsing strings 1867c8b uloop: terminate parent uloop in task child processes d2cc003 uci: auto-load package in `ctx.foreach()` and `ctx.get_first()` 6c5ee53 compiler: ensure that arrow functions with block bodies return no value fdc9b6a compiler: fix `??=`, `||=` and `&&=` logical assignment semantics 88dcca7 add cmake to install requires for debian Signed-off-by: Jo-Philipp Wich * firewall4: update to latest Git HEAD 700a925 fw4: prevent null access when no ipsets are defined 6443ec7 config: drop input traffic by default 119ee1a ruleset: drop ctstate invalid traffic for masq-enabled zones Signed-off-by: Jo-Philipp Wich * ustream-ssl: update to Git version 2022-12-07 9217ab4 ustream-openssl: Disable renegotiation in TLSv1.2 and earlier 2ce1d48 ci: fix building with i.MX6 SDK 584f1f6 ustream-openssl: wolfSSL: provide detailed information in debug builds aa8c48e cmake: add a possibility to set library version Signed-off-by: Hauke Mehrtens * tools/mpfr: import patch fixing macro bug Co-authored-by: Nick Hainke Signed-off-by: Linhui Liu Signed-off-by: Linhui Liu Signed-off-by: Rosen Penev Signed-off-by: Hauke Mehrtens Signed-off-by: Jo-Philipp Wich Co-authored-by: Rosen Penev Co-authored-by: Hauke Mehrtens Co-authored-by: Jo-Philipp Wich Co-authored-by: Nick Hainke --- config/Config-build.in | 39 +- config/Config-devel.in | 5 + config/Config-images.in | 7 +- config/Config-kernel.in | 180 +++++- include/uclibc++.mk | 18 +- package/devel/binutils/Makefile | 6 +- package/devel/gdb/Makefile | 4 +- .../001-Add-support-for-readline-8.2.patch | 31 + .../devel/gdb/patches/110-shared_libgcc.patch | 12 +- .../devel/gdb/patches/130-gdb-ctrl-c.patch | 2 +- package/devel/perf/Makefile | 3 +- package/devel/strace/Makefile | 7 +- package/devel/trace-cmd/Makefile | 27 +- .../devel/trace-cmd/patches/100-musl.patch | 104 --- .../patches/110-mac80211_tracepoint.patch | 24 - package/devel/valgrind/Makefile | 6 +- .../010-mips-Fix-new-syscall-numbers.patch | 131 ++++ .../patches/100-fix_configure_check.patch | 2 +- .../patches/130-fix_arm_arch_detection.patch | 2 +- .../patches/130-mips_fix_soft_float.patch | 12 +- package/kernel/linux/modules/netsupport.mk | 17 + package/lean/polarssl/Makefile | 3 - package/libs/argp-standalone/Makefile | 4 +- package/libs/gettext-full/Makefile | 15 +- .../gettext-full/patches/001-autotools.patch | 2 +- .../libs/gettext-full/patches/010-m4.patch | 128 ++-- package/libs/gettext/Makefile | 63 -- package/libs/gettext/src/LICENSE | 7 - package/libs/gettext/src/include/libintl.h | 53 -- package/libs/gettext/src/m4/codeset.m4 | 21 - package/libs/gettext/src/m4/gettext.m4 | 383 ----------- package/libs/gettext/src/m4/intl.m4 | 294 --------- package/libs/gettext/src/m4/intldir.m4 | 19 - package/libs/gettext/src/m4/intlmacosx.m4 | 51 -- package/libs/gettext/src/m4/lcmessage.m4 | 31 - package/libs/gettext/src/m4/nls.m4 | 32 - package/libs/gettext/src/m4/po.m4 | 449 ------------- package/libs/jansson/Makefile | 16 +- package/libs/libbsd/Makefile | 6 +- package/libs/libcap/Makefile | 5 +- .../900-use-more-compatible-shebang.patch | 8 + package/libs/libdouble-conversion/Makefile | 68 -- package/libs/libiconv-full/Makefile | 11 +- package/libs/libiconv/COPYING | 504 --------------- package/libs/libiconv/COPYRIGHT | 20 - package/libs/libiconv/Makefile | 79 --- package/libs/libiconv/src/LICENSE | 6 - package/libs/libiconv/src/iconv.c | 449 ------------- package/libs/libiconv/src/include/charmaps.h | 80 --- .../src/include/charmaps/iso-8859-10.h | 24 - .../src/include/charmaps/iso-8859-13.h | 24 - .../src/include/charmaps/iso-8859-14.h | 25 - .../src/include/charmaps/iso-8859-16.h | 24 - .../src/include/charmaps/iso-8859-2.h | 24 - .../src/include/charmaps/iso-8859-3.h | 24 - .../src/include/charmaps/iso-8859-4.h | 24 - .../src/include/charmaps/iso-8859-5.h | 24 - .../src/include/charmaps/iso-8859-6.h | 24 - .../src/include/charmaps/iso-8859-7.h | 24 - .../src/include/charmaps/iso-8859-8.h | 24 - .../src/include/charmaps/iso-8859-9.h | 24 - .../libiconv/src/include/charmaps/koi8-r.h | 24 - .../src/include/charmaps/windows-1250.h | 24 - .../src/include/charmaps/windows-1251.h | 24 - .../src/include/charmaps/windows-1252.h | 25 - .../src/include/charmaps/windows-1253.h | 24 - .../src/include/charmaps/windows-1254.h | 24 - .../src/include/charmaps/windows-1255.h | 24 - .../src/include/charmaps/windows-1256.h | 24 - .../src/include/charmaps/windows-1257.h | 24 - .../src/include/charmaps/windows-1258.h | 24 - .../src/include/charmaps/windows-874.h | 24 - package/libs/libiconv/src/include/iconv.h | 36 -- package/libs/libiconv/src/m4/iconv.m4 | 214 ------- package/libs/libjson-c/Makefile | 14 +- package/libs/libjson-c/patches/000-libm.patch | 45 -- .../patches/001-dont-build-docs.patch | 8 +- package/libs/libmd/Makefile | 47 ++ package/libs/libnftnl/Makefile | 5 +- package/libs/libnl-tiny/Makefile | 8 +- package/libs/libpcap/Makefile | 3 +- package/libs/libselinux/Makefile | 2 +- .../libs/libselinux/bcm27xx-userland/Makefile | 71 --- package/libs/libsemanage/Makefile | 8 +- package/libs/libtraceevent/Makefile | 74 +++ package/libs/libtracefs/Makefile | 49 ++ package/libs/libubox/Makefile | 10 +- package/libs/libusb/Makefile | 9 +- ...n-the-Changelog-and-clean-up-a-stray.patch | 29 - ...parsing-of-descriptors-for-multi-con.patch | 61 -- package/libs/mbedtls/Config.in | 193 ++++++ package/libs/mbedtls/Makefile | 138 ++-- ...and-GCM-with-ARMv8-Crypto-Extensions.patch | 390 ------------ package/libs/mbedtls/patches/200-config.patch | 228 ------- package/libs/musl-fts/Makefile | 3 + package/libs/nettle/Makefile | 8 +- .../libs/nettle/patches/100-portability.patch | 8 +- package/libs/pcre/Makefile | 28 +- package/libs/popt/Makefile | 13 +- ...re.ac-remove-require-gettext-version.patch | 26 + package/libs/readline/Makefile | 6 +- package/libs/sysfsutils/Makefile | 2 +- package/libs/sysfsutils/files/sysfsutils | 3 +- package/libs/toolchain/Makefile | 7 +- package/libs/uclibc++/Makefile | 105 ---- package/libs/uclibc++/files/config.default | 58 -- .../libs/uclibc++/patches/001-no-ansi.patch | 10 - .../patches/002-undef-functions.patch | 35 -- .../libs/uclibc++/patches/003-no-fPIC.patch | 10 - ...ibc-Make-long-long-available-to-C-11.patch | 143 ----- .../005-istream_helpers-Fix-sscanf-typo.patch | 37 -- package/libs/ustream-ssl/Makefile | 6 +- package/libs/zlib/Makefile | 8 +- .../001-neon-implementation-of-adler32.patch | 253 -------- ...m-specific-optimisations-for-inflate.patch | 6 - ...m-specific-optimisations-for-inflate.patch | 31 +- ...rcefiles-in-patch-002-to-buildsystem.patch | 4 +- .../zlib/patches/006-fix-CVE-2022-37434.patch | 32 - ...ll-dereference-in-fix-CVE-2022-37434.patch | 29 - package/network/config/firewall4/Makefile | 6 +- package/network/services/bridger/Makefile | 2 - package/network/services/e2guardian/Makefile | 3 +- package/network/services/noddos/Makefile | 1 - package/network/services/odhcpd/Makefile | 1 - package/network/utils/umbim/Makefile | 2 - package/network/utils/uqmi/Makefile | 2 - package/system/ca-certificates/Makefile | 4 +- ...fix-python3-cryptography-woes-in-cer.patch | 53 ++ package/system/fstools/Makefile | 10 +- package/system/fstools/files/fstab.init | 6 +- ...port-extroot-for-non-MTD-rootfs_data.patch | 18 +- .../fstools/patches/0100-automount.patch | 4 +- ...missing-limits.h-for-USE_CPUID_DEVIC.patch | 29 + package/system/opkg/Makefile | 10 +- package/system/procd/Makefile | 36 +- package/system/procd/files/hotplug.json | 12 +- package/system/procd/files/procd.sh | 26 +- package/system/procd/files/service | 30 + package/system/procd/files/uxc.init | 8 +- .../001-procd_ujail_static_binary_fix.patch | 29 - package/system/rpcd/Makefile | 8 +- package/system/rpcd/files/rpcd.init | 2 +- package/system/selinux-policy/Makefile | 4 +- package/system/ubox/Makefile | 15 +- package/system/ubox/files/log.init | 20 +- package/system/ubox/files/modules.conf | 3 + package/system/ubus/Makefile | 9 +- package/system/uci/Makefile | 11 +- package/system/uci/files/lib/config/uci.sh | 8 + package/system/urngd/Makefile | 2 - .../0001-fix-high-cpu-usage-with-docker.patch | 7 +- package/system/zram-swap/Makefile | 9 +- package/system/zram-swap/files/zram.init | 64 +- package/utils/bcm27xx-userland/Makefile | 36 +- package/utils/bcm4908img/Makefile | 2 +- package/utils/bcm4908img/src/bcm4908img.c | 45 +- package/utils/busybox/Config-defaults.in | 4 +- package/utils/busybox/files/cron | 2 +- ...-transaction-IDs-for-the-DNS-queries.patch | 42 ++ .../900-add-e-f-option-for-docker.patch | 4 +- package/utils/checkpolicy/Makefile | 6 +- package/utils/f2fs-tools/Makefile | 11 +- .../100-configure.ac-fix-AC_ARG_WITH.patch | 88 +++ ...1-configure.ac-fix-cross-compilation.patch | 80 +++ .../fritz-tools/src/fritz_tffs_nand_read.c | 2 +- .../utils/fritz-tools/src/fritz_tffs_read.c | 2 +- package/utils/lua/Makefile | 13 +- package/utils/lua5.3/Makefile | 4 +- package/utils/mdadm/Makefile | 15 +- .../mdadm/patches/100-cross_compile.patch | 2 +- ...h-Undefine-dprintf-before-redefining.patch | 38 -- ...missing-include-file-sys-sysmacros.h.patch | 29 - .../utils/mdadm/patches/200-reduce_size.patch | 20 +- package/utils/mtd-utils/Makefile | 7 +- .../mtd-utils/patches/130-lzma_jffs2.patch | 13 +- package/utils/nvram/Makefile | 8 +- .../files/{nvram.init => nvram-bcm47xx.init} | 4 +- package/utils/nvram/files/nvram-bcm53xx.init | 40 ++ package/utils/otrx/Makefile | 14 +- package/utils/otrx/src/Makefile | 7 - package/utils/otrx/src/otrx.c | 592 ------------------ package/utils/policycoreutils/Makefile | 6 +- package/utils/px5g-wolfssl/Makefile | 4 +- package/utils/px5g-wolfssl/px5g-wolfssl.c | 62 +- package/utils/secilc/Makefile | 6 +- package/utils/ucode/Makefile | 39 +- package/utils/uencrypt/Makefile | 58 ++ package/utils/uencrypt/src/CMakeLists.txt | 20 + package/utils/uencrypt/src/uencrypt.c | 150 +++++ package/utils/ugps/files/ugps.init | 13 +- package/utils/util-linux/Makefile | 117 ++-- .../util-linux/patches/010-meson-typo.patch | 20 + ...eson-fix-compilation-without-systemd.patch | 22 + .../patches/030-meson-don-t-use-run.patch | 34 + .../040-meson-fix-cpu_set_t-test.patch | 23 + .../050-meson-fix-environ-search.patch | 23 + ...son-add-_GNU_SOURCE-for-sighandler_t.patch | 23 + .../patches/070-meson-fix-isnan-check.patch | 24 + .../patches/080-meson-fix-tzname-check.patch | 23 + .../util-linux/patches/090-meson-libpam.patch | 18 + ...-make-libcap-ng-dependent-on-setpriv.patch | 31 + ...n-fix-when-HAVE_CLOCK_GETTIME-is-set.patch | 21 + ...oject-version-from-the-version-gen-s.patch | 20 + ...r-in-processing-version-for-pc-files.patch | 26 + .../util-linux/patches/200-meson-no-po.patch | 10 + ...se_urandom.patch => 210-use-urandom.patch} | 0 package/utils/zyxel-bootconfig/Makefile | 38 ++ .../files/95_apply_bootconfig | 16 + package/utils/zyxel-bootconfig/src/Makefile | 7 + .../zyxel-bootconfig/src/zyxel-bootconfig.c | 331 ++++++++++ scripts/linksys-image.sh | 3 - target/Config.in | 5 +- target/imagebuilder/Makefile | 8 +- target/imagebuilder/files/Makefile | 2 + target/imagebuilder/files/README.md | 11 + target/linux/generic/config-5.10 | 2 - target/linux/generic/config-5.15 | 1 - target/linux/generic/config-5.4 | 2 - target/linux/generic/config-6.0 | 2 - target/sdk/Config.in | 9 +- target/sdk/files/Config.in | 3 +- target/sdk/files/Makefile | 2 +- target/toolchain/Config.in | 1 + target/toolchain/Makefile | 9 +- toolchain/Config.in | 6 +- toolchain/binutils/Config.in | 2 +- toolchain/binutils/Config.version | 2 +- toolchain/build_version | 1 + toolchain/gcc/Config.in | 5 +- toolchain/gcc/Config.version | 5 - toolchain/gcc/common.mk | 5 +- .../patches-10.x/002-case_insensitive.patch | 24 - .../gcc/patches-10.x/010-documentation.patch | 35 -- .../patches-10.x/110-Fix-MIPS-PR-84790.patch | 20 - .../gcc/patches-10.x/230-musl_libssp.patch | 13 - .../300-mips_Os_cpu_rtx_cost_model.patch | 21 - .../810-arm-softfloat-libgcc.patch | 33 - .../gcc/patches-10.x/820-libgcc_pic.patch | 44 -- .../840-armv4_pass_fix-v4bx_to_ld.patch | 28 - .../patches-10.x/850-use_shared_libgcc.patch | 54 -- .../patches-10.x/851-libgcc_no_compat.patch | 22 - .../patches-10.x/870-ppc_no_crtsavres.patch | 11 - .../gcc/patches-10.x/881-no_tm_section.patch | 11 - .../gcc/patches-10.x/900-bad-mips16-crt.patch | 9 - .../gcc/patches-10.x/910-mbsd_multi.patch | 146 ----- .../920-specs_nonfatal_getenv.patch | 22 - .../930-fix-mips-noexecstack.patch | 111 ---- ...ibffi-fix-MIPS-softfloat-build-issue.patch | 168 ----- ...mpilation-when-making-cross-compiler.patch | 67 -- tools/Makefile | 2 +- tools/dwarves/Makefile | 2 - tools/llvm-bpf/Makefile | 2 - ...2-Fix-mpfr_custom_get_kind-macro-bug.patch | 76 +++ 253 files changed, 2920 insertions(+), 7369 deletions(-) create mode 100644 package/devel/gdb/patches/001-Add-support-for-readline-8.2.patch delete mode 100644 package/devel/trace-cmd/patches/100-musl.patch delete mode 100644 package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch create mode 100644 package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch delete mode 100644 package/libs/gettext/Makefile delete mode 100644 package/libs/gettext/src/LICENSE delete mode 100644 package/libs/gettext/src/include/libintl.h delete mode 100644 package/libs/gettext/src/m4/codeset.m4 delete mode 100644 package/libs/gettext/src/m4/gettext.m4 delete mode 100644 package/libs/gettext/src/m4/intl.m4 delete mode 100644 package/libs/gettext/src/m4/intldir.m4 delete mode 100644 package/libs/gettext/src/m4/intlmacosx.m4 delete mode 100644 package/libs/gettext/src/m4/lcmessage.m4 delete mode 100644 package/libs/gettext/src/m4/nls.m4 delete mode 100644 package/libs/gettext/src/m4/po.m4 create mode 100644 package/libs/libcap/patches/900-use-more-compatible-shebang.patch delete mode 100644 package/libs/libdouble-conversion/Makefile delete mode 100644 package/libs/libiconv/COPYING delete mode 100644 package/libs/libiconv/COPYRIGHT delete mode 100644 package/libs/libiconv/Makefile delete mode 100644 package/libs/libiconv/src/LICENSE delete mode 100644 package/libs/libiconv/src/iconv.c delete mode 100644 package/libs/libiconv/src/include/charmaps.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-10.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-13.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-14.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-16.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-2.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-3.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-4.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-5.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-6.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-7.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-8.h delete mode 100644 package/libs/libiconv/src/include/charmaps/iso-8859-9.h delete mode 100644 package/libs/libiconv/src/include/charmaps/koi8-r.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1250.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1251.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1252.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1253.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1254.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1255.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1256.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1257.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-1258.h delete mode 100644 package/libs/libiconv/src/include/charmaps/windows-874.h delete mode 100644 package/libs/libiconv/src/include/iconv.h delete mode 100644 package/libs/libiconv/src/m4/iconv.m4 delete mode 100644 package/libs/libjson-c/patches/000-libm.patch create mode 100644 package/libs/libmd/Makefile delete mode 100644 package/libs/libselinux/bcm27xx-userland/Makefile create mode 100644 package/libs/libtraceevent/Makefile create mode 100644 package/libs/libtracefs/Makefile delete mode 100644 package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch delete mode 100644 package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch create mode 100644 package/libs/mbedtls/Config.in delete mode 100644 package/libs/mbedtls/patches/100-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch delete mode 100644 package/libs/mbedtls/patches/200-config.patch create mode 100644 package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch delete mode 100644 package/libs/uclibc++/Makefile delete mode 100644 package/libs/uclibc++/files/config.default delete mode 100644 package/libs/uclibc++/patches/001-no-ansi.patch delete mode 100644 package/libs/uclibc++/patches/002-undef-functions.patch delete mode 100644 package/libs/uclibc++/patches/003-no-fPIC.patch delete mode 100644 package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch delete mode 100644 package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch delete mode 100644 package/libs/zlib/patches/001-neon-implementation-of-adler32.patch delete mode 100644 package/libs/zlib/patches/006-fix-CVE-2022-37434.patch delete mode 100644 package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch create mode 100644 package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch create mode 100644 package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch create mode 100644 package/system/procd/files/service delete mode 100644 package/system/procd/patches/001-procd_ujail_static_binary_fix.patch create mode 100644 package/system/ubox/files/modules.conf create mode 100644 package/utils/busybox/patches/530-nslookup-ensure-unique-transaction-IDs-for-the-DNS-queries.patch create mode 100644 package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch create mode 100644 package/utils/f2fs-tools/patches/101-configure.ac-fix-cross-compilation.patch delete mode 100644 package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch delete mode 100644 package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch rename package/utils/nvram/files/{nvram.init => nvram-bcm47xx.init} (97%) create mode 100755 package/utils/nvram/files/nvram-bcm53xx.init delete mode 100644 package/utils/otrx/src/Makefile delete mode 100644 package/utils/otrx/src/otrx.c create mode 100644 package/utils/uencrypt/Makefile create mode 100644 package/utils/uencrypt/src/CMakeLists.txt create mode 100644 package/utils/uencrypt/src/uencrypt.c create mode 100644 package/utils/util-linux/patches/010-meson-typo.patch create mode 100644 package/utils/util-linux/patches/020-meson-fix-compilation-without-systemd.patch create mode 100644 package/utils/util-linux/patches/030-meson-don-t-use-run.patch create mode 100644 package/utils/util-linux/patches/040-meson-fix-cpu_set_t-test.patch create mode 100644 package/utils/util-linux/patches/050-meson-fix-environ-search.patch create mode 100644 package/utils/util-linux/patches/060-meson-add-_GNU_SOURCE-for-sighandler_t.patch create mode 100644 package/utils/util-linux/patches/070-meson-fix-isnan-check.patch create mode 100644 package/utils/util-linux/patches/080-meson-fix-tzname-check.patch create mode 100644 package/utils/util-linux/patches/090-meson-libpam.patch create mode 100644 package/utils/util-linux/patches/100-meson-make-libcap-ng-dependent-on-setpriv.patch create mode 100644 package/utils/util-linux/patches/110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch create mode 100644 package/utils/util-linux/patches/120-meson-get-the-project-version-from-the-version-gen-s.patch create mode 100644 package/utils/util-linux/patches/130-meson-fix-error-in-processing-version-for-pc-files.patch create mode 100644 package/utils/util-linux/patches/200-meson-no-po.patch rename package/utils/util-linux/patches/{100-use_urandom.patch => 210-use-urandom.patch} (100%) create mode 100644 package/utils/zyxel-bootconfig/Makefile create mode 100644 package/utils/zyxel-bootconfig/files/95_apply_bootconfig create mode 100644 package/utils/zyxel-bootconfig/src/Makefile create mode 100644 package/utils/zyxel-bootconfig/src/zyxel-bootconfig.c create mode 100644 target/imagebuilder/files/README.md create mode 100644 toolchain/build_version delete mode 100644 toolchain/gcc/patches-10.x/002-case_insensitive.patch delete mode 100644 toolchain/gcc/patches-10.x/010-documentation.patch delete mode 100644 toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch delete mode 100644 toolchain/gcc/patches-10.x/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch delete mode 100644 toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch delete mode 100644 toolchain/gcc/patches-10.x/820-libgcc_pic.patch delete mode 100644 toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch delete mode 100644 toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch delete mode 100644 toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch delete mode 100644 toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch delete mode 100644 toolchain/gcc/patches-10.x/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch delete mode 100644 toolchain/gcc/patches-10.x/910-mbsd_multi.patch delete mode 100644 toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch delete mode 100644 toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch delete mode 100644 toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch delete mode 100644 toolchain/gcc/patches-10.x/960-gotools-fix-compilation-when-making-cross-compiler.patch create mode 100644 tools/mpfr/patches/002-Fix-mpfr_custom_get_kind-macro-bug.patch diff --git a/config/Config-build.in b/config/Config-build.in index 196d4e67a..c2303637c 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -14,14 +14,14 @@ config EXPERIMENTAL positive and negative). But do so only if you know how to recover your device in case of flashing potentially non-working firmware. - + If you plan to use this build in production, say NO! menu "Global build settings" config JSON_OVERVIEW_IMAGE_INFO bool "Create JSON info file overview per target" - default BUILDBOT + default y help Create a JSON info file called profiles.json in the target directory containing machine readable list of built profiles @@ -111,7 +111,7 @@ menu "Global build settings" default n help This makes file checksums part of package metadata. It increases size - but provides you with pkg_check command to check for flash coruptions. + but provides you with pkg_check command to check for flash corruptions. config INCLUDE_CONFIG bool "Include build configuration in firmware" if DEVEL @@ -154,17 +154,12 @@ menu "Global build settings" Adds -g3 to the CFLAGS. config IPV6 - bool - prompt "Enable IPv6 support in packages" - default y - help - Enables IPv6 support in kernel (builtin) and packages. + def_bool y comment "Stripping options" choice prompt "Binary stripping method" - default USE_STRIP if EXTERNAL_TOOLCHAIN default USE_STRIP if USE_GLIBC default USE_SSTRIP help @@ -221,20 +216,6 @@ menu "Global build settings" make the system libraries incompatible with most of the packages that are not selected during the build process. - choice - prompt "Preferred standard C++ library" - default USE_LIBSTDCXX if USE_GLIBC - default USE_UCLIBCXX - help - Select the preferred standard C++ library for all packages that support this. - - config USE_UCLIBCXX - bool "uClibc++" - - config USE_LIBSTDCXX - bool "libstdc++" - endchoice - comment "Hardening build options" config PKG_CHECK_FORMAT_SECURITY @@ -390,4 +371,16 @@ menu "Global build settings" endchoice + config SECCOMP + bool "Enable SECCOMP" + select KERNEL_SECCOMP + select PACKAGE_procd-seccomp + depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64) + depends on !TARGET_uml + default y + help + This option enables seccomp kernel features to safely + execute untrusted bytecode and selects the seccomp-variants + of procd + endmenu diff --git a/config/Config-devel.in b/config/Config-devel.in index 4c40817c5..e16e6ecaa 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -95,6 +95,11 @@ menuconfig DEVEL Store ccache in this directory. If not set, uses './.ccache' + config KERNEL_CFLAGS + string "Kernel extra CFLAGS" if DEVEL + default "-falign-functions=32" if TARGET_bcm53xx + default "" + config EXTERNAL_KERNEL_TREE string "Use external kernel tree" if DEVEL default "" diff --git a/config/Config-images.in b/config/Config-images.in index b27655967..6c1408614 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -48,6 +48,7 @@ menu "Target Images" bool "xz" config TARGET_INITRAMFS_COMPRESSION_ZSTD + depends on !LINUX_5_4 bool "zstd" endchoice @@ -296,7 +297,7 @@ menu "Target Images" source "target/linux/*/image/Config.in" config TARGET_KERNEL_PARTSIZE - int "Kernel partition size (in MB)" + int "Kernel partition size (in MiB)" depends on USES_BOOT_PART default 8 if TARGET_apm821xx_sata default 64 if TARGET_bcm27xx @@ -304,8 +305,8 @@ menu "Target Images" default 16 config TARGET_ROOTFS_PARTSIZE - int "Root filesystem partition size (in MB)" - depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml || TARGET_ramips + int "Root filesystem partition size (in MiB)" + depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS default 400 help Select the root filesystem partition size. diff --git a/config/Config-kernel.in b/config/Config-kernel.in index 7c6e0e5a8..b6177421c 100644 --- a/config/Config-kernel.in +++ b/config/Config-kernel.in @@ -24,11 +24,6 @@ config KERNEL_PRINTK bool "Enable support for printk" default y -config KERNEL_CRASHLOG - bool "Crash logging" - depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64) - default y - config KERNEL_SWAP bool "Support for paging of anonymous memory (swap)" default y if !SMALL_FLASH @@ -48,8 +43,7 @@ config KERNEL_DEBUG_FS config KERNEL_MIPS_FP_SUPPORT bool - default y - depends on (mips || mipsel || mips64 || mips64el) + default y if TARGET_pistachio config KERNEL_ARM_PMU bool @@ -87,6 +81,11 @@ config KERNEL_PROFILING Enable the extended profiling support mechanisms used by profilers such as OProfile. +config KERNEL_RPI_AXIPERF + bool "Compile the kernel with RaspberryPi AXI Performance monitors" + default y + depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx + config KERNEL_UBSAN bool "Compile the kernel with undefined behaviour sanity checker" help @@ -115,6 +114,16 @@ config KERNEL_UBSAN_ALIGNMENT Enabling this option on architectures that support unaligned accesses may produce a lot of false positives. +config KERNEL_UBSAN_BOUNDS + bool "Perform array index bounds checking" + depends on KERNEL_UBSAN + help + This option enables detection of directly indexed out of bounds array + accesses, where the array size is known at compile time. Note that + this does not protect array overflows via bad calls to the + {str,mem}*cpy() family of functions (that is addressed by + FORTIFY_SOURCE). + config KERNEL_UBSAN_NULL bool "Enable checking of null pointers" depends on KERNEL_UBSAN @@ -122,6 +131,19 @@ config KERNEL_UBSAN_NULL This option enables detection of memory accesses via a null pointer. +config KERNEL_UBSAN_TRAP + bool "On Sanitizer warnings, abort the running kernel code" + depends on KERNEL_UBSAN + help + Building kernels with Sanitizer features enabled tends to grow the + kernel size by around 5%, due to adding all the debugging text on + failure paths. To avoid this, Sanitizer instrumentation can just + issue a trap. This reduces the kernel size overhead but turns all + warnings (including potentially harmless conditions) into full + exceptions that abort the running kernel code (regardless of context, + locks held, etc), which may destabilize the system. For some system + builders this is an acceptable trade-off. + config KERNEL_KASAN bool "Compile the kernel with KASan: runtime memory debugger" select KERNEL_SLUB_DEBUG @@ -148,6 +170,30 @@ config KERNEL_KASAN_EXTRA compile time. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more +config KERNEL_KASAN_VMALLOC + bool "Back mappings in vmalloc space with real shadow memory" + depends on KERNEL_KASAN + help + By default, the shadow region for vmalloc space is the read-only + zero page. This means that KASAN cannot detect errors involving + vmalloc space. + + Enabling this option will hook in to vmap/vmalloc and back those + mappings with real shadow memory allocated on demand. This allows + for KASAN to detect more sorts of errors (and to support vmapped + stacks), but at the cost of higher memory usage. + + This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't + depend on that in here, so it is possible that enabling this + will have no effect. + +if KERNEL_KASAN + config KERNEL_KASAN_GENERIC + def_bool y + + config KERNEL_KASAN_SW_TAGS + def_bool n +endif choice prompt "Instrumentation type" @@ -303,6 +349,19 @@ config KERNEL_PREEMPT_TRACER enabled. This option and the irqs-off timing option can be used together or separately.) +config KERNEL_HIST_TRIGGERS + bool "Histogram triggers" + depends on KERNEL_FTRACE + help + Hist triggers allow one or more arbitrary trace event fields to be + aggregated into hash tables and dumped to stdout by reading a + debugfs/tracefs file. They're useful for gathering quick and dirty + (though precise) summaries of event activity as an initial guide for + further investigation using more advanced tools. + + Inter-event tracing of quantities such as latencies is also + supported using hist triggers under this option. + config KERNEL_DEBUG_KERNEL bool default n @@ -314,6 +373,34 @@ config KERNEL_DEBUG_INFO help This will compile your kernel and modules with debug information. +config KERNEL_DEBUG_INFO_BTF + + bool "Enable additional BTF type information" + default n + depends on !HOST_OS_MACOS + depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED + select DWARVES + help + Generate BPF Type Format (BTF) information from DWARF debug info. + Turning this on expects presence of pahole tool, which will convert + DWARF type info into equivalent deduplicated BTF type info. + + Required to run BPF CO-RE applications. + +config KERNEL_DEBUG_INFO_REDUCED + bool "Reduce debugging information" + default y + depends on KERNEL_DEBUG_INFO + help + If you say Y here gcc is instructed to generate less debugging + information for structure types. This means that tools that + need full debugging information (like kgdb or systemtap) won't + be happy. But if you merely need debugging information to + resolve line numbers there is no loss. Advantage is that + build directory object sizes shrink dramatically over a full + DEBUG_INFO build and compile times are reduced too. + Only works with newer gcc versions. + config KERNEL_DEBUG_LL_UART_NONE bool default n @@ -327,6 +414,14 @@ config KERNEL_DEBUG_LL help ARM low level debugging. +config KERNEL_DEBUG_VIRTUAL + bool "Compile the kernel with VM translations debugging" + select KERNEL_DEBUG_KERNEL + default n + help + Enable checks sanity checks to catch invalid uses of + virt_to_phys()/phys_to_virt() against the non-linear address space. + config KERNEL_DYNAMIC_DEBUG bool "Compile the kernel with dynamic printk" select KERNEL_DEBUG_FS @@ -368,6 +463,21 @@ config KERNEL_KPROBE_EVENTS bool default y if KERNEL_KPROBES +config KERNEL_BPF_EVENTS + bool "Compile the kernel with BPF event support" + default n + select KERNEL_KPROBES + help + Allows to attach BPF programs to kprobe, uprobe and tracepoint events. + This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY + for sending data from BPF programs to user-space for post-processing + or logging. + +config KERNEL_BPF_KPROBE_OVERRIDE + bool + default n + depends on KERNEL_KPROBES + config KERNEL_AIO bool "Compile the kernel with asynchronous IO support" default y if !SMALL_FLASH @@ -437,34 +547,22 @@ config KERNEL_PROVE_LOCKING select KERNEL_DEBUG_KERNEL default n -config KERNEL_LOCKUP_DETECTOR - bool "Compile the kernel with detect Hard and Soft Lockups" +config KERNEL_SOFTLOCKUP_DETECTOR + bool "Compile the kernel with detect Soft Lockups" depends on KERNEL_DEBUG_KERNEL help Say Y here to enable the kernel to act as a watchdog to detect - hard and soft lockups. + soft lockups. Softlockups are bugs that cause the kernel to loop in kernel mode for more than 20 seconds, without giving other tasks a chance to run. The current stack trace is displayed upon detection and the system will stay locked up. - Hardlockups are bugs that cause the CPU to loop in kernel mode - for more than 10 seconds, without letting other interrupts have a - chance to run. The current stack trace is displayed upon detection - and the system will stay locked up. - - The overhead should be minimal. A periodic hrtimer runs to - generate interrupts and kick the watchdog task every 4 seconds. - An NMI is generated every 10 seconds or so to check for hardlockups. - - The frequency of hrtimer and NMI events and the soft and hard lockup - thresholds can be controlled through the sysctl watchdog_thresh. - config KERNEL_DETECT_HUNG_TASK bool "Compile the kernel with detect Hung Tasks" depends on KERNEL_DEBUG_KERNEL - default KERNEL_LOCKUP_DETECTOR + default KERNEL_SOFTLOCKUP_DETECTOR help Say Y here to enable the kernel to detect "hung tasks", which are bugs that cause the task to be stuck in @@ -944,6 +1042,19 @@ config KERNEL_IP_MROUTE Multicast routing requires a multicast routing daemon in addition to kernel support. +if KERNEL_IP_MROUTE + + config KERNEL_IP_MROUTE_MULTIPLE_TABLES + def_bool y + + config KERNEL_IP_PIMSM_V1 + def_bool y + + config KERNEL_IP_PIMSM_V2 + def_bool y + +endif + # # IPv6 configuration # @@ -966,8 +1077,15 @@ if KERNEL_IPV6 Multicast routing requires a multicast routing daemon in addition to kernel support. - config KERNEL_IPV6_PIMSM_V2 - def_bool n + if KERNEL_IPV6_MROUTE + + config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES + def_bool y + + config KERNEL_IPV6_PIMSM_V2 + def_bool y + + endif config KERNEL_IPV6_SEG6_LWTUNNEL bool "Enable support for lightweight tunnels" @@ -980,6 +1098,16 @@ if KERNEL_IPV6 endif +# +# Miscellaneous network configuration +# + +config KERNEL_NET_L3_MASTER_DEV + bool "L3 Master device support" + help + This module provides glue between core networking code and device + drivers to support L3 master devices like VRF. + # # NFS related symbols # @@ -1125,7 +1253,7 @@ config KERNEL_SQUASHFS_XATTR bool "Squashfs XATTR support" # -# compile optimiziation setting +# compile optimization setting # choice prompt "Compiler optimization level" diff --git a/include/uclibc++.mk b/include/uclibc++.mk index a1a61f26d..10f8d98e1 100644 --- a/include/uclibc++.mk +++ b/include/uclibc++.mk @@ -1,16 +1,2 @@ -ifndef DUMP - ifdef __package_mk - $(error uclibc++.mk must be included before package.mk) - endif -endif - -PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX -CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp - -ifneq ($(CONFIG_USE_UCLIBCXX),) - ifneq ($(CONFIG_CCACHE),) - TARGET_CXX_NOCACHE=g++-uc - else - TARGET_CXX=g++-uc - endif -endif +$(warn uclibc++.mk is deprecated. Please remove it and CXX_DEPENDS) +CXX_DEPENDS = +libstdcpp diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index ca1099349..75fdd320c 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,15 +8,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.35.2 +PKG_VERSION:=2.38 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=dcd5b0416e7b0a9b24bed76cd8c6c132526805761863150a26d016415b8bdc7b +PKG_HASH:=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024 -PKG_FIXUP:=autoreconf +PKG_FIXUP:=patch-libtool PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl PKG_REMOVE_FILES:=libtool.m4 PKG_INSTALL:=1 diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index dd1df7af8..7acf26d60 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb -PKG_VERSION:=11.2 +PKG_VERSION:=12.1 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32 +PKG_HASH:=0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/package/devel/gdb/patches/001-Add-support-for-readline-8.2.patch b/package/devel/gdb/patches/001-Add-support-for-readline-8.2.patch new file mode 100644 index 000000000..eb93c7f29 --- /dev/null +++ b/package/devel/gdb/patches/001-Add-support-for-readline-8.2.patch @@ -0,0 +1,31 @@ +From 1add37b567a7dee39d99f37b37802034c3fce9c4 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Sun, 20 Mar 2022 14:01:54 +0100 +Subject: [PATCH] Add support for readline 8.2 + +In readline 8.2 the type of rl_completer_word_break_characters changed to +include const. +--- + gdb/completer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/gdb/completer.c ++++ b/gdb/completer.c +@@ -36,7 +36,7 @@ + calling a hook instead so we eliminate the CLI dependency. */ + #include "gdbcmd.h" + +-/* Needed for rl_completer_word_break_characters() and for ++/* Needed for rl_completer_word_break_characters and for + rl_filename_completion_function. */ + #include "readline/readline.h" + +@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_thr + rl_basic_quote_characters = NULL; + } + +- return rl_completer_word_break_characters; ++ return (char *) rl_completer_word_break_characters; + } + + char * diff --git a/package/devel/gdb/patches/110-shared_libgcc.patch b/package/devel/gdb/patches/110-shared_libgcc.patch index 3979ccd26..f1602bc69 100644 --- a/package/devel/gdb/patches/110-shared_libgcc.patch +++ b/package/devel/gdb/patches/110-shared_libgcc.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1300,13 +1300,13 @@ if test -z "$LD"; then +@@ -1314,13 +1314,13 @@ if test -z "$LD"; then fi fi @@ -17,7 +17,7 @@ AC_LANG_PUSH(C++) AC_LINK_IFELSE([AC_LANG_SOURCE([ #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) -@@ -1705,7 +1705,7 @@ AC_ARG_WITH(stage1-ldflags, +@@ -1719,7 +1719,7 @@ AC_ARG_WITH(stage1-ldflags, # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -26,7 +26,7 @@ fi]) AC_SUBST(stage1_ldflags) -@@ -1734,7 +1734,7 @@ AC_ARG_WITH(boot-ldflags, +@@ -1748,7 +1748,7 @@ AC_ARG_WITH(boot-ldflags, # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then @@ -37,7 +37,7 @@ --- a/configure +++ b/configure -@@ -5257,14 +5257,14 @@ if test -z "$LD"; then +@@ -5275,14 +5275,14 @@ if test -z "$LD"; then fi fi @@ -56,7 +56,7 @@ ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -@@ -6149,7 +6149,7 @@ else +@@ -6167,7 +6167,7 @@ else # trust that they are doing what they want. if test "$with_static_standard_libraries" = yes -a "$stage1_libs" = "" \ -a "$have_static_libs" = yes; then @@ -65,7 +65,7 @@ fi fi -@@ -6185,7 +6185,7 @@ else +@@ -6203,7 +6203,7 @@ else # statically. But if the user explicitly specified the libraries to # use, trust that they are doing what they want. if test "$poststage1_libs" = ""; then diff --git a/package/devel/gdb/patches/130-gdb-ctrl-c.patch b/package/devel/gdb/patches/130-gdb-ctrl-c.patch index 72b727343..f793a71ca 100644 --- a/package/devel/gdb/patches/130-gdb-ctrl-c.patch +++ b/package/devel/gdb/patches/130-gdb-ctrl-c.patch @@ -24,7 +24,7 @@ Signed-off-by: Khem Raj --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc -@@ -5733,7 +5733,7 @@ linux_process_target::request_interrupt +@@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt { /* Send a SIGINT to the process group. This acts just like the user typed a ^C on the controlling terminal. */ diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index bbf3aaf9c..d556e2d9f 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -27,7 +27,8 @@ include $(INCLUDE_DIR)/nls.mk define Package/perf SECTION:=devel CATEGORY:=Development - DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @!TARGET_arc770 @KERNEL_PERF_EVENTS + DEPENDS:= +libelf +libdw +PACKAGE_libunwind:libunwind +libpthread +librt +objdump @!IN_SDK @KERNEL_PERF_EVENTS \ + +PACKAGE_libbfd:libbfd +PACKAGE_libopcodes:libopcodes TITLE:=Linux performance monitoring tool VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) URL:=http://www.kernel.org diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 8f66ffbe4..7500c3731 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -9,17 +9,17 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=strace -PKG_VERSION:=5.16 +PKG_VERSION:=6.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION) -PKG_HASH:=dc7db230ff3e57c249830ba94acab2b862da1fcaac55417e9b85041a833ca285 +PKG_HASH:=92d720a666855e9f1c6a11512fd6e99674a82bbfe1442557815f2ce8e1293338 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING -PKG_CPE_ID:=cpe:/a:paul_kranenburg:strace +PKG_CPE_ID:=cpe:/a:strace_project:strace PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -29,6 +29,7 @@ PKG_CONFIG_DEPENDS := \ CONFIG_STRACE_LIBUNWIND include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include diff --git a/package/devel/trace-cmd/Makefile b/package/devel/trace-cmd/Makefile index e15b04ad2..b6a28ab93 100644 --- a/package/devel/trace-cmd/Makefile +++ b/package/devel/trace-cmd/Makefile @@ -1,12 +1,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=trace-cmd -PKG_VERSION:=v2.9.1 +PKG_VERSION:=v3.1.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/ -PKG_HASH:=9404fc3cf540ea795304608068c9db6cdb38b90584c7f3c43249785913d54b38 +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/ +PKG_HASH:=447e095dbdfb0d362ab8c2086d62d80c5a2ecf67aef09b8f6b0cc064c0e1bfb5 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING @@ -21,42 +21,27 @@ define Package/trace-cmd SECTION:=devel CATEGORY:=Development TITLE:=Linux trace command line utility - DEPENDS:= + DEPENDS:=+libtracefs +zlib endef define Package/trace-cmd-extra SECTION:=devel CATEGORY:=Development TITLE:=Extra plugins for trace-cmd - DEPENDS:= + DEPENDS:=+libtraceevent-extra endef MAKE_FLAGS += \ NO_PYTHON=1 \ NO_AUDIT=1 \ + NO_LIBZSTD=1 \ prefix=/usr -PLUGINS_DIR := $(PKG_INSTALL_DIR)/usr/lib/traceevent/plugins -PLUGINS_MAIN := function hrtimer mac80211 sched_switch - TARGET_CFLAGS += --std=gnu99 -D_GNU_SOURCE define Package/trace-cmd/install $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/traceevent/plugins $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/trace-cmd $(1)/usr/bin/ - $(CP) \ - $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ - $(1)/usr/lib/traceevent/plugins -endef - -define Package/trace-cmd-extra/install - $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins - $(CP) \ - $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ - $$(filter-out $(PLUGINS_MAIN), \ - $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ - $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ - $(1)/usr/lib/traceevent/plugins endef $(eval $(call BuildPackage,trace-cmd)) diff --git a/package/devel/trace-cmd/patches/100-musl.patch b/package/devel/trace-cmd/patches/100-musl.patch deleted file mode 100644 index 80b419eb8..000000000 --- a/package/devel/trace-cmd/patches/100-musl.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 1a000636c1828eecdcec5360a51623ef4ffbff04 Mon Sep 17 00:00:00 2001 -From: Beniamin Sandu -Date: Mon, 30 Nov 2020 14:27:55 +0200 -Subject: trace-cmd: make it build against musl C library - -* add some missing headers and macros -* set pthread affinity using pthread_setaffinity_np after creating the thread -instead of pthread_attr_setaffinity_np (which seems to not be implemented -in musl) - -Tested using https://musl.cc/x86_64-linux-musl-native.tgz - -Link: https://lore.kernel.org/linux-trace-devel/20201130122755.31000-1-beniaminsandu@gmail.com - -Reviewed-by: Tzvetomir Stoyanov (VMware) -Signed-off-by: Beniamin Sandu -[ Fixed a whitespace issue ] -Signed-off-by: Steven Rostedt (VMware) ---- - include/trace-cmd/trace-cmd.h | 1 + - lib/trace-cmd/include/trace-cmd-local.h | 1 + - lib/tracefs/tracefs-events.c | 1 + - tracecmd/include/trace-local.h | 1 + - tracecmd/trace-tsync.c | 16 +++++++++++----- - 5 files changed, 20 insertions(+), 5 deletions(-) - ---- a/include/trace-cmd/trace-cmd.h -+++ b/include/trace-cmd/trace-cmd.h -@@ -6,6 +6,7 @@ - #ifndef _TRACE_CMD_H - #define _TRACE_CMD_H - -+#include - #include "traceevent/event-parse.h" - - #define TRACECMD_MAGIC { 23, 8, 68 } ---- a/lib/trace-cmd/include/trace-cmd-local.h -+++ b/lib/trace-cmd/include/trace-cmd-local.h -@@ -26,5 +26,6 @@ void warning(const char *fmt, ...); - #endif - #endif - -+#include - - #endif /* _TRACE_CMD_LOCAL_H */ ---- a/lib/tracefs/tracefs-events.c -+++ b/lib/tracefs/tracefs-events.c -@@ -13,6 +13,7 @@ - #include - #include - #include -+#include - - #include "kbuffer.h" - #include "tracefs.h" ---- a/tracecmd/include/trace-local.h -+++ b/tracecmd/include/trace-local.h -@@ -8,6 +8,7 @@ - - #include - #include /* for DIR */ -+#include - - #include "trace-cmd.h" - #include "event-utils.h" ---- a/tracecmd/trace-tsync.c -+++ b/tracecmd/trace-tsync.c -@@ -104,13 +104,16 @@ int tracecmd_host_tsync(struct buffer_in - - pthread_attr_init(&attrib); - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(&instance->tsync_thread, &attrib, - tsync_host_thread, &instance->tsync); -- if (!ret) -+ -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(instance->tsync_thread, mask_size, pin_mask); - instance->tsync_thread_running = true; -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); -@@ -243,11 +246,14 @@ unsigned int tracecmd_guest_tsync(char * - pthread_attr_init(&attrib); - tsync->sync_proto = proto; - pthread_attr_setdetachstate(&attrib, PTHREAD_CREATE_JOINABLE); -- if (!get_first_cpu(&pin_mask, &mask_size)) -- pthread_attr_setaffinity_np(&attrib, mask_size, pin_mask); - - ret = pthread_create(thr_id, &attrib, tsync_agent_thread, tsync); - -+ if (!ret) { -+ if (!get_first_cpu(&pin_mask, &mask_size)) -+ pthread_setaffinity_np(*thr_id, mask_size, pin_mask); -+ } -+ - if (pin_mask) - CPU_FREE(pin_mask); - pthread_attr_destroy(&attrib); diff --git a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch b/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch deleted file mode 100644 index cffcaa06b..000000000 --- a/package/devel/trace-cmd/patches/110-mac80211_tracepoint.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/lib/traceevent/plugins/plugin_mac80211.c -+++ b/lib/traceevent/plugins/plugin_mac80211.c -@@ -165,12 +165,15 @@ static int drv_config(struct trace_seq * - { 2, "IDLE" }, - { 3, "QOS"}, - ); -- tep_print_num_field(s, " chan:%d/", event, "center_freq", record, 1); -- print_enum(s, event, "channel_type", data, -- { 0, "noht" }, -- { 1, "ht20" }, -- { 2, "ht40-" }, -- { 3, "ht40+" }); -+ tep_print_num_field(s, " chan:%d@", event, "control_freq", record, 1); -+ print_enum(s, event, "chan_width", data, -+ { 0, "20_noht" }, -+ { 1, "20" }, -+ { 2, "40" }, -+ { 3, "80" }, -+ { 4, "80p80" }, -+ { 5, "160" }); -+ - trace_seq_putc(s, ' '); - SF("power_level"); - diff --git a/package/devel/valgrind/Makefile b/package/devel/valgrind/Makefile index c2e89d28e..bbd01ce37 100644 --- a/package/devel/valgrind/Makefile +++ b/package/devel/valgrind/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=valgrind -PKG_VERSION:=3.16.1 +PKG_VERSION:=3.20.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/pub/valgrind/ -PKG_HASH:=c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca +PKG_HASH:=8536c031dbe078d342f121fa881a9ecd205cb5a78e639005ad570011bdb9f3c6 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0+ @@ -33,7 +33,7 @@ include $(INCLUDE_DIR)/kernel.mk define Package/valgrind SECTION:=devel CATEGORY:=Development - DEPENDS:=@mips||mipsel||i386||x86_64||powerpc||arm_v7||aarch64 +libpthread +librt + DEPENDS:=@mips||mipsel||mips64||mips64el||i386||x86_64||powerpc||arm_v7||aarch64 +libpthread +librt TITLE:=debugging and profiling tools for Linux URL:=http://www.valgrind.org endef diff --git a/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch new file mode 100644 index 000000000..e84273c97 --- /dev/null +++ b/package/devel/valgrind/patches/010-mips-Fix-new-syscall-numbers.patch @@ -0,0 +1,131 @@ +From 86ab9452bd10f08dbfa22d94e1155838f6f9f2e0 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 31 Oct 2021 23:11:11 +0100 +Subject: [PATCH] mips: Fix new syscall numbers + +The MIPS32 and MIPS64 O32 ABI are adding 4000 to all syscall numbers. +The MIPS64 N64 ABI adds 5000 to each syscall and the MIPS64 N32 ABI adds +6000 to each syscall number. We can not sue the shared file for MIPS and +have to define this for each sycall separately. + +Without this change valgrind is not able to detect new syscalls like +clock_gettime64 correctly. + +Signed-off-by: Hauke Mehrtens +--- + include/pub_tool_vkiscnums_asm.h | 3 --- + include/vki/vki-scnums-mips32-linux.h | 36 +++++++++++++++++++++++++++ + include/vki/vki-scnums-mips64-linux.h | 32 ++++++++++++++++++++++++ + 3 files changed, 68 insertions(+), 3 deletions(-) + +--- a/include/pub_tool_vkiscnums_asm.h ++++ b/include/pub_tool_vkiscnums_asm.h +@@ -63,15 +63,12 @@ + # include "vki/vki-scnums-arm64-linux.h" + + #elif defined(VGP_mips32_linux) +-# include "vki/vki-scnums-shared-linux.h" +-# include "vki/vki-scnums-32bit-linux.h" + # include "vki/vki-scnums-mips32-linux.h" + + #elif defined(VGP_nanomips_linux) + # include "vki/vki-scnums-nanomips-linux.h" + + #elif defined(VGP_mips64_linux) +-# include "vki/vki-scnums-shared-linux.h" + # include "vki/vki-scnums-mips64-linux.h" + + #elif defined(VGP_x86_freebsd) || defined(VGP_amd64_freebsd) +--- a/include/vki/vki-scnums-mips32-linux.h ++++ b/include/vki/vki-scnums-mips32-linux.h +@@ -401,6 +401,42 @@ + #define __NR_pkey_free (__NR_Linux + 365) + #define __NR_statx (__NR_Linux + 366) + ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + /* + * Offset of the last Linux o32 flavoured syscall + */ +--- a/include/vki/vki-scnums-mips64-linux.h ++++ b/include/vki/vki-scnums-mips64-linux.h +@@ -363,6 +363,22 @@ + #define __NR_pkey_free (__NR_Linux + 325) + #define __NR_statx (__NR_Linux + 326) + ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + #elif defined(VGABI_N32) + + /* +@@ -702,6 +718,22 @@ + #define __NR_pkey_free (__NR_Linux + 329) + #define __NR_statx (__NR_Linux + 330) + ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++ ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++ ++#define __NR_faccessat2 (__NR_Linux + 439) ++ + #else + #error unknown mips64 abi + #endif diff --git a/package/devel/valgrind/patches/100-fix_configure_check.patch b/package/devel/valgrind/patches/100-fix_configure_check.patch index 6e9384ff8..38269bb14 100644 --- a/package/devel/valgrind/patches/100-fix_configure_check.patch +++ b/package/devel/valgrind/patches/100-fix_configure_check.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -345,7 +345,7 @@ case "${host_os}" in +@@ -368,7 +368,7 @@ case "${host_os}" in # Ok, this is linux. Check the kernel version AC_MSG_CHECKING([for the kernel version]) diff --git a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch index 26291f777..957e5c930 100644 --- a/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch +++ b/package/devel/valgrind/patches/130-fix_arm_arch_detection.patch @@ -6,7 +6,7 @@ Last-Update: 2013-11-30 --- a/configure.ac +++ b/configure.ac -@@ -252,7 +252,7 @@ case "${host_cpu}" in +@@ -275,7 +275,7 @@ case "${host_cpu}" in ARCH_MAX="s390x" ;; diff --git a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch index 05be099ca..9d3482815 100644 --- a/package/devel/valgrind/patches/130-mips_fix_soft_float.patch +++ b/package/devel/valgrind/patches/130-mips_fix_soft_float.patch @@ -14,7 +14,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/VEX/priv/guest_mips_helpers.c +++ b/VEX/priv/guest_mips_helpers.c -@@ -617,6 +617,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -616,6 +616,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -22,7 +22,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) VexGuestMIPS32State* guest_state = (VexGuestMIPS32State*)gs; UInt loFsVal, hiFsVal, loFtVal, hiFtVal; -@@ -699,6 +700,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -698,6 +699,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -30,7 +30,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: return ret; } -@@ -708,6 +710,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -707,6 +709,7 @@ extern UInt mips_dirtyhelper_calculate_F flt_op inst ) { UInt ret = 0; @@ -38,7 +38,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: #if defined(__mips__) && ((__mips == 64) || \ (defined(__mips_isa_rev) && (__mips_isa_rev >= 2))) #if defined(VGA_mips32) -@@ -860,6 +863,7 @@ extern UInt mips_dirtyhelper_calculate_F +@@ -859,6 +862,7 @@ extern UInt mips_dirtyhelper_calculate_F break; } #endif @@ -48,7 +48,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c -@@ -1828,6 +1828,7 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2106,6 +2106,7 @@ Bool VG_(machine_get_hwcaps)( void ) we are using alternative way to determine FP mode */ ULong result = 0; @@ -56,7 +56,7 @@ This fixes the following error message when compiling with a GCC 10 MIPS BE 32: if (!VG_MINIMAL_SETJMP(env_unsup_insn)) { __asm__ volatile ( ".set push\n\t" -@@ -1845,6 +1846,9 @@ Bool VG_(machine_get_hwcaps)( void ) +@@ -2123,6 +2124,9 @@ Bool VG_(machine_get_hwcaps)( void ) fpmode = (result != 0x3FF0000000000000ull); } diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 6be2d643f..b3f34cd9b 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -565,6 +565,23 @@ endef $(eval $(call KernelPackage,veth)) +define KernelPackage/vrf + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Virtual Routing and Forwarding (Lite) + DEPENDS:=@KERNEL_NET_L3_MASTER_DEV + KCONFIG:=CONFIG_NET_VRF + FILES:=$(LINUX_DIR)/drivers/net/vrf.ko + AUTOLOAD:=$(call AutoLoad,30,vrf) +endef + +define KernelPackage/vrf/description + This option enables the support for mapping interfaces into VRF's. The + support enables VRF devices. +endef + +$(eval $(call KernelPackage,vrf)) + + define KernelPackage/slhc SUBMENU:=$(NETWORK_SUPPORT_MENU) HIDDEN:=1 diff --git a/package/lean/polarssl/Makefile b/package/lean/polarssl/Makefile index 57fa81e91..c2e9c3352 100644 --- a/package/lean/polarssl/Makefile +++ b/package/lean/polarssl/Makefile @@ -19,7 +19,6 @@ PKG_MD5SUM:=66ebbbf67e8a9463041846822b0a1692 PKG_BUILD_DIR:=$(BUILD_DIR)/$(SRC_PKG_NAME)-$(PKG_VERSION) -PKG_BUILD_PARALLEL:=1 PKG_LICENSE:=GPL-2.0+ include $(INCLUDE_DIR)/package.mk @@ -49,8 +48,6 @@ $(call Package/polarssl/Default/description) This package contains the PolarSSL library. endef -PKG_INSTALL:=1 - CMAKE_OPTIONS += \ -DCMAKE_BUILD_TYPE:String="Release" \ -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \ diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile index 21b154f29..1a48dcb2c 100644 --- a/package/libs/argp-standalone/Makefile +++ b/package/libs/argp-standalone/Makefile @@ -34,8 +34,10 @@ define Package/argp-standalone/description endef MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" + CFLAGS="$(TARGET_CFLAGS) $(FPIC) -std=gnu89" +HOST_MAKE_FLAGS += \ + CFLAGS="$(HOST_CFLAGS) $(FPIC) -std=gnu89" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile index 8111a36f5..2319401ba 100644 --- a/package/libs/gettext-full/Makefile +++ b/package/libs/gettext-full/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gettext-full -PKG_VERSION:=0.21 -PKG_RELEASE:=2 +PKG_VERSION:=0.21.1 +PKG_RELEASE:=1 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gettext -PKG_HASH:=d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192 +PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6 PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION) @@ -24,8 +24,8 @@ PKG_CPE_ID:=cpe:/a:gnu:gettext PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=gettext-full/host -PKG_BUILD_PARALLEL:=1 -HOST_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=0 +HOST_BUILD_PARALLEL:=0 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -88,6 +88,11 @@ define Build/InstallDev $(SED) '/read dummy/d' $(STAGING_DIR_HOSTPKG)/bin/gettextize endef +define Host/Install + $(call Host/Install/Default) + $(LN) msgfmt $(STAGING_DIR_HOSTPKG)/bin/gmsgfmt +endef + define Package/libintl-full/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libintl.so.* $(1)/usr/lib/ diff --git a/package/libs/gettext-full/patches/001-autotools.patch b/package/libs/gettext-full/patches/001-autotools.patch index 034fc938a..7e1f005dc 100644 --- a/package/libs/gettext-full/patches/001-autotools.patch +++ b/package/libs/gettext-full/patches/001-autotools.patch @@ -12,7 +12,7 @@ $(INSTALL_DATA) $$dir/$$file $(DESTDIR)$(htmldir)/$$file; \ --- a/gettext-tools/man/Makefile.am +++ b/gettext-tools/man/Makefile.am -@@ -157,8 +157,7 @@ recode-sr-latin.1.html: recode-sr-latin. +@@ -158,8 +158,7 @@ recode-sr-latin.1.html: recode-sr-latin. gettextize.1.html: gettextize.1 autopoint.1.html: autopoint.1 diff --git a/package/libs/gettext-full/patches/010-m4.patch b/package/libs/gettext-full/patches/010-m4.patch index 6d08835e3..fe896db31 100644 --- a/package/libs/gettext-full/patches/010-m4.patch +++ b/package/libs/gettext-full/patches/010-m4.patch @@ -1,14 +1,14 @@ --- a/gettext-runtime/gnulib-m4/stddef_h.m4 +++ b/gettext-runtime/gnulib-m4/stddef_h.m4 -@@ -8,7 +8,7 @@ dnl with or without modifications, as lo - AC_DEFUN([gl_STDDEF_H], +@@ -9,7 +9,7 @@ dnl A placeholder for , for pl + AC_DEFUN_ONCE([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) + AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) - STDDEF_H= - dnl Test whether the type max_align_t exists and whether its alignment + dnl Persuade OpenBSD to declare max_align_t. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) --- a/gettext-runtime/gnulib-m4/stdint.m4 +++ b/gettext-runtime/gnulib-m4/stdint.m4 @@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], @@ -22,7 +22,7 @@ dnl macros. --- a/gettext-runtime/gnulib-m4/wchar_h.m4 +++ b/gettext-runtime/gnulib-m4/wchar_h.m4 -@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H], +@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H], AC_REQUIRE([gl_FEATURES_H]) @@ -44,7 +44,7 @@ [AC_COMPILE_IFELSE( --- a/gettext-runtime/gnulib-m4/wctype_h.m4 +++ b/gettext-runtime/gnulib-m4/wctype_h.m4 -@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H], +@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H], fi AC_SUBST([HAVE_ISWCNTRL]) @@ -77,26 +77,6 @@ [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_COMPILE_IFELSE( ---- a/gettext-runtime/intl/Makefile.am -+++ b/gettext-runtime/intl/Makefile.am -@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ -- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \ -+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \ - -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \ - < $(srcdir)/libgnuintl.in.h \ - | if test '@WOE32DLL@' = yes; then \ -@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ -- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \ -+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \ - -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \ - < $(srcdir)/libgnuintl.in.h > libintl.h - MOSTLYCLEANFILES += libintl.h --- a/gettext-runtime/libasprintf/configure.ac +++ b/gettext-runtime/libasprintf/configure.ac @@ -76,8 +76,8 @@ dnl Checks for typedefs, structures, and @@ -145,30 +125,6 @@ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) ---- a/gettext-tools/gnulib-m4/gnulib-comp.m4 -+++ b/gettext-tools/gnulib-m4/gnulib-comp.m4 -@@ -1843,8 +1843,8 @@ changequote([, ])dnl - AC_REQUIRE([gl_SOCKETS]) - gl_TYPE_SOCKLEN_T - gl_STDALIGN_H -- AC_REQUIRE([gt_TYPE_WCHAR_T]) -- AC_REQUIRE([gt_TYPE_WINT_T]) -+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) -+ AC_REQUIRE([gt_TYPE_WINT_T_GT]) - gl_FUNC_STRERROR_R - if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then - AC_LIBOBJ([strerror_r]) ---- a/gettext-tools/gnulib-m4/stddef_h.m4 -+++ b/gettext-tools/gnulib-m4/stddef_h.m4 -@@ -8,7 +8,7 @@ dnl with or without modifications, as lo - AC_DEFUN([gl_STDDEF_H], - [ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) -- AC_REQUIRE([gt_TYPE_WCHAR_T]) -+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) - STDDEF_H= - - dnl Test whether the type max_align_t exists and whether its alignment --- a/gettext-tools/gnulib-m4/stdint.m4 +++ b/gettext-tools/gnulib-m4/stdint.m4 @@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], @@ -216,7 +172,7 @@ dnl is defined as a weak alias of snprintf; we prefer to use the latter). --- a/gettext-tools/gnulib-m4/wchar_h.m4 +++ b/gettext-tools/gnulib-m4/wchar_h.m4 -@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H], +@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H], AC_REQUIRE([gl_FEATURES_H]) @@ -238,7 +194,7 @@ [AC_COMPILE_IFELSE( --- a/gettext-tools/gnulib-m4/wctype_h.m4 +++ b/gettext-tools/gnulib-m4/wctype_h.m4 -@@ -22,7 +22,7 @@ AC_DEFUN([gl_WCTYPE_H], +@@ -22,7 +22,7 @@ AC_DEFUN_ONCE([gl_WCTYPE_H], fi AC_SUBST([HAVE_ISWCNTRL]) @@ -271,37 +227,6 @@ [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_COMPILE_IFELSE( ---- a/gettext-tools/intl/Makefile.am -+++ b/gettext-tools/intl/Makefile.am -@@ -274,7 +274,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ -- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \ -+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \ - -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \ - < $(srcdir)/libgnuintl.in.h \ - | if test '@WOE32DLL@' = yes; then \ -@@ -294,7 +294,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h - -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \ - -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \ - -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \ -- -e 's,@''HAVE_NAMELESS_LOCALES''@,@HAVE_NAMELESS_LOCALES@,g' \ -+ -e 's,@''HAVE_NAMELESS_LOCALES''@,0,g' \ - -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \ - < $(srcdir)/libgnuintl.in.h > libintl.h - MOSTLYCLEANFILES += libintl.h ---- a/libtextstyle/gnulib-m4/stddef_h.m4 -+++ b/libtextstyle/gnulib-m4/stddef_h.m4 -@@ -8,7 +8,7 @@ dnl with or without modifications, as lo - AC_DEFUN([gl_STDDEF_H], - [ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) -- AC_REQUIRE([gt_TYPE_WCHAR_T]) -+ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) - STDDEF_H= - - dnl Test whether the type max_align_t exists and whether its alignment --- a/libtextstyle/gnulib-m4/stdint.m4 +++ b/libtextstyle/gnulib-m4/stdint.m4 @@ -15,7 +15,7 @@ AC_DEFUN_ONCE([gl_STDINT_H], @@ -349,7 +274,7 @@ dnl is defined as a weak alias of snprintf; we prefer to use the latter). --- a/libtextstyle/gnulib-m4/wchar_h.m4 +++ b/libtextstyle/gnulib-m4/wchar_h.m4 -@@ -27,7 +27,7 @@ AC_DEFUN([gl_WCHAR_H], +@@ -27,7 +27,7 @@ AC_DEFUN_ONCE([gl_WCHAR_H], AC_REQUIRE([gl_FEATURES_H]) @@ -380,3 +305,38 @@ [ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], [AC_COMPILE_IFELSE( +--- a/gettext-tools/gnulib-m4/gnulib-comp.m4 ++++ b/gettext-tools/gnulib-m4/gnulib-comp.m4 +@@ -2218,8 +2218,8 @@ changequote([, ])dnl + AC_REQUIRE([gl_SOCKETLIB]) + AC_REQUIRE([gl_SOCKETS]) + gl_TYPE_SOCKLEN_T +- AC_REQUIRE([gt_TYPE_WCHAR_T]) +- AC_REQUIRE([gt_TYPE_WINT_T]) ++ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) ++ AC_REQUIRE([gt_TYPE_WINT_T_GT]) + gl_FUNC_STRERROR_R + AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [ + AC_LIBOBJ([strerror_r]) +--- a/libtextstyle/gnulib-m4/stddef_h.m4 ++++ b/libtextstyle/gnulib-m4/stddef_h.m4 +@@ -9,7 +9,7 @@ dnl A placeholder for , for pl + AC_DEFUN_ONCE([gl_STDDEF_H], + [ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) +- AC_REQUIRE([gt_TYPE_WCHAR_T]) ++ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) + + dnl Persuade OpenBSD to declare max_align_t. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) +--- a/gettext-tools/gnulib-m4/stddef_h.m4 ++++ b/gettext-tools/gnulib-m4/stddef_h.m4 +@@ -9,7 +9,7 @@ dnl A placeholder for , for pl + AC_DEFUN_ONCE([gl_STDDEF_H], + [ + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) +- AC_REQUIRE([gt_TYPE_WCHAR_T]) ++ AC_REQUIRE([gt_TYPE_WCHAR_T_GT]) + + dnl Persuade OpenBSD to declare max_align_t. + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/package/libs/gettext/Makefile b/package/libs/gettext/Makefile deleted file mode 100644 index f37c4e4e7..000000000 --- a/package/libs/gettext/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=gettext -PKG_RELEASE:=2 - -PKG_LICENSE:=FSFULLR -PKG_LICENSE_FILES:=LICENSE - -PKG_MAINTAINER:=Jo-Philipp Wich - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -define Package/libintl - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Stub header for the GNU Internationalization library -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib/libintl-stub/include - $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/libintl.h $(1)/usr/lib/libintl-stub/include/ - - $(INSTALL_DIR) $(1)/usr/share/aclocal - $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/ -endef - -define Host/Prepare - mkdir -p $(HOST_BUILD_DIR) -endef - -define Host/Compile - -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include - $(INSTALL_DATA) ./src/include/libintl.h $(STAGING_DIR_HOSTPKG)/include/ - - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal - $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/ -endef - -define Package/libintl/install - $(INSTALL_DIR) $(1)/tmp - touch $(1)/tmp/.libintl-placeholder -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,libintl)) diff --git a/package/libs/gettext/src/LICENSE b/package/libs/gettext/src/LICENSE deleted file mode 100644 index d1a59b05e..000000000 --- a/package/libs/gettext/src/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Each source file contains the following message: - -Copyright (C) 1995-2010 Free Software Foundation, Inc. -This file is free software; the Free Software Foundation -gives unlimited permission to copy and/or distribute it, -with or without modifications, as long as this notice is preserved. - diff --git a/package/libs/gettext/src/include/libintl.h b/package/libs/gettext/src/include/libintl.h deleted file mode 100644 index a1157a445..000000000 --- a/package/libs/gettext/src/include/libintl.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This code is lifted from http://permalink.gmane.org/gmane.linux.gentoo.embedded/3218 - */ - -#ifndef _LIBINTL_H -#define _LIBINTL_H 1 - -#include - -/* Undef gettext macros, if any... */ -#undef gettext -#undef dgettext -#undef dcgettext -#undef ngettext -#undef dngettext -#undef dcngettext -#undef textdomain -#undef bindtextdomain -#undef bind_textdomain_codeset - -/* part of locale.h */ -/* #undef setlocale */ - -#undef _ -#undef N_ - -/* Define gettext stubs that map back to the original strings */ -#define gettext(String) (String) -#define dgettext(Domain, String) (String) -#define dcgettext(Domain, String, Type) (String) - -#define ngettext(Singular, Plural, Count) \ - ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural)) - -#define dngettext(Domain, Singular, Plural, Count) \ - ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural)) - -#define dcngettext(Domain, Singular, Plural, Count, Category) \ - ((Count) == 1 ? (const char *) (Singular) : (const char *) (Plural)) - -#define _(String) (String) -#define N_(String) String - -#ifndef _LOCALE_H -/* #define setlocale(Category, Locale) ((char *)NULL) */ -#endif - -/* No-ops for textdomain operations */ -#define bindtextdomain(Domain, Directory) (Domain) -#define bind_textdomain_codeset(Domain, Codeset) (Codeset) -#define textdomain(String) (String) ?: "messages" - -#endif /* _LIBINTL_H */ diff --git a/package/libs/gettext/src/m4/codeset.m4 b/package/libs/gettext/src/m4/codeset.m4 deleted file mode 100644 index a53c04260..000000000 --- a/package/libs/gettext/src/m4/codeset.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# codeset.m4 serial 4 (gettext-0.18) -dnl Copyright (C) 2000-2002, 2006, 2008-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET); return !cs;], - [am_cv_langinfo_codeset=yes], - [am_cv_langinfo_codeset=no]) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE([HAVE_LANGINFO_CODESET], [1], - [Define if you have and nl_langinfo(CODESET).]) - fi -]) diff --git a/package/libs/gettext/src/m4/gettext.m4 b/package/libs/gettext/src/m4/gettext.m4 deleted file mode 100644 index f84e6a5d7..000000000 --- a/package/libs/gettext/src/m4/gettext.m4 +++ /dev/null @@ -1,383 +0,0 @@ -# gettext.m4 serial 63 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2006, 2008-2010. - -dnl Macro to add for using GNU gettext. - -dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. If NEEDSYMBOL is specified and is -dnl 'need-formatstring-macros', then GNU gettext implementations that don't -dnl support the ISO C 99 formatstring macros will be ignored. -dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. -dnl -dnl The result of the configuration is one of three cases: -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -dnl and used. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) No internationalization, always use English msgid. -dnl Catalog format: none -dnl Catalog extension: none -dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -dnl The use of .gmo is historical (it was needed to avoid overwriting the -dnl GNU format catalogs when building on a platform with an X/Open gettext), -dnl but we keep it in order not to force irrelevant filename changes on the -dnl maintainers. -dnl -AC_DEFUN([AM_GNU_GETTEXT], -[ - dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , - [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) - ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], - [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , - [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])])]) - define([gt_included_intl], - ifelse([$1], [external], - ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), - [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) - gt_NEEDS_INIT - AM_GNU_GETTEXT_NEED([$2]) - - AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) - - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Sometimes libintl requires libiconv, so first search for libiconv. - dnl Ideally we would do this search only after the - dnl if test "$USE_NLS" = "yes"; then - dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT - dnl the configure script would need to contain the same shell code - dnl again, outside any 'if'. There are two solutions: - dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. - dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. - ifelse(gt_included_intl, yes, , [ - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - ]) - - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. - gt_INTL_MACOSX - - dnl Set USE_NLS. - AC_REQUIRE([AM_NLS]) - - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - ]) - LIBINTL= - LTLIBINTL= - POSUB= - - dnl Add a version number to the cache macros. - case " $gt_needs " in - *" need-formatstring-macros "*) gt_api_version=3 ;; - *" need-ngettext "*) gt_api_version=2 ;; - *) gt_api_version=1 ;; - esac - gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" - gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH([included-gettext], - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext]) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - ]) - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If GNU gettext is available we use this. Else we have - dnl to fall back to GNU NLS library. - - if test $gt_api_version -ge 3; then - gt_revision_test_code=' -#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -changequote(,)dnl -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -changequote([,])dnl -' - else - gt_revision_test_code= - fi - if test $gt_api_version -ge 2; then - gt_expression_test_code=' + * ngettext ("", "", 0)' - else - gt_expression_test_code= - fi - - AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], - [AC_TRY_LINK([#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings;], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], - [eval "$gt_func_gnugettext_libc=yes"], - [eval "$gt_func_gnugettext_libc=no"])]) - - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ - AM_ICONV_LINK - ]) - dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL - dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) - dnl because that would add "-liconv" to LIBINTL and LTLIBINTL - dnl even if libiconv doesn't exist. - AC_LIB_LINKFLAGS_BODY([intl]) - AC_CACHE_CHECK([for GNU gettext in libintl], - [$gt_func_gnugettext_libintl], - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - dnl Now see whether libintl exists and does not depend on libiconv. - AC_TRY_LINK([#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - [eval "$gt_func_gnugettext_libintl=yes"], - [eval "$gt_func_gnugettext_libintl=no"]) - dnl Now see whether libintl exists and depends on libiconv. - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -$gt_revision_test_code -extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - ]) - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS"]) - fi - - dnl If an already present or preinstalled GNU gettext() is found, - dnl use it. But if this macro is used in GNU gettext, and GNU - dnl gettext is already preinstalled in libintl, we update this - dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ - || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - dnl Reset the values set by searching for libintl. - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - ifelse(gt_included_intl, yes, [ - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - dnl GNU gettext is not found in the C library. - dnl Fall back on included GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - fi - ]) - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Some extra flags are needed during linking. - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE([ENABLE_NLS], [1], - [Define to 1 if translation of program messages to the user's native language - is requested.]) - else - USE_NLS=no - fi - fi - - AC_MSG_CHECKING([whether to use NLS]) - AC_MSG_RESULT([$USE_NLS]) - if test "$USE_NLS" = "yes"; then - AC_MSG_CHECKING([where the gettext function comes from]) - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - AC_MSG_RESULT([$gt_source]) - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - AC_MSG_CHECKING([how to link with libintl]) - AC_MSG_RESULT([$LIBINTL]) - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) - fi - - dnl For backward compatibility. Some packages may be using this. - AC_DEFINE([HAVE_GETTEXT], [1], - [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE([HAVE_DCGETTEXT], [1], - [Define if the GNU dcgettext() function is already present or preinstalled.]) - fi - - dnl We need to process the po/ directory. - POSUB=po - fi - - ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - dnl Make all variables we use known to autoconf. - AC_SUBST([BUILD_INCLUDED_LIBINTL]) - AC_SUBST([USE_INCLUDED_LIBINTL]) - AC_SUBST([CATOBJEXT]) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST([DATADIRNAME]) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST([INSTOBJEXT]) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST([GENCAT]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST([INTLOBJS]) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) - ]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST([INTLLIBS]) - - dnl Make all documented variables known to autoconf. - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - AC_SUBST([POSUB]) -]) - - -dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. -m4_define([gt_NEEDS_INIT], -[ - m4_divert_text([DEFAULTS], [gt_needs=]) - m4_define([gt_NEEDS_INIT], []) -]) - - -dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) -AC_DEFUN([AM_GNU_GETTEXT_NEED], -[ - m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/package/libs/gettext/src/m4/intl.m4 b/package/libs/gettext/src/m4/intl.m4 deleted file mode 100644 index 335b23c20..000000000 --- a/package/libs/gettext/src/m4/intl.m4 +++ /dev/null @@ -1,294 +0,0 @@ -# intl.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2009 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2009. - -AC_PREREQ([2.52]) - -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([gl_VISIBILITY])dnl - AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl - AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - dnl Support for automake's --enable-silent-rules. - case "$enable_silent_rules" in - yes) INTL_DEFAULT_VERBOSITY=0;; - no) INTL_DEFAULT_VERBOSITY=1;; - *) INTL_DEFAULT_VERBOSITY=1;; - esac - AC_SUBST([INTL_DEFAULT_VERBOSITY]) - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) - AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \ - snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include ]) - gt_CHECK_DECL(_snwprintf, [#include ]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(getc_unlocked, [#include ]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_newlocale" = yes; then - HAVE_NEWLOCALE=1 - else - HAVE_NEWLOCALE=0 - fi - AC_SUBST([HAVE_NEWLOCALE]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_LANGINFO_CODESET - gt_LC_MESSAGES - - dnl Compilation on mingw and Cygwin needs special Makefile rules, because - dnl 1. when we install a shared library, we must arrange to export - dnl auxiliary pointer variables for every exported variable, - dnl 2. when we install a shared library and a static library simultaneously, - dnl the include file specifies __declspec(dllimport) and therefore we - dnl must arrange to define the auxiliary pointer variables for the - dnl exported variables _also_ in the static library. - if test "$enable_shared" = yes; then - case "$host_os" in - mingw* | cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac - else - is_woe32dll=no - fi - WOE32DLL=$is_woe32dll - AC_SUBST([WOE32DLL]) - - dnl On mingw and Cygwin, we can activate special Makefile rules which add - dnl version information to the shared libraries and executables. - case "$host_os" in - mingw* | cygwin*) is_woe32=yes ;; - *) is_woe32=no ;; - esac - WOE32=$is_woe32 - AC_SUBST([WOE32]) - if test $WOE32 = yes; then - dnl Check for a program that compiles Windows resource files. - AC_CHECK_TOOL([WINDRES], [windres]) - fi - - dnl Determine whether when creating a library, "-lc" should be passed to - dnl libtool or not. On many platforms, it is required for the libtool option - dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool - dnl in the *.la files - makes it impossible to create multithreaded programs, - dnl because libtool also reorders the -lc to come before the -pthread, and - dnl this disables pthread_create() . - case "$host_os" in - hpux*) LTLIBC="" ;; - *) LTLIBC="-lc" ;; - esac - AC_SUBST([LTLIBC]) - - dnl Rename some macros and functions used for locking. - AH_BOTTOM([ -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init_func libintl_lock_init_func -#define glthread_lock_lock_func libintl_lock_lock_func -#define glthread_lock_unlock_func libintl_lock_unlock_func -#define glthread_lock_destroy_func libintl_lock_destroy_func -#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded -#define glthread_rwlock_init_func libintl_rwlock_init_func -#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded -#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func -#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded -#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func -#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded -#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func -#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded -#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func -#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded -#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func -#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded -#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func -#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded -#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func -#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded -#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func -#define glthread_once_func libintl_once_func -#define glthread_once_singlethreaded libintl_once_singlethreaded -#define glthread_once_multithreaded libintl_once_multithreaded -]) -]) - - -dnl Checks for the core files of the intl subdirectory: -dnl dcigettext.c -dnl eval-plural.h -dnl explodename.c -dnl finddomain.c -dnl gettextP.h -dnl gmo.h -dnl hash-string.h hash-string.c -dnl l10nflist.c -dnl libgnuintl.h.in (except the *printf stuff) -dnl loadinfo.h -dnl loadmsgcat.c -dnl localealias.c -dnl log.c -dnl plural-exp.h plural-exp.c -dnl plural.y -dnl Used by libglocale. -AC_DEFUN([gt_INTL_SUBDIR_CORE], -[ - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_LOCK])dnl - - AC_TRY_LINK( - [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], - [], - [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], - [Define to 1 if the compiler understands __builtin_expect.])]) - - AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \ - argz_stringify argz_next __fsetlocking]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL([feof_unlocked], [#include ]) - gt_CHECK_DECL([fgets_unlocked], [#include ]) - - AM_ICONV - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], -[ - AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1], - [AC_TRY_COMPILE([$2], [ -#ifndef $1 - char *p = (char *) $1; -#endif -], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) -]) diff --git a/package/libs/gettext/src/m4/intldir.m4 b/package/libs/gettext/src/m4/intldir.m4 deleted file mode 100644 index ebae76d36..000000000 --- a/package/libs/gettext/src/m4/intldir.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# intldir.m4 serial 2 (gettext-0.18) -dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -AC_PREREQ([2.52]) - -dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory. -AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], []) diff --git a/package/libs/gettext/src/m4/intlmacosx.m4 b/package/libs/gettext/src/m4/intlmacosx.m4 deleted file mode 100644 index dd9102596..000000000 --- a/package/libs/gettext/src/m4/intlmacosx.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# intlmacosx.m4 serial 3 (gettext-0.18) -dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on MacOS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in MacOS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], - [CFPreferencesCopyAppValue(NULL, NULL)], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) diff --git a/package/libs/gettext/src/m4/lcmessage.m4 b/package/libs/gettext/src/m4/lcmessage.m4 deleted file mode 100644 index 1a705431a..000000000 --- a/package/libs/gettext/src/m4/lcmessage.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# lcmessage.m4 serial 6 (gettext-0.18) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE([HAVE_LC_MESSAGES], [1], - [Define if your file defines LC_MESSAGES.]) - fi -]) diff --git a/package/libs/gettext/src/m4/nls.m4 b/package/libs/gettext/src/m4/nls.m4 deleted file mode 100644 index 003704c4b..000000000 --- a/package/libs/gettext/src/m4/nls.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation, -dnl Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE([nls], - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT([$USE_NLS]) - AC_SUBST([USE_NLS]) -]) diff --git a/package/libs/gettext/src/m4/po.m4 b/package/libs/gettext/src/m4/po.m4 deleted file mode 100644 index 47f36a41a..000000000 --- a/package/libs/gettext/src/m4/po.m4 +++ /dev/null @@ -1,449 +0,0 @@ -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.50]) - -dnl Checks for all prerequisites of the po subdirectory. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AM_NLS])dnl - - dnl Release version of the gettext macros. This is used to ensure that - dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - dnl Support for AM_XGETTEXT_OPTION. - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat < "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" < /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <> "$ac_file.tmp" < PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=License +PKG_CPE_ID:=cpe:/a:libcap_project:libcap PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/package/libs/libcap/patches/900-use-more-compatible-shebang.patch b/package/libs/libcap/patches/900-use-more-compatible-shebang.patch new file mode 100644 index 000000000..454c703fb --- /dev/null +++ b/package/libs/libcap/patches/900-use-more-compatible-shebang.patch @@ -0,0 +1,8 @@ +--- a/progs/mkcapshdoc.sh ++++ b/progs/mkcapshdoc.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/usr/bin/env bash + # This script generates some C code for inclusion in the capsh binary. + # The Makefile generally only generates the .c code and compares it + # with the checked in code in the progs directory. diff --git a/package/libs/libdouble-conversion/Makefile b/package/libs/libdouble-conversion/Makefile deleted file mode 100644 index 5a061f91f..000000000 --- a/package/libs/libdouble-conversion/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# -# Copyright (C) 2008-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libdouble-conversion -PKG_VERSION:=2.0 -PKG_RELEASE:=1 - -PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=0d25506a2e7fb52928963313343e0237e890059e -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_MIRROR_HASH:=7466f634421f3136174cbc2b00635788509a3312894de28367f31d891fd401ad -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_URL:=https://github.com/google/double-conversion.git -PKG_LICENSE_FILES:=COPYING LICENSE - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -define Package/libdouble-conversion - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles - URL:=https://github.com/google/double-conversion - DEPENDS:=+libstdcpp -endef - -define Package/libdouble-conversion/description - double-conversion provides binary-decimal and decimal-binary routines for IEEE doubles. - - The library consists of efficient conversion routines that have been extracted - from the V8 JavaScript engine. The code has been refactored and improved so that - it can be used more easily in other projects. -endef - -CMAKE_OPTIONS += \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF - -define Build/InstallDev - $(INSTALL_DIR) \ - $(1)/usr/lib \ - $(1)/usr/include/double-conversion - - $(CP) \ - $(PKG_INSTALL_DIR)/usr/include/* \ - $(1)/usr/include/ - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \ - $(1)/usr/lib/ -endef - -define Package/libdouble-conversion/install - $(INSTALL_DIR) \ - $(1)/usr/lib - - $(INSTALL_DATA) \ - $(PKG_INSTALL_DIR)/usr/lib/lib*.so* \ - $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,libdouble-conversion)) diff --git a/package/libs/libiconv-full/Makefile b/package/libs/libiconv-full/Makefile index e4f925a1a..0c793973a 100644 --- a/package/libs/libiconv-full/Makefile +++ b/package/libs/libiconv-full/Makefile @@ -8,13 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiconv-full -PKG_VERSION:=1.16 +PKG_VERSION:=1.17 PKG_RELEASE:=1 PKG_SOURCE:=libiconv-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/libiconv -PKG_HASH:=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04 +PKG_HASH:=8f74213b56238c85a50a5329f77e06198771e70dd9a739779f4c02f65d971313 PKG_BUILD_DIR:=$(BUILD_DIR)/libiconv-$(PKG_VERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/libiconv-$(PKG_VERSION) PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=LGPL-2.1-or-later @@ -25,6 +26,7 @@ PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/libiconv-full/Default URL:=https://www.gnu.org/software/libiconv/ @@ -61,6 +63,10 @@ CONFIGURE_ARGS += \ --disable-rpath \ --enable-relocatable +HOST_CONFIGURE_ARGS += \ + --disable-shared \ + --with-pic + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/libiconv-full/include $(CP) $(PKG_INSTALL_DIR)/usr/include/iconv.h $(1)/usr/lib/libiconv-full/include/ @@ -88,3 +94,4 @@ endef $(eval $(call BuildPackage,libcharset)) $(eval $(call BuildPackage,libiconv-full)) $(eval $(call BuildPackage,iconv)) +$(eval $(call HostBuild)) diff --git a/package/libs/libiconv/COPYING b/package/libs/libiconv/COPYING deleted file mode 100644 index 223ede7de..000000000 --- a/package/libs/libiconv/COPYING +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/package/libs/libiconv/COPYRIGHT b/package/libs/libiconv/COPYRIGHT deleted file mode 100644 index d228af355..000000000 --- a/package/libs/libiconv/COPYRIGHT +++ /dev/null @@ -1,20 +0,0 @@ -Copyright status on all included code: - -All files which have no copyright comments are original works -Copyright (C) 2005-2006 Rich Felker. The decision to exclude such -comments is intentional, as it should be possible to carry around the -complete source code on tiny storage media. All public header files -(include/*) should be treated as Public Domain as they intentionally -contain no content which can be covered by copyright. Some source -modules may fall in this category as well. If you believe that a file -is so trivial that it should be in the Public Domain, please contact -me and, if I agree, I will explicitly release it from copyright. - -Some code has been modified by the OpenWrt project, this includes -the conversion from char map files to C arrays and the iconv.h header -file in particular. - -The library as a whole is licensed under the GNU LGPL version 2.1. -See the file COPYING for the text of this license. - -The original source can be accessed at svn://svn.mplayerhq.hu/libc/trunk diff --git a/package/libs/libiconv/Makefile b/package/libs/libiconv/Makefile deleted file mode 100644 index 4d7dcd349..000000000 --- a/package/libs/libiconv/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (C) 2010-2012 OpenWrt.org -# -# This Makefile and the code shipped in src/ is free software, licensed -# under the GNU Lesser General Public License, version 2.1 and later. -# See src/COPYING for more information. -# -# Refer to src/COPYRIGHT for copyright statements on the source files. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=libiconv -PKG_RELEASE:=8 - -PKG_LICENSE:=LGPL-2.1 -PKG_LICENSE_FILES:=LICENSE - -PKG_MAINTAINER:=Jo-Philipp Wich - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/host-build.mk - -define Package/libiconv - SECTION:=libs - CATEGORY:=Libraries - TITLE:=Tiny drop-in replacement for the GNU Character set conversion library -endef - -define Build/Configure -endef - -define Build/Compile - $(TARGET_CC) $(TARGET_CFLAGS) -c $(PKG_BUILD_DIR)/iconv.c -o $(PKG_BUILD_DIR)/iconv.o -I$(PKG_BUILD_DIR)/include $(FPIC) - $(TARGET_CROSS)ar rcs $(PKG_BUILD_DIR)/libiconv.a $(PKG_BUILD_DIR)/iconv.o -endef - -define Build/InstallDev - $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/lib - $(INSTALL_DATA) $(PKG_BUILD_DIR)/libiconv.a $(1)/usr/lib/libiconv-stub/lib/ - - $(INSTALL_DIR) $(1)/usr/lib/libiconv-stub/include - $(INSTALL_DATA) $(PKG_BUILD_DIR)/include/iconv.h $(1)/usr/lib/libiconv-stub/include/ - - $(INSTALL_DIR) $(1)/usr/share/aclocal - $(INSTALL_DATA) $(PKG_BUILD_DIR)/m4/* $(1)/usr/share/aclocal/ -endef - -define Package/libiconv/install - $(INSTALL_DIR) $(1)/tmp - touch $(1)/tmp/.libiconv-placeholder -endef - -define Host/Prepare - mkdir -p $(HOST_BUILD_DIR) -endef - -define Host/Configure - -endef - -define Host/Compile - $(HOSTCC) -c src/iconv.c -o $(HOST_BUILD_DIR)/iconv.o -Isrc/include -fPIC - ar rcs $(HOST_BUILD_DIR)/libiconv.a $(HOST_BUILD_DIR)/iconv.o -endef - -define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib - $(INSTALL_DATA) $(HOST_BUILD_DIR)/libiconv.a $(STAGING_DIR_HOSTPKG)/lib/ - - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/include - $(INSTALL_DATA) ./src/include/iconv.h $(STAGING_DIR_HOSTPKG)/include/ - - $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/share/aclocal - $(INSTALL_DATA) ./src/m4/* $(STAGING_DIR_HOSTPKG)/share/aclocal/ -endef - -$(eval $(call HostBuild)) -$(eval $(call BuildPackage,libiconv)) diff --git a/package/libs/libiconv/src/LICENSE b/package/libs/libiconv/src/LICENSE deleted file mode 100644 index b59e7be47..000000000 --- a/package/libs/libiconv/src/LICENSE +++ /dev/null @@ -1,6 +0,0 @@ -The source file iconv.m4 contains the following message - -Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. -This file is free software; the Free Software Foundation -gives unlimited permission to copy and/or distribute it, -with or without modifications, as long as this notice is preserved. diff --git a/package/libs/libiconv/src/iconv.c b/package/libs/libiconv/src/iconv.c deleted file mode 100644 index c3cfefa3c..000000000 --- a/package/libs/libiconv/src/iconv.c +++ /dev/null @@ -1,449 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* builtin charmaps */ -#include "charmaps.h" - -/* only 0-7 are valid as dest charset */ -#define UTF_16BE 000 -#define UTF_16LE 001 -#define UTF_32BE 002 -#define UTF_32LE 003 -#define WCHAR_T 004 -#define UTF_8 005 -#define US_ASCII 006 -#define LATIN_1 007 - -/* additional charsets with algorithmic conversion */ -#define LATIN_9 010 -#define TIS_620 011 -#define JIS_0201 012 - -/* some programs like php need this */ -int _libiconv_version = _LIBICONV_VERSION; - -/* these must match the constants above */ -static const unsigned char charsets[] = - "\005" "UTF-8" "\0" - "\004" "WCHAR_T" "\0" - "\000" "UTF-16BE" "\0" - "\001" "UTF-16LE" "\0" - "\002" "UTF-32BE" "\0" - "\003" "UTF-32LE" "\0" - "\006" "ASCII" "\0" - "\006" "US-ASCII" "\0" - "\006" "ISO646-US" "\0" - "\006" "ISO_646.IRV:1991" "\0" - "\006" "ISO-IR-6" "\0" - "\006" "ANSI_X3.4-1968" "\0" - "\006" "ANSI_X3.4-1986" "\0" - "\006" "CP367" "\0" - "\006" "IBM367" "\0" - "\006" "US" "\0" - "\006" "CSASCII" "\0" - "\007" "ISO-8859-1" "\0" - "\007" "LATIN1" "\0" - "\010" "ISO-8859-15""\0" - "\010" "LATIN9" "\0" - "\011" "ISO-8859-11""\0" - "\011" "TIS-620" "\0" - "\012" "JIS-0201" "\0" - "\377"; - -/* separate identifiers for sbcs/dbcs/etc map type */ -#define UCS2_8BIT 000 -#define UCS3_8BIT 001 -#define EUC 002 -#define EUC_TW 003 -#define SHIFT_JIS 004 -#define BIG5 005 -#define GBK 006 - -/* FIXME: these are not implemented yet -// EUC: A1-FE A1-FE -// GBK: 81-FE 40-7E,80-FE -// Big5: A1-FE 40-7E,A1-FE -*/ - -static const unsigned short maplen[] = { - [UCS2_8BIT] = 4+ 2* 128, - [UCS3_8BIT] = 4+ 3* 128, - [EUC] = 4+ 2* 94*94, - [SHIFT_JIS] = 4+ 2* 94*94, - [BIG5] = 4+ 2* 94*157, - [GBK] = 4+ 2* 126*190, - [EUC_TW] = 4+ 2* 2*94*94, -}; - -static int find_charmap(const char *name) -{ - int i; - for (i = 0; i < (sizeof(charmaps) / sizeof(charmaps[0])); i++) - if (!strcasecmp(charmaps[i].name, name)) - return i; - return -1; -} - -static int find_charset(const char *name) -{ - const unsigned char *s; - for (s=charsets; *s<0xff && strcasecmp(s+1, name); s+=strlen(s)+1); - return *s; -} - -iconv_t iconv_open(const char *to, const char *from) -{ - unsigned f, t; - int m; - - if ((t = find_charset(to)) > 8) - return -1; - - if ((f = find_charset(from)) < 255) - return 0 | (t<<1) | (f<<8); - - if ((m = find_charmap(from)) > -1) - return 1 | (t<<1) | (m<<8); - - return -1; -} - -int iconv_close(iconv_t cd) -{ - return 0; -} - -static inline wchar_t get_16(const unsigned char *s, int endian) -{ - endian &= 1; - return s[endian]<<8 | s[endian^1]; -} - -static inline void put_16(unsigned char *s, wchar_t c, int endian) -{ - endian &= 1; - s[endian] = c>>8; - s[endian^1] = c; -} - -static inline int utf8enc_wchar(char *outb, wchar_t c) -{ - if (c <= 0x7F) { - *outb = c; - return 1; - } - else if (c <= 0x7FF) { - *outb++ = ((c >> 6) & 0x1F) | 0xC0; - *outb++ = ( c & 0x3F) | 0x80; - return 2; - } - else if (c <= 0xFFFF) { - *outb++ = ((c >> 12) & 0x0F) | 0xE0; - *outb++ = ((c >> 6) & 0x3F) | 0x80; - *outb++ = ( c & 0x3F) | 0x80; - return 3; - } - else if (c <= 0x10FFFF) { - *outb++ = ((c >> 18) & 0x07) | 0xF0; - *outb++ = ((c >> 12) & 0x3F) | 0x80; - *outb++ = ((c >> 6) & 0x3F) | 0x80; - *outb++ = ( c & 0x3F) | 0x80; - return 4; - } - else { - *outb++ = '?'; - return 1; - } -} - -static inline int utf8seq_is_overlong(char *s, int n) -{ - switch (n) - { - case 2: - /* 1100000x (10xxxxxx) */ - return (((*s >> 1) == 0x60) && - ((*(s+1) >> 6) == 0x02)); - - case 3: - /* 11100000 100xxxxx (10xxxxxx) */ - return ((*s == 0xE0) && - ((*(s+1) >> 5) == 0x04) && - ((*(s+2) >> 6) == 0x02)); - - case 4: - /* 11110000 1000xxxx (10xxxxxx 10xxxxxx) */ - return ((*s == 0xF0) && - ((*(s+1) >> 4) == 0x08) && - ((*(s+2) >> 6) == 0x02) && - ((*(s+3) >> 6) == 0x02)); - } - - return 0; -} - -static inline int utf8seq_is_surrogate(char *s, int n) -{ - return ((n == 3) && (*s == 0xED) && (*(s+1) >= 0xA0) && (*(s+1) <= 0xBF)); -} - -static inline int utf8seq_is_illegal(char *s, int n) -{ - return ((n == 3) && (*s == 0xEF) && (*(s+1) == 0xBF) && - (*(s+2) >= 0xBE) && (*(s+2) <= 0xBF)); -} - -static inline int utf8dec_wchar(wchar_t *c, unsigned char *in, size_t inb) -{ - int i; - int n = -1; - - /* trivial char */ - if (*in <= 0x7F) { - *c = *in; - return 1; - } - - /* find utf8 sequence length */ - if ((*in & 0xE0) == 0xC0) n = 2; - else if ((*in & 0xF0) == 0xE0) n = 3; - else if ((*in & 0xF8) == 0xF0) n = 4; - else if ((*in & 0xFC) == 0xF8) n = 5; - else if ((*in & 0xFE) == 0xFC) n = 6; - - /* starved? */ - if (n > inb) - return -2; - - /* decode ... */ - if (n > 1 && n < 5) { - /* reject invalid sequences */ - if (utf8seq_is_overlong(in, n) || - utf8seq_is_surrogate(in, n) || - utf8seq_is_illegal(in, n)) - return -1; - - /* decode ... */ - *c = (char)(*in++ & (0x7F >> n)); - - for (i = 1; i < n; i++) { - /* illegal continuation byte */ - if (*in < 0x80 || *in > 0xBF) - return -1; - - *c = (*c << 6) | (*in++ & 0x3F); - } - - return n; - } - - /* unmapped sequence (> 4) */ - return -1; -} - -static inline wchar_t latin9_translit(wchar_t c) -{ - /* a number of trivial iso-8859-15 <> utf-8 transliterations */ - switch (c) { - case 0x20AC: return 0xA4; /* Euro */ - case 0x0160: return 0xA6; /* S caron */ - case 0x0161: return 0xA8; /* s caron */ - case 0x017D: return 0xB4; /* Z caron */ - case 0x017E: return 0xB8; /* z caron */ - case 0x0152: return 0xBC; /* OE */ - case 0x0153: return 0xBD; /* oe */ - case 0x0178: return 0xBE; /* Y diaeresis */ - default: return 0xFFFD; /* cannot translate */ - } -} - -size_t iconv(iconv_t cd, char **in, size_t *inb, char **out, size_t *outb) -{ - size_t x=0; - unsigned char to = (cd>>1)&127; - unsigned char from = 255; - const unsigned char *map = 0; - char tmp[MB_LEN_MAX]; - wchar_t c, d; - size_t k, l; - int err; - - if (!in || !*in || !*inb) return 0; - - if (cd & 1) - map = charmaps[cd>>8].map; - else - from = cd>>8; - - for (; *inb; *in+=l, *inb-=l) { - c = *(unsigned char *)*in; - l = 1; - if (from >= UTF_8 && c < 0x80) goto charok; - switch (from) { - case WCHAR_T: - l = sizeof(wchar_t); - if (*inb < l) goto starved; - c = *(wchar_t *)*in; - break; - case UTF_8: - l = utf8dec_wchar(&c, *in, *inb); - if (!l) l++; - else if (l == (size_t)-1) goto ilseq; - else if (l == (size_t)-2) goto starved; - break; - case US_ASCII: - goto ilseq; - case LATIN_9: - if ((unsigned)c - 0xa4 <= 0xbe - 0xa4) { - static const unsigned char map[] = { - 0, 0x60, 0, 0x61, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0x7d, 0, 0, 0, 0x7e, 0, 0, 0, - 0x52, 0x53, 0x78 - }; - if (c == 0xa4) c = 0x20ac; - else if (map[c-0xa5]) c = 0x100 | map[c-0xa5]; - } - case LATIN_1: - goto charok; - case TIS_620: - if (c >= 0xa1) c += 0x0e01-0xa1; - goto charok; - case JIS_0201: - if (c >= 0xa1) { - if (c <= 0xdf) c += 0xff61-0xa1; - else goto ilseq; - } - goto charok; - case UTF_16BE: - case UTF_16LE: - l = 2; - if (*inb < 2) goto starved; - c = get_16(*in, from); - if ((unsigned)(c-0xdc00) < 0x400) goto ilseq; - if ((unsigned)(c-0xd800) < 0x400) { - l = 4; - if (*inb < 4) goto starved; - d = get_16(*in + 2, from); - if ((unsigned)(c-0xdc00) >= 0x400) goto ilseq; - c = ((c-0xd800)<<10) | (d-0xdc00); - } - break; - case UTF_32BE: - case UTF_32LE: - l = 4; - if (*inb < 4) goto starved; - // FIXME - // c = get_32(*in, from); - break; - default: - /* only support ascii supersets */ - if (c < 0x80) break; - switch (map[0]) { - case UCS2_8BIT: - c -= 0x80; - break; - case EUC: - if ((unsigned)c - 0xa1 >= 94) goto ilseq; - if ((unsigned)in[0][1] - 0xa1 >= 94) goto ilseq; - c = (c-0xa1)*94 + (in[0][1]-0xa1); - l = 2; - break; - case SHIFT_JIS: - if ((unsigned)c - 0xa1 <= 0xdf-0xa1) { - c += 0xff61-0xa1; - goto charok; - } - // FIXME... - l = 2; - break; - default: - goto badf; - } - c = get_16(map + 4 + 2*c, 0); - if (c == 0xffff) goto ilseq; - goto charok; - } - - if ((unsigned)c - 0xd800 < 0x800 || (unsigned)c >= 0x110000) - goto ilseq; -charok: - switch (to) { - case WCHAR_T: - if (*outb < sizeof(wchar_t)) goto toobig; - *(wchar_t *)*out = c; - *out += sizeof(wchar_t); - *outb -= sizeof(wchar_t); - break; - case UTF_8: - if (*outb < 4) { - k = utf8enc_wchar(tmp, c); - if (*outb < k) goto toobig; - memcpy(*out, tmp, k); - } else k = utf8enc_wchar(*out, c); - *out += k; - *outb -= k; - break; - case US_ASCII: - if (c > 0x7f) c = 0xfffd; - /* fall thru and count replacement in latin1 case */ - case LATIN_9: - if (c >= 0x100 && c != 0xfffd) - c = latin9_translit(c); - /* fall through */ - case LATIN_1: - if (c > 0xff) goto ilseq; - if (!*outb) goto toobig; - **out = c; - ++*out; - --*outb; - break; - case UTF_16BE: - case UTF_16LE: - if (c < 0x10000) { - if (*outb < 2) goto toobig; - put_16(*out, c, to); - *out += 2; - *outb -= 2; - break; - } - if (*outb < 4) goto toobig; - put_16(*out, (c>>10)|0xd800, to); - put_16(*out + 2, (c&0x3ff)|0xdc00, to); - *out += 4; - *outb -= 4; - break; - default: - goto badf; - } - } - return x; -ilseq: - err = EILSEQ; - x = -1; - goto end; -badf: - err = EBADF; - x = -1; - goto end; -toobig: - err = E2BIG; - x = -1; - goto end; -starved: - err = EINVAL; -end: - errno = err; - return x; -} diff --git a/package/libs/libiconv/src/include/charmaps.h b/package/libs/libiconv/src/include/charmaps.h deleted file mode 100644 index 083cd699f..000000000 --- a/package/libs/libiconv/src/include/charmaps.h +++ /dev/null @@ -1,80 +0,0 @@ -#include "charmaps/iso-8859-2.h" -#include "charmaps/iso-8859-10.h" -#include "charmaps/windows-874.h" -#include "charmaps/windows-1250.h" -#include "charmaps/koi8-r.h" - -#ifdef ALL_CHARSETS -#include "charmaps/iso-8859-3.h" -#include "charmaps/iso-8859-4.h" -#include "charmaps/iso-8859-5.h" -#include "charmaps/iso-8859-6.h" -#include "charmaps/iso-8859-7.h" -#include "charmaps/iso-8859-8.h" -#include "charmaps/iso-8859-9.h" -#include "charmaps/iso-8859-13.h" -#include "charmaps/iso-8859-14.h" -#include "charmaps/iso-8859-16.h" -#include "charmaps/windows-1251.h" -#include "charmaps/windows-1252.h" -#include "charmaps/windows-1253.h" -#include "charmaps/windows-1254.h" -#include "charmaps/windows-1255.h" -#include "charmaps/windows-1256.h" -#include "charmaps/windows-1257.h" -#include "charmaps/windows-1258.h" -#endif - - -struct charmap { - const char name[13]; - const unsigned char *map; -}; - -static struct charmap charmaps[] = { - { "ISO-8859-2", map_iso_8859_2 }, - { "ISO-8859-10", map_iso_8859_10 }, - -#ifdef ALL_CHARSETS - { "ISO-8859-3", map_iso_8859_3 }, - { "ISO-8859-4", map_iso_8859_4 }, - { "ISO-8859-5", map_iso_8859_5 }, - { "ISO-8859-6", map_iso_8859_6 }, - { "ISO-8859-7", map_iso_8859_7 }, - { "ISO-8859-8", map_iso_8859_8 }, - { "ISO-8859-9", map_iso_8859_9 }, - { "ISO-8859-13", map_iso_8859_13 }, - { "ISO-8859-14", map_iso_8859_14 }, - { "ISO-8859-16", map_iso_8859_16 }, -#endif - - { "WINDOWS-874", map_windows_874 }, - { "WINDOWS-1250", map_windows_1250 }, - -#ifdef ALL_CHARSETS - { "WINDOWS-1251", map_windows_1251 }, - { "WINDOWS-1252", map_windows_1252 }, - { "WINDOWS-1253", map_windows_1253 }, - { "WINDOWS-1254", map_windows_1254 }, - { "WINDOWS-1255", map_windows_1255 }, - { "WINDOWS-1256", map_windows_1256 }, - { "WINDOWS-1257", map_windows_1257 }, - { "WINDOWS-1258", map_windows_1258 }, -#endif - - { "KOI8-R", map_koi8_r }, - - /* Aliases */ - { "LATIN2", map_iso_8859_2 }, - { "LATIN6", map_iso_8859_10 }, - -#ifdef ALL_CHARSETS - { "ARABIC", map_iso_8859_6 }, - { "CYRILLIC", map_iso_8859_5 }, - { "GREEK", map_iso_8859_7 }, - { "HEBREW", map_iso_8859_8 }, - { "LATIN3", map_iso_8859_3 }, - { "LATIN4", map_iso_8859_4 }, - { "LATIN5", map_iso_8859_9 }, -#endif -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-10.h b/package/libs/libiconv/src/include/charmaps/iso-8859-10.h deleted file mode 100644 index cb93d027d..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-10.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_10[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04, - 0x01, 0x12, 0x01, 0x22, 0x01, 0x2a, 0x01, 0x28, 0x01, 0x36, 0x00, 0xa7, - 0x01, 0x3b, 0x01, 0x10, 0x01, 0x60, 0x01, 0x66, 0x01, 0x7d, 0x00, 0xad, - 0x01, 0x6a, 0x01, 0x4a, 0x00, 0xb0, 0x01, 0x05, 0x01, 0x13, 0x01, 0x23, - 0x01, 0x2b, 0x01, 0x29, 0x01, 0x37, 0x00, 0xb7, 0x01, 0x3c, 0x01, 0x11, - 0x01, 0x61, 0x01, 0x67, 0x01, 0x7e, 0x20, 0x15, 0x01, 0x6b, 0x01, 0x4b, - 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb, - 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x01, 0x45, - 0x01, 0x4c, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x01, 0x68, - 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, - 0x00, 0xde, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x00, 0xf0, 0x01, 0x46, 0x01, 0x4d, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x01, 0x69, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x01, 0x38 -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-13.h b/package/libs/libiconv/src/include/charmaps/iso-8859-13.h deleted file mode 100644 index b44d1b434..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-13.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_13[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x1d, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x20, 0x1e, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x20, 0x1c, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9, - 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6, - 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5, - 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16, - 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43, - 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b, - 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07, - 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c, - 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b, - 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x20, 0x19 -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-14.h b/package/libs/libiconv/src/include/charmaps/iso-8859-14.h deleted file mode 100644 index 76cead98c..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-14.h +++ /dev/null @@ -1,25 +0,0 @@ -static const unsigned char map_iso_8859_14[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x1e, 0x02, - 0x1e, 0x03, 0x00, 0xa3, 0x01, 0x0a, 0x01, 0x0b, 0x1e, 0x0a, 0x00, 0xa7, - 0x1e, 0x80, 0x00, 0xa9, 0x1e, 0x82, 0x1e, 0x0b, 0x1e, 0xf2, 0x00, 0xad, - 0x00, 0xae, 0x01, 0x78, 0x1e, 0x1e, 0x1e, 0x1f, 0x01, 0x20, 0x01, 0x21, - 0x1e, 0x40, 0x1e, 0x41, 0x00, 0xb6, 0x1e, 0x56, 0x1e, 0x81, 0x1e, 0x57, - 0x1e, 0x83, 0x1e, 0x60, 0x1e, 0xf3, 0x1e, 0x84, 0x1e, 0x85, 0x1e, 0x61, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x74, 0x00, 0xd1, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x1e, 0x6a, - 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, - 0x01, 0x76, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x01, 0x75, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x1e, 0x6b, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x77, 0x00, 0xff -}; - diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-16.h b/package/libs/libiconv/src/include/charmaps/iso-8859-16.h deleted file mode 100644 index 4437a41f0..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-16.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_16[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04, - 0x01, 0x05, 0x01, 0x41, 0x20, 0xac, 0x20, 0x1e, 0x01, 0x60, 0x00, 0xa7, - 0x01, 0x61, 0x00, 0xa9, 0x02, 0x18, 0x00, 0xab, 0x01, 0x79, 0x00, 0xad, - 0x01, 0x7a, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x01, 0x0c, 0x01, 0x42, - 0x01, 0x7d, 0x20, 0x1d, 0x00, 0xb6, 0x00, 0xb7, 0x01, 0x7e, 0x01, 0x0d, - 0x02, 0x19, 0x00, 0xbb, 0x01, 0x52, 0x01, 0x53, 0x01, 0x78, 0x01, 0x7c, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x06, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x01, 0x43, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x01, 0x5a, - 0x01, 0x70, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x18, - 0x02, 0x1a, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03, - 0x00, 0xe4, 0x01, 0x07, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x01, 0x11, 0x01, 0x44, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51, - 0x00, 0xf6, 0x01, 0x5b, 0x01, 0x71, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0x19, 0x02, 0x1b, 0x00, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-2.h b/package/libs/libiconv/src/include/charmaps/iso-8859-2.h deleted file mode 100644 index 631610e17..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-2.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_2[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04, - 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x3d, 0x01, 0x5a, 0x00, 0xa7, - 0x00, 0xa8, 0x01, 0x60, 0x01, 0x5e, 0x01, 0x64, 0x01, 0x79, 0x00, 0xad, - 0x01, 0x7d, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x42, - 0x00, 0xb4, 0x01, 0x3e, 0x01, 0x5b, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61, - 0x01, 0x5f, 0x01, 0x65, 0x01, 0x7a, 0x02, 0xdd, 0x01, 0x7e, 0x01, 0x7c, - 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39, - 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb, - 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43, - 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7, - 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd, - 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03, - 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f, - 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51, - 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71, - 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9 -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-3.h b/package/libs/libiconv/src/include/charmaps/iso-8859-3.h deleted file mode 100644 index cd76d59c6..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-3.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_3[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x26, - 0x02, 0xd8, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x01, 0x24, 0x00, 0xa7, - 0x00, 0xa8, 0x01, 0x30, 0x01, 0x5e, 0x01, 0x1e, 0x01, 0x34, 0x00, 0xad, - 0xff, 0xff, 0x01, 0x7b, 0x00, 0xb0, 0x01, 0x27, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x01, 0x25, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x31, - 0x01, 0x5f, 0x01, 0x1f, 0x01, 0x35, 0x00, 0xbd, 0xff, 0xff, 0x01, 0x7c, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0xff, 0xff, 0x00, 0xc4, 0x01, 0x0a, - 0x01, 0x08, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0xff, 0xff, 0x00, 0xd1, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x20, 0x00, 0xd6, 0x00, 0xd7, - 0x01, 0x1c, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x6c, - 0x01, 0x5c, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0xff, 0xff, - 0x00, 0xe4, 0x01, 0x0b, 0x01, 0x09, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0xff, 0xff, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x21, - 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x1d, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0x6d, 0x01, 0x5d, 0x02, 0xd9 -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-4.h b/package/libs/libiconv/src/include/charmaps/iso-8859-4.h deleted file mode 100644 index 5db2f7780..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-4.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_4[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x01, 0x04, - 0x01, 0x38, 0x01, 0x56, 0x00, 0xa4, 0x01, 0x28, 0x01, 0x3b, 0x00, 0xa7, - 0x00, 0xa8, 0x01, 0x60, 0x01, 0x12, 0x01, 0x22, 0x01, 0x66, 0x00, 0xad, - 0x01, 0x7d, 0x00, 0xaf, 0x00, 0xb0, 0x01, 0x05, 0x02, 0xdb, 0x01, 0x57, - 0x00, 0xb4, 0x01, 0x29, 0x01, 0x3c, 0x02, 0xc7, 0x00, 0xb8, 0x01, 0x61, - 0x01, 0x13, 0x01, 0x23, 0x01, 0x67, 0x01, 0x4a, 0x01, 0x7e, 0x01, 0x4b, - 0x01, 0x00, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x01, 0x2e, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb, - 0x01, 0x16, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x2a, 0x01, 0x10, 0x01, 0x45, - 0x01, 0x4c, 0x01, 0x36, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x00, 0xd8, 0x01, 0x72, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x68, - 0x01, 0x6a, 0x00, 0xdf, 0x01, 0x01, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x01, 0x2f, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x19, 0x00, 0xeb, 0x01, 0x17, 0x00, 0xed, 0x00, 0xee, 0x01, 0x2b, - 0x01, 0x11, 0x01, 0x46, 0x01, 0x4d, 0x01, 0x37, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x01, 0x73, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0x69, 0x01, 0x6b, 0x02, 0xd9 -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-5.h b/package/libs/libiconv/src/include/charmaps/iso-8859-5.h deleted file mode 100644 index d9fe684a3..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-5.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_5[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x04, 0x01, - 0x04, 0x02, 0x04, 0x03, 0x04, 0x04, 0x04, 0x05, 0x04, 0x06, 0x04, 0x07, - 0x04, 0x08, 0x04, 0x09, 0x04, 0x0a, 0x04, 0x0b, 0x04, 0x0c, 0x00, 0xad, - 0x04, 0x0e, 0x04, 0x0f, 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13, - 0x04, 0x14, 0x04, 0x15, 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19, - 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f, - 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25, - 0x04, 0x26, 0x04, 0x27, 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b, - 0x04, 0x2c, 0x04, 0x2d, 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31, - 0x04, 0x32, 0x04, 0x33, 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37, - 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, - 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, - 0x04, 0x44, 0x04, 0x45, 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49, - 0x04, 0x4a, 0x04, 0x4b, 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f, - 0x21, 0x16, 0x04, 0x51, 0x04, 0x52, 0x04, 0x53, 0x04, 0x54, 0x04, 0x55, - 0x04, 0x56, 0x04, 0x57, 0x04, 0x58, 0x04, 0x59, 0x04, 0x5a, 0x04, 0x5b, - 0x04, 0x5c, 0x00, 0xa7, 0x04, 0x5e, 0x04, 0x5f -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-6.h b/package/libs/libiconv/src/include/charmaps/iso-8859-6.h deleted file mode 100644 index 820020fd9..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-6.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_6[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x00, 0xa4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x0c, 0x00, 0xad, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x06, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x06, 0x1f, - 0xff, 0xff, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25, - 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b, - 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31, - 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x06, 0x37, - 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x06, 0x40, 0x06, 0x41, 0x06, 0x42, 0x06, 0x43, - 0x06, 0x44, 0x06, 0x45, 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x06, 0x49, - 0x06, 0x4a, 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x06, 0x4f, - 0x06, 0x50, 0x06, 0x51, 0x06, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-7.h b/package/libs/libiconv/src/include/charmaps/iso-8859-7.h deleted file mode 100644 index 174f9d3cb..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-7.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_7[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x20, 0x18, - 0x20, 0x19, 0x00, 0xa3, 0x20, 0xac, 0x20, 0xaf, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x03, 0x7a, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0xff, 0xff, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x03, 0x84, 0x03, 0x85, 0x03, 0x86, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89, - 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f, - 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95, - 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b, - 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1, - 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7, - 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad, - 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3, - 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9, - 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf, - 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5, - 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb, - 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-8.h b/package/libs/libiconv/src/include/charmaps/iso-8859-8.h deleted file mode 100644 index 66d4a5ec1..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-8.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_8[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0xff, 0xff, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x17, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3, - 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9, - 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf, - 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5, - 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/iso-8859-9.h b/package/libs/libiconv/src/include/charmaps/iso-8859-9.h deleted file mode 100644 index f1a864606..000000000 --- a/package/libs/libiconv/src/include/charmaps/iso-8859-9.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_iso_8859_9[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, - 0x00, 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x87, 0x00, 0x88, 0x00, 0x89, - 0x00, 0x8a, 0x00, 0x8b, 0x00, 0x8c, 0x00, 0x8d, 0x00, 0x8e, 0x00, 0x8f, - 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, 0x00, 0x94, 0x00, 0x95, - 0x00, 0x96, 0x00, 0x97, 0x00, 0x98, 0x00, 0x99, 0x00, 0x9a, 0x00, 0x9b, - 0x00, 0x9c, 0x00, 0x9d, 0x00, 0x9e, 0x00, 0x9f, 0x00, 0xa0, 0x00, 0xa1, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30, - 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/koi8-r.h b/package/libs/libiconv/src/include/charmaps/koi8-r.h deleted file mode 100644 index c2453a531..000000000 --- a/package/libs/libiconv/src/include/charmaps/koi8-r.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_koi8_r[] = { - 0x00, 0x00, 0x00, 0x00, 0x25, 0x00, 0x25, 0x02, 0x25, 0x0c, 0x25, 0x10, - 0x25, 0x14, 0x25, 0x18, 0x25, 0x1c, 0x25, 0x24, 0x25, 0x2c, 0x25, 0x34, - 0x25, 0x3c, 0x25, 0x80, 0x25, 0x84, 0x25, 0x88, 0x25, 0x8c, 0x25, 0x90, - 0x25, 0x91, 0x25, 0x92, 0x25, 0x93, 0x23, 0x20, 0x25, 0xa0, 0x22, 0x19, - 0x22, 0x1a, 0x22, 0x48, 0x22, 0x64, 0x22, 0x65, 0x00, 0xa0, 0x23, 0x21, - 0x00, 0xb0, 0x00, 0xb2, 0x00, 0xb7, 0x00, 0xf7, 0x25, 0x50, 0x25, 0x51, - 0x25, 0x52, 0x04, 0x51, 0x25, 0x53, 0x25, 0x54, 0x25, 0x55, 0x25, 0x56, - 0x25, 0x57, 0x25, 0x58, 0x25, 0x59, 0x25, 0x5a, 0x25, 0x5b, 0x25, 0x5c, - 0x25, 0x5d, 0x25, 0x5e, 0x25, 0x5f, 0x25, 0x60, 0x25, 0x61, 0x04, 0x01, - 0x25, 0x62, 0x25, 0x63, 0x25, 0x64, 0x25, 0x65, 0x25, 0x66, 0x25, 0x67, - 0x25, 0x68, 0x25, 0x69, 0x25, 0x6a, 0x25, 0x6b, 0x25, 0x6c, 0x00, 0xa9, - 0x04, 0x4e, 0x04, 0x30, 0x04, 0x31, 0x04, 0x46, 0x04, 0x34, 0x04, 0x35, - 0x04, 0x44, 0x04, 0x33, 0x04, 0x45, 0x04, 0x38, 0x04, 0x39, 0x04, 0x3a, - 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f, 0x04, 0x4f, - 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x36, 0x04, 0x32, - 0x04, 0x4c, 0x04, 0x4b, 0x04, 0x37, 0x04, 0x48, 0x04, 0x4d, 0x04, 0x49, - 0x04, 0x47, 0x04, 0x4a, 0x04, 0x2e, 0x04, 0x10, 0x04, 0x11, 0x04, 0x26, - 0x04, 0x14, 0x04, 0x15, 0x04, 0x24, 0x04, 0x13, 0x04, 0x25, 0x04, 0x18, - 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b, 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, - 0x04, 0x1f, 0x04, 0x2f, 0x04, 0x20, 0x04, 0x21, 0x04, 0x22, 0x04, 0x23, - 0x04, 0x16, 0x04, 0x12, 0x04, 0x2c, 0x04, 0x2b, 0x04, 0x17, 0x04, 0x28, - 0x04, 0x2d, 0x04, 0x29, 0x04, 0x27, 0x04, 0x2a -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1250.h b/package/libs/libiconv/src/include/charmaps/windows-1250.h deleted file mode 100644 index 8e4723e48..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1250.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1250[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30, - 0x01, 0x60, 0x20, 0x39, 0x01, 0x5a, 0x01, 0x64, 0x01, 0x7d, 0x01, 0x79, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a, - 0x01, 0x5b, 0x01, 0x65, 0x01, 0x7e, 0x01, 0x7a, 0x00, 0xa0, 0x02, 0xc7, - 0x02, 0xd8, 0x01, 0x41, 0x00, 0xa4, 0x01, 0x04, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x01, 0x5e, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x01, 0x7b, 0x00, 0xb0, 0x00, 0xb1, 0x02, 0xdb, 0x01, 0x42, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x01, 0x05, - 0x01, 0x5f, 0x00, 0xbb, 0x01, 0x3d, 0x02, 0xdd, 0x01, 0x3e, 0x01, 0x7c, - 0x01, 0x54, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x01, 0x39, - 0x01, 0x06, 0x00, 0xc7, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x18, 0x00, 0xcb, - 0x01, 0x1a, 0x00, 0xcd, 0x00, 0xce, 0x01, 0x0e, 0x01, 0x10, 0x01, 0x43, - 0x01, 0x47, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0x50, 0x00, 0xd6, 0x00, 0xd7, - 0x01, 0x58, 0x01, 0x6e, 0x00, 0xda, 0x01, 0x70, 0x00, 0xdc, 0x00, 0xdd, - 0x01, 0x62, 0x00, 0xdf, 0x01, 0x55, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03, - 0x00, 0xe4, 0x01, 0x3a, 0x01, 0x07, 0x00, 0xe7, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x19, 0x00, 0xeb, 0x01, 0x1b, 0x00, 0xed, 0x00, 0xee, 0x01, 0x0f, - 0x01, 0x11, 0x01, 0x44, 0x01, 0x48, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0x51, - 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x59, 0x01, 0x6f, 0x00, 0xfa, 0x01, 0x71, - 0x00, 0xfc, 0x00, 0xfd, 0x01, 0x63, 0x02, 0xd9 -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1251.h b/package/libs/libiconv/src/include/charmaps/windows-1251.h deleted file mode 100644 index e27885072..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1251.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1251[] = { - 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x04, 0x03, 0x20, 0x1a, 0x04, 0x53, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x20, 0xac, 0x20, 0x30, - 0x04, 0x09, 0x20, 0x39, 0x04, 0x0a, 0x04, 0x0c, 0x04, 0x0b, 0x04, 0x0f, - 0x04, 0x52, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0x04, 0x59, 0x20, 0x3a, - 0x04, 0x5a, 0x04, 0x5c, 0x04, 0x5b, 0x04, 0x5f, 0x00, 0xa0, 0x04, 0x0e, - 0x04, 0x5e, 0x04, 0x08, 0x00, 0xa4, 0x04, 0x90, 0x00, 0xa6, 0x00, 0xa7, - 0x04, 0x01, 0x00, 0xa9, 0x04, 0x04, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x04, 0x07, 0x00, 0xb0, 0x00, 0xb1, 0x04, 0x06, 0x04, 0x56, - 0x04, 0x91, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x04, 0x51, 0x21, 0x16, - 0x04, 0x54, 0x00, 0xbb, 0x04, 0x58, 0x04, 0x05, 0x04, 0x55, 0x04, 0x57, - 0x04, 0x10, 0x04, 0x11, 0x04, 0x12, 0x04, 0x13, 0x04, 0x14, 0x04, 0x15, - 0x04, 0x16, 0x04, 0x17, 0x04, 0x18, 0x04, 0x19, 0x04, 0x1a, 0x04, 0x1b, - 0x04, 0x1c, 0x04, 0x1d, 0x04, 0x1e, 0x04, 0x1f, 0x04, 0x20, 0x04, 0x21, - 0x04, 0x22, 0x04, 0x23, 0x04, 0x24, 0x04, 0x25, 0x04, 0x26, 0x04, 0x27, - 0x04, 0x28, 0x04, 0x29, 0x04, 0x2a, 0x04, 0x2b, 0x04, 0x2c, 0x04, 0x2d, - 0x04, 0x2e, 0x04, 0x2f, 0x04, 0x30, 0x04, 0x31, 0x04, 0x32, 0x04, 0x33, - 0x04, 0x34, 0x04, 0x35, 0x04, 0x36, 0x04, 0x37, 0x04, 0x38, 0x04, 0x39, - 0x04, 0x3a, 0x04, 0x3b, 0x04, 0x3c, 0x04, 0x3d, 0x04, 0x3e, 0x04, 0x3f, - 0x04, 0x40, 0x04, 0x41, 0x04, 0x42, 0x04, 0x43, 0x04, 0x44, 0x04, 0x45, - 0x04, 0x46, 0x04, 0x47, 0x04, 0x48, 0x04, 0x49, 0x04, 0x4a, 0x04, 0x4b, - 0x04, 0x4c, 0x04, 0x4d, 0x04, 0x4e, 0x04, 0x4f -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1252.h b/package/libs/libiconv/src/include/charmaps/windows-1252.h deleted file mode 100644 index a6dad8a05..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1252.h +++ /dev/null @@ -1,25 +0,0 @@ -static const unsigned char map_windows_1252[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30, - 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0x01, 0x7d, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a, - 0x01, 0x53, 0xff, 0xff, 0x01, 0x7e, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x00, 0xd0, 0x00, 0xd1, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x00, 0xdd, - 0x00, 0xde, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x00, 0xf0, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x00, 0xfd, 0x00, 0xfe, 0x00, 0xff -}; - diff --git a/package/libs/libiconv/src/include/charmaps/windows-1253.h b/package/libs/libiconv/src/include/charmaps/windows-1253.h deleted file mode 100644 index b0bdf1eb3..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1253.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1253[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30, - 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x03, 0x85, - 0x03, 0x86, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0xff, 0xff, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x20, 0x15, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x03, 0x84, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x03, 0x88, 0x03, 0x89, - 0x03, 0x8a, 0x00, 0xbb, 0x03, 0x8c, 0x00, 0xbd, 0x03, 0x8e, 0x03, 0x8f, - 0x03, 0x90, 0x03, 0x91, 0x03, 0x92, 0x03, 0x93, 0x03, 0x94, 0x03, 0x95, - 0x03, 0x96, 0x03, 0x97, 0x03, 0x98, 0x03, 0x99, 0x03, 0x9a, 0x03, 0x9b, - 0x03, 0x9c, 0x03, 0x9d, 0x03, 0x9e, 0x03, 0x9f, 0x03, 0xa0, 0x03, 0xa1, - 0xff, 0xff, 0x03, 0xa3, 0x03, 0xa4, 0x03, 0xa5, 0x03, 0xa6, 0x03, 0xa7, - 0x03, 0xa8, 0x03, 0xa9, 0x03, 0xaa, 0x03, 0xab, 0x03, 0xac, 0x03, 0xad, - 0x03, 0xae, 0x03, 0xaf, 0x03, 0xb0, 0x03, 0xb1, 0x03, 0xb2, 0x03, 0xb3, - 0x03, 0xb4, 0x03, 0xb5, 0x03, 0xb6, 0x03, 0xb7, 0x03, 0xb8, 0x03, 0xb9, - 0x03, 0xba, 0x03, 0xbb, 0x03, 0xbc, 0x03, 0xbd, 0x03, 0xbe, 0x03, 0xbf, - 0x03, 0xc0, 0x03, 0xc1, 0x03, 0xc2, 0x03, 0xc3, 0x03, 0xc4, 0x03, 0xc5, - 0x03, 0xc6, 0x03, 0xc7, 0x03, 0xc8, 0x03, 0xc9, 0x03, 0xca, 0x03, 0xcb, - 0x03, 0xcc, 0x03, 0xcd, 0x03, 0xce, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1254.h b/package/libs/libiconv/src/include/charmaps/windows-1254.h deleted file mode 100644 index be2260079..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1254.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1254[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30, - 0x01, 0x60, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0x01, 0x61, 0x20, 0x3a, - 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x1e, 0x00, 0xd1, - 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0x30, - 0x01, 0x5e, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x00, 0xec, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x01, 0x1f, 0x00, 0xf1, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0xf4, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0x31, 0x01, 0x5f, 0x00, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1255.h b/package/libs/libiconv/src/include/charmaps/windows-1255.h deleted file mode 100644 index 28bf513d4..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1255.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1255[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30, - 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x00, 0xa1, - 0x00, 0xa2, 0x00, 0xa3, 0x20, 0xaa, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xd7, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xf7, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf, - 0x05, 0xb0, 0x05, 0xb1, 0x05, 0xb2, 0x05, 0xb3, 0x05, 0xb4, 0x05, 0xb5, - 0x05, 0xb6, 0x05, 0xb7, 0x05, 0xb8, 0x05, 0xb9, 0xff, 0xff, 0x05, 0xbb, - 0x05, 0xbc, 0x05, 0xbd, 0x05, 0xbe, 0x05, 0xbf, 0x05, 0xc0, 0x05, 0xc1, - 0x05, 0xc2, 0x05, 0xc3, 0x05, 0xf0, 0x05, 0xf1, 0x05, 0xf2, 0x05, 0xf3, - 0x05, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x05, 0xd0, 0x05, 0xd1, 0x05, 0xd2, 0x05, 0xd3, - 0x05, 0xd4, 0x05, 0xd5, 0x05, 0xd6, 0x05, 0xd7, 0x05, 0xd8, 0x05, 0xd9, - 0x05, 0xda, 0x05, 0xdb, 0x05, 0xdc, 0x05, 0xdd, 0x05, 0xde, 0x05, 0xdf, - 0x05, 0xe0, 0x05, 0xe1, 0x05, 0xe2, 0x05, 0xe3, 0x05, 0xe4, 0x05, 0xe5, - 0x05, 0xe6, 0x05, 0xe7, 0x05, 0xe8, 0x05, 0xe9, 0x05, 0xea, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x0e, 0x20, 0x0f, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1256.h b/package/libs/libiconv/src/include/charmaps/windows-1256.h deleted file mode 100644 index fbca315ef..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1256.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1256[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0x06, 0x7e, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30, - 0x06, 0x79, 0x20, 0x39, 0x01, 0x52, 0x06, 0x86, 0x06, 0x98, 0x06, 0x88, - 0x06, 0xaf, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0x06, 0xa9, 0x21, 0x22, 0x06, 0x91, 0x20, 0x3a, - 0x01, 0x53, 0x20, 0x0c, 0x20, 0x0d, 0x06, 0xba, 0x00, 0xa0, 0x06, 0x0c, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x06, 0xbe, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x06, 0x1b, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x06, 0x1f, - 0x06, 0xc1, 0x06, 0x21, 0x06, 0x22, 0x06, 0x23, 0x06, 0x24, 0x06, 0x25, - 0x06, 0x26, 0x06, 0x27, 0x06, 0x28, 0x06, 0x29, 0x06, 0x2a, 0x06, 0x2b, - 0x06, 0x2c, 0x06, 0x2d, 0x06, 0x2e, 0x06, 0x2f, 0x06, 0x30, 0x06, 0x31, - 0x06, 0x32, 0x06, 0x33, 0x06, 0x34, 0x06, 0x35, 0x06, 0x36, 0x00, 0xd7, - 0x06, 0x37, 0x06, 0x38, 0x06, 0x39, 0x06, 0x3a, 0x06, 0x40, 0x06, 0x41, - 0x06, 0x42, 0x06, 0x43, 0x00, 0xe0, 0x06, 0x44, 0x00, 0xe2, 0x06, 0x45, - 0x06, 0x46, 0x06, 0x47, 0x06, 0x48, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x06, 0x49, 0x06, 0x4a, 0x00, 0xee, 0x00, 0xef, - 0x06, 0x4b, 0x06, 0x4c, 0x06, 0x4d, 0x06, 0x4e, 0x00, 0xf4, 0x06, 0x4f, - 0x06, 0x50, 0x00, 0xf7, 0x06, 0x51, 0x00, 0xf9, 0x06, 0x52, 0x00, 0xfb, - 0x00, 0xfc, 0x20, 0x0e, 0x20, 0x0f, 0x06, 0xd2 -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1257.h b/package/libs/libiconv/src/include/charmaps/windows-1257.h deleted file mode 100644 index 69d4474bc..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1257.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1257[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0xff, 0xff, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0xff, 0xff, 0x20, 0x30, - 0xff, 0xff, 0x20, 0x39, 0xff, 0xff, 0x00, 0xa8, 0x02, 0xc7, 0x00, 0xb8, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a, - 0xff, 0xff, 0x00, 0xaf, 0x02, 0xdb, 0xff, 0xff, 0x00, 0xa0, 0xff, 0xff, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0xff, 0xff, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xd8, 0x00, 0xa9, 0x01, 0x56, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xc6, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xf8, 0x00, 0xb9, - 0x01, 0x57, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xe6, - 0x01, 0x04, 0x01, 0x2e, 0x01, 0x00, 0x01, 0x06, 0x00, 0xc4, 0x00, 0xc5, - 0x01, 0x18, 0x01, 0x12, 0x01, 0x0c, 0x00, 0xc9, 0x01, 0x79, 0x01, 0x16, - 0x01, 0x22, 0x01, 0x36, 0x01, 0x2a, 0x01, 0x3b, 0x01, 0x60, 0x01, 0x43, - 0x01, 0x45, 0x00, 0xd3, 0x01, 0x4c, 0x00, 0xd5, 0x00, 0xd6, 0x00, 0xd7, - 0x01, 0x72, 0x01, 0x41, 0x01, 0x5a, 0x01, 0x6a, 0x00, 0xdc, 0x01, 0x7b, - 0x01, 0x7d, 0x00, 0xdf, 0x01, 0x05, 0x01, 0x2f, 0x01, 0x01, 0x01, 0x07, - 0x00, 0xe4, 0x00, 0xe5, 0x01, 0x19, 0x01, 0x13, 0x01, 0x0d, 0x00, 0xe9, - 0x01, 0x7a, 0x01, 0x17, 0x01, 0x23, 0x01, 0x37, 0x01, 0x2b, 0x01, 0x3c, - 0x01, 0x61, 0x01, 0x44, 0x01, 0x46, 0x00, 0xf3, 0x01, 0x4d, 0x00, 0xf5, - 0x00, 0xf6, 0x00, 0xf7, 0x01, 0x73, 0x01, 0x42, 0x01, 0x5b, 0x01, 0x6b, - 0x00, 0xfc, 0x01, 0x7c, 0x01, 0x7e, 0x02, 0xd9 -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-1258.h b/package/libs/libiconv/src/include/charmaps/windows-1258.h deleted file mode 100644 index 5bbd737ae..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-1258.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_1258[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0x20, 0x1a, 0x01, 0x92, - 0x20, 0x1e, 0x20, 0x26, 0x20, 0x20, 0x20, 0x21, 0x02, 0xc6, 0x20, 0x30, - 0xff, 0xff, 0x20, 0x39, 0x01, 0x52, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0x02, 0xdc, 0x21, 0x22, 0xff, 0xff, 0x20, 0x3a, - 0x01, 0x53, 0xff, 0xff, 0xff, 0xff, 0x01, 0x78, 0x00, 0xa0, 0x00, 0xa1, - 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00, 0xa6, 0x00, 0xa7, - 0x00, 0xa8, 0x00, 0xa9, 0x00, 0xaa, 0x00, 0xab, 0x00, 0xac, 0x00, 0xad, - 0x00, 0xae, 0x00, 0xaf, 0x00, 0xb0, 0x00, 0xb1, 0x00, 0xb2, 0x00, 0xb3, - 0x00, 0xb4, 0x00, 0xb5, 0x00, 0xb6, 0x00, 0xb7, 0x00, 0xb8, 0x00, 0xb9, - 0x00, 0xba, 0x00, 0xbb, 0x00, 0xbc, 0x00, 0xbd, 0x00, 0xbe, 0x00, 0xbf, - 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x01, 0x02, 0x00, 0xc4, 0x00, 0xc5, - 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xc8, 0x00, 0xc9, 0x00, 0xca, 0x00, 0xcb, - 0x03, 0x00, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xcf, 0x01, 0x10, 0x00, 0xd1, - 0x03, 0x09, 0x00, 0xd3, 0x00, 0xd4, 0x01, 0xa0, 0x00, 0xd6, 0x00, 0xd7, - 0x00, 0xd8, 0x00, 0xd9, 0x00, 0xda, 0x00, 0xdb, 0x00, 0xdc, 0x01, 0xaf, - 0x03, 0x03, 0x00, 0xdf, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x01, 0x03, - 0x00, 0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0xe8, 0x00, 0xe9, - 0x00, 0xea, 0x00, 0xeb, 0x03, 0x01, 0x00, 0xed, 0x00, 0xee, 0x00, 0xef, - 0x01, 0x11, 0x00, 0xf1, 0x03, 0x23, 0x00, 0xf3, 0x00, 0xf4, 0x01, 0xa1, - 0x00, 0xf6, 0x00, 0xf7, 0x00, 0xf8, 0x00, 0xf9, 0x00, 0xfa, 0x00, 0xfb, - 0x00, 0xfc, 0x01, 0xb0, 0x20, 0xab, 0x00, 0xff -}; diff --git a/package/libs/libiconv/src/include/charmaps/windows-874.h b/package/libs/libiconv/src/include/charmaps/windows-874.h deleted file mode 100644 index 5749280a5..000000000 --- a/package/libs/libiconv/src/include/charmaps/windows-874.h +++ /dev/null @@ -1,24 +0,0 @@ -static const unsigned char map_windows_874[] = { - 0x00, 0x00, 0x00, 0x00, 0x20, 0xac, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x26, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x20, 0x18, 0x20, 0x19, 0x20, 0x1c, 0x20, 0x1d, 0x20, 0x22, - 0x20, 0x13, 0x20, 0x14, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xa0, 0x0e, 0x01, - 0x0e, 0x02, 0x0e, 0x03, 0x0e, 0x04, 0x0e, 0x05, 0x0e, 0x06, 0x0e, 0x07, - 0x0e, 0x08, 0x0e, 0x09, 0x0e, 0x0a, 0x0e, 0x0b, 0x0e, 0x0c, 0x0e, 0x0d, - 0x0e, 0x0e, 0x0e, 0x0f, 0x0e, 0x10, 0x0e, 0x11, 0x0e, 0x12, 0x0e, 0x13, - 0x0e, 0x14, 0x0e, 0x15, 0x0e, 0x16, 0x0e, 0x17, 0x0e, 0x18, 0x0e, 0x19, - 0x0e, 0x1a, 0x0e, 0x1b, 0x0e, 0x1c, 0x0e, 0x1d, 0x0e, 0x1e, 0x0e, 0x1f, - 0x0e, 0x20, 0x0e, 0x21, 0x0e, 0x22, 0x0e, 0x23, 0x0e, 0x24, 0x0e, 0x25, - 0x0e, 0x26, 0x0e, 0x27, 0x0e, 0x28, 0x0e, 0x29, 0x0e, 0x2a, 0x0e, 0x2b, - 0x0e, 0x2c, 0x0e, 0x2d, 0x0e, 0x2e, 0x0e, 0x2f, 0x0e, 0x30, 0x0e, 0x31, - 0x0e, 0x32, 0x0e, 0x33, 0x0e, 0x34, 0x0e, 0x35, 0x0e, 0x36, 0x0e, 0x37, - 0x0e, 0x38, 0x0e, 0x39, 0x0e, 0x3a, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0x0e, 0x3f, 0x0e, 0x40, 0x0e, 0x41, 0x0e, 0x42, 0x0e, 0x43, - 0x0e, 0x44, 0x0e, 0x45, 0x0e, 0x46, 0x0e, 0x47, 0x0e, 0x48, 0x0e, 0x49, - 0x0e, 0x4a, 0x0e, 0x4b, 0x0e, 0x4c, 0x0e, 0x4d, 0x0e, 0x4e, 0x0e, 0x4f, - 0x0e, 0x50, 0x0e, 0x51, 0x0e, 0x52, 0x0e, 0x53, 0x0e, 0x54, 0x0e, 0x55, - 0x0e, 0x56, 0x0e, 0x57, 0x0e, 0x58, 0x0e, 0x59, 0x0e, 0x5a, 0x0e, 0x5b, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff -}; diff --git a/package/libs/libiconv/src/include/iconv.h b/package/libs/libiconv/src/include/iconv.h deleted file mode 100644 index 8767be42e..000000000 --- a/package/libs/libiconv/src/include/iconv.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _LIBICONV_H -#define _LIBICONV_H 1 - -#define _LIBICONV_VERSION 0x010B /* version number: (major<<8) + minor */ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -extern int _libiconv_version; /* Likewise */ - -typedef long iconv_t; - -#define iconv_open libiconv_open -#define iconv libiconv -#define iconv_close libiconv_close - -extern iconv_t -iconv_open(const char *tocode, const char *fromcode); - -extern size_t -iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, - char **outbuf, size_t *outbytesleft); - -extern int -iconv_close(iconv_t cd); - -#define libiconv_set_relocation_prefix(...) do {} while(0) - -#ifdef __cplusplus -} -#endif - -#endif /* _LIBICONV_H */ diff --git a/package/libs/libiconv/src/m4/iconv.m4 b/package/libs/libiconv/src/m4/iconv.m4 deleted file mode 100644 index e2041b9b4..000000000 --- a/package/libs/libiconv/src/m4/iconv.m4 +++ /dev/null @@ -1,214 +0,0 @@ -# iconv.m4 serial 11 (gettext-0.18.1) -dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([iconv]) -]) - -AC_DEFUN([AM_ICONV_LINK], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - [am_cv_func_iconv=yes]) - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include -#include ], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - [am_cv_lib_iconv=yes] - [am_cv_func_iconv=yes]) - LIBS="$am_save_LIBS" - fi - ]) - if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ - dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10. - am_save_LIBS="$LIBS" - if test $am_cv_lib_iconv = yes; then - LIBS="$LIBS $LIBICONV" - fi - AC_TRY_RUN([ -#include -#include -int main () -{ - /* Test against AIX 5.1 bug: Failures are not distinguishable from successful - returns. */ - { - iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); - if (cd_utf8_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\342\202\254"; /* EURO SIGN */ - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - return 1; - } - } - /* Test against Solaris 10 bug: Failures are not distinguishable from - successful returns. */ - { - iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); - if (cd_ascii_to_88591 != (iconv_t)(-1)) - { - static const char input[] = "\263"; - char buf[10]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if (res == 0) - return 1; - } - } -#if 0 /* This bug could be worked around by the caller. */ - /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ - { - iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); - if (cd_88591_to_utf8 != (iconv_t)(-1)) - { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; - char buf[50]; - const char *inptr = input; - size_t inbytesleft = strlen (input); - char *outptr = buf; - size_t outbytesleft = sizeof (buf); - size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, - &outptr, &outbytesleft); - if ((int)res > 0) - return 1; - } - } -#endif - /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is - provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; -}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], - [case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac]) - LIBS="$am_save_LIBS" - ]) - case "$am_cv_func_iconv_works" in - *no) am_func_iconv=no am_cv_lib_iconv=no ;; - *) am_func_iconv=yes ;; - esac - else - am_func_iconv=no am_cv_lib_iconv=no - fi - if test "$am_func_iconv" = yes; then - AC_DEFINE([HAVE_ICONV], [1], - [Define if you have the iconv() function and it works.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST([LIBICONV]) - AC_SUBST([LTLIBICONV]) -]) - -dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to -dnl avoid warnings like -dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". -dnl This is tricky because of the way 'aclocal' is implemented: -dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. -dnl Otherwise aclocal's initial scan pass would miss the macro definition. -dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. -dnl Otherwise aclocal would emit many "Use of uninitialized value $1" -dnl warnings. -m4_define([gl_iconv_AC_DEFUN], - m4_version_prereq([2.64], - [[AC_DEFUN_ONCE( - [$1], [$2])]], - [[AC_DEFUN( - [$1], [$2])]])) -gl_iconv_AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL([am_cv_proto_iconv], [ - AC_TRY_COMPILE([ -#include -#include -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif -], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"]) - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([ - $am_cv_proto_iconv]) - AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], - [Define as const if the declaration of iconv() needs const.]) - fi -]) diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index 0ea3fe80b..2c312f200 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -8,20 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json-c -PKG_VERSION:=0.15 +PKG_VERSION:=0.16 PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/ -PKG_HASH:=99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878 +PKG_HASH:=ac8a3dd6820daaca579b23fbc74664310fbc3d67f52f6707cda67d21dde5570f PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:json-c_project:json-c -PKG_FLAGS := nonshared -PKG_BUILD_PARALLEL:=1 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST) include $(INCLUDE_DIR)/package.mk @@ -29,9 +27,11 @@ include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk CMAKE_HOST_OPTIONS += \ - -DCMAKE_SKIP_RPATH=FALSE \ - -DCMAKE_MACOSX_RPATH=1 \ - -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" + -DDISABLE_EXTRA_LIBS=TRUE \ + -DBUILD_SHARED_LIBS=FALSE + +CMAKE_OPTIONS += \ + -DDISABLE_EXTRA_LIBS=TRUE define Package/libjson-c SECTION:=libs diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch deleted file mode 100644 index c6ff5f476..000000000 --- a/package/libs/libjson-c/patches/000-libm.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- a/math_compat.h -+++ b/math_compat.h -@@ -6,38 +6,9 @@ - * @brief Do not use, json-c internal, may be changed or removed at any time. - */ - --/* Define isnan, isinf, infinity and nan on Windows/MSVC */ -- --#ifndef HAVE_DECL_ISNAN --#ifdef HAVE_DECL__ISNAN --#include --#define isnan(x) _isnan(x) --#else --/* On platforms like AIX and "IBM i" we need to provide our own isnan */ --#define isnan(x) ((x) != (x)) --#endif --#endif -- --#ifndef HAVE_DECL_ISINF --#ifdef HAVE_DECL__FINITE --#include --#define isinf(x) (!_finite(x)) --#else --#include --/* On platforms like AIX and "IBM i" we need to provide our own isinf */ --#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX) --#endif --#endif -- --#ifndef HAVE_DECL_INFINITY --#include --#define INFINITY (DBL_MAX + DBL_MAX) --#define HAVE_DECL_INFINITY --#endif -- --#ifndef HAVE_DECL_NAN --#define NAN (INFINITY - INFINITY) --#define HAVE_DECL_NAN --#endif -+#undef isnan -+#define isnan(x) __builtin_isnan(x) -+#undef isinf -+#define isinf(x) __builtin_isinf(x) - - #endif diff --git a/package/libs/libjson-c/patches/001-dont-build-docs.patch b/package/libs/libjson-c/patches/001-dont-build-docs.patch index 1aa0da4f5..f35da8072 100644 --- a/package/libs/libjson-c/patches/001-dont-build-docs.patch +++ b/package/libs/libjson-c/patches/001-dont-build-docs.patch @@ -1,11 +1,11 @@ --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -401,8 +401,6 @@ set(JSON_C_SOURCES +@@ -433,8 +433,6 @@ configure_file(json.h.cmakein ${PROJECT_ include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_BINARY_DIR}) -add_subdirectory(doc) - - # uninstall - add_custom_target(uninstall - COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm + # "uninstall" custom target for make generators in unix like operating systems + # and if that target is not present + if (CMAKE_GENERATOR STREQUAL "Unix Makefiles") diff --git a/package/libs/libmd/Makefile b/package/libs/libmd/Makefile new file mode 100644 index 000000000..faba27e5e --- /dev/null +++ b/package/libs/libmd/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libmd +PKG_VERSION:=1.0.4 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://archive.hadrons.org/software/libmd/ +PKG_HASH:=f51c921042e34beddeded4b75557656559cf5b1f2448033b4c1eec11c07e530f + +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=COPYING + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += $(FPIC) + +CONFIGURE_ARGS += \ + --enable-static + +define Package/libmd + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Message Digest functions from BSD systems + ABI_VERSION:=0 +endef + +define Package/libmd/description + This library provides message digest functions found on BSD systems either + on their libc or libmd libraries and lacking on others like GNU systems, + thus making it easier to port projects with strong BSD origins, without + needing to embed the same code over and over again on each project. +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmd.a $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libmd*.pc $(1)/usr/lib/pkgconfig/ + $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ +endef + +$(eval $(call BuildPackage,libmd)) diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index 4c7f6ad46..50ad11a2c 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -8,12 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnftnl -PKG_VERSION:=1.2.0 +PKG_CPE_ID:=cpe:/a:netfilter:libnftnl +PKG_VERSION:=1.2.4 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files -PKG_HASH:=90b01fddfe9be8c3245c3ba5ff5a4424a8df708828f92b2b361976b658c074f5 +PKG_HASH:=c0fe233be4cdfd703e7d5977ef8eb63fcbf1d0052b6044e1b23d47ca3562477f PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0-or-later diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile index b4d5a8d63..4f09861ed 100644 --- a/package/libs/libnl-tiny/Makefile +++ b/package/libs/libnl-tiny/Makefile @@ -12,13 +12,11 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git -PKG_SOURCE_DATE:=2022-05-23 -PKG_SOURCE_VERSION:=28c44ca97cd546ef8168e7476472a0da022b3421 -PKG_MIRROR_HASH:=66151ac44d70510d9320b6c0e002a3c43c787c2d756d1eaaa3b84b12edd34af5 +PKG_SOURCE_DATE:=2022-11-01 +PKG_SOURCE_VERSION:=db3b2cdbca5277723326a2720024a59fb821ae36 +PKG_MIRROR_HASH:=f6f9e2cb5366cda3be6d27a6320aa6cf3681c0b10df07b29ab4e4005e9f04f1c CMAKE_INSTALL:=1 -PKG_FLAGS := nonshared - PKG_LICENSE:=LGPL-2.1 PKG_MAINTAINER:=Felix Fietkau diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index ca2203411..5ee5727a9 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -20,7 +20,8 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_ASLR_PIE_REGULAR:=1 -PKG_BUILD_PARALLEL:=1 + +PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_rpcapd include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/libs/libselinux/Makefile b/package/libs/libselinux/Makefile index 0559505c3..7246d8556 100644 --- a/package/libs/libselinux/Makefile +++ b/package/libs/libselinux/Makefile @@ -19,7 +19,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Thomas Petazzoni PKG_CPE_ID:=cpe:/a:selinuxproject:libselinux -HOST_BUILD_DEPENDS:=libsepol/host pcre/host +HOST_BUILD_DEPENDS:=libsepol/host musl-fts/host pcre/host include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/package/libs/libselinux/bcm27xx-userland/Makefile b/package/libs/libselinux/bcm27xx-userland/Makefile deleted file mode 100644 index 098c039f1..000000000 --- a/package/libs/libselinux/bcm27xx-userland/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# -# Copyright (C) 2019-2020 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=bcm27xx-userland -PKG_VERSION:=4a0a19b88b43e48c6b51b526b9378289fb712a4c -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)? -PKG_HASH:=0f42d48095d1f680cbe8781c2e974b76bdd0507aaef64cce8b8b472ca3a09588 - -PKG_FLAGS:=nonshared - -PKG_MAINTAINER:=Álvaro Fernández Rojas - -CMAKE_INSTALL:=1 -CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr - -ifeq ($(ARCH),aarch64) - CMAKE_OPTIONS+=-DARM64=ON -else - CMAKE_OPTIONS+=-DARM64=OFF -endif - -include $(INCLUDE_DIR)/package.mk -include $(INCLUDE_DIR)/cmake.mk - -TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS) -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -define Package/bcm27xx-userland - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=@TARGET_bcm27xx - TITLE:=BCM27xx userland tools - DEFAULT:=y if TARGET_bcm27xx -endef - -define Package/bcm27xx-userland/description - BCM27xx userland tools including vcgencmd and tvservice. -endef - -define Package/bcm27xx-userland/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin -ifneq ($(ARCH),aarch64) - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspistill $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspivid $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspividyuv $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspiyuv $(1)/usr/bin -endif - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tvservice $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin - - $(INSTALL_DIR) $(1)/usr/include - $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/ - - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/ -endef - -$(eval $(call BuildPackage,bcm27xx-userland)) diff --git a/package/libs/libsemanage/Makefile b/package/libs/libsemanage/Makefile index 2fde14c06..8337b90bd 100644 --- a/package/libs/libsemanage/Makefile +++ b/package/libs/libsemanage/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libsemanage -PKG_VERSION:=3.2 -PKG_RELEASE:=2 +PKG_VERSION:=3.3 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2 -PKG_HASH:=d722a55ca4fe2d4e2b30527720db657e6238b28079e69e2e4affeb8e733ee511 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=84d0ec5afa34bbbb471f602d8c1bf317d12443d07852a34b60741d428d597ce8 PKG_MAINTAINER:=Thomas Petazzoni PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:=COPYING diff --git a/package/libs/libtraceevent/Makefile b/package/libs/libtraceevent/Makefile new file mode 100644 index 000000000..c09197cc7 --- /dev/null +++ b/package/libs/libtraceevent/Makefile @@ -0,0 +1,74 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libtraceevent +PKG_VERSION:=1.6.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/ +PKG_HASH:=031e4428586788bb835d894f7f11c54e482764063d96ead303c7f208fb59e353 + +PKG_MAINTAINER:=Nick Hainke + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libtraceevent + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux kernel trace event library + URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git + ABI_VERSION:=0 +endef + +define Package/libtraceevent/description +The libtraceevent library provides APIs to access kernel tracepoint events, located in +the tracefs file system under the events directory. +endef + +define Package/libtraceevent-extra + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Extra plugins for libtraceevent + DEPENDS:= +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static + +PLUGINS_DIR := $(PKG_BUILD_DIR)/plugins +PLUGINS_MAIN := function hrtimer mac80211 sched_switch + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/include/traceevent $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/libtraceevent.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libtraceevent/install + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins + $(CP) $(PKG_BUILD_DIR)/lib/libtraceevent.so.* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) \ + $(patsubst %,$(PLUGINS_DIR)/plugin_%.so,$(PLUGINS_MAIN)) \ + $(1)/usr/lib/traceevent/plugins +endef + +define Package/libtraceevent-extra/install + $(INSTALL_DIR) $(1)/usr/lib/traceevent/plugins + $(CP) \ + $$(patsubst %,$(PLUGINS_DIR)/plugin_%.so, \ + $$(filter-out $(PLUGINS_MAIN), \ + $$(patsubst $(PLUGINS_DIR)/plugin_%.so,%, \ + $$(wildcard $(PLUGINS_DIR)/plugin_*.so)))) \ + $(1)/usr/lib/traceevent/plugins +endef + +$(eval $(call BuildPackage,libtraceevent)) +$(eval $(call BuildPackage,libtraceevent-extra)) diff --git a/package/libs/libtracefs/Makefile b/package/libs/libtracefs/Makefile new file mode 100644 index 000000000..aa3fdb44f --- /dev/null +++ b/package/libs/libtracefs/Makefile @@ -0,0 +1,49 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libtracefs +PKG_VERSION:=1.6.1 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/ +PKG_HASH:=215a5182ee7d5a813ff84d290bb8988aa4c04cc16bb837780f61b0f5bf7494ab + +PKG_MAINTAINER:=Nick Hainke + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/libtracefs + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Linux kernel trace file system library + URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git + DEPENDS+=+libpthread +libtraceevent + ABI_VERSION:=0 +endef + +define Package/libtracefs/description +The libtracefs library provides APIs to access kernel trace file system. +endef + +CONFIGURE_ARGS+= \ + --enable-shared \ + --enable-static \ + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/include/* $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.{a,so*} $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_BUILD_DIR)/libtracefs.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libtracefs/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/lib/libtracefs.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libtracefs)) diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile index b77abcdc0..e19a97cbb 100644 --- a/package/libs/libubox/Makefile +++ b/package/libs/libubox/Makefile @@ -1,18 +1,16 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libubox -PKG_RELEASE=2 +PKG_RELEASE=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git -PKG_MIRROR_HASH:=7ea3c04e8d274bfc99789f9880c97aead9013095d2ac6dc4fcbee47fc533f3a9 -PKG_SOURCE_DATE:=2021-11-04 -PKG_SOURCE_VERSION:=c86a894ec63d83ecf2c373bbf9dc8fba9713d942 +PKG_MIRROR_HASH:=400bef38b8c0f382e4e595a50bb52dfbdb8da820eb80f3447b9bd7be3f5499a5 +PKG_SOURCE_DATE:=2022-09-27 +PKG_SOURCE_VERSION:=ea56013409d5823001b47a9bba6f74055a6d76a5 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) CMAKE_INSTALL:=1 -PKG_FLAGS := nonshared - PKG_LICENSE:=ISC PKG_LICENSE_FILES:= diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile index ce5440509..65c624409 100644 --- a/package/libs/libusb/Makefile +++ b/package/libs/libusb/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libusb -PKG_VERSION:=1.0.24 +PKG_VERSION:=1.0.26 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=\ https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION) \ @SF/$(PKG_NAME) -PKG_HASH:=7efd2685f7b327326dcfb85cee426d9b871fd70e22caa15bb68d595ce2a2b12a +PKG_HASH:=12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5 PKG_MAINTAINER:= Felix Fietkau PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:libusb:libusb PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -30,7 +31,7 @@ define Package/libusb-1.0 SECTION:=libs CATEGORY:=Libraries TITLE:=A library for accessing Linux USB devices - DEPENDS:=+libpthread +librt + DEPENDS:=+libpthread +librt +libatomic URL:=http://libusb.info/ ABI_VERSION:=0 endef @@ -72,7 +73,7 @@ endef define Package/libusb-1.0/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusb-1.0.so* $(1)/usr/lib/ endef define Package/fxload/install diff --git a/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch b/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch deleted file mode 100644 index b17d6178d..000000000 --- a/package/libs/libusb/patches/001-Correct-a-typo-in-the-Changelog-and-clean-up-a-stray.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 369af149e3ad92514a2d24f112cedfeb7acaf558 Mon Sep 17 00:00:00 2001 -From: Chris Dickens -Date: Sun, 13 Dec 2020 15:46:27 -0800 -Subject: [PATCH] Correct a typo in the Changelog and clean up a stray file - -Signed-off-by: Chris Dickens ---- - ChangeLog | 2 +- - libusb/version_nano.h | 2 +- - test | 0 - 3 files changed, 2 insertions(+), 2 deletions(-) - delete mode 100644 test - ---- a/ChangeLog -+++ b/ChangeLog -@@ -12,7 +12,7 @@ visit: http://log.libusb.info - * Darwin (macOS): use IOUSBDevice as darwin_device_class explicitly (#693) - * Linux: Drop support for kernel older than 2.6.32 - * Linux: Provide an event thread name (#689) --* Linux: Wait until all USBs have been reaped before freeing them (#607) -+* Linux: Wait until all URBs have been reaped before freeing them (#607) - * NetBSD: Recognize device timeouts (#710) - * OpenBSD: Allow opening ugen devices multiple times (#763) - * OpenBSD: Support libusb_get_port_number() (#764) ---- a/libusb/version_nano.h -+++ b/libusb/version_nano.h -@@ -1 +1 @@ --#define LIBUSB_NANO 11584 -+#define LIBUSB_NANO 11585 diff --git a/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch b/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch deleted file mode 100644 index a53a8900d..000000000 --- a/package/libs/libusb/patches/002-linux_usbfs-Fix-parsing-of-descriptors-for-multi-con.patch +++ /dev/null @@ -1,61 +0,0 @@ -From f6d2cb561402c3b6d3627c0eb89e009b503d9067 Mon Sep 17 00:00:00 2001 -From: Chris Dickens -Date: Sun, 13 Dec 2020 15:49:19 -0800 -Subject: [PATCH] linux_usbfs: Fix parsing of descriptors for - multi-configuration devices - -Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device -initialization") introduced a regression for devices with multiple -configurations. The logic that verifies the reported length of the -configuration descriptors failed to count the length of the -configuration descriptor itself and would truncate the actual length by -9 bytes, leading to a parsing error for subsequent descriptors. - -Closes #825 - -Signed-off-by: Chris Dickens ---- - libusb/os/linux_usbfs.c | 12 ++++++++---- - libusb/version_nano.h | 2 +- - 2 files changed, 9 insertions(+), 5 deletions(-) - ---- a/libusb/os/linux_usbfs.c -+++ b/libusb/os/linux_usbfs.c -@@ -641,7 +641,12 @@ static int seek_to_next_config(struct li - uint8_t *buffer, size_t len) - { - struct usbi_descriptor_header *header; -- int offset = 0; -+ int offset; -+ -+ /* Start seeking past the config descriptor */ -+ offset = LIBUSB_DT_CONFIG_SIZE; -+ buffer += LIBUSB_DT_CONFIG_SIZE; -+ len -= LIBUSB_DT_CONFIG_SIZE; - - while (len > 0) { - if (len < 2) { -@@ -718,7 +723,7 @@ static int parse_config_descriptors(stru - } - - if (priv->sysfs_dir) { -- /* -+ /* - * In sysfs wTotalLength is ignored, instead the kernel returns a - * config descriptor with verified bLength fields, with descriptors - * with an invalid bLength removed. -@@ -727,8 +732,7 @@ static int parse_config_descriptors(stru - int offset; - - if (num_configs > 1 && idx < num_configs - 1) { -- offset = seek_to_next_config(ctx, buffer + LIBUSB_DT_CONFIG_SIZE, -- remaining - LIBUSB_DT_CONFIG_SIZE); -+ offset = seek_to_next_config(ctx, buffer, remaining); - if (offset < 0) - return offset; - sysfs_config_len = (uint16_t)offset; ---- a/libusb/version_nano.h -+++ b/libusb/version_nano.h -@@ -1 +1 @@ --#define LIBUSB_NANO 11585 -+#define LIBUSB_NANO 11586 diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in new file mode 100644 index 000000000..ffabd799d --- /dev/null +++ b/package/libs/mbedtls/Config.in @@ -0,0 +1,193 @@ +if PACKAGE_libmbedtls + +comment "Option details in source code: include/mbedtls/mbedtls_config.h" + +comment "Ciphers - unselect old or less-used ciphers to reduce binary size" + +config MBEDTLS_AES_C + bool "MBEDTLS_AES_C" + default y + +config MBEDTLS_CAMELLIA_C + bool "MBEDTLS_CAMELLIA_C" + default n + +config MBEDTLS_CCM_C + bool "MBEDTLS_CCM_C" + default n + +config MBEDTLS_CMAC_C + bool "MBEDTLS_CMAC_C (old but used by hostapd)" + default y + +config MBEDTLS_DES_C + bool "MBEDTLS_DES_C (old but used by hostapd)" + default y + +config MBEDTLS_GCM_C + bool "MBEDTLS_GCM_C" + default y + +config MBEDTLS_NIST_KW_C + bool "MBEDTLS_NIST_KW_C (old but used by hostapd)" + default y + +config MBEDTLS_RIPEMD160_C + bool "MBEDTLS_RIPEMD160_C" + default n + +config MBEDTLS_XTEA_C + bool "MBEDTLS_XTEA_C" + default n + +config MBEDTLS_RSA_NO_CRT + bool "MBEDTLS_RSA_NO_CRT" + default y + +config MBEDTLS_KEY_EXCHANGE_PSK_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED" + default y + +config MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED" + default n + +config MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED" + default y + +config MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED" + default n + +config MBEDTLS_KEY_EXCHANGE_RSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED" + default n + +config MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED" + default n + +config MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED" + default y + +config MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED" + default y + +config MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED" + default n + +config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED + bool "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED" + default n + +comment "Curves - unselect old or less-used curves to reduce binary size" + +config MBEDTLS_ECP_DP_SECP192R1_ENABLED + bool "MBEDTLS_ECP_DP_SECP192R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_SECP224R1_ENABLED + bool "MBEDTLS_ECP_DP_SECP224R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_SECP256R1_ENABLED + bool "MBEDTLS_ECP_DP_SECP256R1_ENABLED" + default y + +config MBEDTLS_ECP_DP_SECP384R1_ENABLED + bool "MBEDTLS_ECP_DP_SECP384R1_ENABLED" + default y + +config MBEDTLS_ECP_DP_SECP521R1_ENABLED + bool "MBEDTLS_ECP_DP_SECP521R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_SECP192K1_ENABLED + bool "MBEDTLS_ECP_DP_SECP192K1_ENABLED" + default n + +config MBEDTLS_ECP_DP_SECP224K1_ENABLED + bool "MBEDTLS_ECP_DP_SECP224K1_ENABLED" + default n + +config MBEDTLS_ECP_DP_SECP256K1_ENABLED + bool "MBEDTLS_ECP_DP_SECP256K1_ENABLED" + default y + +config MBEDTLS_ECP_DP_BP256R1_ENABLED + bool "MBEDTLS_ECP_DP_BP256R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_BP384R1_ENABLED + bool "MBEDTLS_ECP_DP_BP384R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_BP512R1_ENABLED + bool "MBEDTLS_ECP_DP_BP512R1_ENABLED" + default n + +config MBEDTLS_ECP_DP_CURVE25519_ENABLED + bool "MBEDTLS_ECP_DP_CURVE25519_ENABLED" + default y + +config MBEDTLS_ECP_DP_CURVE448_ENABLED + bool "MBEDTLS_ECP_DP_CURVE448_ENABLED" + default n + +comment "Build Options - unselect features to reduce binary size" + +config MBEDTLS_CERTS_C + bool "MBEDTLS_CERTS_C" + default n + +config MBEDTLS_CIPHER_MODE_OFB + bool "MBEDTLS_CIPHER_MODE_OFB" + default n + +config MBEDTLS_CIPHER_MODE_XTS + bool "MBEDTLS_CIPHER_MODE_XTS" + default n + +config MBEDTLS_DEBUG_C + bool "MBEDTLS_DEBUG_C" + default n + +config MBEDTLS_HKDF_C + bool "MBEDTLS_HKDF_C" + default n + +config MBEDTLS_PLATFORM_C + bool "MBEDTLS_PLATFORM_C" + default n + +config MBEDTLS_SELF_TEST + bool "MBEDTLS_SELF_TEST" + default n + +config MBEDTLS_SSL_TRUNCATED_HMAC + bool "MBEDTLS_SSL_TRUNCATED_HMAC" + default n + +config MBEDTLS_VERSION_C + bool "MBEDTLS_VERSION_C" + default n + +config MBEDTLS_VERSION_FEATURES + bool "MBEDTLS_VERSION_FEATURES" + default n + +comment "Build Options" + +config MBEDTLS_ENTROPY_FORCE_SHA256 + bool "MBEDTLS_ENTROPY_FORCE_SHA256" + default y + +config MBEDTLS_SSL_RENEGOTIATION + bool "MBEDTLS_SSL_RENEGOTIATION" + default n + +endif diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index e1900fcb5..fd0f821d8 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -20,11 +20,60 @@ PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt PKG_CPE_ID:=cpe:/a:arm:mbed_tls -PKG_CONFIG_DEPENDS := \ - CONFIG_LIBMBEDTLS_DEBUG_C \ - CONFIG_LIBMBEDTLS_HAVE_ARMV8CE_AES \ - CONFIG_LIBMBEDTLS_HAVE_SSE2 \ - CONFIG_LIBMBEDTLS_HKDF_C +MBEDTLS_BUILD_OPTS_CURVES= \ + CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED \ + CONFIG_MBEDTLS_ECP_DP_CURVE448_ENABLED + +MBEDTLS_BUILD_OPTS_CIPHERS= \ + CONFIG_MBEDTLS_AES_C \ + CONFIG_MBEDTLS_CAMELLIA_C \ + CONFIG_MBEDTLS_CCM_C \ + CONFIG_MBEDTLS_CMAC_C \ + CONFIG_MBEDTLS_DES_C \ + CONFIG_MBEDTLS_GCM_C \ + CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED \ + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED \ + CONFIG_MBEDTLS_NIST_KW_C \ + CONFIG_MBEDTLS_RIPEMD160_C \ + CONFIG_MBEDTLS_RSA_NO_CRT \ + CONFIG_MBEDTLS_XTEA_C + +MBEDTLS_BUILD_OPTS= \ + $(MBEDTLS_BUILD_OPTS_CURVES) \ + $(MBEDTLS_BUILD_OPTS_CIPHERS) \ + CONFIG_MBEDTLS_CERTS_C \ + CONFIG_MBEDTLS_CIPHER_MODE_OFB \ + CONFIG_MBEDTLS_CIPHER_MODE_XTS \ + CONFIG_MBEDTLS_DEBUG_C \ + CONFIG_MBEDTLS_ENTROPY_FORCE_SHA256 \ + CONFIG_MBEDTLS_HKDF_C \ + CONFIG_MBEDTLS_PLATFORM_C \ + CONFIG_MBEDTLS_SELF_TEST \ + CONFIG_MBEDTLS_SSL_RENEGOTIATION \ + CONFIG_MBEDTLS_SSL_TRUNCATED_HMAC \ + CONFIG_MBEDTLS_VERSION_C \ + CONFIG_MBEDTLS_VERSION_FEATURES + +PKG_CONFIG_DEPENDS := $(MBEDTLS_BUILD_OPTS) include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -45,56 +94,12 @@ $(call Package/mbedtls/Default) CATEGORY:=Libraries SUBMENU:=SSL TITLE+= (library) - PKGFLAGS:=nonshared ABI_VERSION:=12 + MENU:=1 endef define Package/libmbedtls/config -config LIBMBEDTLS_DEBUG_C - depends on PACKAGE_libmbedtls - bool "Enable debug functions" - default n - help - This option enables mbedtls library's debug functions. - - It increases the uncompressed libmbedtls binary size - by around 60 KiB (for an ARMv5 platform). - - Usually, you don't need this, so don't select this if you're unsure. - -config LIBMBEDTLS_HAVE_ARMV8CE_AES - depends on PACKAGE_libmbedtls - bool - default y - prompt "Enable use of the ARMv8 Crypto Extensions" - depends on aarch64 && !TARGET_bcm27xx - help - Use of the ARMv8 Crypto Extensions greatly increase performance - (up to 4x faster on AES-GCM while 10x faster on raw AES). - - If you don't sure, say Y here. - -config LIBMBEDTLS_HAVE_SSE2 - depends on PACKAGE_libmbedtls - bool - default y if !TARGET_x86_legacy && !TARGET_x86_geode - prompt "Enable use of x86 SSE2 instructions" - depends on x86_64 || i386 - help - Use of SSE2 instructions greatly increase performance (up to - 3x faster) with a minimum (~0.2%, or 23KB) increase in package - size, but it will bring no benefit if your hardware does not - support them, such as Geode GX and LX. In this case you may - save 23KB by saying yes here. AMD Geode NX, and Intel - Pentium 4 and above support SSE2. - -config LIBMBEDTLS_HKDF_C - depends on PACKAGE_libmbedtls - bool "Enable the HKDF algorithm (RFC 5869)" - default n - help - This option adds support for the Hashed Message Authentication Code - (HMAC)-based key derivation function (HKDF). + source "$(SOURCE)/Config.in" endef define Package/mbedtls-util @@ -118,9 +123,6 @@ endef TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -ifneq ($(CONFIG_LIBMBEDTLS_HAVE_ARMV8CE_AES),) - TARGET_CFLAGS := $(filter-out -march=%,$(TARGET_CFLAGS)) -march=armv8-a+crypto -endif CMAKE_OPTIONS += \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ @@ -129,28 +131,22 @@ CMAKE_OPTIONS += \ -DENABLE_PROGRAMS:Bool=ON define Build/Configure - $(Build/Configure/Default) - - awk 'BEGIN { rc = 1 } \ - /#define MBEDTLS_DEBUG_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_DEBUG_C),,// )#define MBEDTLS_DEBUG_C"; rc = 0 } \ - /#define MBEDTLS_ARMV8CE_AES_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_HAVE_ARMV8CE_AES),,// )#define MBEDTLS_ARMV8CE_AES_C"; rc = 0 } \ - /#define MBEDTLS_HAVE_SSE2/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_HAVE_SSE2),,// )#define MBEDTLS_HAVE_SSE2"; rc = 0 } \ - { print } \ - END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \ - >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \ - mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h - - awk 'BEGIN { rc = 1 } \ - /#define MBEDTLS_HKDF_C/ { $$$$0 = "$(if $(CONFIG_LIBMBEDTLS_HKDF_C),,// )#define MBEDTLS_HKDF_C"; rc = 0 } \ - { print } \ - END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \ - >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \ - mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h + $(call Build/Configure/Default) sed -i '/fuzz/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt sed -i '/test/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt endef +define Build/Prepare + $(call Build/Prepare/Default) + + $(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))), + $(foreach opt,$(MBEDTLS_BUILD_OPTS), + $(PKG_BUILD_DIR)/scripts/config.py \ + -f $(PKG_BUILD_DIR)/include/mbedtls/config.h \ + $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),) +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/ diff --git a/package/libs/mbedtls/patches/100-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch b/package/libs/mbedtls/patches/100-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch deleted file mode 100644 index d4900724a..000000000 --- a/package/libs/mbedtls/patches/100-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch +++ /dev/null @@ -1,390 +0,0 @@ -From dfb6015ca79a9fee28f7fcb0af7e350a83574b83 Mon Sep 17 00:00:00 2001 -From: "Markku-Juhani O. Saarinen" -Date: Mon, 20 Nov 2017 14:58:41 +0000 -Subject: Implements AES and GCM with ARMv8 Crypto Extensions - -A compact patch that provides AES and GCM implementations that utilize the -ARMv8 Crypto Extensions. The config flag is MBEDTLS_ARMV8CE_AES_C, which -is disabled by default as we don't do runtime checking for the feature. -The new implementation lives in armv8ce_aes.c. - -Provides similar functionality to https://github.com/ARMmbed/mbedtls/pull/432 -Thanks to Barry O'Rourke and others for that contribtion. - -Tested on a Cortex A53 device and QEMU. On a midrange phone the real AES-GCM -throughput increases about 4x, while raw AES speed is up to 10x faster. - -When cross-compiling, you want to set something like: - - export CC='aarch64-linux-gnu-gcc' - export CFLAGS='-Ofast -march=armv8-a+crypto' - scripts/config.pl set MBEDTLS_ARMV8CE_AES_C - -QEMU seems to also need - - export LDFLAGS='-static' - -Then run normal make or cmake etc. ---- - ---- /dev/null -+++ b/ChangeLog.d/armv8_crypto_extensions.txt -@@ -0,0 +1,2 @@ -+Features -+ * Support ARMv8 Cryptography Extensions for AES and GCM. ---- /dev/null -+++ b/include/mbedtls/armv8ce_aes.h -@@ -0,0 +1,63 @@ -+/** -+ * \file armv8ce_aes.h -+ * -+ * \brief ARMv8 Cryptography Extensions -- Optimized code for AES and GCM -+ */ -+ -+/* -+ * -+ * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved -+ * SPDX-License-Identifier: Apache-2.0 -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); you may -+ * not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ * -+ * This file is part of mbed TLS (https://tls.mbed.org) -+ */ -+ -+#ifndef MBEDTLS_ARMV8CE_AES_H -+#define MBEDTLS_ARMV8CE_AES_H -+ -+#include "aes.h" -+ -+/** -+ * \brief [ARMv8 Crypto Extensions] AES-ECB block en(de)cryption -+ * -+ * \param ctx AES context -+ * \param mode MBEDTLS_AES_ENCRYPT or MBEDTLS_AES_DECRYPT -+ * \param input 16-byte input block -+ * \param output 16-byte output block -+ * -+ * \return 0 on success (cannot fail) -+ */ -+ -+int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, -+ int mode, -+ const unsigned char input[16], -+ unsigned char output[16] ); -+ -+/** -+ * \brief [ARMv8 Crypto Extensions] Multiply in GF(2^128) for GCM -+ * -+ * \param c Result -+ * \param a First operand -+ * \param b Second operand -+ * -+ * \note Both operands and result are bit strings interpreted as -+ * elements of GF(2^128) as per the GCM spec. -+ */ -+ -+void mbedtls_armv8ce_gcm_mult( unsigned char c[16], -+ const unsigned char a[16], -+ const unsigned char b[16] ); -+ -+#endif /* MBEDTLS_ARMV8CE_AES_H */ ---- a/include/mbedtls/check_config.h -+++ b/include/mbedtls/check_config.h -@@ -72,6 +72,10 @@ - #error "MBEDTLS_AESNI_C defined, but not all prerequisites" - #endif - -+#if defined(MBEDTLS_ARMV8CE_AES_C) && !defined(MBEDTLS_HAVE_ASM) -+#error "MBEDTLS_ARMV8CE_AES_C defined, but not all prerequisites" -+#endif -+ - #if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C) - #error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites" - #endif -@@ -897,3 +901,4 @@ - typedef int mbedtls_iso_c_forbids_empty_translation_units; - - #endif /* MBEDTLS_CHECK_CONFIG_H */ -+ ---- a/include/mbedtls/config.h -+++ b/include/mbedtls/config.h -@@ -46,6 +46,7 @@ - * Requires support for asm() in compiler. - * - * Used in: -+ * library/armv8ce_aes.c - * library/aria.c - * library/timing.c - * include/mbedtls/bn_mul.h -@@ -2313,6 +2314,21 @@ - #define MBEDTLS_AESNI_C - - /** -+ * \def MBEDTLS_ARMV8CE_AES_C -+ * -+ * Enable ARMv8 Crypto Extensions for AES and GCM -+ * -+ * Module: library/armv8ce_aes.c -+ * Caller: library/aes.c -+ * library/gcm.c -+ * -+ * Requires: MBEDTLS_HAVE_ASM -+ * -+ * This module adds support for Armv8 Cryptography Extensions for AES and GCM. -+ */ -+//#define MBEDTLS_ARMV8CE_AES_C -+ -+/** - * \def MBEDTLS_AES_C - * - * Enable the AES block cipher. ---- a/library/aes.c -+++ b/library/aes.c -@@ -39,7 +39,9 @@ - #if defined(MBEDTLS_AESNI_C) - #include "mbedtls/aesni.h" - #endif -- -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+#include "mbedtls/armv8ce_aes.h" -+#endif - #if defined(MBEDTLS_SELF_TEST) - #if defined(MBEDTLS_PLATFORM_C) - #include "mbedtls/platform.h" -@@ -999,6 +1001,11 @@ int mbedtls_aes_crypt_ecb( mbedtls_aes_c - return( mbedtls_aesni_crypt_ecb( ctx, mode, input, output ) ); - #endif - -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+ // We don't do runtime checking for ARMv8 Crypto Extensions -+ return mbedtls_armv8ce_aes_crypt_ecb( ctx, mode, input, output ); -+#endif -+ - #if defined(MBEDTLS_PADLOCK_C) && defined(MBEDTLS_HAVE_X86) - if( aes_padlock_ace ) - { ---- /dev/null -+++ b/library/armv8ce_aes.c -@@ -0,0 +1,142 @@ -+/* -+ * ARMv8 Cryptography Extensions -- Optimized code for AES and GCM -+ * -+ * Copyright (C) 2006-2017, ARM Limited, All Rights Reserved -+ * SPDX-License-Identifier: Apache-2.0 -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); you may -+ * not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ * -+ * This file is part of mbed TLS (https://tls.mbed.org) -+ */ -+ -+#if !defined(MBEDTLS_CONFIG_FILE) -+#include "mbedtls/config.h" -+#else -+#include MBEDTLS_CONFIG_FILE -+#endif -+ -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+ -+#include -+#include "mbedtls/armv8ce_aes.h" -+ -+#ifndef asm -+#define asm __asm -+#endif -+ -+/* -+ * [Armv8 Cryptography Extensions] AES-ECB block en(de)cryption -+ */ -+ -+#if defined(MBEDTLS_AES_C) -+ -+int mbedtls_armv8ce_aes_crypt_ecb( mbedtls_aes_context *ctx, -+ int mode, -+ const unsigned char input[16], -+ unsigned char output[16] ) -+{ -+ unsigned int i; -+ const uint8_t *rk; -+ uint8x16_t x, k; -+ -+ x = vld1q_u8( input ); /* input block */ -+ rk = (const uint8_t *) ctx->rk; /* round keys */ -+ -+ if( mode == MBEDTLS_AES_ENCRYPT ) -+ { -+ for( i = ctx->nr - 1; i != 0; i-- ) /* encryption loop */ -+ { -+ k = vld1q_u8( rk ); -+ rk += 16; -+ x = vaeseq_u8( x, k ); -+ x = vaesmcq_u8( x ); -+ } -+ k = vld1q_u8( rk ); -+ rk += 16; -+ x = vaeseq_u8( x, k ); -+ } -+ else -+ { -+ for( i = ctx->nr - 1; i != 0 ; i-- ) /* decryption loop */ -+ { -+ k = vld1q_u8( rk ); -+ rk += 16; -+ x = vaesdq_u8( x, k ); -+ x = vaesimcq_u8( x ); -+ } -+ k = vld1q_u8( rk ); -+ rk += 16; -+ x = vaesdq_u8( x, k ); -+ } -+ -+ k = vld1q_u8( rk ); /* final key just XORed */ -+ x = veorq_u8( x, k ); -+ vst1q_u8( output, x ); /* write out */ -+ -+ return ( 0 ); -+} -+ -+#endif /* MBEDTLS_AES_C */ -+ -+ -+/* -+ * [Armv8 Cryptography Extensions] Multiply in GF(2^128) for GCM -+ */ -+ -+#if defined(MBEDTLS_GCM_C) -+ -+void mbedtls_armv8ce_gcm_mult( unsigned char c[16], -+ const unsigned char a[16], -+ const unsigned char b[16] ) -+{ -+ /* GCM's GF(2^128) polynomial basis is x^128 + x^7 + x^2 + x + 1 */ -+ const uint64x2_t base = { 0, 0x86 }; /* note missing LS bit */ -+ -+ register uint8x16_t vc asm( "v0" ); /* named registers */ -+ register uint8x16_t va asm( "v1" ); /* (to avoid conflict) */ -+ register uint8x16_t vb asm( "v2" ); -+ register uint64x2_t vp asm( "v3" ); -+ -+ va = vld1q_u8( a ); /* load inputs */ -+ vb = vld1q_u8( b ); -+ vp = base; -+ -+ asm ( -+ "rbit %1.16b, %1.16b \n\t" /* reverse bit order */ -+ "rbit %2.16b, %2.16b \n\t" -+ "pmull2 %0.1q, %1.2d, %2.2d \n\t" /* v0 = a.hi * b.hi */ -+ "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ -+ "ext %0.16b, %0.16b, %0.16b, #8 \n\t" -+ "eor %0.16b, %0.16b, v4.16b \n\t" -+ "ext v5.16b, %2.16b, %2.16b, #8 \n\t" /* (swap hi and lo in b) */ -+ "pmull v4.1q, %1.1d, v5.1d \n\t" /* v0 ^= a.lo * b.hi */ -+ "eor %0.16b, %0.16b, v4.16b \n\t" -+ "pmull2 v4.1q, %1.2d, v5.2d \n\t" /* v0 ^= a.hi * b.lo */ -+ "eor %0.16b, %0.16b, v4.16b \n\t" -+ "pmull2 v4.1q, %0.2d, %3.2d \n\t" /* mul v0 by x^64, reduce */ -+ "ext %0.16b, %0.16b, %0.16b, #8 \n\t" -+ "eor %0.16b, %0.16b, v4.16b \n\t" -+ "pmull v4.1q, %1.1d, %2.1d \n\t" /* v0 ^= a.lo * b.lo */ -+ "eor %0.16b, %0.16b, v4.16b \n\t" -+ "rbit %0.16b, %0.16b \n\t" /* reverse bits for output */ -+ : "=w" (vc) /* q0: output */ -+ : "w" (va), "w" (vb), "w" (vp) /* q1, q2: input */ -+ : "v4", "v5" /* q4, q5: clobbered */ -+ ); -+ -+ vst1q_u8( c, vc ); /* write out */ -+} -+ -+#endif /* MBEDTLS_GCM_C */ -+ -+#endif /* MBEDTLS_ARMV8CE_AES_C */ ---- a/library/CMakeLists.txt -+++ b/library/CMakeLists.txt -@@ -15,6 +15,7 @@ set(src_crypto - aesni.c - arc4.c - aria.c -+ armv8ce_aes.c - asn1parse.c - asn1write.c - base64.c ---- a/library/gcm.c -+++ b/library/gcm.c -@@ -41,6 +41,10 @@ - #include "mbedtls/aesni.h" - #endif - -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+#include "mbedtls/armv8ce_aes.h" -+#endif -+ - #if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) - #include "mbedtls/aes.h" - #include "mbedtls/platform.h" -@@ -87,6 +91,12 @@ static int gcm_gen_table( mbedtls_gcm_co - if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) - return( ret ); - -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+ // we don't do feature testing with ARMv8 cryptography extensions -+ memcpy( ctx ->HL, h, 16 ); // put H at the beginning of buffer -+ return( 0 ); // that's all we need -+#endif -+ - /* pack h as two 64-bits ints, big-endian */ - hi = MBEDTLS_GET_UINT32_BE( h, 0 ); - lo = MBEDTLS_GET_UINT32_BE( h, 4 ); -@@ -196,6 +206,11 @@ static void gcm_mult( mbedtls_gcm_contex - unsigned char lo, hi, rem; - uint64_t zh, zl; - -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+ mbedtls_armv8ce_gcm_mult( output, x, (const unsigned char *) ctx->HL ); -+ return; -+#endif -+ - #if defined(MBEDTLS_AESNI_C) && defined(MBEDTLS_HAVE_X86_64) - if( mbedtls_aesni_has_support( MBEDTLS_AESNI_CLMUL ) ) { - unsigned char h[16]; ---- a/library/Makefile -+++ b/library/Makefile -@@ -74,6 +74,7 @@ OBJS_CRYPTO= \ - aria.o \ - asn1parse.o \ - asn1write.o \ -+ armv8ce_aes.o \ - base64.o \ - bignum.o \ - blowfish.o \ ---- a/library/version_features.c -+++ b/library/version_features.c -@@ -624,6 +624,9 @@ static const char * const features[] = { - #if defined(MBEDTLS_AESNI_C) - "MBEDTLS_AESNI_C", - #endif /* MBEDTLS_AESNI_C */ -+#if defined(MBEDTLS_ARMV8CE_AES_C) -+ "MBEDTLS_ARMV8CE_AES_C", -+#endif /* MBEDTLS_ARMV8CE_AES_C */ - #if defined(MBEDTLS_AES_C) - "MBEDTLS_AES_C", - #endif /* MBEDTLS_AES_C */ diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch deleted file mode 100644 index 54d4cf431..000000000 --- a/package/libs/mbedtls/patches/200-config.patch +++ /dev/null @@ -1,228 +0,0 @@ ---- a/include/mbedtls/config.h -+++ b/include/mbedtls/config.h -@@ -670,14 +670,14 @@ - * - * Enable Output Feedback mode (OFB) for symmetric ciphers. - */ --#define MBEDTLS_CIPHER_MODE_OFB -+//#define MBEDTLS_CIPHER_MODE_OFB - - /** - * \def MBEDTLS_CIPHER_MODE_XTS - * - * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES. - */ --#define MBEDTLS_CIPHER_MODE_XTS -+//#define MBEDTLS_CIPHER_MODE_XTS - - /** - * \def MBEDTLS_CIPHER_NULL_CIPHER -@@ -795,20 +795,20 @@ - * Comment macros to disable the curve and functions for it - */ - /* Short Weierstrass curves (supporting ECP, ECDH, ECDSA) */ --#define MBEDTLS_ECP_DP_SECP192R1_ENABLED --#define MBEDTLS_ECP_DP_SECP224R1_ENABLED -+//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED -+//#define MBEDTLS_ECP_DP_SECP224R1_ENABLED - #define MBEDTLS_ECP_DP_SECP256R1_ENABLED - #define MBEDTLS_ECP_DP_SECP384R1_ENABLED --#define MBEDTLS_ECP_DP_SECP521R1_ENABLED --#define MBEDTLS_ECP_DP_SECP192K1_ENABLED --#define MBEDTLS_ECP_DP_SECP224K1_ENABLED -+//#define MBEDTLS_ECP_DP_SECP521R1_ENABLED -+//#define MBEDTLS_ECP_DP_SECP192K1_ENABLED -+//#define MBEDTLS_ECP_DP_SECP224K1_ENABLED - #define MBEDTLS_ECP_DP_SECP256K1_ENABLED --#define MBEDTLS_ECP_DP_BP256R1_ENABLED --#define MBEDTLS_ECP_DP_BP384R1_ENABLED --#define MBEDTLS_ECP_DP_BP512R1_ENABLED -+//#define MBEDTLS_ECP_DP_BP256R1_ENABLED -+//#define MBEDTLS_ECP_DP_BP384R1_ENABLED -+//#define MBEDTLS_ECP_DP_BP512R1_ENABLED - /* Montgomery curves (supporting ECP) */ - #define MBEDTLS_ECP_DP_CURVE25519_ENABLED --#define MBEDTLS_ECP_DP_CURVE448_ENABLED -+//#define MBEDTLS_ECP_DP_CURVE448_ENABLED - - /** - * \def MBEDTLS_ECP_NIST_OPTIM -@@ -961,7 +961,7 @@ - * See dhm.h for more details. - * - */ --#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED -+//#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED - - /** - * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -981,7 +981,7 @@ - * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA - */ --#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -+//#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED - - /** - * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -1006,7 +1006,7 @@ - * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA - * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA - */ --#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -+//#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED - - /** - * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -@@ -1140,7 +1140,7 @@ - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 - */ --#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -+//#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED - - /** - * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -1164,7 +1164,7 @@ - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 - */ --#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -+//#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED - - /** - * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -@@ -1268,7 +1268,7 @@ - * This option is only useful if both MBEDTLS_SHA256_C and - * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. - */ --//#define MBEDTLS_ENTROPY_FORCE_SHA256 -+#define MBEDTLS_ENTROPY_FORCE_SHA256 - - /** - * \def MBEDTLS_ENTROPY_NV_SEED -@@ -1483,14 +1483,14 @@ - * Uncomment this macro to disable the use of CRT in RSA. - * - */ --//#define MBEDTLS_RSA_NO_CRT -+#define MBEDTLS_RSA_NO_CRT - - /** - * \def MBEDTLS_SELF_TEST - * - * Enable the checkup functions (*_self_test). - */ --#define MBEDTLS_SELF_TEST -+//#define MBEDTLS_SELF_TEST - - /** - * \def MBEDTLS_SHA256_SMALLER -@@ -1761,7 +1761,7 @@ - * configuration of this extension). - * - */ --#define MBEDTLS_SSL_RENEGOTIATION -+//#define MBEDTLS_SSL_RENEGOTIATION - - /** - * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -@@ -2022,7 +2022,7 @@ - * - * Comment this macro to disable support for truncated HMAC in SSL - */ --#define MBEDTLS_SSL_TRUNCATED_HMAC -+//#define MBEDTLS_SSL_TRUNCATED_HMAC - - /** - * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT -@@ -2201,7 +2201,7 @@ - * - * Comment this to disable run-time checking and save ROM space - */ --#define MBEDTLS_VERSION_FEATURES -+//#define MBEDTLS_VERSION_FEATURES - - /** - * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -@@ -2550,7 +2550,7 @@ - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 - * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 - */ --#define MBEDTLS_CAMELLIA_C -+//#define MBEDTLS_CAMELLIA_C - - /** - * \def MBEDTLS_ARIA_C -@@ -2616,7 +2616,7 @@ - * This module enables the AES-CCM ciphersuites, if other requisites are - * enabled as well. - */ --#define MBEDTLS_CCM_C -+//#define MBEDTLS_CCM_C - - /** - * \def MBEDTLS_CERTS_C -@@ -2628,7 +2628,7 @@ - * - * This module is used for testing (ssl_client/server). - */ --#define MBEDTLS_CERTS_C -+//#define MBEDTLS_CERTS_C - - /** - * \def MBEDTLS_CHACHA20_C -@@ -2741,7 +2741,7 @@ - * \warning DES is considered a weak cipher and its use constitutes a - * security risk. We recommend considering stronger ciphers instead. - */ --#define MBEDTLS_DES_C -+//#define MBEDTLS_DES_C - - /** - * \def MBEDTLS_DHM_C -@@ -2906,7 +2906,7 @@ - * This module adds support for the Hashed Message Authentication Code - * (HMAC)-based key derivation function (HKDF). - */ --#define MBEDTLS_HKDF_C -+//#define MBEDTLS_HKDF_C - - /** - * \def MBEDTLS_HMAC_DRBG_C -@@ -3219,7 +3219,7 @@ - * - * This module enables abstraction of common (libc) functions. - */ --#define MBEDTLS_PLATFORM_C -+//#define MBEDTLS_PLATFORM_C - - /** - * \def MBEDTLS_POLY1305_C -@@ -3295,7 +3295,7 @@ - * Caller: library/md.c - * - */ --#define MBEDTLS_RIPEMD160_C -+//#define MBEDTLS_RIPEMD160_C - - /** - * \def MBEDTLS_RSA_C -@@ -3506,7 +3506,7 @@ - * - * This module provides run-time version information. - */ --#define MBEDTLS_VERSION_C -+//#define MBEDTLS_VERSION_C - - /** - * \def MBEDTLS_X509_USE_C -@@ -3616,7 +3616,7 @@ - * Module: library/xtea.c - * Caller: - */ --#define MBEDTLS_XTEA_C -+//#define MBEDTLS_XTEA_C - - /** \} name SECTION: mbed TLS modules */ - diff --git a/package/libs/musl-fts/Makefile b/package/libs/musl-fts/Makefile index 494f700f8..72341cd37 100644 --- a/package/libs/musl-fts/Makefile +++ b/package/libs/musl-fts/Makefile @@ -30,6 +30,7 @@ PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/musl-fts SECTION:=libs @@ -43,6 +44,7 @@ define Package/musl-fts/description The musl-fts package implements the fts(3) functions fts_open, fts_read, fts_children, fts_set and fts_close, which are missing in musl libc. endef +HOST_CONFIGURE_ARGS += --disable-shared --with-pic define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include @@ -58,3 +60,4 @@ define Package/musl-fts/install endef $(eval $(call BuildPackage,musl-fts)) +$(eval $(call HostBuild)) diff --git a/package/libs/nettle/Makefile b/package/libs/nettle/Makefile index 3b4bd9d05..8825da4be 100644 --- a/package/libs/nettle/Makefile +++ b/package/libs/nettle/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nettle -PKG_VERSION:=3.7.3 +PKG_VERSION:=3.8.1 PKG_RELEASE:=$(AUTORELEASE) PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/nettle -PKG_HASH:=661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0 +PKG_HASH:=364f3e2b77cd7dcde83fd7c45219c834e54b0c75e428b6f894a23d12dd41cbfe PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:nettle_project:nettle PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS := CONFIG_LIBNETTLE_MINI @@ -44,7 +45,8 @@ CONFIGURE_ARGS += \ --enable-fat \ --disable-openssl \ --disable-documentation \ - --enable-static + --enable-static \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--disable-assembler)) ifeq ($(CONFIG_LIBNETTLE_MINI),y) CONFIGURE_ARGS += --enable-mini-gmp diff --git a/package/libs/nettle/patches/100-portability.patch b/package/libs/nettle/patches/100-portability.patch index 5bbae2275..b4677ec02 100644 --- a/package/libs/nettle/patches/100-portability.patch +++ b/package/libs/nettle/patches/100-portability.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -4661,6 +4661,7 @@ $as_echo_n "checking build system compil +@@ -4704,6 +4704,7 @@ $as_echo_n "checking build system compil # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <conftest.c <conftest.c <conftest.c < PKG_LICENSE:=BSD-3-Clause @@ -24,6 +24,7 @@ PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:=\ + CONFIG_PACKAGE_libpcrecpp \ CONFIG_PCRE_JIT_ENABLED include $(INCLUDE_DIR)/package.mk @@ -54,14 +55,20 @@ define Package/libpcre32 TITLE:=A Perl Compatible Regular Expression library (32bit support) endef +define Package/libpcrecpp + $(call Package/libpcre/default) + TITLE:=C++ wrapper for Perl Compatible Regular Expression library + DEPENDS:=+libpcre +libstdcpp +endef + HOST_CONFIGURE_ARGS += \ + --disable-shared \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcre16 \ --with-match-limit-recursion=16000 \ - --disable-cpp - -TARGET_CFLAGS += $(FPIC) + --enable-cpp \ + --with-pic CONFIGURE_ARGS += \ --enable-utf8 \ @@ -70,7 +77,8 @@ CONFIGURE_ARGS += \ --enable-pcre32 \ $(if $(CONFIG_PCRE_JIT_ENABLED),--enable-jit,--disable-jit) \ --with-match-limit-recursion=16000 \ - -disable-cpp + --$(if $(CONFIG_PACKAGE_libpcrecpp),en,dis)able-cpp \ + --with-pic MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" @@ -109,7 +117,13 @@ define Package/libpcre32/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcre32.so* $(1)/usr/lib/ endef +define Package/libpcrecpp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcrecpp.so.* $(1)/usr/lib/ +endef + $(eval $(call BuildPackage,libpcre)) $(eval $(call BuildPackage,libpcre16)) $(eval $(call BuildPackage,libpcre32)) +$(eval $(call BuildPackage,libpcrecpp)) $(eval $(call HostBuild)) diff --git a/package/libs/popt/Makefile b/package/libs/popt/Makefile index 34ae4d7c6..ad767b8ee 100644 --- a/package/libs/popt/Makefile +++ b/package/libs/popt/Makefile @@ -8,15 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=popt -PKG_VERSION:=1.16 -PKG_RELEASE:=2 +PKG_VERSION:=1.19 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:= \ - http://distfiles.gentoo.org/distfiles/ \ - http://distcache.freebsd.org/ports-distfiles/ \ - http://rpm5.org/files/popt/ -PKG_HASH:=e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 +PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/ +PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9 PKG_LICENSE:=MIT PKG_FIXUP:=autoreconf @@ -33,7 +30,7 @@ define Package/libpopt SECTION:=libs CATEGORY:=Libraries TITLE:=A command line option parsing library - URL:=http://rpm5.org/files/popt/ + URL:=https://github.com/rpm-software-management/popt ABI_VERSION:=0 endef diff --git a/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch b/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch new file mode 100644 index 000000000..24ad07643 --- /dev/null +++ b/package/libs/popt/patches/100-configure.ac-remove-require-gettext-version.patch @@ -0,0 +1,26 @@ +From 19d21b2d9e5aea5f73b1709b3c7803f920471146 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sun, 25 Sep 2022 11:52:29 +0200 +Subject: [PATCH] configure.ac: remove require gettext version + +This breaks compilation with OpenWrt: +./configure: line 13059: syntax error near unexpected token `0.19.8' +./configure: line 13059: `AM_GNU_GETTEXT_REQUIRE_VERSION(0.19.8)' + +Fixes: bf8dd64e8aa0 ("Update gettext autoconf usage") + +Signed-off-by: Nick Hainke +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -53,7 +53,6 @@ AC_SEARCH_LIBS([setreuid], [ucb]) + AC_CHECK_FUNCS([getuid geteuid iconv mtrace secure_getenv __secure_getenv setreuid setuid stpcpy strerror vasprintf srandom glob_pattern_p mbsrtowcs]) + + AM_GNU_GETTEXT_VERSION([0.19.8]) +-AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) + AM_GNU_GETTEXT([external]) + AM_ICONV_LINK + diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile index d41a6d74f..015a1ae2d 100644 --- a/package/libs/readline/Makefile +++ b/package/libs/readline/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=readline -PKG_VERSION:=8.1 +PKG_VERSION:=8.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/readline -PKG_HASH:=f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02 +PKG_HASH:=3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35 PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING @@ -45,6 +45,7 @@ define Package/libreadline/description history expansion on previous commands. endef +HOST_CONFIGURE_ARGS += --disable-shared --with-pic CONFIGURE_ARGS += --with-curses --disable-install-examples CONFIGURE_VARS += \ @@ -52,6 +53,7 @@ CONFIGURE_VARS += \ bash_cv_func_sigsetjmp=yes \ TARGET_CFLAGS += $(FPIC) +HOST_CFLAGS += $(FPIC) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/package/libs/sysfsutils/Makefile b/package/libs/sysfsutils/Makefile index 8ce9a40f9..ff676308d 100644 --- a/package/libs/sysfsutils/Makefile +++ b/package/libs/sysfsutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sysfsutils PKG_VERSION:=2.1.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/linux-diag diff --git a/package/libs/sysfsutils/files/sysfsutils b/package/libs/sysfsutils/files/sysfsutils index 0305ca82a..3c5b35e78 100644 --- a/package/libs/sysfsutils/files/sysfsutils +++ b/package/libs/sysfsutils/files/sysfsutils @@ -4,6 +4,8 @@ # Based on Debian's script /etc/init.d/sysfsutils by # Martin Pitt +START=11 + load_conffile() { FILE="$1" sed 's/#.*$//; /^[[:space:]]*$/d; @@ -39,7 +41,6 @@ load_conffile() { } } -START=11 start() { for file in /etc/sysfs.conf /etc/sysfs.d/*.conf; do [ -r "$file" ] || continue diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index cf2aff865..f9f8ac956 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=toolchain -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-3.0-with-GCC-exception @@ -115,7 +115,7 @@ define Package/libasan $(call Package/gcc/Default) NAME:=libasan TITLE:=Runtime library for AddressSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc ABI_VERSION:=5 endef @@ -202,7 +202,7 @@ define Package/libubsan $(call Package/gcc/Default) NAME:=libubsan TITLE:=Runtime library for UndefinedBehaviorSanitizer in GCC - DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc + DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips64 @!mips64el @!arc ABI_VERSION:=1 endef @@ -490,6 +490,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) define Package/libstdcpp/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(TOOLCHAIN_DIR)/lib/libstdc++.so.* $(1)/usr/lib/ + rm -rf $(1)/usr/lib/*-gdb.py endef define Package/libasan/install diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile deleted file mode 100644 index 0e3210a5b..000000000 --- a/package/libs/uclibc++/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# -# Copyright (C) 2006-2012 OpenWrt.org -# Copyright (c) 2016 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=uclibc++ -PKG_VERSION:=0.2.5 -PKG_RELEASE:=3 - -PKG_SOURCE:=uClibc++-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=https://cxx.uclibc.org/src/ -PKG_HASH:=596fb9ed7295564ce4c70ae6076a18f92e72f70310d70c98520bbca85c77895a -PKG_BUILD_DIR:=$(BUILD_DIR)/uClibc++-$(PKG_VERSION) - -PKG_LICENSE:=LGPL-2.1-or-later -PKG_INSTALL:=1 -PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 - -include $(INCLUDE_DIR)/package.mk - -define Package/uclibcxx - NAME:=uclibc++ - SECTION:=libs - CATEGORY:=Libraries - TITLE:=C++ library for embedded systems - URL:=https://cxx.uclibc.org/ -endef - -UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \ - -e 's/i.86/i386/' \ - -e 's/sparc.*/sparc/' \ - -e 's/m68k.*/m68k/' \ - -e 's/ppc/powerpc/g' \ - -e 's/v850.*/v850/g' \ - -e 's/sh64/sh/' \ - -e 's/sh[234].*/sh/' \ - -e 's/mips.*/mips/' \ - -e 's/mipsel.*/mips/' \ -) - -TARGET_CFLAGS += $(FPIC) -nostdinc++ -std=c++11 -TARGET_LDFLAGS += -Wl,--gc-sections - -ifneq ($(CONFIG_CCACHE),) -TARGET_CXX=$(TARGET_CXX_NOCACHE) -endif - -ifeq ($(CONFIG_USE_MUSL),y) -SSP_LIB=-lssp_nonshared -endif - -ifeq (${V}, s) -MAKE_VARS+= \ - V=1 -else ifeq (${V}, sc) -MAKE_VARS+= \ - V=2 -endif - -MAKE_FLAGS:= \ - $(TARGET_CONFIGURE_OPTS) \ - CPU_CFLAGS="$(TARGET_CFLAGS)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - GEN_LIBS="-lc $(LIBGCC_S) $(SSP_LIB)" \ - check_as_needed= - -# check_as_needed overrides dependency on libgcc_s - -define Build/Configure - if [ -f ./files/config.$(UCLIBC_TARGET_ARCH) ]; then \ - cp ./files/config.$(UCLIBC_TARGET_ARCH) $(PKG_BUILD_DIR)/.config; \ - else \ - cp ./files/config.default $(PKG_BUILD_DIR)/.config; \ - fi -endef - -define Build/InstallDev - $(INSTALL_DIR) $(2)/bin $(1)/usr/include/uClibc++ $(1)/usr/lib - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/ - $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include/uClibc++/ - $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++*.{a,so}* $(1)/usr/lib/ - $(SED) 's!\(^\|[[:space:]]\)-[IL]$(TOOLCHAIN_DIR)/[^[:space:]]*!!g' $(TOOLCHAIN_DIR)/bin/g++-uc - $(SED) 's|-I/include/|-I$$$${STAGING_DIR:-$(STAGING_DIR)}/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc - $(SED) 's|-L/lib/|-L$$$${STAGING_DIR:-$(STAGING_DIR)}/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc -# add another wrapper which links against both uClibc++ and libstdc++ - $(INSTALL_BIN) $(TOOLCHAIN_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/g++-uc+std - $(SED) 's|^WRAPPER_INCLUDEDIR=.*||g' $(TOOLCHAIN_DIR)/bin/g++-uc+std - $(SED) 's|-luClibc++|-Wl,-Bdynamic,-luClibc++,-Bstatic,-lstdc++,-Bdynamic|g' $(TOOLCHAIN_DIR)/bin/g++-uc+std - $(SED) 's|-nostdinc++||g' $(TOOLCHAIN_DIR)/bin/g++-uc+std -endef - -define Package/uclibcxx/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++.so.* $(1)/usr/lib/ - $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++-*.so $(1)/usr/lib/ -endef - -$(eval $(call BuildPackage,uclibcxx)) diff --git a/package/libs/uclibc++/files/config.default b/package/libs/uclibc++/files/config.default deleted file mode 100644 index d76670e96..000000000 --- a/package/libs/uclibc++/files/config.default +++ /dev/null @@ -1,58 +0,0 @@ -# -# Automatically generated make config: don't edit -# - -# -# Target Features and Options -# -UCLIBCXX_HAS_FLOATS=y -# UCLIBCXX_HAS_LONG_DOUBLE is not set -# UCLIBCXX_HAS_TLS is not set -UCLIBCXX_WARNINGS="" -BUILD_EXTRA_LIBRARIES="" -HAVE_DOT_CONFIG=y - -# -# String and I/O Stream Support -# -UCLIBCXX_HAS_WCHAR=y -UCLIBCXX_IOSTREAM_BUFSIZE=32 -UCLIBCXX_HAS_LFS=y -UCLIBCXX_SUPPORT_CDIR=y -UCLIBCXX_SUPPORT_CIN=y -UCLIBCXX_SUPPORT_COUT=y -UCLIBCXX_SUPPORT_CERR=y -UCLIBCXX_SUPPORT_CLOG=y -# UCLIBCXX_SUPPORT_WCIN is not set -# UCLIBCXX_SUPPORT_WCOUT is not set -# UCLIBCXX_SUPPORT_WCERR is not set -# UCLIBCXX_SUPPORT_WCLOG is not set - -# -# STL and Code Expansion -# -UCLIBCXX_STL_BUFFER_SIZE=32 -UCLIBCXX_CODE_EXPANSION=y -UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS=y -UCLIBCXX_EXPAND_STRING_CHAR=y -UCLIBCXX_EXPAND_VECTOR_BASIC=y -UCLIBCXX_EXPAND_IOS_CHAR=y -UCLIBCXX_EXPAND_STREAMBUF_CHAR=y -UCLIBCXX_EXPAND_ISTREAM_CHAR=y -UCLIBCXX_EXPAND_OSTREAM_CHAR=y -UCLIBCXX_EXPAND_FSTREAM_CHAR=y -UCLIBCXX_EXPAND_SSTREAM_CHAR=y - -# -# Library Installation Options -# -UCLIBCXX_RUNTIME_PREFIX="" -UCLIBCXX_RUNTIME_INCLUDE_SUBDIR="/include" -UCLIBCXX_RUNTIME_LIB_SUBDIR="/lib" -UCLIBCXX_RUNTIME_BIN_SUBDIR="/bin" -UCLIBCXX_EXCEPTION_SUPPORT=y -IMPORT_LIBSUP=y -# IMPORT_LIBGCC_EH is not set -BUILD_STATIC_LIB=y -# BUILD_ONLY_STATIC_LIB is not set -# DODEBUG is not set diff --git a/package/libs/uclibc++/patches/001-no-ansi.patch b/package/libs/uclibc++/patches/001-no-ansi.patch deleted file mode 100644 index 7ddbf52f0..000000000 --- a/package/libs/uclibc++/patches/001-no-ansi.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Rules.mak -+++ b/Rules.mak -@@ -232,7 +232,6 @@ endif - GEN_CXXFLAGS:=-nostdinc++ - GEN_CXXFLAGS+=$(if $(CXXFLAG_-fvisibility-inlines-hidden),-DGCC_HASCLASSVISIBILITY) - CXXFLAGS:=$(CFLAGS) --CFLAGS += -ansi - - LIBGCC:=$(shell $(CC) -print-libgcc-file-name) - LIBGCC_DIR:=$(dir $(LIBGCC)) diff --git a/package/libs/uclibc++/patches/002-undef-functions.patch b/package/libs/uclibc++/patches/002-undef-functions.patch deleted file mode 100644 index 47fa1580f..000000000 --- a/package/libs/uclibc++/patches/002-undef-functions.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8245f62c1e7aba150f666b3c3a1dda646dee6d4b Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Fri, 27 Sep 2019 13:12:44 -0700 -Subject: [PATCH] cstdio: Add undef for four functions - -When compiling with uClibc-ng, these functions get defined as macros and -become unavailable for std. - -Fixes programs that use the std versions of these functions. - -This matches libstdcpp behavior. - -Signed-off-by: Rosen Penev ---- - include/cstdio | 9 +++++++++ - 1 file changed, 9 insertions(+) - ---- a/include/cstdio -+++ b/include/cstdio -@@ -21,6 +21,15 @@ - #ifndef __HEADER_CSTDIO - #define __HEADER_CSTDIO 1 - -+#undef clearerr -+#undef feof -+#undef ferror -+#undef fgetc -+#undef fputc -+#undef getc -+#undef getchar -+#undef putc -+#undef putchar - - namespace std{ - using ::FILE; diff --git a/package/libs/uclibc++/patches/003-no-fPIC.patch b/package/libs/uclibc++/patches/003-no-fPIC.patch deleted file mode 100644 index dfd8833ae..000000000 --- a/package/libs/uclibc++/patches/003-no-fPIC.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/Rules.mak -+++ b/Rules.mak -@@ -185,7 +185,6 @@ export UCLIBCXX_RUNTIME_PREFIX UCLIBCXX_ - - WRAPPER = $(top_builddir)bin/g++-uc - OPTIMIZATION:= --PICFLAG:=-fPIC - - # use '-Os' optimization if available, else use -O2, allow Config to override - $(eval $(call check-gcc-var,-Os)) diff --git a/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch b/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch deleted file mode 100644 index 6e13f22c8..000000000 --- a/package/libs/uclibc++/patches/004-uClibc-Make-long-long-available-to-C-11.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 8151579eb36d9366632242415ff3f5177fa5e1e2 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Thu, 3 Oct 2019 18:58:43 -0700 -Subject: [PATCH] uClibc++: Make long long available to C++11 - -C++11 makes long long available. It is no longer a GNU extension. - -Signed-off-by: Rosen Penev ---- - include/istream | 4 ++-- - include/istream_helpers | 2 +- - include/ostream | 8 ++++---- - include/ostream_helpers | 8 ++++---- - tests/sstreamtest.cpp | 4 ++-- - 5 files changed, 13 insertions(+), 13 deletions(-) - ---- a/include/istream -+++ b/include/istream -@@ -72,7 +72,7 @@ namespace std{ - basic_istream& operator>>(void*& p); - basic_istream& operator>>(basic_streambuf* sb); - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - basic_istream& operator>>(long long& n); - basic_istream& operator>>(unsigned long long& n); - #endif -@@ -455,7 +455,7 @@ namespace std{ - return *this; - } - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - template _UCXXEXPORT basic_istream& - basic_istream::operator>>(long long& n) - { ---- a/include/istream_helpers -+++ b/include/istream_helpers -@@ -301,7 +301,7 @@ namespace std{ - }; - - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - template class _UCXXEXPORT __istream_readin{ - public: - inline static void readin(basic_istream& stream, long long & var) ---- a/include/ostream -+++ b/include/ostream -@@ -85,7 +85,7 @@ namespace std { - basic_ostream& operator<<(long double f); - basic_ostream& operator<<(void* p); - basic_ostream& operator<<(basic_streambuf* sb); --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - basic_ostream& operator<<(long long n); - basic_ostream& operator<<(unsigned long long n); - #endif -@@ -221,7 +221,7 @@ namespace std { - return *this; - } - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - template _UCXXEXPORT basic_ostream& basic_ostream::operator<<(long long n) - { - sentry s(*this); -@@ -487,7 +487,7 @@ namespace std { - #endif - - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - //Support for output of long long data types - -@@ -509,7 +509,7 @@ template _UCXXEXPORT - } - - --#endif //__STRICT_ANSI__ -+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - - ---- a/include/ostream_helpers -+++ b/include/ostream_helpers -@@ -142,7 +142,7 @@ namespace std{ - } - }; - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - template class _UCXXEXPORT __ostream_printout{ - public: -@@ -237,7 +237,7 @@ namespace std{ - }; - - --#endif //__STRICT_ANSI__ -+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - template class _UCXXEXPORT __ostream_printout{ - public: -@@ -357,7 +357,7 @@ namespace std{ - } - }; - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - template class _UCXXEXPORT __ostream_printout{ - public: -@@ -428,7 +428,7 @@ namespace std{ - }; - - --#endif //__STRICT_ANSI__ -+#endif // !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - - template class _UCXXEXPORT __ostream_printout{ - public: ---- a/tests/sstreamtest.cpp -+++ b/tests/sstreamtest.cpp -@@ -9,7 +9,7 @@ int main(){ - int i; - std::string s; - char c; --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - long long ll; - unsigned long long ull; - #endif -@@ -32,7 +32,7 @@ int main(){ - - - --#ifndef __STRICT_ANSI__ -+#if !defined(__STRICT_ANSI__) || (__cplusplus >= 201103L) - a.str("678 76 54"); - a >> ll >> ull >> s; - std::cout << "ll (should be 678): " << ll << std::endl; diff --git a/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch b/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch deleted file mode 100644 index 66b62c197..000000000 --- a/package/libs/uclibc++/patches/005-istream_helpers-Fix-sscanf-typo.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 7f6dd860818512c0eb313320308b22ba7e2c7205 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Fri, 4 Oct 2019 20:06:53 -0700 -Subject: [PATCH] istream_helpers: Fix sscanf typo - -This caused readin not to work properly with long long types. - -Found accidentally through a glibc warning -(declared with warn_unused_result). - -Tested with gptfdisk on OpenWrt. - -Signed-off-by: Rosen Penev ---- - include/istream_helpers | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/include/istream_helpers -+++ b/include/istream_helpers -@@ -317,7 +317,7 @@ namespace std{ - sscanf(temp.c_str(), "%llo", (unsigned long long *)&var ); - }else if(stream.flags() & ios_base::hex){ - if(stream.flags() & ios_base::uppercase){ -- scanf(temp.c_str(), "%llX", (unsigned long long *)&var ); -+ sscanf(temp.c_str(), "%llX", (unsigned long long *)&var ); - }else{ - sscanf(temp.c_str(), "%llx", (unsigned long long *)&var); - } -@@ -344,7 +344,7 @@ namespace std{ - sscanf(temp.c_str(), "%llo", &var ); - }else if(stream.flags() & ios_base::hex){ - if(stream.flags() & ios_base::uppercase){ -- scanf(temp.c_str(), "%llX", &var ); -+ sscanf(temp.c_str(), "%llX", &var ); - }else{ - sscanf(temp.c_str(), "%llx", &var); - } diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index a5e34a73b..f90a2edb7 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git -PKG_SOURCE_DATE:=2022-01-16 -PKG_SOURCE_VERSION:=868fd8812f477c110f9c6c5252c0bd172167b94c -PKG_MIRROR_HASH:=dd28d5e846b391917cf83d66176653bdfa4e8a0d5b11144b65a012fe7693ddeb +PKG_SOURCE_DATE:=2022-12-08 +PKG_SOURCE_VERSION:=9217ab46536353c7c792951b57163063f5ec7a3b +PKG_MIRROR_HASH:=cd4dc6a6c18290348b1f8b1c01df3320e4954dc46d714c797bef066f7a91248d CMAKE_INSTALL:=1 PKG_LICENSE:=ISC diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile index c7a8415c7..092443ab0 100644 --- a/package/libs/zlib/Makefile +++ b/package/libs/zlib/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zlib -PKG_VERSION:=1.2.11 -PKG_RELEASE:=3 +PKG_VERSION:=1.2.13 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net -PKG_HASH:=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 +PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION) +PKG_HASH:=d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98 PKG_LICENSE:=Zlib PKG_LICENSE_FILES:=README diff --git a/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch b/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch deleted file mode 100644 index 843ef45c7..000000000 --- a/package/libs/zlib/patches/001-neon-implementation-of-adler32.patch +++ /dev/null @@ -1,253 +0,0 @@ -From d2f06cd65d7ac39c6dd6761eef162abc946b155b Mon Sep 17 00:00:00 2001 -From: Adenilson Cavalcanti -Date: Tue, 11 Apr 2017 17:13:02 -0700 -Subject: [PATCH] NEON implementation for Adler32 - -The checksum is calculated in the uncompressed PNG data -and can be made much faster by using SIMD. - -Tests in ARMv8 yielded an improvement of about 3x -(e.g. walltime was 350ms x 125ms for a 4096x4096 bytes -executed 30 times). That results in at least 18% improvement -in image decoding in Chromium. - -Further details at: -https://bugs.chromium.org/p/chromium/issues/detail?id=688601 ---- - CMakeLists.txt | 29 +++++++--- - adler32.c | 5 ++ - contrib/README.contrib | 3 + - contrib/arm/neon_adler32.c | 137 +++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 166 insertions(+), 8 deletions(-) - create mode 100644 contrib/arm/neon_adler32.c - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 0fe939df..8e75f664 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -7,6 +7,7 @@ set(VERSION "1.2.11") - - option(ASM686 "Enable building i686 assembly implementation") - option(AMD64 "Enable building amd64 assembly implementation") -+option(ARMv8 "Enable building ARM NEON intrinsics implementation") - - set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") - set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") -@@ -132,14 +133,26 @@ endif() - if(CMAKE_COMPILER_IS_GNUCC) - if(ASM686) - set(ZLIB_ASMS contrib/asm686/match.S) -- elseif (AMD64) -+ elseif(AMD64) - set(ZLIB_ASMS contrib/amd64/amd64-match.S) -- endif () -+ elseif(ARMv8) -+ set(ZLIB_ARMv8 contrib/arm/neon_adler32.c) -+ endif() - -- if(ZLIB_ASMS) -- add_definitions(-DASMV) -- set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) -- endif() -+ if(ZLIB_ASMS) -+ add_definitions(-DASMV) -+ set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) -+ elseif(ZLIB_ARMv8) -+ add_definitions(-DARMv8) -+ set(COMPILER ${CMAKE_C_COMPILER}) -+ # NEON is mandatory in ARMv8. -+ if(${COMPILER} MATCHES "aarch64") -+ set_source_files_properties(${ZLIB_ARMv8} PROPERTIES LANGUAGE C COMPILE_FLAGS -march=armv8-a) -+ # But it was optional for ARMv7. -+ elseif(${COMPILER} MATCHES "arm") -+ set_source_files_properties(${ZLIB_ARMv8} PROPERTIES LANGUAGE C COMPILE_FLAGS -mfpu=neon) -+ endif() -+ endif() - endif() - - if(MSVC) -@@ -183,8 +196,8 @@ if(MINGW) - set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) - endif(MINGW) - --add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) --add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_ARMv8} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -+add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_ARMv8} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) - set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) - set_target_properties(zlib PROPERTIES SOVERSION 1) - -diff --git a/adler32.c b/adler32.c -index d0be4380..45ebaa4b 100644 ---- a/adler32.c -+++ b/adler32.c -@@ -136,7 +136,12 @@ uLong ZEXPORT adler32(adler, buf, len) - const Bytef *buf; - uInt len; - { -+#ifdef ARMv8 -+# pragma message("Using NEON-ized Adler32.") -+ return NEON_adler32(adler, buf, len); -+#else - return adler32_z(adler, buf, len); -+#endif - } - - /* ========================================================================= */ -diff --git a/contrib/README.contrib b/contrib/README.contrib -index a411d5c3..3fd1d202 100644 ---- a/contrib/README.contrib -+++ b/contrib/README.contrib -@@ -12,6 +12,9 @@ amd64/ by Mikhail Teterin - asm code for AMD64 - See patch at http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/96393 - -+arm/ by Adenilson Cavalcanti -+ ARM optimizations (NEON and ARMv8 code). -+ - asm686/ by Brian Raiter - asm code for Pentium and PPro/PII, using the AT&T (GNU as) syntax - See http://www.muppetlabs.com/~breadbox/software/assembly.html -diff --git a/contrib/arm/neon_adler32.c b/contrib/arm/neon_adler32.c -new file mode 100644 -index 00000000..f173a74f ---- /dev/null -+++ b/contrib/arm/neon_adler32.c -@@ -0,0 +1,137 @@ -+/* Copyright (C) 1995-2011, 2016 Mark Adler -+ * Copyright (C) 2017 ARM Holdings Inc. -+ * Authors: Adenilson Cavalcanti -+ * Simon Hosie -+ * This software is provided 'as-is', without any express or implied -+ * warranty. In no event will the authors be held liable for any damages -+ * arising from the use of this software. -+ * Permission is granted to anyone to use this software for any purpose, -+ * including commercial applications, and to alter it and redistribute it -+ * freely, subject to the following restrictions: -+ * 1. The origin of this software must not be misrepresented; you must not -+ * claim that you wrote the original software. If you use this software -+ * in a product, an acknowledgment in the product documentation would be -+ * appreciated but is not required. -+ * 2. Altered source versions must be plainly marked as such, and must not be -+ * misrepresented as being the original software. -+ * 3. This notice may not be removed or altered from any source distribution. -+ */ -+ -+#if (defined(__ARM_NEON__) || defined(__ARM_NEON)) -+#include -+ -+static void NEON_accum32(uint32_t *s, const unsigned char *buf, -+ unsigned int len) -+{ -+ static const uint8_t taps[32] = { -+ 32, 31, 30, 29, 28, 27, 26, 25, -+ 24, 23, 22, 21, 20, 19, 18, 17, -+ 16, 15, 14, 13, 12, 11, 10, 9, -+ 8, 7, 6, 5, 4, 3, 2, 1 }; -+ -+ uint32x2_t adacc2, s2acc2, as; -+ uint8x16_t t0 = vld1q_u8(taps), t1 = vld1q_u8(taps + 16); -+ -+ uint32x4_t adacc = vdupq_n_u32(0), s2acc = vdupq_n_u32(0); -+ adacc = vsetq_lane_u32(s[0], adacc, 0); -+ s2acc = vsetq_lane_u32(s[1], s2acc, 0); -+ -+ while (len >= 2) { -+ uint8x16_t d0 = vld1q_u8(buf), d1 = vld1q_u8(buf + 16); -+ uint16x8_t adler, sum2; -+ s2acc = vaddq_u32(s2acc, vshlq_n_u32(adacc, 5)); -+ adler = vpaddlq_u8( d0); -+ adler = vpadalq_u8(adler, d1); -+ sum2 = vmull_u8( vget_low_u8(t0), vget_low_u8(d0)); -+ sum2 = vmlal_u8(sum2, vget_high_u8(t0), vget_high_u8(d0)); -+ sum2 = vmlal_u8(sum2, vget_low_u8(t1), vget_low_u8(d1)); -+ sum2 = vmlal_u8(sum2, vget_high_u8(t1), vget_high_u8(d1)); -+ adacc = vpadalq_u16(adacc, adler); -+ s2acc = vpadalq_u16(s2acc, sum2); -+ len -= 2; -+ buf += 32; -+ } -+ -+ while (len > 0) { -+ uint8x16_t d0 = vld1q_u8(buf); -+ uint16x8_t adler, sum2; -+ s2acc = vaddq_u32(s2acc, vshlq_n_u32(adacc, 4)); -+ adler = vpaddlq_u8(d0); -+ sum2 = vmull_u8( vget_low_u8(t1), vget_low_u8(d0)); -+ sum2 = vmlal_u8(sum2, vget_high_u8(t1), vget_high_u8(d0)); -+ adacc = vpadalq_u16(adacc, adler); -+ s2acc = vpadalq_u16(s2acc, sum2); -+ buf += 16; -+ len--; -+ } -+ -+ adacc2 = vpadd_u32(vget_low_u32(adacc), vget_high_u32(adacc)); -+ s2acc2 = vpadd_u32(vget_low_u32(s2acc), vget_high_u32(s2acc)); -+ as = vpadd_u32(adacc2, s2acc2); -+ s[0] = vget_lane_u32(as, 0); -+ s[1] = vget_lane_u32(as, 1); -+} -+ -+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf, -+ unsigned int len) -+{ -+ /* Oldie K&R code integration. */ -+ unsigned int i; -+ for (i = 0; i < len; ++i) { -+ pair[0] += buf[i]; -+ pair[1] += pair[0]; -+ } -+} -+ -+extern unsigned long NEON_adler32(unsigned long adler, const unsigned char *buf, -+ const unsigned int len) -+{ -+ /* initial Adler-32 value (deferred check for len == 1 speed) */ -+ if (!buf) -+ return 1L; -+ -+ /* The largest prime smaller than 65536. */ -+ const uint32_t M_BASE = 65521; -+ /* This is the threshold where doing accumulation may overflow. */ -+ const int M_NMAX = 5552; -+ -+ unsigned long sum2; -+ uint32_t pair[2]; -+ int n = M_NMAX; -+ unsigned int done = 0; -+ /* Oldie K&R code integration. */ -+ unsigned int i; -+ -+ /* Split Adler-32 into component sums, it can be supplied by -+ * the caller sites (e.g. in a PNG file). -+ */ -+ sum2 = (adler >> 16) & 0xffff; -+ adler &= 0xffff; -+ pair[0] = adler; -+ pair[1] = sum2; -+ -+ for (i = 0; i < len; i += n) { -+ if ((i + n) > len) -+ n = len - i; -+ -+ if (n < 16) -+ break; -+ -+ NEON_accum32(pair, buf + i, n / 16); -+ pair[0] %= M_BASE; -+ pair[1] %= M_BASE; -+ -+ done += (n / 16) * 16; -+ } -+ -+ /* Handle the tail elements. */ -+ if (done < len) { -+ NEON_handle_tail(pair, (buf + done), len - done); -+ pair[0] %= M_BASE; -+ pair[1] %= M_BASE; -+ } -+ -+ /* D = B * 65536 + A, see: https://en.wikipedia.org/wiki/Adler-32. */ -+ return (pair[1] << 16) | pair[0]; -+} -+#endif diff --git a/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch b/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch index d181b034e..04e66621e 100644 --- a/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch +++ b/package/libs/zlib/patches/002-arm-specific-optimisations-for-inflate.patch @@ -11,9 +11,6 @@ Change-Id: Id4cda552b39bfb39ab35ec499dbe122b43b6d1a1 create mode 100644 contrib/arm/inffast.c create mode 100644 contrib/arm/inflate.c -diff --git a/contrib/arm/inffast.c b/contrib/arm/inffast.c -new file mode 100644 -index 00000000..0dbd1dbc --- /dev/null +++ b/contrib/arm/inffast.c @@ -0,0 +1,323 @@ @@ -340,9 +337,6 @@ index 00000000..0dbd1dbc + */ + +#endif /* !ASMINF */ -diff --git a/contrib/arm/inflate.c b/contrib/arm/inflate.c -new file mode 100644 -index 00000000..ac333e8c --- /dev/null +++ b/contrib/arm/inflate.c @@ -0,0 +1,1561 @@ diff --git a/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch b/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch index 9370264c4..1f83b500b 100644 --- a/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch +++ b/package/libs/zlib/patches/003-arm-specific-optimisations-for-inflate.patch @@ -16,9 +16,6 @@ Change-Id: I59854eb25d2b1e43561c8a2afaf9175bf10cf674 3 files changed, 335 insertions(+), 62 deletions(-) create mode 100644 contrib/arm/chunkcopy.h -diff --git a/contrib/arm/chunkcopy.h b/contrib/arm/chunkcopy.h -new file mode 100644 -index 00000000..2d6fd6f9 --- /dev/null +++ b/contrib/arm/chunkcopy.h @@ -0,0 +1,279 @@ @@ -301,8 +298,6 @@ index 00000000..2d6fd6f9 +#undef Z_RESTRICT + +#endif /* CHUNKCOPY_H */ -diff --git a/contrib/arm/inffast.c b/contrib/arm/inffast.c -index 0dbd1dbc..f7f50071 100644 --- a/contrib/arm/inffast.c +++ b/contrib/arm/inffast.c @@ -7,6 +7,7 @@ @@ -313,7 +308,7 @@ index 0dbd1dbc..f7f50071 100644 #ifdef ASMINF # pragma message("Assembler code may have bugs -- use at your own risk") -@@ -57,6 +58,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -57,6 +58,7 @@ unsigned start; /* inflate()'s s unsigned char FAR *out; /* local strm->next_out */ unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ unsigned char FAR *end; /* while out < end, enough space available */ @@ -321,7 +316,7 @@ index 0dbd1dbc..f7f50071 100644 #ifdef INFLATE_STRICT unsigned dmax; /* maximum distance from zlib header */ #endif -@@ -84,12 +86,13 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -84,12 +86,13 @@ unsigned start; /* inflate()'s s out = strm->next_out; beg = out - (start - strm->avail_out); end = out + (strm->avail_out - 257); @@ -336,7 +331,7 @@ index 0dbd1dbc..f7f50071 100644 window = state->window; hold = state->hold; bits = state->bits; -@@ -197,70 +200,51 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -197,70 +200,51 @@ unsigned start; /* inflate()'s s #endif } from = window; @@ -371,14 +366,8 @@ index 0dbd1dbc..f7f50071 100644 - } while (--op); - from = out - dist; /* rest from output */ - } -+ out = chunkcopy_safe(out, from, op, limit); -+ from = window; /* more from start of window */ -+ op = wnext; -+ /* This (rare) case can create a situation where -+ the first chunkcopy below must be checked. -+ */ - } - } +- } +- } - else { /* contiguous in window */ - from += wnext - op; - if (op < len) { /* some from window */ @@ -399,6 +388,14 @@ index 0dbd1dbc..f7f50071 100644 - *out++ = *from++; - if (len > 1) - *out++ = *from++; ++ out = chunkcopy_safe(out, from, op, limit); ++ from = window; /* more from start of window */ ++ op = wnext; ++ /* This (rare) case can create a situation where ++ the first chunkcopy below must be checked. ++ */ ++ } ++ } + if (op < len) { /* still need some from output */ + out = chunkcopy_safe(out, from, op, limit); + len -= op; @@ -443,8 +440,6 @@ index 0dbd1dbc..f7f50071 100644 } } else if ((op & 64) == 0) { /* 2nd level distance code */ -diff --git a/contrib/arm/inflate.c b/contrib/arm/inflate.c -index ac333e8c..e40322c3 100644 --- a/contrib/arm/inflate.c +++ b/contrib/arm/inflate.c @@ -84,6 +84,7 @@ diff --git a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch index 68f317b24..81816aed6 100644 --- a/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch +++ b/package/libs/zlib/patches/004-attach-sourcefiles-in-patch-002-to-buildsystem.patch @@ -1,8 +1,6 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8e75f66..24d7329 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -95,34 +95,67 @@ set(ZLIB_PUBLIC_HDRS +@@ -91,34 +91,67 @@ set(ZLIB_PUBLIC_HDRS ${CMAKE_CURRENT_BINARY_DIR}/zconf.h zlib.h ) diff --git a/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch b/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch deleted file mode 100644 index dc84d3a1d..000000000 --- a/package/libs/zlib/patches/006-fix-CVE-2022-37434.patch +++ /dev/null @@ -1,32 +0,0 @@ -From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001 -From: Mark Adler -Date: Sat, 30 Jul 2022 15:51:11 -0700 -Subject: [PATCH] Fix a bug when getting a gzip header extra field with - inflate(). - -If the extra field was larger than the space the user provided with -inflateGetHeader(), and if multiple calls of inflate() delivered -the extra header data, then there could be a buffer overflow of the -provided space. This commit assures that provided space is not -exceeded. ---- - inflate.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/inflate.c b/inflate.c -index 7be8c6366..7a7289749 100644 ---- a/inflate.c -+++ b/inflate.c -@@ -763,9 +763,10 @@ int flush; - copy = state->length; - if (copy > have) copy = have; - if (copy) { -+ len = state->head->extra_len - state->length; - if (state->head != Z_NULL && -- state->head->extra != Z_NULL) { -- len = state->head->extra_len - state->length; -+ state->head->extra != Z_NULL && -+ len < state->head->extra_max) { - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); diff --git a/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch b/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch deleted file mode 100644 index c5c95a92b..000000000 --- a/package/libs/zlib/patches/007-fix-null-dereference-in-fix-CVE-2022-37434.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001 -From: Mark Adler -Date: Mon, 8 Aug 2022 10:50:09 -0700 -Subject: [PATCH] Fix extra field processing bug that dereferences NULL - state->head. - -The recent commit to fix a gzip header extra field processing bug -introduced the new bug fixed here. ---- - inflate.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/inflate.c b/inflate.c -index 7a7289749..2a3c4fe98 100644 ---- a/inflate.c -+++ b/inflate.c -@@ -763,10 +763,10 @@ int flush; - copy = state->length; - if (copy > have) copy = have; - if (copy) { -- len = state->head->extra_len - state->length; - if (state->head != Z_NULL && - state->head->extra != Z_NULL && -- len < state->head->extra_max) { -+ (len = state->head->extra_len - state->length) < -+ state->head->extra_max) { - zmemcpy(state->head->extra + len, next, - len + copy > state->head->extra_max ? - state->head->extra_max - len : copy); diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile index 87510d59a..bec03b62d 100644 --- a/package/network/config/firewall4/Makefile +++ b/package/network/config/firewall4/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git -PKG_SOURCE_DATE:=2022-09-01 -PKG_SOURCE_VERSION:=f5fcdcf2c51f6f0a4b116c352000c4fe0523be77 -PKG_MIRROR_HASH:=57ef6f161abdd323019c026c959ab875fdfd3c972b8dc7767623634b1c259138 +PKG_SOURCE_DATE:=2022-11-29 +PKG_SOURCE_VERSION:=700a925fd9c1f1ff404e6b125cd5347ad7c45668 +PKG_MIRROR_HASH:=18fb7a27399bf2e9e094a4cbacd4e859448c1c9194b6da4a78c9f37a642d1703 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile index dc32b1a6a..3f8b89d48 100644 --- a/package/network/services/bridger/Makefile +++ b/package/network/services/bridger/Makefile @@ -19,8 +19,6 @@ PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_DEPENDS:=bpf-headers -PKG_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk include $(INCLUDE_DIR)/bpf.mk diff --git a/package/network/services/e2guardian/Makefile b/package/network/services/e2guardian/Makefile index 17328ddba..ea9c952f1 100644 --- a/package/network/services/e2guardian/Makefile +++ b/package/network/services/e2guardian/Makefile @@ -22,12 +22,11 @@ PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -include $(INCLUDE_DIR)/uclibc++.mk include $(INCLUDE_DIR)/package.mk define Package/e2guardian SECTION:=net - DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib +libpcre + DEPENDS:=+libstdcpp +libpthread +zlib +libpcre CATEGORY:=Network SUBMENU:=Web Servers/Proxies TITLE:=E2Guardian diff --git a/package/network/services/noddos/Makefile b/package/network/services/noddos/Makefile index 1cfec48b9..8492b6a59 100644 --- a/package/network/services/noddos/Makefile +++ b/package/network/services/noddos/Makefile @@ -20,7 +20,6 @@ PKG_MAINTAINER:=Steven Hessing PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENSE.md -PKG_BUILD_PARALLEL:=1 CMAKE_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index d9a320d17..05174a509 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -19,7 +19,6 @@ PKG_MIRROR_HASH:=a0644d31f99f20e5c2cee74153b81a0c2eae9ebeb644662cc76b0984b44dd49 PKG_MAINTAINER:=Hans Dedecker PKG_LICENSE:=GPL-2.0 -PKG_INSTALL:=1 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_odhcpd_$(BUILD_VARIANT)_ext_cer_id PKG_ASLR_PIE_REGULAR:=1 diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile index d696c96c6..d408f5625 100644 --- a/package/network/utils/umbim/Makefile +++ b/package/network/utils/umbim/Makefile @@ -13,8 +13,6 @@ PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile index da54ba0f4..53ca67230 100644 --- a/package/network/utils/uqmi/Makefile +++ b/package/network/utils/uqmi/Makefile @@ -13,8 +13,6 @@ PKG_MAINTAINER:=Matti Laakso PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index 46bd871cc..9fac32e7e 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ca-certificates -PKG_VERSION:=20210119 +PKG_VERSION:=20211016 PKG_RELEASE:=1 PKG_MAINTAINER:= PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates -PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665 +PKG_HASH:=2ae9b6dc5f40c25d6d7fe55e07b54f12a8967d1955d3b7b2f42ee46266eeef88 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch b/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch new file mode 100644 index 000000000..add01f42c --- /dev/null +++ b/package/system/ca-certificates/patches/0001-ca-certificates-fix-python3-cryptography-woes-in-cer.patch @@ -0,0 +1,53 @@ +From 3c51cb5ff1d0db41fb3288fb555c7e7055cf3e86 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Wed, 1 Dec 2021 14:41:31 +0100 +Subject: [PATCH] ca-certificates: fix python3-cryptography woes in + certdata2pem.py + +reverts the code portion of the Debian's ca-certificate +commit 033d52259172 ("mozilla/certdata2pem.py: print a warning for expired certificates.") + +It broke builds with the popular Ubuntu 20.04 (focal) releases. +This was due to them shipping with an older python3-cryptography +version which is not compatible. + +More concerns were raised by jow- as well: +"We don't want the build to depend on the local system time anyway." + +Reported-by: Chen Minqiang +Reported-by: Shane Synan +Signed-off-by: Christian Lamparter +--- +--- a/work/mozilla/certdata2pem.py ++++ b/work/mozilla/certdata2pem.py +@@ -21,16 +21,12 @@ + # USA. + + import base64 +-import datetime + import os.path + import re + import sys + import textwrap + import io + +-from cryptography import x509 +- +- + objects = [] + + # Dirty file parser. +@@ -121,13 +117,6 @@ for obj in objects: + if obj['CKA_CLASS'] == 'CKO_CERTIFICATE': + if not obj['CKA_LABEL'] in trust or not trust[obj['CKA_LABEL']]: + continue +- +- cert = x509.load_der_x509_certificate(obj['CKA_VALUE']) +- if cert.not_valid_after < datetime.datetime.now(): +- print('!'*74) +- print('Trusted but expired certificate found: %s' % obj['CKA_LABEL']) +- print('!'*74) +- + bname = obj['CKA_LABEL'][1:-1].replace('/', '_')\ + .replace(' ', '_')\ + .replace('(', '=')\ diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index effe37133..d07e235f9 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=faa4679562ae31cb6dbbc90b7f3f297294a51f7be1b12d10a5f0b7acfaae7252 -PKG_SOURCE_DATE:=2021-08-14 -PKG_SOURCE_VERSION:=2e3aca299ea7bbe74f219860510c4b34e77c7aa4 +PKG_MIRROR_HASH:=28be14a1e28fc62e80681e1b5e7f2435692ee326b66afcc1f3d158764df686d5 +PKG_SOURCE_DATE:=2022-11-10 +PKG_SOURCE_VERSION:=3affe9ea5098c8bb90111ce97d50ad976ef0c034 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -75,6 +75,10 @@ define Package/snapshot-tool DEPENDS:=+libubox +fstools endef +define Package/block-mount/conffiles +/etc/config/fstab +endef + define Package/block-mount SECTION:=base CATEGORY:=Base system diff --git a/package/system/fstools/files/fstab.init b/package/system/fstools/files/fstab.init index 08d5601be..03a399349 100644 --- a/package/system/fstools/files/fstab.init +++ b/package/system/fstools/files/fstab.init @@ -1,7 +1,9 @@ #!/bin/sh /etc/rc.common -# (C) 2013 openwrt.org +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2013-2020 OpenWrt.org -START=40 +START=11 boot() { /sbin/block mount diff --git a/package/system/fstools/patches/0001-fstools-support-extroot-for-non-MTD-rootfs_data.patch b/package/system/fstools/patches/0001-fstools-support-extroot-for-non-MTD-rootfs_data.patch index 65d1a087c..20a68484d 100644 --- a/package/system/fstools/patches/0001-fstools-support-extroot-for-non-MTD-rootfs_data.patch +++ b/package/system/fstools/patches/0001-fstools-support-extroot-for-non-MTD-rootfs_data.patch @@ -16,12 +16,9 @@ Signed-off-by: Qi Liu 4 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 libfstools/fstype.h -diff --git a/CMakeLists.txt b/CMakeLists.txt -index a586577..4b6e3e7 100644 - --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -75,9 +75,9 @@ INSTALL(TARGETS blockd RUNTIME DESTINATION sbin) +@@ -78,9 +78,9 @@ INSTALL(TARGETS blockd RUNTIME DESTINATI ADD_EXECUTABLE(block block.c probe.c probe-libblkid.c) IF(DEFINED CMAKE_UBIFS_EXTROOT) ADD_DEFINITIONS(-DUBIFS_EXTROOT) @@ -33,12 +30,10 @@ index a586577..4b6e3e7 100644 ENDIF(DEFINED CMAKE_UBIFS_EXTROOT) INSTALL(TARGETS block RUNTIME DESTINATION sbin) -diff --git a/block.c b/block.c -index 569bf56..66cce46 100644 --- a/block.c +++ b/block.c -@@ -45,6 +45,8 @@ - #include +@@ -44,6 +44,8 @@ + #include #include +#include "libfstools/fstype.h" @@ -46,7 +41,7 @@ index 569bf56..66cce46 100644 #include "probe.h" #define AUTOFS_MOUNT_PATH "/tmp/run/blockd/" -@@ -1590,6 +1592,44 @@ static int main_extroot(int argc, char **argv) +@@ -1696,6 +1698,44 @@ static int main_extroot(int argc, char * } #endif @@ -91,9 +86,6 @@ index 569bf56..66cce46 100644 /* As a last resort look for /etc/config/fstab on "rootfs" partition */ return mount_extroot(NULL); } -diff --git a/libfstools/fstype.h b/libfstools/fstype.h -new file mode 100644 -index 0000000..8882343 --- /dev/null +++ b/libfstools/fstype.h @@ -0,0 +1,13 @@ @@ -111,8 +103,6 @@ index 0000000..8882343 +}; +#endif \ No newline at end of file -diff --git a/libfstools/libfstools.h b/libfstools/libfstools.h -index f27307a..8d3362f 100644 --- a/libfstools/libfstools.h +++ b/libfstools/libfstools.h @@ -18,20 +18,10 @@ diff --git a/package/system/fstools/patches/0100-automount.patch b/package/system/fstools/patches/0100-automount.patch index a8b864a50..6a68444e0 100644 --- a/package/system/fstools/patches/0100-automount.patch +++ b/package/system/fstools/patches/0100-automount.patch @@ -1,6 +1,6 @@ --- a/block.c +++ b/block.c -@@ -530,7 +530,7 @@ +@@ -729,7 +729,7 @@ static int print_block_uci(struct probe_ printf("\toption\tuuid\t'%s'\n", pr->uuid); else printf("\toption\tdevice\t'%s'\n", pr->dev); @@ -9,7 +9,7 @@ return 0; } -@@ -1454,7 +1454,7 @@ +@@ -1794,7 +1794,7 @@ static int main_detect(int argc, char ** cache_load(0); printf("config 'global'\n"); printf("\toption\tanon_swap\t'0'\n"); diff --git a/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch b/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch new file mode 100644 index 000000000..ef9e5ab2f --- /dev/null +++ b/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch @@ -0,0 +1,29 @@ +From e1137cdafc97c0a8b2a0717a771823f3c4320087 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Tue, 29 Nov 2022 19:37:03 +0100 +Subject: [PATCH] iucode_tool: add missing limits.h for USE_CPUID_DEVICE + +If USE_CPUID_DEVICE is enabled, compilation fails for missing define. +Add the missing include to fix compilation error with USE_CPUID_DEVICE +define. + +Signed-off-by: Christian Marangi +--- + iucode_tool.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/iucode_tool.c b/iucode_tool.c +index 4bba5db..0246035 100644 +--- a/iucode_tool.c ++++ b/iucode_tool.c +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.37.2 + diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile index 65bdf6dba..83c9dab1b 100644 --- a/package/system/opkg/Makefile +++ b/package/system/opkg/Makefile @@ -12,9 +12,9 @@ PKG_FLAGS:=essential PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/opkg-lede.git -PKG_SOURCE_DATE:=2021-06-13 -PKG_SOURCE_VERSION:=1bf042dd06751b693a8544d2317e5b969d666b69 -PKG_MIRROR_HASH:=aeda4e0f11805bf95fc7be6d38391ce579acd965c8ba6a490b3e8669815b7264 +PKG_SOURCE_DATE:=2022-02-24 +PKG_SOURCE_VERSION:=d038e5b6d155784575f62a66a8bb7e874173e92e +PKG_MIRROR_HASH:=e5ec4ae93f6529f7f0b9acc22a9a63c1b2f27d3b30b4a82041fcd58b9bc7cdf3 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING @@ -26,10 +26,6 @@ PKG_CONFIG_DEPENDS += \ CONFIG_SIGNATURE_CHECK \ CONFIG_TARGET_INIT_PATH -PKG_BUILD_PARALLEL:=1 -HOST_BUILD_PARALLEL:=1 -PKG_INSTALL:=1 - HOST_BUILD_DEPENDS:=libubox/host include $(INCLUDE_DIR)/package.mk diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile index e2919ab50..5e9733675 100644 --- a/package/system/procd/Makefile +++ b/package/system/procd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git -PKG_MIRROR_HASH:=0d51642d82d7bb4150355a6986e54504dce171c6fcb7eeff312d20a5d106bad8 -PKG_SOURCE_DATE:=2021-11-04 -PKG_SOURCE_VERSION:=0ee8e734a7f67220cf4a3412b60ff674b5fb20dd +PKG_MIRROR_HASH:=d60b4aa9d47d75e906dfd812528a1bc28e91f5af72a9d9275056b71b19d99f04 +PKG_SOURCE_DATE:=2022-11-10 +PKG_SOURCE_VERSION:=039b88f75367203e540009cc97603b1bce3fafa6 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -24,8 +24,7 @@ PKG_MAINTAINER:=John Crispin PKG_ASLR_PIE_REGULAR:=1 PKG_CONFIG_DEPENDS:= \ - CONFIG_TARGET_INIT_PATH CONFIG_KERNEL_SECCOMP \ - CONFIG_PROCD_SHOW_BOOT CONFIG_PROCD_ZRAM_TMPFS \ + CONFIG_TARGET_INIT_PATH CONFIG_KERNEL_SECCOMP CONFIG_PROCD_SHOW_BOOT \ CONFIG_KERNEL_NAMESPACES CONFIG_PACKAGE_procd-ujail CONFIG_PACKAGE_procd-seccomp include $(INCLUDE_DIR)/package.mk @@ -72,25 +71,17 @@ define Package/procd-ujail TITLE:=OpenWrt process jail helper endef -define Package/procd-ujail-console - SECTION:=base - CATEGORY:=Base system - DEPENDS:=+procd-ujail +libubus +libubox - TITLE:=OpenWrt process jail console -endef - define Package/procd-seccomp SECTION:=base CATEGORY:=Base system - DEPENDS:=@(aarch64||arm||armeb||mips||mipsel||i386||powerpc||x86_64) @!TARGET_uml \ - @KERNEL_SECCOMP +libubox +libblobmsg-json + DEPENDS:=@SECCOMP +libubox +libblobmsg-json TITLE:=OpenWrt process seccomp helper + utrace endef define Package/uxc SECTION:=base CATEGORY:=Base system - DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd + DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd +PACKAGE_uxc:rpcd TITLE:=OpenWrt container management MAINTAINER:=Daniel Golle endef @@ -104,10 +95,6 @@ config PROCD_SHOW_BOOT default n prompt "Print the shutdown to the console as well as logging it to syslog" -config PROCD_ZRAM_TMPFS - bool - default n - prompt "Mount /tmp using zram." endmenu endef @@ -119,10 +106,6 @@ ifeq ($(CONFIG_PROCD_SHOW_BOOT),y) CMAKE_OPTIONS += -DSHOW_BOOT_ON_CONSOLE=1 endif -ifeq ($(CONFIG_PROCD_ZRAM_TMPFS),y) - CMAKE_OPTIONS += -DZRAM_TMPFS=1 -endif - ifdef CONFIG_PACKAGE_procd-ujail CMAKE_OPTIONS += -DJAIL_SUPPORT=1 endif @@ -138,6 +121,7 @@ define Package/procd/install $(INSTALL_BIN) ./files/reload_config $(1)/sbin/ $(INSTALL_CONF) ./files/hotplug*.json $(1)/etc/ $(INSTALL_DATA) ./files/procd.sh $(1)/lib/functions/ + $(INSTALL_BIN) ./files/service $(1)/sbin/service endef Package/procd-selinux/install = $(Package/procd/install) @@ -147,11 +131,6 @@ define Package/procd-ujail/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ujail $(1)/sbin/ endef -define Package/procd-ujail-console/install - $(INSTALL_DIR) $(1)/sbin - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ujail-console $(1)/sbin/ -endef - define Package/procd-seccomp/install $(INSTALL_DIR) $(1)/sbin $(1)/lib $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libpreload-seccomp.so $(1)/lib @@ -174,6 +153,5 @@ endef $(eval $(call BuildPackage,procd)) $(eval $(call BuildPackage,procd-selinux)) $(eval $(call BuildPackage,procd-ujail)) -$(eval $(call BuildPackage,procd-ujail-console)) $(eval $(call BuildPackage,procd-seccomp)) $(eval $(call BuildPackage,uxc)) diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index 7e0f129d3..b930b307a 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -7,9 +7,19 @@ [ "has", "MINOR" ] ], [ + [ "if", + [ "eq", "DEVNAME", "null" ], + [ + [ "makedev", "/dev/%DEVNAME%", "0666" ], + [ "exec", "/bin/ln", "-s", "/proc/self/fd/0", "/dev/stdin" ], + [ "exec", "/bin/ln", "-s", "/proc/self/fd/1", "/dev/stdout" ], + [ "exec", "/bin/ln", "-s", "/proc/self/fd/2", "/dev/stderr" ], + [ "return" ] + ] + ], [ "if", [ "eq", "DEVNAME", - [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ] + [ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ] ], [ [ "makedev", "/dev/%DEVNAME%", "0666" ], diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 3be496fbb..5148b2f03 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -48,6 +48,15 @@ _PROCD_SERVICE= procd_lock() { local basescript=$(readlink "$initscript") local service_name="$(basename ${basescript:-$initscript})" + + flock -n 1000 &> /dev/null + if [ "$?" != "0" ]; then + exec 1000>"$IPKG_INSTROOT/var/lock/procd_${service_name}.lock" + flock 1000 + if [ "$?" != "0" ]; then + logger "warning: procd flock for $service_name failed" + fi + fi } _procd_call() { @@ -189,7 +198,6 @@ _procd_add_jail() { netns) json_add_boolean "netns" "1";; userns) json_add_boolean "userns" "1";; cgroupsns) json_add_boolean "cgroupsns" "1";; - console) json_add_boolean "console" "1";; esac done json_add_object "mount" @@ -355,14 +363,15 @@ _procd_add_mount_trigger() { } _procd_add_action_mount_trigger() { + local action="$1" + shift + local mountpoints="$(procd_get_mountpoints "$@")" + [ "${mountpoints//[[:space:]]}" ] || return 0 local script=$(readlink "$initscript") local name=$(basename ${script:-$initscript}) - local action="$1" - local mpath - shift _procd_open_trigger - _procd_add_mount_trigger mount.add $action "$@" + _procd_add_mount_trigger mount.add $action "$mountpoints" _procd_close_trigger } @@ -376,7 +385,7 @@ procd_get_mountpoints() { target="${target%%/}/" [ "$path" != "${path##$target}" ] && echo "${target%%/}" } - + local mpath config_load fstab for mpath in "$@"; do config_foreach __procd_check_mount mount "$mpath" @@ -385,11 +394,11 @@ procd_get_mountpoints() { } _procd_add_restart_mount_trigger() { - _procd_add_action_mount_trigger restart $(procd_get_mountpoints "$@") + _procd_add_action_mount_trigger restart "$@" } _procd_add_reload_mount_trigger() { - _procd_add_action_mount_trigger reload $(procd_get_mountpoints "$@") + _procd_add_action_mount_trigger reload "$@" } _procd_add_raw_trigger() { @@ -626,6 +635,7 @@ _procd_wrapper \ procd_add_mount_trigger \ procd_add_reload_trigger \ procd_add_reload_interface_trigger \ + procd_add_action_mount_trigger \ procd_add_reload_mount_trigger \ procd_add_restart_mount_trigger \ procd_open_trigger \ diff --git a/package/system/procd/files/service b/package/system/procd/files/service new file mode 100644 index 000000000..0ca705804 --- /dev/null +++ b/package/system/procd/files/service @@ -0,0 +1,30 @@ +#!/bin/sh + +main() { + local service="$1" + shift + + local boot status + + if [ -f "/etc/init.d/${service}" ]; then + /etc/init.d/"${service}" "$@" + exit "$?" + fi + + if [ -n "$service" ]; then + echo "Service \"$service\" not found:" + exit 1 + fi + + echo "Usage: $(basename "$0") [command]" + for service in /etc/init.d/* ; do + boot="$($service enabled && echo "enabled" || echo "disabled" )" + status="$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename "$service")' }" \ + | jsonfilter -q -e "@['$(basename "$service")'].instances[*].running" | uniq)" = "true" ] \ + && echo "running" || echo "stopped" )" + + printf "%-30s\\t%10s\\t%10s\\n" "$service" "$boot" "$status" + done +} + +main "$@" diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init index 1e75b796f..0b51925a7 100644 --- a/package/system/procd/files/uxc.init +++ b/package/system/procd/files/uxc.init @@ -6,17 +6,11 @@ NAME=uxc PROG=/sbin/uxc start_service() { - [ "${__BOOT_UXC}" = "1" ] || return 0 procd_open_instance "uxc" procd_set_param command "$PROG" boot procd_close_instance } -boot() { - __BOOT_UXC=1 - start -} - service_triggers() { - procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot + procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc start } diff --git a/package/system/procd/patches/001-procd_ujail_static_binary_fix.patch b/package/system/procd/patches/001-procd_ujail_static_binary_fix.patch deleted file mode 100644 index 1612b8a8f..000000000 --- a/package/system/procd/patches/001-procd_ujail_static_binary_fix.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/jail/elf.c -+++ b/jail/elf.c -@@ -236,18 +236,18 @@ int elf_load_deps(const char *path, cons - unsigned long load_offset, load_vaddr; - unsigned long interp_offset; - -- if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) { -- ERROR("failed to load the .load section from %s\n", path); -- return -1; -+ if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) { -+ add_path_and_deps(map+interp_offset, 1, -1, 0); - } - -- if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) { -- ERROR("failed to load the .dynamic section from %s\n", path); -- return -1; -+ if (elf_find_section(map, PT_LOAD, &load_offset, NULL, &load_vaddr)) { -+ DEBUG("failed to load the .load section from %s\n", path); -+ return 0; - } - -- if (elf_find_section(map, PT_INTERP, &interp_offset, NULL, NULL) == 0) { -- add_path_and_deps(map+interp_offset, 1, -1, 0); -+ if (elf_find_section(map, PT_DYNAMIC, &dyn_offset, &dyn_size, NULL)) { -+ DEBUG("failed to load the .dynamic section from %s\n", path); -+ return 0; - } - - int clazz = map[EI_CLASS]; diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index 63b4200f7..c63b8acda 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=rpcd -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git -PKG_MIRROR_HASH:=f5a8f4342ef581fb8750fc41c4e7dfee808a97b3e2a53dbf9d7f51e48b35bae6 -PKG_SOURCE_DATE:=2022-05-31 -PKG_SOURCE_VERSION:=1c4825739b3cf19fe429c19eafa82a7f27aa99b3 +PKG_MIRROR_HASH:=18137fa6904b1a7aec03a16a4c25fd9b9689b24ee14d431bacdda9f093339071 +PKG_SOURCE_DATE:=2022-09-21 +PKG_SOURCE_VERSION:=8c852b656bf1622dee1ae2cfa4c083f730c1c539 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC diff --git a/package/system/rpcd/files/rpcd.init b/package/system/rpcd/files/rpcd.init index e410215a2..f75d0e0f0 100755 --- a/package/system/rpcd/files/rpcd.init +++ b/package/system/rpcd/files/rpcd.init @@ -7,7 +7,7 @@ NAME=rpcd PROG=/sbin/rpcd start_service() { - local socket='/var/run/ubus/ubus.sock' + local socket=$(uci -q get rpcd.@rpcd[0].socket) local timeout=$(uci -q get rpcd.@rpcd[0].timeout) procd_open_instance diff --git a/package/system/selinux-policy/Makefile b/package/system/selinux-policy/Makefile index 219ebc799..bcf6b4a3c 100644 --- a/package/system/selinux-policy/Makefile +++ b/package/system/selinux-policy/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=selinux-policy PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git -PKG_VERSION:=0.9 -PKG_MIRROR_HASH:=f1a37a4fc104fbacde3012178fc117b473899360f26a8735156394288441d99c +PKG_VERSION:=1.2.3 +PKG_MIRROR_HASH:=ff1ddca168a6631aeac34352657f424bc4acf5d50b8aa7ff8dfa8c9663ba8538 PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index 9ba4abdd5..ca177b2c4 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ubox -PKG_RELEASE:=2 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2020-10-25 -PKG_SOURCE_VERSION:=9ef886819dd48303d8ced4cdbc9afbf32682535c -PKG_MIRROR_HASH:=e2d93b798b91de98cb003f7b3be97d3d8a2413c8612b527d096c86ac5365cbdd +PKG_SOURCE_DATE:=2022-08-13 +PKG_SOURCE_VERSION:=4c7b720b9c63b826fb9404e454ae54f2ef5649d5 +PKG_MIRROR_HASH:=35178148034dfef36c5fda2bc8217617920bc1a3b86f72efbe87e85048a6a2a8 CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 @@ -33,6 +33,10 @@ define Package/ubox 100:/sbin/modprobe:/sbin/kmodloader endef +define Package/ubox/conffiles +/etc/modules.conf +endef + define Package/getrandom SECTION:=base CATEGORY:=Base system @@ -53,10 +57,11 @@ define Package/getrandom/install endef define Package/ubox/install - $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin + $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin $(1)/etc $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib + $(INSTALL_DATA) ./files/modules.conf $(1)/etc/modules.conf endef define Package/logd/install diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init index c4802d419..c6fdf4429 100644 --- a/package/system/ubox/files/log.init +++ b/package/system/ubox/files/log.init @@ -34,7 +34,7 @@ start_service_daemon() { [ $log_buffer_size -eq 0 -a $log_size -gt 0 ] && log_buffer_size=$log_size [ $log_buffer_size -eq 0 ] && log_buffer_size=64 - procd_open_instance + procd_open_instance logd procd_set_param command "/sbin/logd" procd_append_param command -S "${log_buffer_size}" procd_set_param respawn 5 1 -1 @@ -52,9 +52,12 @@ start_service_file() } [ -z "${log_file}" ] && return + [ "$_BOOT" = "1" ] && + [ "$(procd_get_mountpoints "${log_file}")" ] && return 0 + mkdir -p "$(dirname "${log_file}")" - procd_open_instance + procd_open_instance logfile procd_set_param command "$PROG" -f -F "$log_file" -p "$pid_file" [ -n "${log_size}" ] && procd_append_param command -S "$log_size" procd_close_instance @@ -73,7 +76,7 @@ start_service_remote() [ -z "${log_ip}" ] && return [ -z "${log_hostname}" ] && log_hostname=$(cat /proc/sys/kernel/hostname) - procd_open_instance + procd_open_instance logremote procd_set_param command "$PROG" -f -h "$log_hostname" -r "$log_ip" "${log_port}" -p "$pid_file" case "${log_proto}" in "udp") procd_append_param command -u;; @@ -83,10 +86,17 @@ start_service_remote() procd_close_instance } +register_mount_trigger() +{ + [ -n "${log_file}" ] && procd_add_action_mount_trigger start "${log_file}" +} + service_triggers() { + config_load system procd_add_reload_trigger "system" procd_add_validation validate_log_section + config_foreach validate_log_section system register_mount_trigger } start_service() @@ -96,3 +106,7 @@ start_service() config_foreach validate_log_section system start_service_file config_foreach validate_log_section system start_service_remote } + +boot() { + _BOOT=1 start +} diff --git a/package/system/ubox/files/modules.conf b/package/system/ubox/files/modules.conf new file mode 100644 index 000000000..f54345fe4 --- /dev/null +++ b/package/system/ubox/files/modules.conf @@ -0,0 +1,3 @@ +# examples: +# options mod1 option=val +# blacklist mod2 diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index 9b29bf0e0..c70defcaf 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ubus -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2021-06-03 -PKG_SOURCE_VERSION:=a8cf678230ed163ff7a07eb1e2c872f9d655460a -PKG_MIRROR_HASH:=aee34cd1c1aa0f1a459dda0b2c6cbdb6b66e67147ebd1bcbb2a16a2ef923d008 +PKG_SOURCE_DATE:=2022-06-01 +PKG_SOURCE_VERSION:=2bebf93cd3343fe49f22a05ef935e460d2d44f67 +PKG_MIRROR_HASH:=4efd873928089c086bbac02f3ca5bae55904500b6e6f1c4c377181a00b67147f PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) CMAKE_INSTALL:=1 @@ -15,7 +15,6 @@ PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= PKG_MAINTAINER:=Felix Fietkau -PKG_FLAGS := nonshared PKG_ASLR_PIE_REGULAR:=1 include $(INCLUDE_DIR)/package.mk diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile index 3d9fdf739..48e5bcc4d 100644 --- a/package/system/uci/Makefile +++ b/package/system/uci/Makefile @@ -9,22 +9,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uci -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE=2021-04-14 -PKG_SOURCE_VERSION:=4b3db1179747b6a6779029407984bacef851325c -PKG_MIRROR_HASH:=9d00b5056a0dd4094c7e19f1a0ecaffa90409f22ea28f164d0e36febd06e37d1 +PKG_SOURCE_DATE=2021-10-22 +PKG_SOURCE_VERSION:=f84f49f00fb70364f58b4cce72f1796a7190d370 +PKG_MIRROR_HASH:=9f4747a029976b43fcea9919643ce71e587e515edc21b280163f7262360d847f PKG_LICENSE:=LGPL-2.1 PKG_LICENSE_FILES:= PKG_MAINTAINER:=Felix Fietkau -PKG_BUILD_PARALLEL:=0 -PKG_FLAGS := nonshared - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/system/uci/files/lib/config/uci.sh b/package/system/uci/files/lib/config/uci.sh index 8d32cd174..6ebfb73ae 100644 --- a/package/system/uci/files/lib/config/uci.sh +++ b/package/system/uci/files/lib/config/uci.sh @@ -149,6 +149,14 @@ uci_remove_list() { /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} del_list "$PACKAGE.$CONFIG.$OPTION=$VALUE" } +uci_revert() { + local PACKAGE="$1" + local CONFIG="$2" + local OPTION="$3" + + /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} revert "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}" +} + uci_commit() { local PACKAGE="$1" /sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit $PACKAGE diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile index f36b492a4..bfee18470 100644 --- a/package/system/urngd/Makefile +++ b/package/system/urngd/Makefile @@ -12,8 +12,6 @@ PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f PKG_LICENSE:=GPL-2.0 BSD-3-Clause PKG_LICENSE_FILES:= -PKG_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/package/system/urngd/patches/0001-fix-high-cpu-usage-with-docker.patch b/package/system/urngd/patches/0001-fix-high-cpu-usage-with-docker.patch index a76f7dc15..0be9c5fa2 100644 --- a/package/system/urngd/patches/0001-fix-high-cpu-usage-with-docker.patch +++ b/package/system/urngd/patches/0001-fix-high-cpu-usage-with-docker.patch @@ -1,8 +1,6 @@ -diff --git a/urngd.c b/urngd.c -index 35ccdec..410d300 100644 --- a/urngd.c +++ b/urngd.c -@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urngd *u) +@@ -129,9 +129,14 @@ static size_t gather_entropy(struct urng static void low_entropy_cb(struct uloop_fd *ufd, unsigned int events) { struct urngd *u = container_of(ufd, struct urngd, rnd_fd); @@ -16,4 +14,5 @@ index 35ccdec..410d300 100644 + sleep(60); + } } - \ No newline at end of file + + static void urngd_done(struct urngd *u) diff --git a/package/system/zram-swap/Makefile b/package/system/zram-swap/Makefile index 80f87fcdf..d0d1baddd 100644 --- a/package/system/zram-swap/Makefile +++ b/package/system/zram-swap/Makefile @@ -1,14 +1,11 @@ +# SPDX-License-Identifier: GPL-2.0-only # -# Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# Copyright (C) 2013-2021 OpenWrt.org include $(TOPDIR)/rules.mk PKG_NAME:=zram-swap -PKG_RELEASE:=8 +PKG_RELEASE:=$(AUTORELEASE) PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index 3c5466737..1a9cefeff 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -2,9 +2,8 @@ START=15 -EXTRA_COMMANDS="compact status" -EXTRA_HELP=" compact Trigger compaction for all Z-RAM swap dev's -status Print out information & statistics about Z-RAM swap devices" +extra_command "compact" "Trigger compaction for all zram swap devices" +extra_command "status" "Print out information & statistics about zram swap devices" ram_getsize() { @@ -26,31 +25,6 @@ zram_getsize() # in megabytes fi } -zram_applicable() -{ - local zram_dev="$1" - - [ -e "$zram_dev" ] || { - logger -s -t zram_applicable -p daemon.crit "[ERROR] device '$zram_dev' not found" - return 1 - } - - [ -x /sbin/mkswap ] || { - logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox mkswap' not installed" - return 1 - } - - [ -x /sbin/swapon ] || { - logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapon' not installed" - return 1 - } - - [ -x /sbin/swapoff ] || { - logger -s -t zram_applicable -p daemon.err "[ERROR] 'BusyBox swapoff' not installed" - return 1 - } -} - zram_dev() { local idx="$1" @@ -86,15 +60,15 @@ zram_comp_algo() local zram_comp_algo="$( uci -q get system.@system[0].zram_comp_algo )" if [ -z "$zram_comp_algo" ]; then - # lzo-rle fails on small RAM devices, default to lzo, which is always available + # default to lzo, which is always available zram_comp_algo="lzo" fi if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then - logger -s -t zram_comp_algo -p daemon.debug "Set compression algorithm '$zram_comp_algo' for zram '$dev'" + logger -s -t zram_comp_algo -p daemon.debug "set compression algorithm '$zram_comp_algo' for zram '$dev'" echo $zram_comp_algo > "/sys/block/$( basename $dev )/comp_algorithm" else - logger -s -t zram_comp_algo -p daemon.debug "Compression algorithm '$zram_comp_algo' is not supported for '$dev'" + logger -s -t zram_comp_algo -p daemon.debug "compression algorithm '$zram_comp_algo' is not supported for '$dev'" fi } @@ -105,7 +79,7 @@ zram_stats() printf "\nGathering stats info for zram device \"$( basename "$1" )\"\n\n" - printf "Z-RAM\n-----\n" + printf "ZRAM\n----\n" printf "%-25s - %s\n" "Block device" $zdev awk '{ printf "%-25s - %d MiB\n", "Device size", $1/1024/1024 }' <$zdev/disksize printf "%-25s - %s\n" "Compression algo" "$(cat $zdev/comp_algorithm)" @@ -157,23 +131,31 @@ start() } if [ $( grep -cs zram /proc/swaps ) -ne 0 ]; then - logger -s -t zram_start -p daemon.notice "[OK] zram swap is already mounted" + logger -s -t zram_start -p daemon.notice "zram swap is already mounted" return 1 fi - local zram_size="$( zram_getsize )" local zram_dev="$( zram_getdev )" - zram_applicable "$zram_dev" || return 1 - local zram_priority="$( uci -q get system.@system[0].zram_priority )" - zram_priority=${zram_priority:+-p $zram_priority} - logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MegaBytes)" + [ -e "$zram_dev" ] || { + logger -s -t zram_start -p daemon.crit "[ERROR] device '$zram_dev' not found" + return 1 + } + + local zram_size="$( zram_getsize )" + local zram_priority="$( uci -q get system.@system[0].zram_priority )" + + if [ -z "$zram_priority" ]; then + zram_priority="100" + fi + + logger -s -t zram_start -p daemon.debug "activating '$zram_dev' for swapping ($zram_size MiB)" zram_reset "$zram_dev" "enforcing defaults" zram_comp_algo "$zram_dev" echo $(( $zram_size * 1024 * 1024 )) >"/sys/block/$( basename "$zram_dev" )/disksize" - /sbin/mkswap "$zram_dev" - /sbin/swapon -d $zram_priority "$zram_dev" + busybox mkswap "$zram_dev" + busybox swapon -d -p $zram_priority "$zram_dev" } stop() @@ -182,7 +164,7 @@ stop() for zram_dev in $( grep zram /proc/swaps |awk '{print $1}' ); do { logger -s -t zram_stop -p daemon.debug "deactivate swap $zram_dev" - /sbin/swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back" + busybox swapoff "$zram_dev" && zram_reset "$zram_dev" "claiming memory back" local dev_index="$( echo $zram_dev | grep -o "[0-9]*$" )" if [ $dev_index -ne 0 ]; then logger -s -t zram_stop -p daemon.debug "removing zram $zram_dev" diff --git a/package/utils/bcm27xx-userland/Makefile b/package/utils/bcm27xx-userland/Makefile index 098c039f1..857db7969 100644 --- a/package/utils/bcm27xx-userland/Makefile +++ b/package/utils/bcm27xx-userland/Makefile @@ -8,16 +8,18 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcm27xx-userland -PKG_VERSION:=4a0a19b88b43e48c6b51b526b9378289fb712a4c -PKG_RELEASE:=1 +PKG_VERSION:=c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/raspberrypi/userland/tar.gz/$(PKG_VERSION)? -PKG_HASH:=0f42d48095d1f680cbe8781c2e974b76bdd0507aaef64cce8b8b472ca3a09588 +PKG_HASH:=ab8a5b27c34cf1b97de87b895448a6355229f73b679866b47c51a723273cc8ae PKG_FLAGS:=nonshared PKG_MAINTAINER:=Álvaro Fernández Rojas +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENCE CMAKE_INSTALL:=1 CMAKE_OPTIONS+=-DVMCS_INSTALL_PREFIX=/usr @@ -46,6 +48,19 @@ define Package/bcm27xx-userland/description BCM27xx userland tools including vcgencmd and tvservice. endef +define Package/bcm27xx-userland-dev + SECTION:=devel + CATEGORY:=Development + SUBMENU:=Libraries + DEPENDS:=@TARGET_bcm27xx +bcm27xx-userland + TITLE:=Development files of BCM27xx userland tools +endef + +define Package/bcm27xx-userland-dev/description + This package contains the header and static libraries of + the BCM27xx userland tools. +endef + define Package/bcm27xx-userland/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin @@ -61,11 +76,22 @@ endif $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin + $(INSTALL_DIR) $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/usr/lib/ +ifneq ($(ARCH),aarch64) + $(INSTALL_DIR) $(1)/usr/lib/plugins + $(CP) $(PKG_INSTALL_DIR)/usr/lib/plugins/ $(1)/usr/lib/ +endif +endef + +define Package/bcm27xx-userland-dev/install $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/ $(1)/usr/ - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/ $(1)/usr/ + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.a $(1)/usr/lib/ endef $(eval $(call BuildPackage,bcm27xx-userland)) +$(eval $(call BuildPackage,bcm27xx-userland-dev)) diff --git a/package/utils/bcm4908img/Makefile b/package/utils/bcm4908img/Makefile index c18ac958f..fbb91fba7 100644 --- a/package/utils/bcm4908img/Makefile +++ b/package/utils/bcm4908img/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bcm4908img -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_FLAGS:=nonshared diff --git a/package/utils/bcm4908img/src/bcm4908img.c b/package/utils/bcm4908img/src/bcm4908img.c index 402d31719..240fe895d 100644 --- a/package/utils/bcm4908img/src/bcm4908img.c +++ b/package/utils/bcm4908img/src/bcm4908img.c @@ -77,13 +77,14 @@ struct bcm4908img_tail { * 4. padding ├─ firmware * 5. rootfs ─┘ * 6. BCM4908 tail + * 7. (Optional) vendor tail */ struct bcm4908img_info { - size_t file_size; size_t cferom_offset; size_t bootfs_offset; size_t padding_offset; size_t rootfs_offset; + size_t tail_offset; uint32_t crc32; /* Calculated checksum */ struct bcm4908img_tail tail; }; @@ -219,7 +220,7 @@ static int bcm4908img_calc_crc32(FILE *fp, struct bcm4908img_info *info) { fseek(fp, info->cferom_offset, SEEK_SET); info->crc32 = 0xffffffff; - length = info->file_size - info->cferom_offset - sizeof(struct bcm4908img_tail); + length = info->tail_offset - info->cferom_offset; while (length && (bytes = fread(buf, 1, bcm4908img_min(sizeof(buf), length), fp)) > 0) { info->crc32 = bcm4908img_crc32(info->crc32, buf, bytes); length -= bytes; @@ -249,6 +250,16 @@ struct chk_header { char board_id[0]; }; +struct linksys_tail { + char magic[9]; + uint8_t version[8]; + char model[15]; + uint32_t crc32; + uint8_t padding[9]; + uint8_t signature[16]; + uint8_t reserved[192]; +}; + static bool bcm4908img_is_all_ff(const void *buf, size_t length) { const uint8_t *in = buf; @@ -264,9 +275,11 @@ static bool bcm4908img_is_all_ff(const void *buf, size_t length) static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { struct bcm4908img_tail *tail = &info->tail; + struct linksys_tail *linksys; struct chk_header *chk; struct stat st; uint8_t buf[1024]; + size_t file_size; uint16_t tmp16; size_t length; size_t bytes; @@ -281,7 +294,9 @@ static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { fprintf(stderr, "Failed to fstat: %d\n", err); return err; } - info->file_size = st.st_size; + file_size = st.st_size; + + info->tail_offset = file_size - sizeof(*tail); /* Vendor formats */ @@ -294,10 +309,20 @@ static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { if (be32_to_cpu(chk->magic) == 0x2a23245e) info->cferom_offset = be32_to_cpu(chk->header_len); + fseek(fp, -sizeof(buf), SEEK_END); + if (fread(buf, 1, sizeof(buf), fp) != sizeof(buf)) { + fprintf(stderr, "Failed to read file header\n"); + return -EIO; + } + linksys = (void *)(buf + sizeof(buf) - sizeof(*linksys)); + if (!memcmp(linksys->magic, ".LINKSYS.", sizeof(linksys->magic))) { + info->tail_offset -= sizeof(*linksys); + } + /* Offsets */ for (info->bootfs_offset = info->cferom_offset; - info->bootfs_offset < info->file_size; + info->bootfs_offset < info->tail_offset; info->bootfs_offset += 0x20000) { if (fseek(fp, info->bootfs_offset, SEEK_SET)) { err = -errno; @@ -311,13 +336,13 @@ static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { if (be16_to_cpu(tmp16) == 0x8519) break; } - if (info->bootfs_offset >= info->file_size) { + if (info->bootfs_offset >= info->tail_offset) { fprintf(stderr, "Failed to find bootfs offset\n"); return -EPROTO; } for (info->rootfs_offset = info->bootfs_offset; - info->rootfs_offset < info->file_size; + info->rootfs_offset < info->tail_offset; info->rootfs_offset += 0x20000) { uint32_t *magic = (uint32_t *)&buf[0]; @@ -340,7 +365,7 @@ static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { if (be32_to_cpu(*magic) == UBI_EC_HDR_MAGIC) break; } - if (info->rootfs_offset >= info->file_size) { + if (info->rootfs_offset >= info->tail_offset) { fprintf(stderr, "Failed to find rootfs offset\n"); return -EPROTO; } @@ -351,7 +376,7 @@ static int bcm4908img_parse(FILE *fp, struct bcm4908img_info *info) { fseek(fp, info->cferom_offset, SEEK_SET); info->crc32 = 0xffffffff; - length = info->file_size - info->cferom_offset - sizeof(*tail); + length = info->tail_offset - info->cferom_offset; while (length && (bytes = fread(buf, 1, bcm4908img_min(sizeof(buf), length), fp)) > 0) { info->crc32 = bcm4908img_crc32(info->crc32, buf, bytes); length -= bytes; @@ -617,10 +642,10 @@ static int bcm4908img_extract(int argc, char **argv) { length = (info.padding_offset ? info.padding_offset : info.rootfs_offset) - offset; } else if (!strcmp(type, "rootfs")) { offset = info.rootfs_offset; - length = info.file_size - offset - sizeof(struct bcm4908img_tail); + length = info.tail_offset - offset; } else if (!strcmp(type, "firmware")) { offset = info.bootfs_offset; - length = info.file_size - offset - sizeof(struct bcm4908img_tail); + length = info.tail_offset - offset; } else { err = -EINVAL; fprintf(stderr, "Unsupported extract type: %s\n", type); diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 940b32d68..abe6d5431 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -336,10 +336,10 @@ config BUSYBOX_DEFAULT_FEATURE_GUNZIP_LONG_OPTIONS default n config BUSYBOX_DEFAULT_BUNZIP2 bool - default y + default n config BUSYBOX_DEFAULT_BZCAT bool - default y + default n config BUSYBOX_DEFAULT_UNLZMA bool default n diff --git a/package/utils/busybox/files/cron b/package/utils/busybox/files/cron index 28985ff18..4efdfa52c 100755 --- a/package/utils/busybox/files/cron +++ b/package/utils/busybox/files/cron @@ -4,7 +4,7 @@ START=50 USE_PROCD=1 -PROG=crond +PROG=/usr/sbin/crond validate_cron_section() { uci_validate_section system system "${1}" \ diff --git a/package/utils/busybox/patches/530-nslookup-ensure-unique-transaction-IDs-for-the-DNS-queries.patch b/package/utils/busybox/patches/530-nslookup-ensure-unique-transaction-IDs-for-the-DNS-queries.patch new file mode 100644 index 000000000..caa5ee78f --- /dev/null +++ b/package/utils/busybox/patches/530-nslookup-ensure-unique-transaction-IDs-for-the-DNS-queries.patch @@ -0,0 +1,42 @@ +From: Uwe Kleine-König +Date: Sat, 8 Oct 2022 19:22:52 +0200 +Subject: [PATCH] nslookup: ensure unique transaction IDs for the DNS queries + +The transaction IDs generated by res_mkquery() for both glibc and musl only +depends on the state of the monotonic clock. +For some machines (here: a TP-Link RE200 powered by a MediaTek MT7620A) +the monotonic clock has a coarse resolution (here: 20 µs) and it can happen +that the requests for A and AAAA share the same transaction ID. + +In that case the mapping from received responses to the sent queries +doesn't work and name resolution fails as follows: + + # /bin/busybox nslookup heise.de + Server: 127.0.0.1 + Address: 127.0.0.1:53 + + Non-authoritative answer: + Name: heise.de + Address: 193.99.144.80 + + *** Can't find heise.de: No answer + +because the AAAA reply is dropped as a duplicate reply to the A query. + +To prevent this make sure the transaction IDs are unique. + +Forwarded: http://lists.busybox.net/pipermail/busybox/2022-October/089911.html +--- +--- a/networking/nslookup.c ++++ b/networking/nslookup.c +@@ -978,6 +978,10 @@ int nslookup_main(int argc UNUSED_PARAM, + } + } + ++ /* Ensure the Transaction IDs are unique */ ++ for (rc = 1; rc < G.query_count; rc++) ++ G.query[rc].query[1] = G.query[rc - 1].query[1] + 1; ++ + for (rc = 0; rc < G.serv_count;) { + int c; + diff --git a/package/utils/busybox/patches/900-add-e-f-option-for-docker.patch b/package/utils/busybox/patches/900-add-e-f-option-for-docker.patch index cf2b68305..41f1b0098 100644 --- a/package/utils/busybox/patches/900-add-e-f-option-for-docker.patch +++ b/package/utils/busybox/patches/900-add-e-f-option-for-docker.patch @@ -1,6 +1,6 @@ --- a/procps/ps.c -+++ a/procps/ps.c -@@ -665,7 +665,7 @@ ++++ b/procps/ps.c +@@ -668,7 +668,7 @@ int ps_main(int argc UNUSED_PARAM, char int w_count = 0; make_all_argv_opts(argv); opts = getopt32(argv, "^" diff --git a/package/utils/checkpolicy/Makefile b/package/utils/checkpolicy/Makefile index 206bf201c..e9c10e293 100644 --- a/package/utils/checkpolicy/Makefile +++ b/package/utils/checkpolicy/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=checkpolicy -PKG_VERSION:=3.2 +PKG_VERSION:=3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2 -PKG_HASH:=9b1c81fa86fe3867842164448d90c8e7ea94b2987497809c65d4caa87a5c5bc8 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=25c84edfa3a10ab8cb073b97bc55cb66377532d54a2723da9accdabd05431485 PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=libselinux HOST_BUILD_DEPENDS:=libselinux/host diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile index 0d243302c..99d402af6 100644 --- a/package/utils/f2fs-tools/Makefile +++ b/package/utils/f2fs-tools/Makefile @@ -8,16 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=f2fs-tools -PKG_VERSION:=1.14.0 +PKG_VERSION:=1.15.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/ -PKG_HASH:=619263d4e2022152a1472c1d912eaae104f20bd227ce0bb9d41d1d6608094bd1 +PKG_HASH:=147d471040b44900283ce2c935f1d35d13d7f40008e7cb8fab2b69f54da01a4f PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING +PKG_CPE_ID:=cpe:/a:f2fs-tools_project:f2fs-tools PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 @@ -85,6 +86,7 @@ define Package/libf2fs DEPENDS:=+libuuid ABI_VERSION:=6 CONFLICTS:=libf2fs-selinux + VARIANT:=default endef define Package/libf2fs-selinux @@ -93,11 +95,14 @@ define Package/libf2fs-selinux TITLE:=Library for Flash-Friendly File System (F2FS) tools with SELinux support DEPENDS:=+libuuid +libselinux ABI_VERSION:=6 + VARIANT:=selinux endef CONFIGURE_ARGS += \ --disable-static \ - --without-blkid + --without-blkid \ + --without-lzo2 \ + --without-lz4 ifneq ($(BUILD_VARIANT),selinux) CONFIGURE_ARGS += --without-selinux diff --git a/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch b/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch new file mode 100644 index 000000000..a7fb50a63 --- /dev/null +++ b/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch @@ -0,0 +1,88 @@ +From 9af8ee5baceab59d46154c96da62b52935f363fe Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Mon, 27 Jun 2022 20:43:11 +0200 +Subject: [PATCH] configure.ac: fix AC_ARG_WITH + +In the new version the configuration no longer respects the +--without/--with blkid/selinux parameters. Add the tests for +"with_blkid" and "with_selinux" back to configure.ac as described +in the manual. + +Link: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html + +Fixes: c48335416a09 ("configure.ac: Enable cross-compilation") + +Signed-off-by: Nick Hainke +--- + configure.ac | 44 ++++++++++++++++++++++++++++++-------------- + 1 file changed, 30 insertions(+), 14 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -39,12 +39,16 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign + + # Test configure options. + AC_ARG_WITH([selinux], +- AS_HELP_STRING([--without-selinux], +- [Ignore presence of libselinux and disable selinux support])) ++ [AS_HELP_STRING([--without-selinux], ++ [Ignore presence of libselinux and disable selinux support])], ++ [], ++ [with_selinux=check]) + + AC_ARG_WITH([blkid], +- AS_HELP_STRING([--without-blkid], +- [Ignore presence of libblkid and disable blkid support])) ++ [AS_HELP_STRING([--without-blkid], ++ [Ignore presence of libblkid and disable blkid support])], ++ [], ++ [with_blkid=check]) + + # Checks for programs. + AC_PROG_CC +@@ -55,11 +59,17 @@ AC_PATH_PROG([LDCONFIG], [ldconfig], + [$PATH:/sbin]) + + # Checks for libraries. +-AC_CHECK_LIB([blkid], [blkid_probe_all], +- [AC_SUBST([libblkid_LIBS], ["-lblkid"]) +- AC_DEFINE([HAVE_LIBBLKID], [1], +- [Define if you have libblkid]) +- ], [], []) ++AS_IF([test "x$with_blkid" != xno], ++ [AC_CHECK_LIB([blkid], [blkid_probe_all], ++ [AC_SUBST([libblkid_LIBS], ["-lblkid"]) ++ AC_DEFINE([HAVE_LIBBLKID], [1], ++ [Define if you have libblkid]) ++ ], ++ [if test "x$with_blkid" != xcheck; then ++ AC_MSG_FAILURE( ++ [--with-blkid was given, but test for blkid failed]) ++ fi ++ ], -lblkid)]) + + AC_CHECK_LIB([lzo2], [main], + [AC_SUBST([liblzo2_LIBS], ["-llzo2"]) +@@ -73,11 +83,17 @@ AC_CHECK_LIB([lz4], [main], + [Define if you have liblz4]) + ], [], []) + +-AC_CHECK_LIB([selinux], [getcon], +- [AC_SUBST([libselinux_LIBS], ["-lselinux"]) +- AC_DEFINE([HAVE_LIBSELINUX], [1], +- [Define if you have libselinux]) +- ], [], []) ++AS_IF([test "x$with_selinux" != xno], ++ [AC_CHECK_LIB([selinux], [getcon], ++ [AC_SUBST([libselinux_LIBS], ["-lselinux"]) ++ AC_DEFINE([HAVE_LIBSELINUX], [1], ++ [Define if you have libselinux]) ++ ], ++ [if test "x$with_selinux" != xcheck; then ++ AC_MSG_FAILURE( ++ [--with-selinux was given, but test for selinux failed]) ++ fi ++ ], -lselinux)]) + + AC_CHECK_LIB([uuid], [uuid_clear], + [AC_SUBST([libuuid_LIBS], ["-luuid"]) diff --git a/package/utils/f2fs-tools/patches/101-configure.ac-fix-cross-compilation.patch b/package/utils/f2fs-tools/patches/101-configure.ac-fix-cross-compilation.patch new file mode 100644 index 000000000..b9edd6634 --- /dev/null +++ b/package/utils/f2fs-tools/patches/101-configure.ac-fix-cross-compilation.patch @@ -0,0 +1,80 @@ +From 821a1d3fcce31c234512a8f4dc4fc97dfbd7ae32 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Mon, 4 Jul 2022 09:46:10 +0200 +Subject: [PATCH] configure.ac: fix cross compilation + +AC_CHECK_LIB seems to not work correctly with OpenWrt. Add possibility +to disable lz4 and lzo2 manually. + +Fixes errors in the form of: + Package f2fsck is missing dependencies for the following libraries: + liblz4.so.1 + liblzo2.so.2 + +Signed-off-by: Nick Hainke +--- + configure.ac | 44 ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 34 insertions(+), 10 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -50,6 +50,18 @@ AC_ARG_WITH([blkid], + [], + [with_blkid=check]) + ++AC_ARG_WITH([lzo2], ++ [AS_HELP_STRING([--without-lzo2], ++ [Ignore presence of liblzo2 and disable lzo2 support])], ++ [], ++ [with_lzo2=check]) ++ ++AC_ARG_WITH([lz4], ++ [AS_HELP_STRING([--without-lz4], ++ [Ignore presence of liblz4 and disable lz4 support])], ++ [], ++ [with_lz4=check]) ++ + # Checks for programs. + AC_PROG_CC + AM_PROG_AR +@@ -71,17 +83,29 @@ AS_IF([test "x$with_blkid" != xno], + fi + ], -lblkid)]) + +-AC_CHECK_LIB([lzo2], [main], +- [AC_SUBST([liblzo2_LIBS], ["-llzo2"]) +- AC_DEFINE([HAVE_LIBLZO2], [1], +- [Define if you have liblzo2]) +- ], [], []) +- +-AC_CHECK_LIB([lz4], [main], +- [AC_SUBST([liblz4_LIBS], ["-llz4"]) +- AC_DEFINE([HAVE_LIBLZ4], [1], +- [Define if you have liblz4]) +- ], [], []) ++AS_IF([test "x$with_lzo2" != xno], ++ [AC_CHECK_LIB([lzo2], [main], ++ [AC_SUBST([liblzo2_LIBS], ["-llzo2"]) ++ AC_DEFINE([HAVE_LIBLZO2], [1], ++ [Define if you have liblzo2]) ++ ], ++ [if test "x$with_lzo2" != xcheck; then ++ AC_MSG_FAILURE( ++ [--with-lzo2 was given, but test for lzo2 failed]) ++ fi ++ ], -llzo2)]) ++ ++AS_IF([test "x$with_lz4" != xno], ++ [AC_CHECK_LIB([lz4], [main], ++ [AC_SUBST([liblz4_LIBS], ["-llz4"]) ++ AC_DEFINE([HAVE_LIBLZ4], [1], ++ [Define if you have liblz4]) ++ ], ++ [if test "x$with_lz4" != xcheck; then ++ AC_MSG_FAILURE( ++ [--with-lz4 was given, but test for lz4 failed]) ++ fi ++ ], -llz4)]) + + AS_IF([test "x$with_selinux" != xno], + [AC_CHECK_LIB([selinux], [getcon], diff --git a/package/utils/fritz-tools/src/fritz_tffs_nand_read.c b/package/utils/fritz-tools/src/fritz_tffs_nand_read.c index ded0577cf..22b27336f 100644 --- a/package/utils/fritz-tools/src/fritz_tffs_nand_read.c +++ b/package/utils/fritz-tools/src/fritz_tffs_nand_read.c @@ -340,7 +340,7 @@ static int show_matching_key_value(struct tffs_key_name_table *key_names) for (uint32_t i = 0; i < key_names->size; i++) { name = key_names->entries[i].val; - if (strncmp(name, name_filter, strlen(name)) == 0) { + if (strcmp(name, name_filter) == 0) { if (find_entry(key_names->entries[i].id, &tmp)) { print_entry_value(&tmp); printf("\n"); diff --git a/package/utils/fritz-tools/src/fritz_tffs_read.c b/package/utils/fritz-tools/src/fritz_tffs_read.c index d1b3038e6..256c34c41 100644 --- a/package/utils/fritz-tools/src/fritz_tffs_read.c +++ b/package/utils/fritz-tools/src/fritz_tffs_read.c @@ -204,7 +204,7 @@ static int show_matching_key_value(uint8_t *buffer, for (i = 0; i < key_names->size; i++) { name = key_names->entries[i].val; - if (strncmp(name, name_filter, strlen(name)) == 0) { + if (strcmp(name, name_filter) == 0) { id = to_entry_header_id(*key_names->entries[i].id); if (find_entry(buffer, id, &tmp)) { diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile index ac85ef24b..9d7cc4067 100644 --- a/package/utils/lua/Makefile +++ b/package/utils/lua/Makefile @@ -9,14 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua PKG_VERSION:=5.1.5 -PKG_RELEASE:=9 +PKG_RELEASE:=10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.lua.org/ftp/ \ https://www.tecgraf.puc-rio.br/lua/ftp/ PKG_HASH:=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 PKG_BUILD_PARALLEL:=1 -PKG_FLAGS := nonshared PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYRIGHT @@ -126,7 +125,7 @@ endif define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ - CC="$(HOSTCC) -std=gnu99" \ + CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \ $(LUA_OS) endef @@ -135,8 +134,12 @@ define Host/Install INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \ install - $(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua - $(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac + $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/pkgconfig + $(CP) $(HOST_BUILD_DIR)/etc/lua.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua5.1.pc + + $(LN) lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua + $(LN) luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac + $(LN) lua5.1.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua.pc endef define Build/InstallDev diff --git a/package/utils/lua5.3/Makefile b/package/utils/lua5.3/Makefile index 6d1f98ee1..9a707fbba 100644 --- a/package/utils/lua5.3/Makefile +++ b/package/utils/lua5.3/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=lua PKG_VERSION:=5.3.5 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.lua.org/ftp/ \ @@ -110,7 +110,7 @@ endif define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ - CC="$(HOSTCC) -std=gnu99" \ + CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \ $(LUA_OS) endef diff --git a/package/utils/mdadm/Makefile b/package/utils/mdadm/Makefile index f6696bf21..553728194 100644 --- a/package/utils/mdadm/Makefile +++ b/package/utils/mdadm/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mdadm -PKG_VERSION:=4.1 -PKG_RELEASE:=2 +PKG_VERSION:=4.2 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/raid/mdadm -PKG_HASH:=ab7688842908d3583a704d491956f31324c3a5fc9f6a04653cb75d19f1934f4a +PKG_HASH:=461c215670864bb74a4d1a3620684aa2b2f8296dffa06743f26dda5557acf01d PKG_MAINTAINER:=Felix Fietkau PKG_CPE_ID:=cpe:/a:mdadm_project:mdadm @@ -48,11 +48,16 @@ TARGET_CFLAGS += \ -DCONFFILE='\"/var/etc/mdadm.conf\"' \ -DMAP_DIR='\"/var/run/mdadm\"' \ -DMDMON_DIR='\"/var/run/mdadm\"' \ - -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' + -DFAILED_SLOTS_DIR='\"/var/run/mdadm/failed-slots\"' \ + -DNO_LIBUDEV + +TARGET_CXFLAGS = -DNO_LIBUDEV TARGET_LDFLAGS += -Wl,--gc-sections -MAKE_FLAGS += CHECK_RUN_DIR=0 +MAKE_FLAGS += \ + CHECK_RUN_DIR=0 \ + CXFLAGS="$(TARGET_CXFLAGS)" define Build/Compile $(call Build/Compile/Default,mdadm) diff --git a/package/utils/mdadm/patches/100-cross_compile.patch b/package/utils/mdadm/patches/100-cross_compile.patch index 0a5fa017c..790d7755b 100644 --- a/package/utils/mdadm/patches/100-cross_compile.patch +++ b/package/utils/mdadm/patches/100-cross_compile.patch @@ -1,6 +1,6 @@ --- a/Makefile +++ b/Makefile -@@ -97,7 +97,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h +@@ -99,7 +99,7 @@ DLM:=$(shell [ -f /usr/include/libdlm.h DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\" diff --git a/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch b/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch deleted file mode 100644 index 356d0deec..000000000 --- a/package/utils/mdadm/patches/101-mdadm.h-Undefine-dprintf-before-redefining.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 6d369e8f226594632ce4260129509daf7030de0a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 9 May 2016 22:03:57 +0000 -Subject: [PATCH] mdadm.h: Undefine dprintf before redefining - -dprintf is also defined in libc see -usr/include/bits/stdio2.h, this comes into -play especially when fortify sources is enabled -and compilers like clang reports the override - -In file included from policy.c:25: -./mdadm.h:1562:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined] - ^ -/mnt/oe/openembedded-core/build/tmp-glibc/sysroots/qemux86/usr/include/bits/stdio2.h:145:12: note: previous definition is here - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - mdadm.h | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/mdadm.h -+++ b/mdadm.h -@@ -1649,11 +1649,13 @@ static inline char *to_subarray(struct m - } - - #ifdef DEBUG -+#undef dprintf - #define dprintf(fmt, arg...) \ - fprintf(stderr, "%s: %s: "fmt, Name, __func__, ##arg) - #define dprintf_cont(fmt, arg...) \ - fprintf(stderr, fmt, ##arg) - #else -+#undef dprintf - #define dprintf(fmt, arg...) \ - ({ if (0) fprintf(stderr, "%s: %s: " fmt, Name, __func__, ##arg); 0; }) - #define dprintf_cont(fmt, arg...) \ diff --git a/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch b/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch deleted file mode 100644 index 891b5c62f..000000000 --- a/package/utils/mdadm/patches/102-Add-missing-include-file-sys-sysmacros.h.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 452dc4d13a012cdcb05088c0dbc699959c4d6c73 Mon Sep 17 00:00:00 2001 -From: Baruch Siach -Date: Tue, 6 Aug 2019 16:05:23 +0300 -Subject: mdadm.h: include sysmacros.h unconditionally - -musl libc now also requires sys/sysmacros.h for the major/minor macros. -All supported libc implementations carry sys/sysmacros.h, including -diet-libc, klibc, and uclibc-ng. - -Cc: Hauke Mehrtens -Signed-off-by: Baruch Siach -Signed-off-by: Jes Sorensen ---- - mdadm.h | 2 -- - 1 file changed, 2 deletions(-) - ---- a/mdadm.h -+++ b/mdadm.h -@@ -45,10 +45,8 @@ extern __off64_t lseek64 __P ((int __fd, - #include - #include - #include --#ifdef __GLIBC__ - /* Newer glibc requires sys/sysmacros.h directly for makedev() */ - #include --#endif - #ifdef __dietlibc__ - #include - /* dietlibc has deprecated random and srandom!! */ diff --git a/package/utils/mdadm/patches/200-reduce_size.patch b/package/utils/mdadm/patches/200-reduce_size.patch index 6905c2ccf..163e125c2 100644 --- a/package/utils/mdadm/patches/200-reduce_size.patch +++ b/package/utils/mdadm/patches/200-reduce_size.patch @@ -1,19 +1,19 @@ --- a/Incremental.c +++ b/Incremental.c -@@ -1619,6 +1619,10 @@ static int Incremental_container(struct - if (ra_all == ra_blocked) - return 0; +@@ -983,6 +983,10 @@ static int array_try_spare(char *devname + goto next; + } -+#ifndef MDADM_FULL -+ return 0; -+#endif ++ #ifndef MDADM_FULL ++ return 0; ++ #endif + - /* Now move all suitable spares from spare container */ - domains = domain_from_array(list, st->ss->name); - memcpy(suuid, uuid_zero, sizeof(int[4])); + dl = domain_from_array(sra, st2->ss->name); + if (domain_test(dl, pol, st2->ss->name) != 1) { + /* domain test fails */ --- a/util.c +++ b/util.c -@@ -1220,7 +1220,9 @@ void wait_for(char *dev, int fd) +@@ -1147,7 +1147,9 @@ void wait_for(char *dev, int fd) struct superswitch *superlist[] = { &super0, &super1, diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile index 5a4b03da9..afbfbceff 100644 --- a/package/utils/mtd-utils/Makefile +++ b/package/utils/mtd-utils/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtd-utils -PKG_VERSION:=2.1.2 +PKG_VERSION:=2.1.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/ -PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6 +PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/ +PKG_HASH:=386e27fd121699b6b729bc2e8e04dda987b31cca6b16e12fb6cc6dcf26449f46 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf @@ -24,6 +24,7 @@ PKG_BUILD_DEPENDS:=util-linux PKG_LICENSE:=GPLv2 PKG_LICENSE_FILES:= +PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils PKG_MAINTAINER:=John Crispin diff --git a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch index 9778aa6d0..db683063d 100644 --- a/package/utils/mtd-utils/patches/130-lzma_jffs2.patch +++ b/package/utils/mtd-utils/patches/130-lzma_jffs2.patch @@ -1,6 +1,6 @@ --- a/jffsX-utils/Makemodule.am +++ b/jffsX-utils/Makemodule.am -@@ -4,11 +4,19 @@ mkfs_jffs2_SOURCES = \ +@@ -4,7 +4,10 @@ mkfs_jffs2_SOURCES = \ jffsX-utils/compr_zlib.c \ jffsX-utils/compr.h \ jffsX-utils/rbtree.c \ @@ -10,7 +10,12 @@ + jffsX-utils/lzma/LzmaEnc.c \ + jffsX-utils/lzma/LzmaDec.c \ jffsX-utils/compr.c \ - jffsX-utils/compr_rtime.c + jffsX-utils/compr_rtime.c \ + jffsX-utils/compr.h \ +@@ -12,8 +15,13 @@ mkfs_jffs2_SOURCES = \ + jffsX-utils/summary.h \ + include/linux/jffs2.h \ + include/mtd/jffs2-user.h + +if !WITHOUT_LZO +mkfs_jffs2_SOURCES += jffsX-utils/compr_lzo.c @@ -20,7 +25,7 @@ -mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) +mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) -I./include/linux/lzma - jffs2reader_SOURCES = jffsX-utils/jffs2reader.c + jffs2reader_SOURCES = jffsX-utils/jffs2reader.c include/mtd/jffs2-user.h jffs2reader_LDADD = libmtd.a $(ZLIB_LIBS) $(LZO_LIBS) --- a/jffsX-utils/compr.c +++ b/jffsX-utils/compr.c @@ -5015,7 +5020,7 @@ +} --- a/jffsX-utils/mkfs.jffs2.c +++ b/jffsX-utils/mkfs.jffs2.c -@@ -1667,11 +1667,11 @@ int main(int argc, char **argv) +@@ -1668,11 +1668,11 @@ int main(int argc, char **argv) } erase_block_size *= units; diff --git a/package/utils/nvram/Makefile b/package/utils/nvram/Makefile index 863b304d0..b95721128 100644 --- a/package/utils/nvram/Makefile +++ b/package/utils/nvram/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nvram -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) @@ -44,7 +44,11 @@ define Package/nvram/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/nvram $(1)/usr/sbin/ ifneq ($(CONFIG_TARGET_bcm47xx),) $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_BIN) ./files/nvram.init $(1)/etc/init.d/nvram + $(INSTALL_BIN) ./files/nvram-bcm47xx.init $(1)/etc/init.d/nvram +endif +ifneq ($(CONFIG_TARGET_bcm53xx),) + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/nvram-bcm53xx.init $(1)/etc/init.d/nvram endif endef diff --git a/package/utils/nvram/files/nvram.init b/package/utils/nvram/files/nvram-bcm47xx.init similarity index 97% rename from package/utils/nvram/files/nvram.init rename to package/utils/nvram/files/nvram-bcm47xx.init index 467ab2819..4a2bcd16f 100755 --- a/package/utils/nvram/files/nvram.init +++ b/package/utils/nvram/files/nvram-bcm47xx.init @@ -1,7 +1,7 @@ #!/bin/sh /etc/rc.common # NVRAM setup # -# This file handles the NVRAM quirks of various hardware. +# This file handles the NVRAM quirks of various hardware of the bcm47xx target. START=02 alias debug=${DEBUG:-:} @@ -71,7 +71,7 @@ fixup_linksys() { esac } -start() { +boot() { # Don't do any fixups on the WGT634U [ "$(cat /proc/diag/model)" = "Netgear WGT634U" ] && return diff --git a/package/utils/nvram/files/nvram-bcm53xx.init b/package/utils/nvram/files/nvram-bcm53xx.init new file mode 100755 index 000000000..0502cd28b --- /dev/null +++ b/package/utils/nvram/files/nvram-bcm53xx.init @@ -0,0 +1,40 @@ +#!/bin/sh /etc/rc.common +# NVRAM setup +# +# This file handles the NVRAM quirks of various hardware of the bcm53xx target. + +START=02 + +clear_partialboots() { + # clear partialboots + + case $(board_name) in + linksys,panamera) + COMMIT=1 + nvram set partialboots=0 + ;; + esac +} + +set_wireless_led_behaviour() { + # set Broadcom wireless LED behaviour for both radios + # 0:ledbh9 -> Behaviour of 2.4GHz LED + # 1:ledbh9 -> Behaviour of 5GHz LED + # 0x7 makes the wireless LEDs on, when radios are enabled, and blink when there's activity + + case $(board_name) in + asus,rt-ac88u) + COMMIT=1 + nvram set 0:ledbh9=0x7 set 1:ledbh9=0x7 + ;; + esac +} + +boot() { + . /lib/functions.sh + + clear_partialboots + set_wireless_led_behaviour + + [ "$COMMIT" = "1" ] && nvram commit +} diff --git a/package/utils/otrx/Makefile b/package/utils/otrx/Makefile index 2a3ac731a..35c59e273 100644 --- a/package/utils/otrx/Makefile +++ b/package/utils/otrx/Makefile @@ -10,7 +10,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=otrx PKG_RELEASE:=1 -PKG_FLAGS:=nonshared +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git +PKG_SOURCE_DATE:=2021-12-02 +PKG_SOURCE_VERSION:=56e8e19151743c923f48604c457850cf8eb52076 +PKG_MIRROR_HASH:=2a40ac73e8eab0a7a4474cb331b8e2fc972635314b0b5e02a9f2b9a32c5d5f3b include $(INCLUDE_DIR)/package.mk @@ -26,10 +30,12 @@ define Package/otrx/description This package contains an utility that allows validating TRX images. endef +TARGET_CFLAGS += -Wall + define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - CC="$(TARGET_CC)" \ - CFLAGS="$(TARGET_CFLAGS) -Wall" + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + -o $(PKG_BUILD_DIR)/otrx \ + $(PKG_BUILD_DIR)/src/otrx.c endef define Package/otrx/install diff --git a/package/utils/otrx/src/Makefile b/package/utils/otrx/src/Makefile deleted file mode 100644 index df50ea446..000000000 --- a/package/utils/otrx/src/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -all: otrx - -otrx: - $(CC) $(CFLAGS) -o $@ otrx.c -Wall - -clean: - rm -f otrx diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c deleted file mode 100644 index 223e032f2..000000000 --- a/package/utils/otrx/src/otrx.c +++ /dev/null @@ -1,592 +0,0 @@ -/* - * otrx - * - * Copyright (C) 2015-2017 Rafał Miłecki - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(__BYTE_ORDER) -#error "Unknown byte order" -#endif - -#if __BYTE_ORDER == __BIG_ENDIAN -#define cpu_to_le32(x) bswap_32(x) -#define le32_to_cpu(x) bswap_32(x) -#elif __BYTE_ORDER == __LITTLE_ENDIAN -#define cpu_to_le32(x) (x) -#define le32_to_cpu(x) (x) -#else -#error "Unsupported endianness" -#endif - -#define TRX_MAGIC 0x30524448 -#define TRX_FLAGS_OFFSET 12 -#define TRX_MAX_PARTS 3 - -struct trx_header { - uint32_t magic; - uint32_t length; - uint32_t crc32; - uint16_t flags; - uint16_t version; - uint32_t offset[3]; -}; - -char *trx_path; -size_t trx_offset = 0; -char *partition[TRX_MAX_PARTS] = {}; - -static inline size_t otrx_min(size_t x, size_t y) { - return x < y ? x : y; -} - -/************************************************** - * CRC32 - **************************************************/ - -static const uint32_t crc32_tbl[] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, - 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, - 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, - 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, - 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, - 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, - 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, - 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, - 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, - 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, - 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, - 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, - 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, - 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, - 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, - 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, - 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, - 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, - 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, - 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, - 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, - 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, - 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, - 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, - 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, - 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, - 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, - 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, - 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, - 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, - 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, - 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, - 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, - 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, - 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, -}; - -uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) { - while (len) { - crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8); - buf++; - len--; - } - - return crc; -} - -/************************************************** - * Check - **************************************************/ - -static void otrx_check_parse_options(int argc, char **argv) { - int c; - - while ((c = getopt(argc, argv, "o:")) != -1) { - switch (c) { - case 'o': - trx_offset = atoi(optarg); - break; - } - } -} - -static int otrx_check(int argc, char **argv) { - FILE *trx; - struct trx_header hdr; - size_t bytes, length; - uint8_t buf[1024]; - uint32_t crc32; - int err = 0; - - if (argc < 3) { - fprintf(stderr, "No TRX file passed\n"); - err = -EINVAL; - goto out; - } - trx_path = argv[2]; - - optind = 3; - otrx_check_parse_options(argc, argv); - - trx = fopen(trx_path, "r"); - if (!trx) { - fprintf(stderr, "Couldn't open %s\n", trx_path); - err = -EACCES; - goto out; - } - - fseek(trx, trx_offset, SEEK_SET); - bytes = fread(&hdr, 1, sizeof(hdr), trx); - if (bytes != sizeof(hdr)) { - fprintf(stderr, "Couldn't read %s header\n", trx_path); - err = -EIO; - goto err_close; - } - - if (le32_to_cpu(hdr.magic) != TRX_MAGIC) { - fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic)); - err = -EINVAL; - goto err_close; - } - - length = le32_to_cpu(hdr.length); - if (length < sizeof(hdr)) { - fprintf(stderr, "Length read from TRX too low (%zu B)\n", length); - err = -EINVAL; - goto err_close; - } - - crc32 = 0xffffffff; - fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET); - length -= TRX_FLAGS_OFFSET; - while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { - crc32 = otrx_crc32(crc32, buf, bytes); - length -= bytes; - } - - if (length) { - fprintf(stderr, "Couldn't read last %zd B of data from %s\n", length, trx_path); - err = -EIO; - goto err_close; - } - - if (crc32 != le32_to_cpu(hdr.crc32)) { - fprintf(stderr, "Invalid data crc32: 0x%08x instead of 0x%08x\n", crc32, le32_to_cpu(hdr.crc32)); - err = -EINVAL; - goto err_close; - } - - printf("Found a valid TRX version %d\n", le32_to_cpu(hdr.version)); - -err_close: - fclose(trx); -out: - return err; -} - -/************************************************** - * Create - **************************************************/ - -static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) { - FILE *in; - size_t bytes; - ssize_t length = 0; - uint8_t buf[1024]; - - in = fopen(in_path, "r"); - if (!in) { - fprintf(stderr, "Couldn't open %s\n", in_path); - return -EACCES; - } - - while ((bytes = fread(buf, 1, sizeof(buf), in)) > 0) { - if (fwrite(buf, 1, bytes, trx) != bytes) { - fprintf(stderr, "Couldn't write %zu B to %s\n", bytes, trx_path); - length = -EIO; - break; - } - length += bytes; - } - - fclose(in); - - return length; -} - -static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) { - uint8_t *buf; - - buf = malloc(length); - if (!buf) - return -ENOMEM; - memset(buf, 0, length); - - if (fwrite(buf, 1, length, trx) != length) { - fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path); - free(buf); - return -EIO; - } - - free(buf); - - return length; -} - -static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment) { - if (curr_offset & (alignment - 1)) { - size_t length = alignment - (curr_offset % alignment); - return otrx_create_append_zeros(trx, length); - } - - return 0; -} - -static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) { - size_t bytes, length; - uint8_t buf[1024]; - uint32_t crc32; - - hdr->magic = cpu_to_le32(TRX_MAGIC); - hdr->version = 1; - - fseek(trx, 0, SEEK_SET); - bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx); - if (bytes != sizeof(struct trx_header)) { - fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path); - return -EIO; - } - - length = le32_to_cpu(hdr->length); - - crc32 = 0xffffffff; - fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET); - length -= TRX_FLAGS_OFFSET; - while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) { - crc32 = otrx_crc32(crc32, buf, bytes); - length -= bytes; - } - hdr->crc32 = cpu_to_le32(crc32); - - fseek(trx, 0, SEEK_SET); - bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx); - if (bytes != sizeof(struct trx_header)) { - fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path); - return -EIO; - } - - return 0; -} - -static int otrx_create(int argc, char **argv) { - FILE *trx; - struct trx_header hdr = {}; - ssize_t sbytes; - size_t curr_idx = 0; - size_t curr_offset = sizeof(hdr); - int c; - int err = 0; - - if (argc < 3) { - fprintf(stderr, "No TRX file passed\n"); - err = -EINVAL; - goto out; - } - trx_path = argv[2]; - - trx = fopen(trx_path, "w+"); - if (!trx) { - fprintf(stderr, "Couldn't open %s\n", trx_path); - err = -EACCES; - goto out; - } - fseek(trx, curr_offset, SEEK_SET); - - optind = 3; - while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) { - switch (c) { - case 'f': - if (curr_idx >= TRX_MAX_PARTS) { - err = -ENOSPC; - fprintf(stderr, "Reached TRX partitions limit, no place for %s\n", optarg); - goto err_close; - } - - sbytes = otrx_create_append_file(trx, optarg); - if (sbytes < 0) { - fprintf(stderr, "Failed to append file %s\n", optarg); - } else { - hdr.offset[curr_idx++] = curr_offset; - curr_offset += sbytes; - } - - sbytes = otrx_create_align(trx, curr_offset, 4); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - - break; - case 'A': - sbytes = otrx_create_append_file(trx, optarg); - if (sbytes < 0) { - fprintf(stderr, "Failed to append file %s\n", optarg); - } else { - curr_offset += sbytes; - } - - sbytes = otrx_create_align(trx, curr_offset, 4); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - break; - case 'a': - sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0)); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - break; - case 'b': - sbytes = strtol(optarg, NULL, 0) - curr_offset; - if (sbytes < 0) { - fprintf(stderr, "Current TRX length is 0x%zx, can't pad it with zeros to 0x%lx\n", curr_offset, strtol(optarg, NULL, 0)); - } else { - sbytes = otrx_create_append_zeros(trx, sbytes); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - } - break; - } - if (err) - break; - } - - sbytes = otrx_create_align(trx, curr_offset, 0x1000); - if (sbytes < 0) - fprintf(stderr, "Failed to append zeros\n"); - else - curr_offset += sbytes; - - hdr.length = curr_offset; - otrx_create_write_hdr(trx, &hdr); -err_close: - fclose(trx); -out: - return err; -} - -/************************************************** - * Extract - **************************************************/ - -static void otrx_extract_parse_options(int argc, char **argv) { - int c; - - while ((c = getopt(argc, argv, "c:e:o:1:2:3:")) != -1) { - switch (c) { - case 'o': - trx_offset = atoi(optarg); - break; - case '1': - partition[0] = optarg; - break; - case '2': - partition[1] = optarg; - break; - case '3': - partition[2] = optarg; - break; - } - } -} - -static int otrx_extract_copy(FILE *trx, size_t offset, size_t length, char *out_path) { - FILE *out; - size_t bytes; - uint8_t *buf; - int err = 0; - - out = fopen(out_path, "w"); - if (!out) { - fprintf(stderr, "Couldn't open %s\n", out_path); - err = -EACCES; - goto out; - } - - buf = malloc(length); - if (!buf) { - fprintf(stderr, "Couldn't alloc %zu B buffer\n", length); - err = -ENOMEM; - goto err_close; - } - - fseek(trx, offset, SEEK_SET); - bytes = fread(buf, 1, length, trx); - if (bytes != length) { - fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path); - err = -ENOMEM; - goto err_free_buf; - }; - - bytes = fwrite(buf, 1, length, out); - if (bytes != length) { - fprintf(stderr, "Couldn't write %zu B to %s\n", length, out_path); - err = -ENOMEM; - goto err_free_buf; - } - - printf("Extracted 0x%zx bytes into %s\n", length, out_path); - -err_free_buf: - free(buf); -err_close: - fclose(out); -out: - return err; -} - -static int otrx_extract(int argc, char **argv) { - FILE *trx; - struct trx_header hdr; - size_t bytes; - int i; - int err = 0; - - if (argc < 3) { - fprintf(stderr, "No TRX file passed\n"); - err = -EINVAL; - goto out; - } - trx_path = argv[2]; - - optind = 3; - otrx_extract_parse_options(argc, argv); - - trx = fopen(trx_path, "r"); - if (!trx) { - fprintf(stderr, "Couldn't open %s\n", trx_path); - err = -EACCES; - goto out; - } - - fseek(trx, trx_offset, SEEK_SET); - bytes = fread(&hdr, 1, sizeof(hdr), trx); - if (bytes != sizeof(hdr)) { - fprintf(stderr, "Couldn't read %s header\n", trx_path); - err = -EIO; - goto err_close; - } - - if (le32_to_cpu(hdr.magic) != TRX_MAGIC) { - fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic)); - err = -EINVAL; - goto err_close; - } - - for (i = 0; i < TRX_MAX_PARTS; i++) { - size_t length; - - if (!partition[i]) - continue; - if (!hdr.offset[i]) { - printf("TRX doesn't contain partition %d, can't extract %s\n", i + 1, partition[i]); - continue; - } - - if (i + 1 >= TRX_MAX_PARTS || !hdr.offset[i + 1]) - length = le32_to_cpu(hdr.length) - le32_to_cpu(hdr.offset[i]); - else - length = le32_to_cpu(hdr.offset[i + 1]) - le32_to_cpu(hdr.offset[i]); - - otrx_extract_copy(trx, trx_offset + le32_to_cpu(hdr.offset[i]), length, partition[i]); - } - -err_close: - fclose(trx); -out: - return err; -} - -/************************************************** - * Start - **************************************************/ - -static void usage() { - printf("Usage:\n"); - printf("\n"); - printf("Checking TRX file:\n"); - printf("\totrx check [options]\tcheck if file is a valid TRX\n"); - printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n"); - printf("\n"); - printf("Creating new TRX file:\n"); - printf("\totrx create [options] [partitions]\n"); - printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n"); - printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n"); - printf("\t-a alignment\t\t\t[partition] align current partition\n"); - printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n"); - printf("\n"); - printf("Extracting from TRX file:\n"); - printf("\totrx extract [options]\textract partitions from TRX file\n"); - printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n"); - printf("\t-1 file\t\t\t\tfile to extract 1st partition to (optional)\n"); - printf("\t-2 file\t\t\t\tfile to extract 2nd partition to (optional)\n"); - printf("\t-3 file\t\t\t\tfile to extract 3rd partition to (optional)\n"); -} - -int main(int argc, char **argv) { - if (argc > 1) { - if (!strcmp(argv[1], "check")) - return otrx_check(argc, argv); - else if (!strcmp(argv[1], "create")) - return otrx_create(argc, argv); - else if (!strcmp(argv[1], "extract")) - return otrx_extract(argc, argv); - } - - usage(); - return 0; -} diff --git a/package/utils/policycoreutils/Makefile b/package/utils/policycoreutils/Makefile index 249c2afb9..f724deda9 100644 --- a/package/utils/policycoreutils/Makefile +++ b/package/utils/policycoreutils/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=policycoreutils -PKG_VERSION:=3.2 +PKG_VERSION:=3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2 -PKG_HASH:=d1331c6fa766c547b071c491de90b9f343c8dbffdb119be8a5a7e491199b93a9 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=4199040ced8a81f2ddd0522b4faf2aba62fc821473f4051dc8474fb1c4a01078 PKG_INSTALL:=1 HOST_BUILD_DEPENDS:=libsemanage/host gettext-full/host PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam gettext-full/host diff --git a/package/utils/px5g-wolfssl/Makefile b/package/utils/px5g-wolfssl/Makefile index 90296008d..ea805acd8 100644 --- a/package/utils/px5g-wolfssl/Makefile +++ b/package/utils/px5g-wolfssl/Makefile @@ -5,13 +5,15 @@ include $(TOPDIR)/rules.mk PKG_NAME:=px5g-wolfssl -PKG_RELEASE:=$(COMMITCOUNT) +PKG_RELEASE:=$(COMMITCOUNT).1 PKG_LICENSE:=GPL-2.0-or-later PKG_USE_MIPS16:=0 PKG_MAINTAINER:=Paul Spooren +PKG_CONFIG_DEPENDS:=CONFIG_WOLFSSL_ALT_NAMES + include $(INCLUDE_DIR)/package.mk define Package/px5g-wolfssl diff --git a/package/utils/px5g-wolfssl/px5g-wolfssl.c b/package/utils/px5g-wolfssl/px5g-wolfssl.c index 763d7b4b7..cd04a41df 100644 --- a/package/utils/px5g-wolfssl/px5g-wolfssl.c +++ b/package/utils/px5g-wolfssl/px5g-wolfssl.c @@ -142,42 +142,42 @@ int selfsigned(WC_RNG *rng, char **arg) { newCert.isCA = 0; while (*arg && **arg == '-') { - if (!strncmp(*arg, "-der", 4)) { + if (!strcmp(*arg, "-der")) { pem = false; - } else if (!strncmp(*arg, "-newkey", 6) && arg[1]) { + } else if (!strcmp(*arg, "-newkey") && arg[1]) { if (!strncmp(arg[1], "rsa:", 4)) { type = RSA_KEY_TYPE; - keySz = (unsigned int)atoi(arg[1] + 4); - } else if (!strncmp(arg[1], "ec", 2)) { + keySz = atoi(arg[1] + 4); + } else if (!strcmp(arg[1], "ec")) { type = EC_KEY_TYPE; } else { fprintf(stderr, "error: invalid algorithm\n"); return 1; } arg++; - } else if (!strncmp(*arg, "-days", 5) && arg[1]) { + } else if (!strcmp(*arg, "-days") && arg[1]) { days = (unsigned int)atoi(arg[1]); arg++; - } else if (!strncmp(*arg, "-pkeyopt", 8) && arg[1]) { + } else if (!strcmp(*arg, "-pkeyopt") && arg[1]) { if (strncmp(arg[1], "ec_paramgen_curve:", 18)) { fprintf(stderr, "error: invalid pkey option: %s\n", arg[1]); return 1; } - if (!strncmp(arg[1] + 18, "P-256:", 5)) { + if (!strcmp(arg[1] + 18, "P-256")) { curve = ECC_SECP256R1; - } else if (!strncmp(arg[1] + 18, "P-384:", 5)) { + } else if (!strcmp(arg[1] + 18, "P-384")) { curve = ECC_SECP384R1; - } else if (!strncmp(arg[1] + 18, "P-521:", 5)) { + } else if (!strcmp(arg[1] + 18, "P-521")) { curve = ECC_SECP521R1; } else { fprintf(stderr, "error: invalid curve name: %s\n", arg[1] + 18); return 1; } arg++; - } else if (!strncmp(*arg, "-keyout", 7) && arg[1]) { + } else if (!strcmp(*arg, "-keyout") && arg[1]) { keypath = arg[1]; arg++; - } else if (!strncmp(*arg, "-out", 4) && arg[1]) { + } else if (!strcmp(*arg, "-out") && arg[1]) { certpath = arg[1]; arg++; } else if (!strcmp(*arg, "-subj") && arg[1]) { @@ -203,8 +203,23 @@ int selfsigned(WC_RNG *rng, char **arg) { strncpy(newCert.subject.org, val, CTC_NAME_SIZE); else if (!strcmp(key, "OU")) strncpy(newCert.subject.unit, val, CTC_NAME_SIZE); - else if (!strcmp(key, "CN")) + else if (!strcmp(key, "CN")) { strncpy(newCert.subject.commonName, val, CTC_NAME_SIZE); + +#ifdef WOLFSSL_ALT_NAMES + if(strlen(val) + 2 > 256) { + fprintf(stderr, "error: CN is too long: %s\n", val); + return 1; + } + + newCert.altNames[0] = 0x30; //Sequence with one element + newCert.altNames[1] = strlen(val) + 2; // Length of entire sequence + newCert.altNames[2] = 0x82; //8 - String, 2 - DNS Name + newCert.altNames[3] = strlen(val); //DNS Name length + memcpy(newCert.altNames + 4, val, strlen(val)); //DNS Name + newCert.altNamesSz = strlen(val) + 4; +#endif + } else if (!strcmp(key, "EMAIL")) strncpy(newCert.subject.email, val, CTC_NAME_SIZE); else @@ -216,6 +231,9 @@ int selfsigned(WC_RNG *rng, char **arg) { } newCert.daysValid = days; + newCert.keyUsage = KEYUSE_DIGITAL_SIG | KEYUSE_CONTENT_COMMIT | KEYUSE_KEY_ENCIPHER; + newCert.extKeyUsage = EXTKEYUSE_SERVER_AUTH; + gen_key(rng, &ecKey, &rsaKey, type, keySz, exp, curve); write_key(&ecKey, &rsaKey, type, keySz, keypath, pem); @@ -288,25 +306,25 @@ int dokey(WC_RNG *rng, int type, char **arg) { bool pem = true; while (*arg && **arg == '-') { - if (!strncmp(*arg, "-out", 4) && arg[1]) { + if (!strcmp(*arg, "-out") && arg[1]) { path = arg[1]; arg++; - } else if (!strncmp(*arg, "-3", 2)) { + } else if (!strcmp(*arg, "-3")) { exp = 3; - } else if (!strncmp(*arg, "-der", 4)) { + } else if (!strcmp(*arg, "-der")) { pem = false; } arg++; } if (*arg && type == RSA_KEY_TYPE) { - keySz = (unsigned int)atoi(*arg); + keySz = atoi(*arg); } else if (*arg) { - if (!strncmp(*arg, "P-256", 5)) { + if (!strcmp(*arg, "P-256")) { curve = ECC_SECP256R1; - } else if (!strncmp(*arg, "P-384", 5)) { + } else if (!strcmp(*arg, "P-384")) { curve = ECC_SECP384R1; - } else if (!strncmp(*arg, "P-521", 5)) { + } else if (!strcmp(*arg, "P-521")) { curve = ECC_SECP521R1; } else { fprintf(stderr, "Invalid Curve Name: %s\n", *arg); @@ -338,13 +356,13 @@ int main(int argc, char *argv[]) { } if (argv[1]) { - if (!strncmp(argv[1], "eckey", 5)) + if (!strcmp(argv[1], "eckey")) return dokey(&rng, EC_KEY_TYPE, argv + 2); - if (!strncmp(argv[1], "rsakey", 5)) + if (!strcmp(argv[1], "rsakey")) return dokey(&rng, RSA_KEY_TYPE, argv + 2); - if (!strncmp(argv[1], "selfsigned", 10)) + if (!strcmp(argv[1], "selfsigned")) return selfsigned(&rng, argv + 2); } diff --git a/package/utils/secilc/Makefile b/package/utils/secilc/Makefile index 7ed22615c..6f059bfc8 100644 --- a/package/utils/secilc/Makefile +++ b/package/utils/secilc/Makefile @@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=secilc -PKG_VERSION:=3.2 +PKG_VERSION:=3.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/3.2 -PKG_HASH:=5f6e6528a281b29ac5e558babffc3d8aab682fd8df8977daff5f266a50292cc3 +PKG_SOURCE_URL:=https://github.com/SELinuxProject/selinux/releases/download/$(PKG_VERSION) +PKG_HASH:=2c5e1a5d417baf1d2aa3eac294e12c3aac7184a5ef6a779dcbe469ed756e8651 HOST_BUILD_DEPENDS:=libsepol/host PKG_MAINTAINER:=Dominick Grift diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile index 5af210935..fafc44909 100644 --- a/package/utils/ucode/Makefile +++ b/package/utils/ucode/Makefile @@ -12,18 +12,31 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/jow-/ucode.git -PKG_SOURCE_DATE:=2022-05-20 -PKG_SOURCE_VERSION:=081871e18db544e2c834a516950e1c16c9bc4d2c -PKG_MIRROR_HASH:=5ff1ee6d5549e83ac7bc5f5877d303c82cdb8e640305de5d95cbd3ce66ced133 +PKG_SOURCE_DATE:=2022-12-02 +PKG_SOURCE_VERSION:=46d93c9cc5da6fce581df86159bd0fc4357de41c +PKG_MIRROR_HASH:=970a47f1bef719f056d40d17398db492bd4de92b98ef9aba4582cb18b4c9b270 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=ISC -PKG_ABI_VERSION:=20220322 +PKG_ABI_VERSION:=20220812 include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk CMAKE_OPTIONS += -DSOVERSION=$(PKG_ABI_VERSION) +CMAKE_HOST_OPTIONS += \ + -DSOVERSION=$(PKG_ABI_VERSION) \ + -DFS_SUPPORT=ON \ + -DMATH_SUPPORT=ON \ + -DNL80211_SUPPORT=OFF \ + -DRESOLV_SUPPORT=OFF \ + -DRTNL_SUPPORT=OFF \ + -DSTRUCT_SUPPORT=ON \ + -DUBUS_SUPPORT=OFF \ + -DUCI_SUPPORT=OFF \ + -DULOOP_SUPPORT=OFF + define Package/ucode/default SECTION:=utils @@ -143,6 +156,18 @@ define Package/ucode-mod-uci/description endef +define Package/ucode-mod-uloop + $(Package/ucode/default) + TITLE+= (uloop module) + DEPENDS:=ucode +libubox +endef + +define Package/ucode-mod-uloop/description + The uloop module allows ucode scripts to interact with OpenWrt uloop event + loop implementation. +endef + + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include/ucode $(CP) $(PKG_INSTALL_DIR)/usr/include/ucode/*.h $(1)/usr/include/ucode/ @@ -200,6 +225,10 @@ define Package/ucode-mod-uci/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uci.so $(1)/usr/lib/ucode/ endef +define Package/ucode-mod-uloop/install + $(INSTALL_DIR) $(1)/usr/lib/ucode + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/uloop.so $(1)/usr/lib/ucode/ +endef $(eval $(call BuildPackage,libucode)) $(eval $(call BuildPackage,ucode)) @@ -211,3 +240,5 @@ $(eval $(call BuildPackage,ucode-mod-rtnl)) $(eval $(call BuildPackage,ucode-mod-struct)) $(eval $(call BuildPackage,ucode-mod-ubus)) $(eval $(call BuildPackage,ucode-mod-uci)) +$(eval $(call BuildPackage,ucode-mod-uloop)) +$(eval $(call HostBuild)) diff --git a/package/utils/uencrypt/Makefile b/package/utils/uencrypt/Makefile new file mode 100644 index 000000000..688c38a5b --- /dev/null +++ b/package/utils/uencrypt/Makefile @@ -0,0 +1,58 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022 Eneas Ulir de Queiroz + +include $(TOPDIR)/rules.mk + +PKG_NAME:=uencrypt +PKG_RELEASE:=2 + +PKG_FLAGS:=nonshared +PKG_LICENSE:=GPL-2.0-or-later +PKG_MAINTAINER:=Eneas U de Queiroz +PKG_CONFIG_DEPENDS:=\ + CONFIG_UENCRYPT_OPENSSL \ + CONFIG_UENCRYPT_WOLFSSL + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_INSTALL:=1 +CMAKE_OPTIONS+=$(if $(CONFIG_UENCRYPT_WOLFSSL),-DUSE_WOLFSSL=1) + +define Package/uencrypt + SECTION:=utils + CATEGORY:=Base system + TITLE:=Decryption utility for Arcadyan WG4xx223 and TP-Link Deco S4 + DEPENDS:=+UENCRYPT_WOLFSSL:libwolfssl +UENCRYPT_OPENSSL:libopenssl +endef + +define Package/uencrypt/description + This is a small encrypton/decryption program. It defaults + to AES-128-CBC, but supports any encryption provided by + the available openssl/wolfssl library. Even though it can + be used for regular encryption and decryption operations, + it is included here to unencrypt the configuration from mtd + on Arcadyan WG430223/WG443223 and TP-Link Deco S4 routers +endef + +define Package/uencrypt/config + if PACKAGE_uencrypt + choice + prompt "Crypto provider" + default UENCRYPT_OPENSSL + + config UENCRYPT_OPENSSL + bool "OpenSSL" + + config UENCRYPT_WOLFSSL + bool "wolfSSL" + endchoice + endif +endef + +define Package/uencrypt/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uencrypt $(1)/usr/bin +endef + +$(eval $(call BuildPackage,uencrypt)) diff --git a/package/utils/uencrypt/src/CMakeLists.txt b/package/utils/uencrypt/src/CMakeLists.txt new file mode 100644 index 000000000..cd25d2f12 --- /dev/null +++ b/package/utils/uencrypt/src/CMakeLists.txt @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (C) 2022 Eneas Ulir de Queiroz + +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) +project(uencrypt LANGUAGES C) + +option(USE_WOLFSSL "Use WolfSSL as crypto provider" OFF) +if (USE_WOLFSSL) + add_definitions(-DUSE_WOLFSSL) + find_library(WOLFSSL_LIBRARY wolfssl REQUIRED) + set(CRYPTO_LIBRARIES ${WOLFSSL_LIBRARY}) +else() + find_package(OpenSSL REQUIRED) + set(CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) +endif() + +add_executable(${PROJECT_NAME} ${PROJECT_NAME}.c) +target_link_libraries(${PROJECT_NAME} ${CRYPTO_LIBRARIES}) + +install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) diff --git a/package/utils/uencrypt/src/uencrypt.c b/package/utils/uencrypt/src/uencrypt.c new file mode 100644 index 000000000..ab9a202ce --- /dev/null +++ b/package/utils/uencrypt/src/uencrypt.c @@ -0,0 +1,150 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later + * Copyright (C) 2022 Eneas Ulir de Queiroz + */ + +#include +#include +#include +#include +#include + +#ifdef USE_WOLFSSL +# include +# include +#else +# include +#endif + +int do_crypt(FILE *infile, FILE *outfile, const EVP_CIPHER *cipher, const char *key, const char *iv, + int enc, int padding) +{ + EVP_CIPHER_CTX *ctx; + unsigned char inbuf[1024], outbuf[1024 + EVP_MAX_BLOCK_LENGTH]; + int inlen, outlen; + + ctx = EVP_CIPHER_CTX_new(); + EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc); + EVP_CIPHER_CTX_set_padding(ctx, padding); + + for (;;) { + inlen = fread(inbuf, 1, 1024, infile); + if (inlen <= 0) + break; + if (!EVP_CipherUpdate(ctx, outbuf, &outlen, inbuf, inlen)) { + EVP_CIPHER_CTX_free(ctx); + return -1; + } + fwrite(outbuf, 1, outlen, outfile); + } + if (!EVP_CipherFinal_ex(ctx, outbuf, &outlen)) { + EVP_CIPHER_CTX_free(ctx); + return -1; + } + fwrite(outbuf, 1, outlen, outfile); + + EVP_CIPHER_CTX_free(ctx); + return 0; +} + +static void check_enc_dec(const int enc) +{ + if (enc == -1) + return; + fprintf(stderr, "Error: both -d and -e were specified.\n"); + exit(EXIT_FAILURE); +} + +#ifndef USE_WOLFSSL +static void print_ciphers(const OBJ_NAME *name,void *arg) { + fprintf(arg, "\t%s\n", name->name); +} +#endif + +static void check_cipher(const EVP_CIPHER *cipher) +{ + if (cipher == NULL) { + fprintf(stderr, "Error: invalid cipher: %s.\n", optarg); +#ifndef USE_WOLFSSL + fprintf(stderr, "Supported ciphers: \n", optarg); + OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, print_ciphers, stderr); +#endif + exit(EXIT_FAILURE); + } +} + +static void show_usage(const char* name) +{ + fprintf(stderr, "Usage: %s: [-d | -e] [-n] -k key [-i iv] [-c cipher]\n" + "-d = decrypt; -e = encrypt; -n = no padding\n", name); +} + +int main(int argc, char *argv[]) +{ + int enc = -1; + unsigned char *iv = NULL; + unsigned char *key = NULL; + long len; + int opt; + int padding = 1; + int need_iv = 1; + const EVP_CIPHER *cipher = EVP_aes_128_cbc(); + int ret; + + while ((opt = getopt(argc, argv, "c:dei:k:n")) != -1) { + switch (opt) { + case 'c': + cipher = EVP_get_cipherbyname(optarg); + check_cipher(cipher); + int arglen = strlen(optarg); + if (arglen > 3 && strncmp(optarg+arglen-3, "ecb", 3) == 0) //if ends with "ecb" + need_iv = 0; + break; + case 'd': + check_enc_dec(enc); + enc = 0; + break; + case 'e': + check_enc_dec(enc); + enc = 1; + break; + case 'i': + iv = OPENSSL_hexstr2buf((const char *)optarg, &len); + if (iv == NULL) { + fprintf(stderr, "Error setting IV to %s. The IV should be encoded in hex.\n", + optarg); + exit(EINVAL); + } + break; + case 'k': + key = OPENSSL_hexstr2buf((const char *)optarg, &len); + if (key == NULL) { + fprintf(stderr, "Error setting key to %s. The key should be encoded in hex.\n", + optarg); + exit(EINVAL); + } + break; + case 'n': + padding = 0; + break; + default: + show_usage(argv[0]); + exit(EINVAL); + } + } + if (need_iv && iv == NULL) { + fprintf(stderr, "Error: iv not set.\n"); + show_usage(argv[0]); + exit(EXIT_FAILURE); + } + if (key == NULL) { + fprintf(stderr, "Error: key not set.\n"); + show_usage(argv[0]); + exit(EXIT_FAILURE); + } + ret = do_crypt(stdin, stdout, cipher, key, iv, !!enc, padding); + if (ret) + fprintf(stderr, "Error during crypt operation.\n"); + OPENSSL_free(iv); + OPENSSL_free(key); + return ret; +} diff --git a/package/utils/ugps/files/ugps.init b/package/utils/ugps/files/ugps.init index 3cd1ca1b8..77c360306 100644 --- a/package/utils/ugps/files/ugps.init +++ b/package/utils/ugps/files/ugps.init @@ -16,11 +16,16 @@ start_service() { local disabled="$(uci get gps.@gps[-1].disabled || echo 0)" [ "$disabled" == "0" ] || return + [ "$tty" ] || return - [ -c "$tty" ] || { - tty="/dev/$tty" - [ -c "$tty" ] || return - } + case "$tty" in + "/"*) + true + ;; + *) + tty="/dev/$tty" + ;; + esac procd_open_instance procd_set_param command "$PROG" diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index a93c9f6fd..706c3194b 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -25,14 +25,10 @@ PKG_LICENSE_FILES:= COPYING \ libuuid/COPYING \ Documentation/licenses/COPYING.BSD-3 -PKG_BUILD_PARALLEL:=1 - -PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -DISABLE_NLS:=--disable-nls - include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk define Package/util-linux/Default SECTION:=utils @@ -552,44 +548,69 @@ define Package/wipefs/description libblkid. endef -CONFIGURE_ARGS += \ - --disable-use-tty-group \ - --disable-rpath \ - --disable-tls \ - --disable-su \ - --disable-sulogin \ - --disable-makeinstall-chown \ - --disable-login \ - --disable-nologin \ - --disable-lslogins \ - --disable-runuser \ - --disable-chfn-chsh \ - --disable-raw \ - --without-python \ - --without-udev \ - --without-readline \ - --without-libmagic \ - --with-ncursesw - -TARGET_CFLAGS += $(FPIC) -std=gnu99 +MESON_ARGS += \ + -Dsystemd=disabled \ + -Dtinfo=disabled \ + -Dcryptsetup=disabled \ + -Dlibutil=disabled \ + -Dlibutempter=disabled \ + -Dlibpcre2-posix=disabled \ + -Dlibuser=disabled \ + -Duse-tty-group=false \ + -Duse-tls=false \ + -Dbuild-python=disabled \ + -Dbuild-zramctl=disabled \ + -Dbuild-fsck=disabled \ + -Dbuild-wipefs=disabled \ + -Dbuild-fallocate=disabled \ + -Dbuild-setpriv=disabled \ + -Dbuild-hardlink=disabled \ + -Dbuild-cramfs=disabled \ + -Dbuild-bfs=disabled \ + -Dbuild-minix=disabled \ + -Dbuild-fdformat=disabled \ + -Dbuild-lslogins=disabled \ + -Dbuild-wdctl=disabled \ + -Dbuild-cal=disabled \ + -Dbuild-switch_root=disabled \ + -Dbuild-pivot_root=disabled \ + -Dbuild-lsmem=disabled \ + -Dbuild-lsirq=disabled \ + -Dbuild-irqtop=disabled \ + -Dbuild-chmem=disabled \ + -Dbuild-ipcrm=disabled \ + -Dbuild-rfkill=disabled \ + -Dbuild-tunelp=disabled \ + -Dbuild-kill=disabled \ + -Dbuild-last=disabled \ + -Dbuild-utmpdump=disabled \ + -Dbuild-line=disabled \ + -Dbuild-mesg=disabled \ + -Dbuild-raw=disabled \ + -Dbuild-vipw=disabled \ + -Dbuild-newgrp=disabled \ + -Dbuild-chfn-chsh=disabled \ + -Dbuild-login=disabled \ + -Dbuild-nologin=disabled \ + -Dbuild-sulogin=disabled \ + -Dbuild-su=disabled \ + -Dbuild-runuser=disabled \ + -Dbuild-ul=disabled \ + -Dbuild-pg=disabled \ + -Dbuild-write=disabled \ + -Dbuild-bash-completion=disabled \ + -Dbuild-pylibmount=disabled \ + -Dreadline=disabled \ + -Dmagic=disabled \ + -Dncursesw=enabled define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/blkid.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/blkid.pc $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/fdisk.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/fdisk.pc $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/mount.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/mount.pc $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/smartcols.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/smartcols.pc $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig - $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/uuid.pc - $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/uuid.pc $(INSTALL_DIR) $(1)/usr/include/blkid $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid @@ -603,43 +624,37 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib - - $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so - $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so - $(LN) libmount.so.1 $(1)/usr/lib/libmount.so - $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so - $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so* $(1)/usr/lib endef define Package/libfdisk/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.so.* $(1)/usr/lib/ endef define Package/libblkid/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.so.* $(1)/usr/lib/ endef define Package/libmount/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.so.* $(1)/usr/lib/ endef define Package/libsmartcols/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.so.* $(1)/usr/lib/ endef define Package/libuuid/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so.* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.so.* $(1)/usr/lib/ endef define Package/agetty/install diff --git a/package/utils/util-linux/patches/010-meson-typo.patch b/package/utils/util-linux/patches/010-meson-typo.patch new file mode 100644 index 000000000..466d942d5 --- /dev/null +++ b/package/utils/util-linux/patches/010-meson-typo.patch @@ -0,0 +1,20 @@ +From c387d4fe7a1435a762a5b7d8b75feb13ad613315 Mon Sep 17 00:00:00 2001 +From: Anatoly Pugachev +Date: Fri, 8 Apr 2022 15:34:16 +0300 +Subject: [PATCH] libfdisk: meson.build fix typo + +--- + libfdisk/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libfdisk/meson.build ++++ b/libfdisk/meson.build +@@ -11,7 +11,7 @@ libfdisk_h = configure_file( + output : 'libfdisk.h', + configuration : defs, + install : build_libfdisk, +- install_dir : join_paths(get_option('includedir'), 'libfisk'), ++ install_dir : join_paths(get_option('includedir'), 'libfdisk'), + ) + + lib_fdisk_sources = ''' diff --git a/package/utils/util-linux/patches/020-meson-fix-compilation-without-systemd.patch b/package/utils/util-linux/patches/020-meson-fix-compilation-without-systemd.patch new file mode 100644 index 000000000..aa209994e --- /dev/null +++ b/package/utils/util-linux/patches/020-meson-fix-compilation-without-systemd.patch @@ -0,0 +1,22 @@ +From 38b15ca2dc4ca32bbe4a2449e1c7b645e4577840 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 16:53:43 -0700 +Subject: [PATCH 1/7] meson: fix compilation without systemd + +systemdsystemunitdir is used elsewhere. + +Signed-off-by: Rosen Penev +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +--- a/meson.build ++++ b/meson.build +@@ -720,6 +720,7 @@ if fs_search_path_extra != '' + endif + conf.set_quoted('FS_SEARCH_PATH', fs_search_path) + ++systemdsystemunitdir = '' + if systemd.found() + systemdsystemunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') + endif diff --git a/package/utils/util-linux/patches/030-meson-don-t-use-run.patch b/package/utils/util-linux/patches/030-meson-don-t-use-run.patch new file mode 100644 index 000000000..7803dd772 --- /dev/null +++ b/package/utils/util-linux/patches/030-meson-don-t-use-run.patch @@ -0,0 +1,34 @@ +From e25db9169450d3d5fb43656a2eae5c08999310f4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 16:56:54 -0700 +Subject: [PATCH 2/7] meson: don't use run + +Fixes cross compilation. run is not needed anyway. + +Signed-off-by: Rosen Penev +--- + meson.build | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/meson.build ++++ b/meson.build +@@ -577,8 +577,7 @@ int main(void) { + return tzname ? 0 : 1; + } + '''.format(have ? 1 : 0) +-result = cc.run(code, name : 'using tzname[]') +-have = result.compiled() and result.returncode() == 0 ++have = cc.compiles(code, name : 'using tzname[]') + conf.set('HAVE_TZNAME', have ? 1 : false) + + socket_libs = [] +@@ -641,8 +640,7 @@ int main(void) { + return (*__progname != 0); + } + ''' +-result = cc.run(code, name : 'using __progname') +-have = result.compiled() and result.returncode() == 0 ++have = cc.compiles(code, name : 'using __progname') + conf.set('HAVE___PROGNAME', have ? 1 : false) + + build_plymouth_support = get_option('build-plymouth-support') diff --git a/package/utils/util-linux/patches/040-meson-fix-cpu_set_t-test.patch b/package/utils/util-linux/patches/040-meson-fix-cpu_set_t-test.patch new file mode 100644 index 000000000..bdbfc4bfe --- /dev/null +++ b/package/utils/util-linux/patches/040-meson-fix-cpu_set_t-test.patch @@ -0,0 +1,23 @@ +From 4194bb5b35e9b5f3296bf17b7cabcc5cb1632ba3 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 16:55:15 -0700 +Subject: [PATCH 3/7] meson: fix cpu_set_t test + +_GNU_SOURCE is needed here. + +Signed-off-by: Rosen Penev +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -379,7 +379,7 @@ endforeach + have = cc.has_header('sched.h') + conf.set10('HAVE_DECL_CPU_ALLOC', have) + # We get -1 if the size cannot be determined +-have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#include ') > 0 ++have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include ') > 0 + conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false) + + have = cc.has_header_symbol('stdlib.h', 'environ') diff --git a/package/utils/util-linux/patches/050-meson-fix-environ-search.patch b/package/utils/util-linux/patches/050-meson-fix-environ-search.patch new file mode 100644 index 000000000..2cd02e5b4 --- /dev/null +++ b/package/utils/util-linux/patches/050-meson-fix-environ-search.patch @@ -0,0 +1,23 @@ +From 1e9e2b9fe365cc4a0025d44dc0a9c54bfffe9058 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 18:16:17 -0700 +Subject: [PATCH 4/7] meson: fix environ search + +musl has it defined in unistd.h and hidden behind _GNU_SOURCE. + +Signed-off-by: Rosen Penev +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -382,7 +382,7 @@ conf.set10('HAVE_DECL_CPU_ALLOC', have) + have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include ') > 0 + conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false) + +-have = cc.has_header_symbol('stdlib.h', 'environ') ++have = cc.has_header_symbol('unistd.h', 'environ', prefix : '#define _GNU_SOURCE') + conf.set10('HAVE_ENVIRON_DECL', have) + + have = cc.has_header_symbol('signal.h', 'sighandler_t') diff --git a/package/utils/util-linux/patches/060-meson-add-_GNU_SOURCE-for-sighandler_t.patch b/package/utils/util-linux/patches/060-meson-add-_GNU_SOURCE-for-sighandler_t.patch new file mode 100644 index 000000000..7f9137f8b --- /dev/null +++ b/package/utils/util-linux/patches/060-meson-add-_GNU_SOURCE-for-sighandler_t.patch @@ -0,0 +1,23 @@ +From 5d7557eb3827664b2b78145373907f2a6994bdf9 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 18:17:52 -0700 +Subject: [PATCH 5/7] meson: add _GNU_SOURCE for sighandler_t + +musl requires it. + +Signed-off-by: Rosen Penev +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -385,7 +385,7 @@ conf.set('HAVE_CPU_SET_T', have_cpu_set_ + have = cc.has_header_symbol('unistd.h', 'environ', prefix : '#define _GNU_SOURCE') + conf.set10('HAVE_ENVIRON_DECL', have) + +-have = cc.has_header_symbol('signal.h', 'sighandler_t') ++have = cc.has_header_symbol('signal.h', 'sighandler_t', prefix : '#define _GNU_SOURCE') + conf.set('HAVE_SIGHANDLER_T', have ? 1 : false) + + have = cc.has_header_symbol('string.h', 'strsignal') diff --git a/package/utils/util-linux/patches/070-meson-fix-isnan-check.patch b/package/utils/util-linux/patches/070-meson-fix-isnan-check.patch new file mode 100644 index 000000000..a0b104f80 --- /dev/null +++ b/package/utils/util-linux/patches/070-meson-fix-isnan-check.patch @@ -0,0 +1,24 @@ +From 777652585924034deeba98ae3192f26bc32bb661 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 18:19:53 -0700 +Subject: [PATCH 6/7] meson: fix isnan check + +musl only has isnan as a macro, not as a function. Handle the former +case. + +Signed-off-by: Rosen Penev +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -622,7 +622,7 @@ rtas_libs = cc.find_library('rtas', requ + conf.set('HAVE_LIBRTAS', rtas_libs.found() ? 1 : false) + + math_libs = [] +-if not cc.has_function('isnan') ++if not cc.has_header_symbol('math.h', 'isnan') + lib = cc.find_library('m', required : true) + if (cc.has_function('isnan', dependencies : lib) and + cc.has_function('__isnan', dependencies : lib)) diff --git a/package/utils/util-linux/patches/080-meson-fix-tzname-check.patch b/package/utils/util-linux/patches/080-meson-fix-tzname-check.patch new file mode 100644 index 000000000..f5d53c4d3 --- /dev/null +++ b/package/utils/util-linux/patches/080-meson-fix-tzname-check.patch @@ -0,0 +1,23 @@ +From 9a6b2618b46a859388139d1eb18f876886786659 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Fri, 29 Apr 2022 19:00:53 -0700 +Subject: [PATCH] meson: fix tzname check + +tzname is not a type but a variable. sizeof only works on types. + +Signed-off-by: Rosen Penev +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -565,7 +565,7 @@ have = cc.has_member('struct tm', 'tm_zo + prefix : '#include ') + conf.set('HAVE_STRUCT_TM_TM_ZONE', have ? 1 : false) + +-have = cc.sizeof('tzname', prefix : '#include ') > 0 ++have = cc.has_header_symbol('time.h', 'tzname') + conf.set('HAVE_DECL_TZNAME', have ? 1 : false) + + code = ''' diff --git a/package/utils/util-linux/patches/090-meson-libpam.patch b/package/utils/util-linux/patches/090-meson-libpam.patch new file mode 100644 index 000000000..c9a91b993 --- /dev/null +++ b/package/utils/util-linux/patches/090-meson-libpam.patch @@ -0,0 +1,18 @@ +--- a/meson.build ++++ b/meson.build +@@ -299,10 +299,14 @@ conf.set('HAVE_LIBUDEV', lib_udev.found( + + lib_crypt = cc.find_library('crypt') + +-lib_pam = cc.find_library('pam') ++req_libpam = not (get_option('build-login').disabled() or get_option('build-chfn-chsh').disabled() ++ or get_option('build-su').disabled() or get_option('build-runuser').disabled()) ++lib_pam = cc.find_library('pam', required : req_libpam) + if lib_pam.found() + lib_pam_misc = cc.find_library('pam_misc') + lib_pam = [lib_pam, lib_pam_misc] ++else ++ lib_pam_misc = declare_dependency() + endif + + lib_cryptsetup = dependency( diff --git a/package/utils/util-linux/patches/100-meson-make-libcap-ng-dependent-on-setpriv.patch b/package/utils/util-linux/patches/100-meson-make-libcap-ng-dependent-on-setpriv.patch new file mode 100644 index 000000000..d8b119900 --- /dev/null +++ b/package/utils/util-linux/patches/100-meson-make-libcap-ng-dependent-on-setpriv.patch @@ -0,0 +1,31 @@ +From cd23a4336f49ba6a12ade557a09589f2a7c966f4 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Mon, 2 May 2022 16:18:33 -0700 +Subject: [PATCH] meson: make libcap-ng dependent on setpriv + +Signed-off-by: Rosen Penev +--- + meson.build | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/meson.build ++++ b/meson.build +@@ -334,7 +334,8 @@ have = cc.has_function( + conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false) + + lib_cap_ng = dependency( +- 'libcap-ng') ++ 'libcap-ng', ++ required : get_option('build-setpriv')) + + lib_selinux = dependency( + 'libselinux', +@@ -1754,7 +1755,7 @@ if opt and not is_disabler(exe) + exes += exe + endif + +-opt = not get_option('build-setpriv').disabled() ++opt = not get_option('build-setpriv').disabled() and lib_cap_ng.found() + exe = executable( + 'setpriv', + setpriv_sources, diff --git a/package/utils/util-linux/patches/110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch b/package/utils/util-linux/patches/110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch new file mode 100644 index 000000000..bba8baf5a --- /dev/null +++ b/package/utils/util-linux/patches/110-meson-fix-when-HAVE_CLOCK_GETTIME-is-set.patch @@ -0,0 +1,21 @@ +From e51565b653cf09985df57cb7254b16d5af5df223 Mon Sep 17 00:00:00 2001 +From: Nicolas Caramelli +Date: Fri, 29 Apr 2022 18:16:36 +0200 +Subject: [PATCH] meson: fix when HAVE_CLOCK_GETTIME is set + +Signed-off-by: Nicolas Caramelli +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -602,7 +602,7 @@ if not have + have = cc.has_function('clock_gettime', + dependencies : realtime_libs) + endif +-conf.set('HAVE_CLOCK_GETTIME', have_dirfd ? 1 : false) ++conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false) + + thread_libs = dependency('threads') + diff --git a/package/utils/util-linux/patches/120-meson-get-the-project-version-from-the-version-gen-s.patch b/package/utils/util-linux/patches/120-meson-get-the-project-version-from-the-version-gen-s.patch new file mode 100644 index 000000000..8529c8268 --- /dev/null +++ b/package/utils/util-linux/patches/120-meson-get-the-project-version-from-the-version-gen-s.patch @@ -0,0 +1,20 @@ +From e0c1a86bf88b568a7afe8ebaea1b9f84afb892c2 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Wed, 4 May 2022 23:52:31 -0400 +Subject: [PATCH] meson: get the project version from the version-gen script + +This matches autotools and ensures that the version number is actually +reliable. +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -1,5 +1,5 @@ + project('util-linux', 'c', +- version : '2.37', ++ version : run_command('tools/git-version-gen', check: true).stdout(), + license : 'GPLv2+') + + pkgconfig = import('pkgconfig') diff --git a/package/utils/util-linux/patches/130-meson-fix-error-in-processing-version-for-pc-files.patch b/package/utils/util-linux/patches/130-meson-fix-error-in-processing-version-for-pc-files.patch new file mode 100644 index 000000000..75e88682e --- /dev/null +++ b/package/utils/util-linux/patches/130-meson-fix-error-in-processing-version-for-pc-files.patch @@ -0,0 +1,26 @@ +From dc307e1cbf73f6dbf72bb049c19d332774cdb4e7 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz +Date: Thu, 5 May 2022 00:16:15 -0400 +Subject: [PATCH] meson: fix error in processing version for pc files + +This awk command was copied verbatim from configure.ac, which included +non-awk syntax because configure.ac cannot contain [ literals. + +Rewrite these autoconf quadrigraphs as their actual values, for meson. + +Fixes always setting the micro version to "0". +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -41,7 +41,7 @@ conf.set_quoted('PACKAGE_VERSION', meson + + codes = [''' {print $1} ''', + ''' {sub("-.*","",$2); print $2} ''', +- ''' {sub("-.*","",$3); print $3 ~ /^@<:@0-9@:>@+$/ ? $3 : 0} '''] ++ ''' {sub("-.*","",$3); print $3 ~ /^[0-9]+$/ ? $3 : 0} '''] + pc_version = [] + foreach code : codes + res = run_command('bash', '-c', diff --git a/package/utils/util-linux/patches/200-meson-no-po.patch b/package/utils/util-linux/patches/200-meson-no-po.patch new file mode 100644 index 000000000..d626036bb --- /dev/null +++ b/package/utils/util-linux/patches/200-meson-no-po.patch @@ -0,0 +1,10 @@ +--- a/meson.build ++++ b/meson.build +@@ -774,7 +774,6 @@ subdir('disk-utils') + subdir('misc-utils') + subdir('text-utils') + subdir('term-utils') +-subdir('po') + + includes = [dir_include, + dir_libblkid, diff --git a/package/utils/util-linux/patches/100-use_urandom.patch b/package/utils/util-linux/patches/210-use-urandom.patch similarity index 100% rename from package/utils/util-linux/patches/100-use_urandom.patch rename to package/utils/util-linux/patches/210-use-urandom.patch diff --git a/package/utils/zyxel-bootconfig/Makefile b/package/utils/zyxel-bootconfig/Makefile new file mode 100644 index 000000000..eb2dd79b8 --- /dev/null +++ b/package/utils/zyxel-bootconfig/Makefile @@ -0,0 +1,38 @@ +# +# Copyright (C) 2022 David Bauer +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=zyxel-bootconfig +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/zyxel-bootconfig + SECTION:=utils + CATEGORY:=Base system + TITLE:=Utility for handling ZyXEL Bootconfig settings + MAINTAINER:=David Bauer +endef + +define Package/zyxel-bootconfig/description + This package contains an utility that allows handling ZyXEL Bootconfig settings. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" +endef + +define Package/zyxel-bootconfig/install + $(INSTALL_DIR) $(1)/usr/bin $(1)/lib/preinit + $(INSTALL_BIN) $(PKG_BUILD_DIR)/zyxel-bootconfig $(1)/usr/bin/ + $(CP) ./files/95_apply_bootconfig $(1)/lib/preinit/95_apply_bootconfig +endef + +$(eval $(call BuildPackage,zyxel-bootconfig)) diff --git a/package/utils/zyxel-bootconfig/files/95_apply_bootconfig b/package/utils/zyxel-bootconfig/files/95_apply_bootconfig new file mode 100644 index 000000000..c47857b08 --- /dev/null +++ b/package/utils/zyxel-bootconfig/files/95_apply_bootconfig @@ -0,0 +1,16 @@ +apply_bootconfig() { + . /lib/functions.sh + + local part + + case $(board_name) in + zyxel,nwa50ax|\ + zyxel,nwa55axe) + mtd_idx=$(find_mtd_index "bootconfig") + zyxel-bootconfig "/dev/mtd$mtd_idx" set-image-status 0 valid + zyxel-bootconfig "/dev/mtd$mtd_idx" set-active-image 0 + ;; + esac +} + +[ "$INITRAMFS" = "1" ] || boot_hook_add preinit_main apply_bootconfig diff --git a/package/utils/zyxel-bootconfig/src/Makefile b/package/utils/zyxel-bootconfig/src/Makefile new file mode 100644 index 000000000..66741c8ac --- /dev/null +++ b/package/utils/zyxel-bootconfig/src/Makefile @@ -0,0 +1,7 @@ +all: zyxel-bootconfig + +zyxel-bootconfig: + $(CC) $(CFLAGS) -Wall zyxel-bootconfig.c -o zyxel-bootconfig + +clean: + rm -f zyxel-bootconfig diff --git a/package/utils/zyxel-bootconfig/src/zyxel-bootconfig.c b/package/utils/zyxel-bootconfig/src/zyxel-bootconfig.c new file mode 100644 index 000000000..6dd2f8969 --- /dev/null +++ b/package/utils/zyxel-bootconfig/src/zyxel-bootconfig.c @@ -0,0 +1,331 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (C) 2022 David Bauer */ + +/* + * First byte: Image status + * + * Possible status-codes: + * 0x0: none + * 0x1: new + * 0x2: valid + * 0x3: invalid + * + * Example: Image 0 valid; Image 1 invalid + * 11001000 + * || || + * img1|| + * img0 + * + * Second byte: Active Image + * Possible values: + * 0x0: Image0 active + * 0x1: Image1 active + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#define BOOTCONFIG_SIZE 0x20 +#define BOOTCONFIG_IMAGE_STATUS 0x0 +#define BOOTCONFIG_ACTIVE_IMAGE 0x1 + +#define IMAGE_0_SHIFT 2 +#define IMAGE_0_MASK 0x0c +#define IMAGE_1_SHIFT 6 +#define IMAGE_1_MASK 0xc0 + +#define IMAGE_STATUS(img0, img1) (((img0 << IMAGE_0_SHIFT) & IMAGE_0_MASK) | ((img1 << IMAGE_1_SHIFT) & IMAGE_1_MASK)) + +#define ACTIVE_IMAGE_MASK 0x1 +#define ACTIVE_IMAGE(img) (img & ACTIVE_IMAGE_MASK) + +enum zyxel_bootconfig_image_status { + IMAGE_STATUS_NONE = 0x0, + IMAGE_STATUS_NEW = 0x1, + IMAGE_STATUS_VALID = 0x2, + IMAGE_STATUS_INVALID = 0x3, + __IMAGE_STATUS_EINVAL, +}; + +struct zyxel_bootconfig { + enum zyxel_bootconfig_image_status image0_status; + enum zyxel_bootconfig_image_status image1_status; + unsigned int active_image; +}; + +struct zyxel_bootconfig_mtd { + struct mtd_info_user mtd_info; + int fd; +}; + +struct zyxel_image_status { + enum zyxel_bootconfig_image_status code; + const char *name; +}; + +struct zyxel_image_status image_status_codes[] = { + { .code = IMAGE_STATUS_NONE, .name = "none" }, + { .code = IMAGE_STATUS_NEW, .name = "new" }, + { .code = IMAGE_STATUS_VALID, .name = "valid" }, + { .code = IMAGE_STATUS_INVALID, .name = "invalid" }, + {}, +}; + + +static enum zyxel_bootconfig_image_status zyxel_bootconfig_image_status_parse(const char *status) { + struct zyxel_image_status* s; + + for (s = image_status_codes; s->name; s++) { + if (!strcmp(status, s->name)) { + return s->code; + } + } + + return __IMAGE_STATUS_EINVAL; +} + +const char *zyxel_bootconfig_image_status_name(const enum zyxel_bootconfig_image_status bootconfig) { + struct zyxel_image_status* s; + + for (s = image_status_codes; s->name; s++) { + if (bootconfig == s->code) { + return s->name; + } + } + + return "N/A"; +} + +static void zyxel_bootconfig_mtd_close(struct zyxel_bootconfig_mtd *mtd) { + close(mtd->fd); +} + + +static int zyxel_bootconfig_mtd_open(struct zyxel_bootconfig_mtd *mtd, const char *mtd_name) { + int ret = 0; + + mtd->fd = open(mtd_name, O_RDWR | O_SYNC); + if (mtd->fd < 0) { + fprintf(stderr, "Could not open mtd device: %s\n", mtd_name); + ret = -1; + goto out; + } + + if (ioctl(mtd->fd, MEMGETINFO, &mtd->mtd_info)) { + fprintf(stderr, "Could not get MTD device info from %s\n", mtd_name); + ret = -1; + zyxel_bootconfig_mtd_close(mtd); + goto out; + } + +out: + return ret; +} + + +static int zyxel_bootconfig_read(struct zyxel_bootconfig *config, struct zyxel_bootconfig_mtd *mtd) { + char *args = NULL; + int ret = 0; + + /* Allocate memory for reading boot-config partition */ + args = calloc(1, mtd->mtd_info.erasesize); + if (!args) { + fprintf(stderr, "Could not allocate memory!\n"); + ret = -1; + goto out; + } + + /* Read bootconfig partition */ + pread(mtd->fd, args, mtd->mtd_info.erasesize, 0); + + /* Parse config */ + memset(config, 0, sizeof(*config)); + + config->image0_status = (args[BOOTCONFIG_IMAGE_STATUS] & IMAGE_0_MASK) >> IMAGE_0_SHIFT; + config->image1_status = (args[BOOTCONFIG_IMAGE_STATUS] & IMAGE_1_MASK) >> IMAGE_1_SHIFT; + config->active_image = (args[BOOTCONFIG_ACTIVE_IMAGE] & ACTIVE_IMAGE_MASK); + +out: + if (args) + free(args); + return ret; +} + + +static int zyxel_bootconfig_write(struct zyxel_bootconfig *config, struct zyxel_bootconfig_mtd *mtd) +{ + struct erase_info_user erase_info; + char img_status, img_active; + char *args = NULL; + int ret = 0; + + /* Allocate memory for reading boot-config partition */ + args = calloc(1, mtd->mtd_info.erasesize); + if (!args) { + fprintf(stderr, "Could not allocate memory!\n"); + ret = -1; + goto out; + } + + /* Read bootconfig partition */ + pread(mtd->fd, args, mtd->mtd_info.erasesize, 0); + + img_status = IMAGE_STATUS(config->image0_status, config->image1_status); + img_active = ACTIVE_IMAGE(config->active_image); + + /* Check if bootconfig has to be written */ + if (args[BOOTCONFIG_IMAGE_STATUS] == img_status && args[BOOTCONFIG_ACTIVE_IMAGE] == img_active) { + ret = 0; + goto out; + } + + /* Erase first block (containing the magic) */ + erase_info.start = 0; + erase_info.length = mtd->mtd_info.erasesize; + ret = ioctl(mtd->fd, MEMERASE, &erase_info); + if (ret < 0) { + fprintf(stderr, "Failed to erase block: %i\n", ret); + goto out; + } + + + /* Write bootconfig */ + args[BOOTCONFIG_IMAGE_STATUS] = img_status; + args[BOOTCONFIG_ACTIVE_IMAGE] = img_active; + + if (pwrite(mtd->fd, args, mtd->mtd_info.erasesize, 0) != mtd->mtd_info.erasesize) { + fprintf(stderr, "Error writing bootconfig!\n"); + ret = -1; + goto out; + } + +out: + if (args) + free(args); + return ret; +} + + +static void zyxel_bootconfig_print_usage(char *programm) +{ + struct zyxel_image_status* s = image_status_codes; + + printf("Usage: %s [args]\n", programm); + printf("Available commands:\n"); + printf(" get-status\n"); + printf(" set-image-status [0/1] ["); + + while (s->name) { + printf("%s", s->name); + s++; + + if (s->name) + printf(","); + } + + printf("]\n"); + printf(" set-active-image [0/1]\n"); +} + +int main(int argc, char *argv[]) +{ + enum zyxel_bootconfig_image_status image_status; + struct zyxel_bootconfig_mtd mtd; + struct zyxel_bootconfig config; + const char *mtd_name, *command; + bool writeback = false; + int image_idx; + + if (argc < 3) { + zyxel_bootconfig_print_usage(argv[0]); + return 1; + } + + mtd_name = argv[1]; + command = argv[2]; + + if (zyxel_bootconfig_mtd_open(&mtd, mtd_name)) { + fprintf(stderr, "Error opening %s!\n", mtd_name); + return 1; + } + + if (zyxel_bootconfig_read(&config, &mtd)) { + fprintf(stderr, "Error reading bootconfig!\n"); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + if (!strcmp(command, "set-image-status")) { + if (argc < 5) { + zyxel_bootconfig_print_usage(argv[0]); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + image_idx = atoi(argv[3]); + if (image_idx > 1 || image_idx < 0) { + fprintf(stderr, "Invalid image-slot set!\n"); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + image_status = zyxel_bootconfig_image_status_parse(argv[4]); + if (image_status == __IMAGE_STATUS_EINVAL) { + fprintf(stderr, "Invalid image-status!\n"); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + if (image_idx == 0) { + config.image0_status = image_status; + } else { + config.image1_status = image_status; + } + + writeback = true; + } else if (!strcmp(command, "set-active-image")) { + if (argc < 4) { + zyxel_bootconfig_print_usage(argv[0]); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + image_idx = atoi(argv[3]); + if (image_idx > 1 || image_idx < 0) { + fprintf(stderr, "Invalid image-slot set!\n"); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + config.active_image = image_idx; + + writeback = true; + } else if (!strcmp(command, "get-status")) { + printf("Active Image: %d\n", config.active_image); + printf("Image 0 Status: %s\n", zyxel_bootconfig_image_status_name(config.image0_status)); + printf("Image 1 Status: %s\n", zyxel_bootconfig_image_status_name(config.image1_status)); + + writeback = false; + } + + if (writeback) { + if (zyxel_bootconfig_write(&config, &mtd)) { + fprintf(stderr, "Error writing bootconfig!\n"); + zyxel_bootconfig_mtd_close(&mtd); + return 1; + } + + zyxel_bootconfig_mtd_close(&mtd); + } + + return 0; +} diff --git a/scripts/linksys-image.sh b/scripts/linksys-image.sh index 3b4412c06..d251b5da8 100755 --- a/scripts/linksys-image.sh +++ b/scripts/linksys-image.sh @@ -17,7 +17,6 @@ # Padding ('0' + 0x20 *7) (8 bytes) # Signature of signer. Not checked so use arbitrary value (16 bytes) # Padding (0x00) (192 bytes) -# 0x0A (1 byte) ## version history # * version 1: initial commit @@ -62,6 +61,4 @@ printf ".LINKSYS.01000409%-15s%-8s%-8s%-16s" "${TYPE}" "${CRC}" "0" "K0000000F02 dd if=/dev/zero bs=1 count=192 conv=notrunc >> "${IMG_TMP_OUT}" -printf '\12' >> "${IMG_TMP_OUT}" - cp "${IMG_TMP_OUT}" "${IMG_OUT}" diff --git a/target/Config.in b/target/Config.in index 4e4de2e11..a6b3351a6 100644 --- a/target/Config.in +++ b/target/Config.in @@ -98,10 +98,13 @@ config HAS_MIPS16 config RFKILL_SUPPORT bool +config EMMC_SUPPORT + bool + config NAND_SUPPORT bool -config EMMC_SUPPORT +config LEGACY_SDCARD_SUPPORT bool config ARCH_64BIT diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 0580e41c5..3bbadc720 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -46,12 +46,16 @@ ifeq ($(CONFIG_IB_STANDALONE),) $(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf endif -ifeq ($(CONFIG_BUILDBOT),) $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages + # create an empty package index so `opkg` doesn't report an error + touch $(PKG_BUILD_DIR)/packages/Packages + $(INSTALL_DATA) ./files/README.md $(PKG_BUILD_DIR)/packages/ + echo '' >> $(PKG_BUILD_DIR)/repositories.conf echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf echo 'src imagebuilder file:packages' >> $(PKG_BUILD_DIR)/repositories.conf +ifeq ($(CONFIG_BUILDBOT),) ifeq ($(CONFIG_IB_STANDALONE),) $(FIND) $(call FeedPackageDir,libc) -type f \ \( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk' \) \ @@ -74,7 +78,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),) $(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/ endif - $(CP) $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ + $(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \ $(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \ fi diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index aeae98aac..3329fe70a 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -27,6 +27,7 @@ include $(INCLUDE_DIR)/rootfs.mk include $(INCLUDE_DIR)/version.mk export REVISION +export SOURCE_DATE_EPOCH define Helptext Available Commands: @@ -102,6 +103,7 @@ staging_dir/host/.prereq-build: include/prereq-build.mk _call_info: FORCE echo 'Current Target: "$(TARGETID)"' + echo 'Current Architecture: "$(ARCH)"' echo 'Current Revision: "$(REVISION)"' echo 'Default Packages: $(DEFAULT_PACKAGES)' echo 'Available Profiles:' diff --git a/target/imagebuilder/files/README.md b/target/imagebuilder/files/README.md new file mode 100644 index 000000000..9a9616d06 --- /dev/null +++ b/target/imagebuilder/files/README.md @@ -0,0 +1,11 @@ +# ./packages folder + +Add `.ipk` packages to this folder will allow the ImageBuilder to install them. + +For more complex setups consider adding a custom feed containing packages. + + src custom file:///path/to/packages + +Whenever the ImageBuilder builds a firmware image this folder will be reloaded +and a new package index created. In case signature checks are enabled the +`./packages/Packages` index will be signed with a locally generated key pair. diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 809771d91..2c0f3da25 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -987,7 +987,6 @@ CONFIG_CPU_SW_DOMAIN_PAN=y # CONFIG_CRAMFS is not set CONFIG_CRAMFS_BLOCKDEV=y # CONFIG_CRAMFS_MTD is not set -CONFIG_CRASHLOG=y # CONFIG_CRASH_DUMP is not set # CONFIG_CRC16 is not set CONFIG_CRC32=y @@ -1261,7 +1260,6 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_INFO_BTF is not set # CONFIG_DEBUG_INFO_COMPRESSED is not set # CONFIG_DEBUG_INFO_DWARF4 is not set -CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_KMEMLEAK is not set diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index a1e122dc9..c2957caac 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -1314,7 +1314,6 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y # CONFIG_DEBUG_INFO_DWARF4 is not set # CONFIG_DEBUG_INFO_DWARF5 is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y -# CONFIG_DEBUG_INFO_REDUCED is not set # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_IRQFLAGS is not set CONFIG_DEBUG_KERNEL=y diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index fb6006340..b002e1937 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -929,7 +929,6 @@ CONFIG_CPU_SW_DOMAIN_PAN=y # CONFIG_CRAMFS is not set CONFIG_CRAMFS_BLOCKDEV=y # CONFIG_CRAMFS_MTD is not set -CONFIG_CRASHLOG=y # CONFIG_CRASH_DUMP is not set # CONFIG_CRC16 is not set CONFIG_CRC32=y @@ -1183,7 +1182,6 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_INFO is not set # CONFIG_DEBUG_INFO_BTF is not set # CONFIG_DEBUG_INFO_DWARF4 is not set -CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_KMEMLEAK is not set diff --git a/target/linux/generic/config-6.0 b/target/linux/generic/config-6.0 index e244e0526..3de711099 100644 --- a/target/linux/generic/config-6.0 +++ b/target/linux/generic/config-6.0 @@ -1056,7 +1056,6 @@ CONFIG_CPU_SW_DOMAIN_PAN=y # CONFIG_CRAMFS is not set CONFIG_CRAMFS_BLOCKDEV=y # CONFIG_CRAMFS_MTD is not set -CONFIG_CRASHLOG=y # CONFIG_CRASH_DUMP is not set # CONFIG_CRC16 is not set CONFIG_CRC32=y @@ -1356,7 +1355,6 @@ CONFIG_DEBUG_FS_ALLOW_ALL=y CONFIG_DEBUG_INFO_DWARF5=y # CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set # CONFIG_DEBUG_INFO_NONE is not set -CONFIG_DEBUG_INFO_REDUCED=y # CONFIG_DEBUG_INFO_SPLIT is not set # CONFIG_DEBUG_IRQFLAGS is not set CONFIG_DEBUG_KERNEL=y diff --git a/target/sdk/Config.in b/target/sdk/Config.in index 0c8a61d24..1984e242e 100644 --- a/target/sdk/Config.in +++ b/target/sdk/Config.in @@ -7,4 +7,11 @@ config SDK with a precompiled toolchain. It can be used to develop and test packages for OpenWrt before including them in the buildroot - +config SDK_LLVM_BPF + bool "Build the LLVM-BPF toolchain tarball" + depends on BPF_TOOLCHAIN_BUILD_LLVM + default BUILDBOT + help + This is a tarball of the precompiled LLVM toolchain suitable + for unpacking into the buildroot/SDK. It is used to build packages + that ship with eBPF kernel modules diff --git a/target/sdk/files/Config.in b/target/sdk/files/Config.in index f68799249..12c0f6a62 100644 --- a/target/sdk/files/Config.in +++ b/target/sdk/files/Config.in @@ -31,7 +31,6 @@ menu "Global build settings" choice prompt "Binary stripping method" - default USE_STRIP if EXTERNAL_TOOLCHAIN default USE_STRIP if USE_GLIBC default USE_SSTRIP help @@ -130,7 +129,7 @@ config IN_SDK config MODULES bool default y - option modules + modules source "Config-build.in" source "tmp/.config-package.in" diff --git a/target/sdk/files/Makefile b/target/sdk/files/Makefile index 4968a6318..dca8bbe20 100644 --- a/target/sdk/files/Makefile +++ b/target/sdk/files/Makefile @@ -14,7 +14,7 @@ export TOPDIR LC_ALL LANG SDK world: -DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep '/usr' -m 1) +DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1) export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) ifneq ($(OPENWRT_BUILD),1) diff --git a/target/toolchain/Config.in b/target/toolchain/Config.in index 5a6ecefeb..02c486b32 100644 --- a/target/toolchain/Config.in +++ b/target/toolchain/Config.in @@ -1,6 +1,7 @@ config MAKE_TOOLCHAIN bool "Package the OpenWrt-based Toolchain" depends on !EXTERNAL_TOOLCHAIN + default BUILDBOT help Package the created toolchain as a tarball under the bin/ directory as OpenWrt-Toolchain-$(BOARD)-for-$(ARCH)$(ARCH_SUFFIX)-gcc-$(GCCV)$(DIR_SUFFIX). diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile index c3ba70db0..c33bccee6 100644 --- a/target/toolchain/Makefile +++ b/target/toolchain/Makefile @@ -26,7 +26,7 @@ all: compile TOOLCHAIN_PREFIX:=$(TOOLCHAIN_BUILD_DIR)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX) -$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2: clean +$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz: clean mkdir -p $(TOOLCHAIN_BUILD_DIR) $(TAR) -cf - -C $(TOPDIR)/staging_dir/ \ $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") \ @@ -62,13 +62,14 @@ $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2: clean find $(TOOLCHAIN_BUILD_DIR) -name CVS | $(XARGS) rm -rf mkdir -p $(BIN_DIR) (cd $(BUILD_DIR); \ - tar cfj $@ $(TOOLCHAIN_NAME); \ + tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(TOOLCHAIN_NAME) \ + --mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \ ) download: prepare: -compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2 +compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz install: compile clean: - rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2 + rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz diff --git a/toolchain/Config.in b/toolchain/Config.in index 2d29ec09e..6d3cc0a20 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -37,6 +37,7 @@ menuconfig TARGET_OPTIONS Most people will answer N. + choice BPF_TOOLCHAIN prompt "BPF toolchain" if DEVEL default BPF_TOOLCHAIN_BUILD_LLVM if BUILDBOT @@ -168,6 +169,7 @@ menuconfig EXTERNAL_TOOLCHAIN string prompt "Toolchain include path" if DEVEL depends on EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN + default "./usr/include ./include/fortify ./include" if EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL default "./usr/include ./include" help Specify additional directories searched for header files (override @@ -307,7 +309,7 @@ config GDB_PYTHON help Enable the python bindings for GDB to allow using python in the gdb shell. - + config HAS_BPF_TOOLCHAIN bool @@ -326,7 +328,7 @@ config USE_LLVM_PREBUILT config USE_LLVM_BUILD default y if !DEVEL && BUILDBOT select HAS_BPF_TOOLCHAIN - bool + bool config USE_GLIBC default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc) diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index 50829ad36..0bc8bbd0a 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -13,7 +13,7 @@ choice config BINUTILS_USE_VERSION_2_38 bool "Binutils 2.38" select BINUTILS_VERSION_2_38 - + config BINUTILS_USE_VERSION_2_39 bool "Binutils 2.39" select BINUTILS_VERSION_2_39 diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index aa1325969..a79b72e17 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -5,7 +5,7 @@ config BINUTILS_VERSION_2_37 config BINUTILS_VERSION_2_38 bool - + config BINUTILS_VERSION_2_39 bool diff --git a/toolchain/build_version b/toolchain/build_version new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/toolchain/build_version @@ -0,0 +1 @@ +1 diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 69eacaef9..8a31bf0d2 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -10,12 +10,9 @@ choice config GCC_USE_VERSION_8 bool "gcc 8.x" - config GCC_USE_VERSION_10 - bool "gcc 10.x" - config GCC_USE_VERSION_11 bool "gcc 11.x" - + config GCC_USE_VERSION_12 bool "gcc 12.x" endchoice diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 8bfb17d03..da915851a 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -3,10 +3,6 @@ config GCC_VERSION_8 default y if mips || mipsel || mips64 || mips64el bool -config GCC_VERSION_10 - default y if GCC_USE_VERSION_10 - bool - config GCC_VERSION_12 default y if GCC_USE_VERSION_12 bool @@ -14,6 +10,5 @@ config GCC_VERSION_12 config GCC_VERSION string default "8.4.0" if GCC_VERSION_8 - default "10.3.0" if GCC_VERSION_10 default "12.2.0" if GCC_VERSION_12 default "11.3.0" diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index e7d45bcb6..1a4a849e4 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -33,10 +33,6 @@ ifeq ($(PKG_VERSION),8.4.0) PKG_HASH:=e30a6e52d10e1f27ed55104ad233c30bd1e99cfb5ff98ab022dc941edd1b2dd4 endif -ifeq ($(PKG_VERSION),10.3.0) - PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344 -endif - ifeq ($(PKG_VERSION),11.3.0) PKG_HASH:=b47cf2818691f5b1e21df2bb38c795fac2cfbd640ede2d0a5e1c89e338a3ac39 endif @@ -113,6 +109,7 @@ GCC_CONFIGURE:= \ $(if $(CONFIG_mips64)$(CONFIG_mips64el),--with-arch=mips64 \ --with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \ $(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \ + $(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \ --with-gmp=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ diff --git a/toolchain/gcc/patches-10.x/002-case_insensitive.patch b/toolchain/gcc/patches-10.x/002-case_insensitive.patch deleted file mode 100644 index 409497e5a..000000000 --- a/toolchain/gcc/patches-10.x/002-case_insensitive.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e -Author: Felix Fietkau -Date: Sun Oct 19 21:45:51 2014 +0000 - - gcc: do not assume that the Mac OS X filesystem is case insensitive - - Signed-off-by: Felix Fietkau - - SVN-Revision: 42973 - ---- a/include/filenames.h -+++ b/include/filenames.h -@@ -44,11 +44,6 @@ extern "C" { - # define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f) - #else /* not DOSish */ --# if defined(__APPLE__) --# ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM --# define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1 --# endif --# endif /* __APPLE__ */ - # define HAS_DRIVE_SPEC(f) (0) - # define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c) - # define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f) diff --git a/toolchain/gcc/patches-10.x/010-documentation.patch b/toolchain/gcc/patches-10.x/010-documentation.patch deleted file mode 100644 index 85990e5ac..000000000 --- a/toolchain/gcc/patches-10.x/010-documentation.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2 -Author: Luka Perkov -Date: Tue Feb 26 16:16:33 2013 +0000 - - gcc: don't build documentation - - This closes #13039. - - Signed-off-by: Luka Perkov - - SVN-Revision: 35807 - ---- a/gcc/Makefile.in -+++ b/gcc/Makefile.in -@@ -3285,18 +3285,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) - doc/gccint.info: $(TEXI_GCCINT_FILES) - doc/cppinternals.info: $(TEXI_CPPINT_FILES) - --doc/%.info: %.texi -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/%.info: - - # Duplicate entry to handle renaming of gccinstall.info --doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES) -- if [ x$(BUILD_INFO) = xinfo ]; then \ -- $(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \ -- -I $(gcc_docdir)/include -o $@ $<; \ -- fi -+doc/gccinstall.info: - - doc/cpp.dvi: $(TEXI_CPP_FILES) - doc/gcc.dvi: $(TEXI_GCC_FILES) diff --git a/toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index 82ac013d3..000000000 --- a/toolchain/gcc/patches-10.x/110-Fix-MIPS-PR-84790.patch +++ /dev/null @@ -1,20 +0,0 @@ -Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790. -MIPS16 functions have a static assembler prologue which clobbers -registers v0 and v1. Add these register clobbers to function call -instructions. - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -3132,6 +3132,12 @@ mips_emit_call_insn (rtx pattern, rtx or - emit_insn (gen_update_got_version ()); - } - -+ if (TARGET_MIPS16 && TARGET_USE_GOT) -+ { -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP); -+ clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode)); -+ } -+ - if (TARGET_MIPS16 - && TARGET_EXPLICIT_RELOCS - && TARGET_CALL_CLOBBERED_GP) diff --git a/toolchain/gcc/patches-10.x/230-musl_libssp.patch b/toolchain/gcc/patches-10.x/230-musl_libssp.patch deleted file mode 100644 index 63f37662f..000000000 --- a/toolchain/gcc/patches-10.x/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -875,7 +875,9 @@ proper position among the other output f - #endif - - #ifndef LINK_SSP_SPEC --#ifdef TARGET_LIBC_PROVIDES_SSP -+#if DEFAULT_LIBC == LIBC_MUSL -+#define LINK_SSP_SPEC "-lssp_nonshared" -+#elif defined(TARGET_LIBC_PROVIDES_SSP) - #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ - "|fstack-protector-strong|fstack-protector-explicit:}" - #else diff --git a/toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch deleted file mode 100644 index 8c4a5fce1..000000000 --- a/toolchain/gcc/patches-10.x/300-mips_Os_cpu_rtx_cost_model.patch +++ /dev/null @@ -1,21 +0,0 @@ -commit ecf7671b769fe96f7b5134be442089f8bdba55d2 -Author: Felix Fietkau -Date: Thu Aug 4 20:29:45 2016 +0200 - -gcc: add a patch to generate better code with Os on mips - -Also happens to reduce compressed code size a bit - -Signed-off-by: Felix Fietkau - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -20041,7 +20041,7 @@ mips_option_override (void) - flag_pcc_struct_return = 0; - - /* Decide which rtx_costs structure to use. */ -- if (optimize_size) -+ if (0 && optimize_size) - mips_cost = &mips_rtx_cost_optimize_size; - else - mips_cost = &mips_rtx_cost_data[mips_tune]; diff --git a/toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch deleted file mode 100644 index 5c9d86aea..000000000 --- a/toolchain/gcc/patches-10.x/810-arm-softfloat-libgcc.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 8570c4be394cff7282f332f97da2ff569a927ddb -Author: Imre Kaloz -Date: Wed Feb 2 20:06:12 2011 +0000 - - fixup arm soft-float symbols - - SVN-Revision: 25325 - ---- a/libgcc/config/arm/t-linux -+++ b/libgcc/config/arm/t-linux -@@ -1,6 +1,10 @@ - LIB1ASMSRC = arm/lib1funcs.S - LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ -- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 -+ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ -+ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ -+ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ -+ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ -+ _arm_fixsfsi _arm_fixunssfsi - - # Just for these, we omit the frame pointer since it makes such a big - # difference. ---- a/gcc/config/arm/linux-elf.h -+++ b/gcc/config/arm/linux-elf.h -@@ -58,8 +58,6 @@ - %{shared:-lc} \ - %{!shared:%{profile:-lc_p}%{!profile:-lc}}" - --#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" -- - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - - #define LINUX_TARGET_LINK_SPEC "%{h*} \ diff --git a/toolchain/gcc/patches-10.x/820-libgcc_pic.patch b/toolchain/gcc/patches-10.x/820-libgcc_pic.patch deleted file mode 100644 index ddd6cf873..000000000 --- a/toolchain/gcc/patches-10.x/820-libgcc_pic.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit c96312958c0621e72c9b32da5bc224ffe2161384 -Author: Felix Fietkau -Date: Mon Oct 19 23:26:09 2009 +0000 - - gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow) - - SVN-Revision: 18086 - ---- a/libgcc/Makefile.in -+++ b/libgcc/Makefile.in -@@ -929,11 +929,12 @@ $(libgcov-driver-objects): %$(objext): $ - - # Static libraries. - libgcc.a: $(libgcc-objects) -+libgcc_pic.a: $(libgcc-s-objects) - libgcov.a: $(libgcov-objects) - libunwind.a: $(libunwind-objects) - libgcc_eh.a: $(libgcc-eh-objects) - --libgcc.a libgcov.a libunwind.a libgcc_eh.a: -+libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a: - -rm -f $@ - - objects="$(objects)"; \ -@@ -957,7 +958,7 @@ all: libunwind.a - endif - - ifeq ($(enable_shared),yes) --all: libgcc_eh.a libgcc_s$(SHLIB_EXT) -+all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT) - ifneq ($(LIBUNWIND),) - all: libunwind$(SHLIB_EXT) - libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1163,6 +1164,10 @@ install-shared: - chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a - $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a - -+ $(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/ -+ chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a -+ - $(subst @multilib_dir@,$(MULTIDIR),$(subst \ - @shlib_base_name@,libgcc_s,$(subst \ - @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL)))) diff --git a/toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch deleted file mode 100644 index e3cb616c4..000000000 --- a/toolchain/gcc/patches-10.x/840-armv4_pass_fix-v4bx_to_ld.patch +++ /dev/null @@ -1,28 +0,0 @@ -commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc -Author: Imre Kaloz -Date: Wed Feb 2 19:34:36 2011 +0000 - - add armv4 fixup patches - - SVN-Revision: 25322 - - ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ - #define MUSL_DYNAMIC_LINKER \ - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" - -+/* For armv4 we pass --fix-v4bx to linker to support EABI */ -+#undef TARGET_FIX_V4BX_SPEC -+#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\ -+ "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC --#define LINK_SPEC EABI_LINK_SPEC \ -+#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ - LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) - diff --git a/toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch b/toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch deleted file mode 100644 index 8b17f1374..000000000 --- a/toolchain/gcc/patches-10.x/850-use_shared_libgcc.patch +++ /dev/null @@ -1,54 +0,0 @@ -commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd -Author: Felix Fietkau -Date: Sun Feb 12 20:25:47 2012 +0000 - - gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary - - SVN-Revision: 30486 ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -132,10 +132,6 @@ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ - LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) - --/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we -- do not use -lfloat. */ --#undef LIBGCC_SPEC -- - /* Clear the instruction cache from `beg' to `end'. This is - implemented in lib1funcs.S, so ensure an error if this definition - is used. */ ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI - builtin_version ("CRuntime_Musl"); \ - } while (0) - -+#ifndef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}" -+#endif -+ - /* Determine which dynamic linker to use depending on whether GLIBC or - uClibc or Bionic or musl is the default C library and whether - -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ---- a/libgcc/mkmap-symver.awk -+++ b/libgcc/mkmap-symver.awk -@@ -136,5 +136,5 @@ function output(lib) { - else if (inherit[lib]) - printf("} %s;\n", inherit[lib]); - else -- printf ("\n local:\n\t*;\n};\n"); -+ printf ("\n\t*;\n};\n"); - } ---- a/gcc/config/rs6000/linux.h -+++ b/gcc/config/rs6000/linux.h -@@ -62,6 +62,9 @@ - #undef CPP_OS_DEFAULT_SPEC - #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" - -+#undef LIBGCC_SPEC -+#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc" -+ - #undef LINK_SHLIB_SPEC - #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \ - %{static-pie:-static -pie --no-dynamic-linker -z text}" diff --git a/toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch b/toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch deleted file mode 100644 index d710e4071..000000000 --- a/toolchain/gcc/patches-10.x/851-libgcc_no_compat.patch +++ /dev/null @@ -1,22 +0,0 @@ -commit 64661de100da1ec1061ef3e5e400285dce115e6b -Author: Felix Fietkau -Date: Sun May 10 13:16:35 2015 +0000 - - gcc: add some size optimization patches - - Signed-off-by: Felix Fietkau - - SVN-Revision: 45664 - ---- a/libgcc/config/t-libunwind -+++ b/libgcc/config/t-libunwind -@@ -2,8 +2,7 @@ - - HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER - --LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \ -- $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c - - # Override the default value from t-slibgcc-elf-ver and mention -lunwind diff --git a/toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch deleted file mode 100644 index bc182f0ce..000000000 --- a/toolchain/gcc/patches-10.x/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000-logue.c -+++ b/gcc/config/rs6000/rs6000-logue.c -@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t * - /* Define cutoff for using out-of-line functions to save registers. */ - if (DEFAULT_ABI == ABI_V4 || TARGET_ELF) - { -- if (!optimize_size) -+ if (1) - { - strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS; - strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS; diff --git a/toolchain/gcc/patches-10.x/881-no_tm_section.patch b/toolchain/gcc/patches-10.x/881-no_tm_section.patch deleted file mode 100644 index 2029910fd..000000000 --- a/toolchain/gcc/patches-10.x/881-no_tm_section.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libgcc/crtstuff.c -+++ b/libgcc/crtstuff.c -@@ -152,7 +152,7 @@ call_ ## FUNC (void) \ - #endif - - #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF) --# define USE_TM_CLONE_REGISTRY 1 -+# define USE_TM_CLONE_REGISTRY 0 - #elif !defined(USE_TM_CLONE_REGISTRY) - # define USE_TM_CLONE_REGISTRY 0 - #endif diff --git a/toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch b/toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc88..000000000 --- a/toolchain/gcc/patches-10.x/900-bad-mips16-crt.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/libgcc/config/mips/t-mips16 -+++ b/libgcc/config/mips/t-mips16 -@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16 - - # Version these symbols if building libgcc.so. - SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver -+ -+CRTSTUFF_T_CFLAGS += -mno-mips16 -+CRTSTUFF_T_CFLAGS_S += -mno-mips16 diff --git a/toolchain/gcc/patches-10.x/910-mbsd_multi.patch b/toolchain/gcc/patches-10.x/910-mbsd_multi.patch deleted file mode 100644 index 3ed623831..000000000 --- a/toolchain/gcc/patches-10.x/910-mbsd_multi.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit 99368862e44740ff4fd33760893f04e14f9dbdf1 -Author: Felix Fietkau -Date: Tue Jul 31 00:52:27 2007 +0000 - - Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly - - SVN-Revision: 8256 - - This patch brings over a feature from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags; - /* Whether any standard preincluded header has been preincluded. */ - static bool done_preinclude; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx11 (int); -@@ -455,6 +458,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1168,6 +1177,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -1590,6 +1590,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ WarnRemoved - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment. ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -1660,6 +1660,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities. - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -8171,6 +8171,17 @@ This option is only supported for C and - @option{-Wall} and by @option{-Wpedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+@item -fhonour-copts -+@opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2318,6 +2318,9 @@ common_handle_option (struct gcc_options - /* Currently handled in a prescan. */ - break; - -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Werror: - dc->warning_as_error_requested = value; - break; diff --git a/toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch deleted file mode 100644 index 487b9e47c..000000000 --- a/toolchain/gcc/patches-10.x/920-specs_nonfatal_getenv.patch +++ /dev/null @@ -1,22 +0,0 @@ -Author: Jo-Philipp Wich -Date: Sat Apr 21 03:02:39 2012 +0000 - - gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset - - SVN-Revision: 31390 - ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -9396,8 +9396,10 @@ getenv_spec_function (int argc, const ch - } - - if (!value) -- fatal_error (input_location, -- "environment variable %qs not defined", varname); -+ { -+ warning (input_location, "environment variable %qs not defined", varname); -+ value = ""; -+ } - - /* We have to escape every character of the environment variable so - they are not interpreted as active spec characters. A diff --git a/toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch deleted file mode 100644 index e795acd1d..000000000 --- a/toolchain/gcc/patches-10.x/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22881,6 +22881,9 @@ mips_asm_file_end (void) - #define TARGET_ASM_FILE_END mips_asm_file_end - - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ diff --git a/toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb1533..000000000 --- a/toolchain/gcc/patches-10.x/931-libffi-fix-MIPS-softfloat-build-issue.patch +++ /dev/null @@ -1,168 +0,0 @@ -From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001 -From: BangLang Huang -Date: Wed, 9 Nov 2016 10:36:49 +0800 -Subject: [PATCH] libffi: fix MIPS softfloat build issue - -Backported from github.com/libffi/libffi#272 - -Signed-off-by: BangLang Huang -Signed-off-by: Yousong Zhou ---- - libffi/src/mips/n32.S | 17 +++++++++++++++++ - libffi/src/mips/o32.S | 17 +++++++++++++++++ - 2 files changed, 34 insertions(+) - ---- a/libffi/src/mips/n32.S -+++ b/libffi/src/mips/n32.S -@@ -107,6 +107,16 @@ loadregs: - - REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6. - -+#ifdef __mips_soft_float -+ REG_L a0, 0*FFI_SIZEOF_ARG(t9) -+ REG_L a1, 1*FFI_SIZEOF_ARG(t9) -+ REG_L a2, 2*FFI_SIZEOF_ARG(t9) -+ REG_L a3, 3*FFI_SIZEOF_ARG(t9) -+ REG_L a4, 4*FFI_SIZEOF_ARG(t9) -+ REG_L a5, 5*FFI_SIZEOF_ARG(t9) -+ REG_L a6, 6*FFI_SIZEOF_ARG(t9) -+ REG_L a7, 7*FFI_SIZEOF_ARG(t9) -+#else - and t4, t6, ((1< -Date: Fri, 4 May 2018 18:20:53 +0800 -Subject: [PATCH] gotools: fix compilation when making cross compiler - -libgo is "the runtime support library for the Go programming language. -This library is intended for use with the Go frontend." - -gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but -the linker will complain that it cannot find it. That's because shared libgcc -is not present in the install directory yet. libgo.so was made without problem -because gcc will emit -lgcc_s when compiled with -shared option. When gotools -were being made, it was supplied with -static-libgcc thus no link option was -provided. Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec -for linking with libgo.so - -- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation -- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html - -When 3-pass GCC compilation is used, shared libgcc runtime libraries will be -available after gcc pass2 completed and will meet the gotools link requirement -at gcc pass3 ---- - gotools/Makefile.am | 4 +++- - gotools/Makefile.in | 4 +++- - 2 files changed, 6 insertions(+), 2 deletions(-) - ---- a/gotools/Makefile.am -+++ b/gotools/Makefile.am -@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - - LIBGOTOOL = $(libgodir)/libgotool.a -@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - - libgosrcdir = $(srcdir)/../libgo/go ---- a/gotools/Makefile.in -+++ b/gotools/Makefile.in -@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd - PWD_COMMAND = $${PWDCMD-pwd} - STAMP = echo timestamp > - libgodir = ../$(target_noncanonical)/libgo -+libgccdir = ../$(target_noncanonical)/libgcc - LIBGODEP = $(libgodir)/libgo.la - LIBGOTOOL = $(libgodir)/libgotool.a - @NATIVE_FALSE@GOCOMPILER = $(GOC) -@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a - GOCFLAGS = $(CFLAGS_FOR_TARGET) - GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS) - AM_GOCFLAGS = -I $(libgodir) --AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs -+AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \ -+ -L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s - GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@ - libgosrcdir = $(srcdir)/../libgo/go - cmdsrcdir = $(libgosrcdir)/cmd diff --git a/tools/Makefile b/tools/Makefile index 30614af9b..30bbc3856 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -17,7 +17,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) BUILD_ISL = y endif endif -ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmware)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) +ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) BUILD_B43_TOOLS = y endif diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile index d9a121aab..00833b957 100644 --- a/tools/dwarves/Makefile +++ b/tools/dwarves/Makefile @@ -13,8 +13,6 @@ PKG_HASH:=576bc112b95937dfbcd347c423696ee9e1992a338fdca1acacca736fd95f69c2 PKG_LICENSE:=GPL-2.0-only PKG_LICENSE_FILES:=COPYING -HOST_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile index 9f0a37b54..4b6eebaa4 100644 --- a/tools/llvm-bpf/Makefile +++ b/tools/llvm-bpf/Makefile @@ -16,8 +16,6 @@ PKG_HASH:=caaf8100365b6ebafc39fea803e902ca3ff38b4d5327b9927097808d32964db7 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src -HOST_BUILD_PARALLEL:=1 - CMAKE_BINARY_SUBDIR := build CMAKE_SOURCE_SUBDIR := llvm diff --git a/tools/mpfr/patches/002-Fix-mpfr_custom_get_kind-macro-bug.patch b/tools/mpfr/patches/002-Fix-mpfr_custom_get_kind-macro-bug.patch new file mode 100644 index 000000000..bb66a9067 --- /dev/null +++ b/tools/mpfr/patches/002-Fix-mpfr_custom_get_kind-macro-bug.patch @@ -0,0 +1,76 @@ +From 0ce17bae34a6c54de31b126f969d3ddd72c6bc37 Mon Sep 17 00:00:00 2001 +From: Vincent Lefevre +Date: Tue, 22 Nov 2022 16:33:00 +0100 +Subject: [PATCH] Fix mpfr_custom_get_kind() macro bug. + +* src/mpfr.h: in the mpfr_custom_get_kind() macro, changed mpfr_ptr to + mpfr_srcptr for _x to agree with the function prototype, in order to + avoid a compilation failure of user code in some cases. This bug was + introduced by commit 9f94e0311ed53d0c64d4fbca249d19cc4888027e, which + introduced the temporary variable _x to avoid an incorrect number of + evaluations of the x argument. +* tests/tstckintc.c: improved the tests to detect this bug. + +This should fix mpfr bug #1. + +Bug initially reported by FX Coudert: + https://github.com/CGAL/cgal/issues/7064 + +It affects Fedora Linux: + https://bugzilla.redhat.com/show_bug.cgi?id=2144197 +--- + src/mpfr.h | 2 +- + tests/tstckintc.c | 10 +++++++--- + 2 files changed, 8 insertions(+), 4 deletions(-) + +--- a/src/mpfr.h ++++ b/src/mpfr.h +@@ -1027,7 +1027,7 @@ __MPFR_DECLSPEC int mpfr_total_order_p ( + #if __GNUC__ > 2 || __GNUC_MINOR__ >= 95 + #define mpfr_custom_get_kind(x) \ + __extension__ ({ \ +- mpfr_ptr _x = (x); \ ++ mpfr_srcptr _x = (x); \ + _x->_mpfr_exp > __MPFR_EXP_INF ? \ + (mpfr_int) MPFR_REGULAR_KIND * MPFR_SIGN (_x) \ + : _x->_mpfr_exp == __MPFR_EXP_INF ? \ +--- a/tests/tstckintc.c ++++ b/tests/tstckintc.c +@@ -295,14 +295,16 @@ static void + test_nan_inf_zero (void) + { + mpfr_ptr val; ++ mpfr_srcptr sval; /* for compilation error checking */ + int sign; + int kind; + + reset_stack (); + + val = new_mpfr (MPFR_PREC_MIN); ++ sval = val; + mpfr_set_nan (val); +- kind = (mpfr_custom_get_kind) (val); ++ kind = (mpfr_custom_get_kind) (sval); + if (kind != MPFR_NAN_KIND) + { + printf ("mpfr_custom_get_kind error: "); +@@ -380,7 +382,8 @@ static long * + dummy_set_si (long si) + { + mpfr_t x; +- long * r = dummy_new (); ++ mpfr_srcptr px; /* for compilation error checking */ ++ long *r = dummy_new (); + int i1, i2, i3, i4, i5; + + /* Check that the type "void *" can be used, like with the function. +@@ -405,7 +408,8 @@ dummy_set_si (long si) + MPFR_ASSERTN (i5 == 1); + + mpfr_set_si (x, si, MPFR_RNDN); +- r[0] = mpfr_custom_get_kind (x); ++ px = x; ++ r[0] = mpfr_custom_get_kind (px); + + /* Check that the type "void *" can be used in C, like with the function + (forbidden in C++). Also check side effects. */