From e21c8c95e141d854b75a0525baf7ef1d357ad97e Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 01:19:41 -0700 Subject: [PATCH 1/6] "toolchain: switch to GCC v7.4" This reverts commit 7548d17823cd251706f1329f2619c5b8c83bec66. --- include/target.mk | 28 +- rules.mk | 8 +- toolchain/Config.in | 14 +- toolchain/Makefile | 2 +- toolchain/binutils/Config.in | 16 +- toolchain/binutils/Config.version | 14 +- toolchain/binutils/Makefile | 58 +- ...ishandles-file-pointers-while-scanni.patch | 112 ++ .../300-001_ld_makefile_patch.patch | 2 +- .../300-012_check_ldrunpath_length.patch | 4 +- .../400-mips_no_dynamic_linking_sym.patch | 4 +- ...e-default-emulation-for-mips64-linux.patch | 4 +- toolchain/fortify-headers/Makefile | 4 +- toolchain/gcc/Config.in | 12 +- toolchain/gcc/Config.version | 24 +- toolchain/gcc/common.mk | 36 +- toolchain/gcc/final/Makefile | 5 +- ...efine-__always_inline-in-local_atomi.patch | 1092 ----------------- .../002-case_insensitive.patch | 0 .../{8.3.0 => 8.2.0}/010-documentation.patch | 0 .../110-Fix-MIPS-PR-84790.patch | 0 .../{8.3.0 => 8.2.0}/230-musl_libssp.patch | 0 .../300-mips_Os_cpu_rtx_cost_model.patch | 0 .../800-arm_v5te_no_ldrd_strd.patch | 0 .../810-arm-softfloat-libgcc.patch | 0 .../{8.3.0 => 8.2.0}/820-libgcc_pic.patch | 0 .../840-armv4_pass_fix-v4bx_to_ld.patch | 0 .../850-use_shared_libgcc.patch | 0 .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 2 +- .../{8.3.0 => 8.2.0}/881-no_tm_section.patch | 0 .../{8.3.0 => 8.2.0}/900-bad-mips16-crt.patch | 0 .../{8.3.0 => 8.2.0}/910-mbsd_multi.patch | 4 +- .../920-specs_nonfatal_getenv.patch | 0 .../930-fix-mips-noexecstack.patch | 0 ...ibffi-fix-MIPS-softfloat-build-issue.patch | 0 ...mpilation-when-making-cross-compiler.patch | 0 ...uninitialised_use_in_mips_split_move.patch | 55 - .../patches/9.2.0/110-Fix-MIPS-PR-84790.patch | 20 - .../gcc/patches/9.2.0/230-musl_libssp.patch | 13 - .../patches/9.2.0/870-ppc_no_crtsavres.patch | 11 - .../gcc/patches/9.2.0/881-no_tm_section.patch | 11 - .../patches/9.2.0/900-bad-mips16-crt.patch | 9 - ...ibffi-fix-MIPS-softfloat-build-issue.patch | 168 --- ...mpilation-when-making-cross-compiler.patch | 67 - .../001-revert_register_mode_search.patch | 77 ++ .../002-case_insensitive.patch | 0 .../010-documentation.patch | 2 +- .../arc-2017.09-release/230-musl_libssp.patch | 28 + .../300-mips_Os_cpu_rtx_cost_model.patch | 2 +- .../800-arm_v5te_no_ldrd_strd.patch | 32 + .../810-arm-softfloat-libgcc.patch | 0 .../820-libgcc_pic.patch | 6 +- .../840-armv4_pass_fix-v4bx_to_ld.patch | 2 +- .../850-use_shared_libgcc.patch | 12 +- .../851-libgcc_no_compat.patch | 0 .../870-ppc_no_crtsavres.patch | 18 + .../881-no_tm_section.patch | 22 + .../900-bad-mips16-crt.patch | 30 + .../910-mbsd_multi.patch | 40 +- .../920-specs_nonfatal_getenv.patch | 4 +- .../930-fix-mips-noexecstack.patch | 6 +- .../940-no-clobber-stamp-bits.patch | 33 + .../950-cpp_file_path_translation.patch | 181 +++ toolchain/gdb/Makefile | 4 +- .../gdb/patches/100-no_extern_inline.patch | 12 +- toolchain/gdb/patches/110-no_testsuite.patch | 6 +- .../120-fix-compile-flag-mismatch.patch | 2 +- toolchain/glibc/common.mk | 4 +- toolchain/kernel-headers/Makefile | 8 +- toolchain/musl/Config.in | 12 - toolchain/musl/common.mk | 11 +- .../musl/patches/100-add_glob_onlydir.patch | 6 +- .../patches/110-read_timezone_from_fs.patch | 2 +- .../patches/200-add_libssp_nonshared.patch | 4 +- ...ribute-to-some-function-declarations.patch | 10 +- .../musl/patches/901-crypt_size_hack.patch | 65 +- toolchain/nasm/Makefile | 4 +- ...rt-upstream-GCC8-compatibility-fixes.patch | 15 + toolchain/uClibc/common.mk | 4 +- 80 files changed, 795 insertions(+), 1668 deletions(-) create mode 100644 toolchain/binutils/patches/2.30/100-PR23254-ld.bfd-mishandles-file-pointers-while-scanni.patch rename toolchain/binutils/patches/{2.32 => 2.30}/300-001_ld_makefile_patch.patch (92%) rename toolchain/binutils/patches/{2.32 => 2.30}/300-012_check_ldrunpath_length.patch (85%) rename toolchain/binutils/patches/{2.32 => 2.30}/400-mips_no_dynamic_linking_sym.patch (79%) rename toolchain/binutils/patches/{2.32 => 2.30}/500-Change-default-emulation-for-mips64-linux.patch (94%) delete mode 100644 toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/002-case_insensitive.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/010-documentation.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/110-Fix-MIPS-PR-84790.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/230-musl_libssp.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/300-mips_Os_cpu_rtx_cost_model.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/800-arm_v5te_no_ldrd_strd.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/820-libgcc_pic.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/840-armv4_pass_fix-v4bx_to_ld.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/850-use_shared_libgcc.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/851-libgcc_no_compat.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/870-ppc_no_crtsavres.patch (84%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/881-no_tm_section.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/900-bad-mips16-crt.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/910-mbsd_multi.patch (97%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/920-specs_nonfatal_getenv.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/930-fix-mips-noexecstack.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/931-libffi-fix-MIPS-softfloat-build-issue.patch (100%) rename toolchain/gcc/patches/{8.3.0 => 8.2.0}/960-gotools-fix-compilation-when-making-cross-compiler.patch (100%) delete mode 100644 toolchain/gcc/patches/9.2.0/100-Fix_uninitialised_use_in_mips_split_move.patch delete mode 100644 toolchain/gcc/patches/9.2.0/110-Fix-MIPS-PR-84790.patch delete mode 100644 toolchain/gcc/patches/9.2.0/230-musl_libssp.patch delete mode 100644 toolchain/gcc/patches/9.2.0/870-ppc_no_crtsavres.patch delete mode 100644 toolchain/gcc/patches/9.2.0/881-no_tm_section.patch delete mode 100644 toolchain/gcc/patches/9.2.0/900-bad-mips16-crt.patch delete mode 100644 toolchain/gcc/patches/9.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch delete mode 100644 toolchain/gcc/patches/9.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch create mode 100644 toolchain/gcc/patches/arc-2017.09-release/001-revert_register_mode_search.patch rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/002-case_insensitive.patch (100%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/010-documentation.patch (94%) create mode 100644 toolchain/gcc/patches/arc-2017.09-release/230-musl_libssp.patch rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/300-mips_Os_cpu_rtx_cost_model.patch (91%) create mode 100644 toolchain/gcc/patches/arc-2017.09-release/800-arm_v5te_no_ldrd_strd.patch rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/810-arm-softfloat-libgcc.patch (100%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/820-libgcc_pic.patch (90%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/840-armv4_pass_fix-v4bx_to_ld.patch (97%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/850-use_shared_libgcc.patch (89%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/851-libgcc_no_compat.patch (100%) create mode 100644 toolchain/gcc/patches/arc-2017.09-release/870-ppc_no_crtsavres.patch create mode 100644 toolchain/gcc/patches/arc-2017.09-release/881-no_tm_section.patch create mode 100644 toolchain/gcc/patches/arc-2017.09-release/900-bad-mips16-crt.patch rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/910-mbsd_multi.patch (84%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/920-specs_nonfatal_getenv.patch (87%) rename toolchain/gcc/patches/{9.2.0 => arc-2017.09-release}/930-fix-mips-noexecstack.patch (95%) create mode 100644 toolchain/gcc/patches/arc-2017.09-release/940-no-clobber-stamp-bits.patch create mode 100644 toolchain/gcc/patches/arc-2017.09-release/950-cpp_file_path_translation.patch delete mode 100644 toolchain/musl/Config.in create mode 100644 toolchain/nasm/patches/100-backport-upstream-GCC8-compatibility-fixes.patch diff --git a/include/target.mk b/include/target.mk index cd64443866..2a74838263 100644 --- a/include/target.mk +++ b/include/target.mk @@ -18,7 +18,7 @@ kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw wget libustream-openssl c default-settings luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \ luci-app-filetransfer luci-app-vsftpd ddns-scripts_aliyun luci-app-ssr-plus \ luci-app-pptp-server luci-app-arpbind luci-app-vlmcsd luci-app-wifischedule luci-app-wol luci-app-ramfree \ -luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-usb-printer luci-app-accesscontrol luci-app-zerotier +luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-usb-printer luci-app-accesscontrol luci-app-zerotier luci-app-xlnetacc # For nas targets DEFAULT_PACKAGES.nas:=fdisk lsblk mdadm automount autosamba luci-app-usb-printer # For router targets @@ -56,7 +56,7 @@ else endif endif -ifneq ($(filter 4.9,$(KERNEL_PATCHVER)),) +ifneq ($(filter 3.18 4.9,$(KERNEL_PATCHVER)),) DEFAULT_PACKAGES.router:=$(filter-out kmod-ipt-offload,$(DEFAULT_PACKAGES.router)) endif @@ -188,6 +188,26 @@ ifeq ($(DUMP),1) endif ifneq ($(findstring arm,$(ARCH)),) CPU_TYPE ?= xscale + CPU_CFLAGS_arm920t = -mcpu=arm920t + CPU_CFLAGS_arm926ej-s = -mcpu=arm926ej-s + CPU_CFLAGS_arm1136j-s = -mcpu=arm1136j-s + CPU_CFLAGS_arm1176jzf-s = -mcpu=arm1176jzf-s + CPU_CFLAGS_cortex-a5 = -mcpu=cortex-a5 + CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7 + CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8 + CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9 + CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15 + CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53 + CPU_CFLAGS_cortex-a72 = -mcpu=cortex-a72 + CPU_CFLAGS_fa526 = -mcpu=fa526 + CPU_CFLAGS_mpcore = -mcpu=mpcore + CPU_CFLAGS_xscale = -mcpu=xscale + ifeq ($(CONFIG_SOFT_FLOAT),) + CPU_CFLAGS_neon = -mfpu=neon + CPU_CFLAGS_vfp = -mfpu=vfp + CPU_CFLAGS_vfpv3 = -mfpu=vfpv3-d16 + CPU_CFLAGS_neon-vfpv4 = -mfpu=neon-vfpv4 + endif endif ifeq ($(ARCH),powerpc) CPU_CFLAGS_603e:=-mcpu=603e @@ -230,9 +250,6 @@ ifeq ($(DUMP),1) .SILENT: $(TMP_CONFIG) .PRECIOUS: $(TMP_CONFIG) - ifdef KERNEL_TESTING_PATCHVER - FEATURES += testing-kernel - endif ifneq ($(CONFIG_OF),) FEATURES += dt endif @@ -291,7 +308,6 @@ define BuildTargets/DumpCurrent echo 'Target-Optimization: $(if $(CFLAGS),$(CFLAGS),$(DEFAULT_CFLAGS))'; \ echo 'CPU-Type: $(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))'; \ echo 'Linux-Version: $(LINUX_VERSION)'; \ - $(if $(LINUX_TESTING_VERSION),echo 'Linux-Testing-Version: $(LINUX_TESTING_VERSION)';) \ echo 'Linux-Release: $(LINUX_RELEASE)'; \ echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'; \ $(if $(SUBTARGET),,$(if $(DEFAULT_SUBTARGET), echo 'Default-Subtarget: $(DEFAULT_SUBTARGET)'; )) \ diff --git a/rules.mk b/rules.mk index 1bf59fbb4a..e97b3f6491 100644 --- a/rules.mk +++ b/rules.mk @@ -139,11 +139,11 @@ else TOOLCHAIN_DIR_NAME:=toolchain-$(GNU_TARGET_NAME) endif -ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_TARGET_uml)),) - ifeq ($(CONFIG_GCC_USE_IREMAP),y) - iremap = -iremap$(1):$(2) +ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),) + ifeq ($(CONFIG_GCC_USE_EMBEDDED_PATH_REMAP),y) + iremap = -fmacro-prefix-map=$(1)=$(2) else - iremap = -ffile-prefix-map=$(1)=$(2) + iremap = -iremap$(1):$(2) endif endif diff --git a/toolchain/Config.in b/toolchain/Config.in index 762f4e10d7..47e1c787df 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -42,7 +42,7 @@ menuconfig EXTERNAL_TOOLCHAIN bool prompt "Use external toolchain" if DEVEL help - If enabled, the buildroot will compile using an existing toolchain instead of + If enabled, LEDE will compile using an existing toolchain instead of compiling one. config NATIVE_TOOLCHAIN @@ -51,7 +51,7 @@ menuconfig EXTERNAL_TOOLCHAIN depends on EXTERNAL_TOOLCHAIN select NO_STRIP help - If enabled, the buildroot will compile using the native toolchain for your + If enabled, LEDE will compile using the native toolchain for your host instead of compiling one. config TARGET_NAME @@ -238,6 +238,7 @@ comment "C Library" choice prompt "C Library implementation" if TOOLCHAINOPTS default LIBC_USE_UCLIBC if arc + default LIBC_USE_GLIBC if powerpc64 default LIBC_USE_MUSL help Select the C library implementation. @@ -250,17 +251,17 @@ choice config LIBC_USE_UCLIBC select USE_UCLIBC bool "Use uClibc" - depends on BROKEN || arc + depends on !(aarch64 || aarch64_be || powerpc64) + depends on BROKEN || !(arm || armeb || i386 || x86_64 || mips || mipsel || mips64 || mips64el || powerpc) config LIBC_USE_MUSL select USE_MUSL bool "Use musl" - depends on !arc + depends on !(arc || powerpc64) endchoice source "toolchain/uClibc/Config.in" -source "toolchain/musl/Config.in" comment "Debuggers" depends on TOOLCHAINOPTS @@ -273,6 +274,7 @@ config GDB Enable if you want to build the gdb. config USE_GLIBC + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (powerpc64) bool config USE_UCLIBC @@ -280,7 +282,7 @@ config USE_UCLIBC bool config USE_MUSL - default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc) + default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && !(arc || powerpc64) bool config SSP_SUPPORT diff --git a/toolchain/Makefile b/toolchain/Makefile index 23a5529eed..0336b2f72c 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -49,7 +49,7 @@ ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) $(curdir)/gcc/initial/compile+=$(curdir)/binutils/compile $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/compile - $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile $(curdir)/kernel-headers/compile + $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/compile $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/compile endif diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index 685e89be96..14c0d53d43 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -3,24 +3,30 @@ choice prompt "Binutils Version" if TOOLCHAINOPTS default BINUTILS_USE_VERSION_2_31_1 if !arc - default BINUTILS_USE_VERSION_2_32 if arc + default BINUTILS_USE_VERSION_2_29_ARC if arc help Select the version of binutils you wish to use. + config BINUTILS_USE_VERSION_2_29_ARC + depends on arc + bool "ARC binutils 2.29" + select BINUTILS_VERSION_2_29_ARC + config BINUTILS_USE_VERSION_2_29_1 depends on !arc bool "Binutils 2.29.1" select BINUTILS_VERSION_2_29_1 + config BINUTILS_USE_VERSION_2_30 + depends on !arc + bool "Binutils 2.30" + select BINUTILS_VERSION_2_30 + config BINUTILS_USE_VERSION_2_31_1 depends on !arc bool "Binutils 2.31.1" select BINUTILS_VERSION_2_31_1 - config BINUTILS_USE_VERSION_2_32 - bool "Binutils 2.32" - select BINUTILS_VERSION_2_32 - endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 3ffcf57347..fc024676d1 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -1,16 +1,20 @@ +config BINUTILS_VERSION_2_29_ARC + default y if (!TOOLCHAINOPTS && arc) + bool + config BINUTILS_VERSION_2_29_1 bool +config BINUTILS_VERSION_2_30 + bool + config BINUTILS_VERSION_2_31_1 default y if (!TOOLCHAINOPTS && !arc) bool -config BINUTILS_VERSION_2_32 - default y if (!TOOLCHAINOPTS && arc) - bool - config BINUTILS_VERSION string default "2.29.1" if BINUTILS_VERSION_2_29_1 + default "2.30" if BINUTILS_VERSION_2_30 default "2.31.1" if BINUTILS_VERSION_2_31_1 - default "2.32" if BINUTILS_VERSION_2_32 + default "arc-2017.09" if BINUTILS_VERSION_2_29_ARC diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 24eaf70566..b988598197 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -19,12 +19,21 @@ ifeq ($(PKG_VERSION),2.29.1) PKG_HASH:=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 endif +ifeq ($(PKG_VERSION),2.30) + PKG_HASH:=6e46b8aeae2f727a36f0bd9505e405768a72218f1796f0d09757d45209871ae6 +endif + ifeq ($(PKG_VERSION),2.31.1) PKG_HASH:=5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86 endif -ifeq ($(PKG_VERSION),2.32) - PKG_HASH:=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04 +ifneq ($(CONFIG_BINUTILS_VERSION_2_29_ARC),) + PKG_REV:=arc-2017.09-release + PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/$(PKG_REV)/ + PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.gz + PKG_HASH:=2ea086fd5521e942926dd6ff6922ce31c29ee7ffc754fca3d06385e0f27600f8 + BINUTILS_DIR:=$(PKG_NAME)-gdb-$(PKG_REV) + HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(BINUTILS_DIR) endif HOST_BUILD_PARALLEL:=1 @@ -33,33 +42,34 @@ PATCH_DIR:=./patches/$(PKG_VERSION) include $(INCLUDE_DIR)/toolchain-build.mk -HOST_CONFIGURE_ARGS = \ - --prefix=$(TOOLCHAIN_DIR) \ - --build=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --target=$(REAL_GNU_TARGET_NAME) \ - --with-sysroot=$(TOOLCHAIN_DIR) \ - --enable-deterministic-archives \ - --enable-plugins \ - --disable-multilib \ - --disable-werror \ - --disable-nls \ - --disable-sim \ - --disable-gdb \ - $(GRAPHITE_CONFIGURE) \ - $(SOFT_FLOAT_CONFIG_OPTION) \ - $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) +BINUTILS_CONFIGURE:= \ + ./configure \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --with-sysroot=$(TOOLCHAIN_DIR) \ + --enable-deterministic-archives \ + --enable-plugins \ + --disable-multilib \ + --disable-werror \ + --disable-nls \ + --disable-sim \ + --disable-gdb \ + $(GRAPHITE_CONFIGURE) \ + $(SOFT_FLOAT_CONFIG_OPTION) \ + $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) ifneq ($(CONFIG_SSP_SUPPORT),) - HOST_CONFIGURE_ARGS+= \ + BINUTILS_CONFIGURE+= \ --enable-libssp else - HOST_CONFIGURE_ARGS+= \ + BINUTILS_CONFIGURE+= \ --disable-libssp endif ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) - HOST_CONFIGURE_ARGS+= \ + BINUTILS_CONFIGURE+= \ --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) endif @@ -70,6 +80,12 @@ define Host/Prepare $(SED) 's, " Linaro.*,,' $(HOST_BUILD_DIR)/bfd/version.h endef +define Host/Configure + (cd $(HOST_BUILD_DIR); \ + $(BINUTILS_CONFIGURE) \ + ); +endef + define Host/Compile +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all endef diff --git a/toolchain/binutils/patches/2.30/100-PR23254-ld.bfd-mishandles-file-pointers-while-scanni.patch b/toolchain/binutils/patches/2.30/100-PR23254-ld.bfd-mishandles-file-pointers-while-scanni.patch new file mode 100644 index 0000000000..8a0b675538 --- /dev/null +++ b/toolchain/binutils/patches/2.30/100-PR23254-ld.bfd-mishandles-file-pointers-while-scanni.patch @@ -0,0 +1,112 @@ +From: Alan Modra +Date: Tue, 5 Jun 2018 21:04:00 +0930 +Subject: [PATCH] PR23254, ld.bfd mishandles file pointers while scanning + archive + +Best practice is to not mix lseek/read with fseek/fread on the same +underlying file descriptor, as not all stdio implementations will cope. +Since the plugin uses lseek/read while bfd uses fseek/fread this patch +reopens the file for exclusive use by the plugin rather than trying to +restore the file descriptor. That allows the plugin to read the file +after plugin_call_claim_file too. + +bfd/ + PR 23254 + * plugin.c (bfd_plugin_open_input): Allow for possibility of + nested archives. Open file again for plugin. + (try_claim): Don't save and restore file position. Close file + if not claimed. + * sysdep.h (O_BINARY): Define. +ld/ + PR 23254 + * plugin.c (plugin_call_claim_file): Revert 2016-07-19 patch. + (plugin_object_p): Don't dup file descriptor. +--- + +--- a/bfd/plugin.c ++++ b/bfd/plugin.c +@@ -165,14 +165,22 @@ bfd_plugin_open_input (bfd *ibfd, struct + bfd *iobfd; + + iobfd = ibfd; +- if (ibfd->my_archive && !bfd_is_thin_archive (ibfd->my_archive)) +- iobfd = ibfd->my_archive; ++ while (iobfd->my_archive ++ && !bfd_is_thin_archive (iobfd->my_archive)) ++ iobfd = iobfd->my_archive; + file->name = iobfd->filename; + + if (!iobfd->iostream && !bfd_open_file (iobfd)) + return 0; + +- file->fd = fileno ((FILE *) iobfd->iostream); ++ /* The plugin API expects that the file descriptor won't be closed ++ and reused as done by the bfd file cache. So open it again. ++ dup isn't good enough. plugin IO uses lseek/read while BFD uses ++ fseek/fread. It isn't wise to mix the unistd and stdio calls on ++ the same underlying file descriptor. */ ++ file->fd = open (file->name, O_RDONLY | O_BINARY); ++ if (file->fd < 0) ++ return 0; + + if (iobfd == ibfd) + { +@@ -196,12 +204,12 @@ try_claim (bfd *abfd) + int claimed = 0; + struct ld_plugin_input_file file; + ++ file.handle = abfd; + if (!bfd_plugin_open_input (abfd, &file)) + return 0; +- file.handle = abfd; +- off_t cur_offset = lseek (file.fd, 0, SEEK_CUR); + claim_file (&file, &claimed); +- lseek (file.fd, cur_offset, SEEK_SET); ++ if (!claimed) ++ close (file.fd); + return claimed; + } + +--- a/bfd/sysdep.h ++++ b/bfd/sysdep.h +@@ -108,6 +108,10 @@ extern char *strrchr (); + #ifndef O_ACCMODE + #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) + #endif ++/* Systems that don't already define this, don't need it. */ ++#ifndef O_BINARY ++#define O_BINARY 0 ++#endif + + #ifndef SEEK_SET + #define SEEK_SET 0 +--- a/ld/plugin.c ++++ b/ld/plugin.c +@@ -1053,14 +1053,10 @@ plugin_call_claim_file (const struct ld_ + { + if (curplug->claim_file_handler) + { +- off_t cur_offset; + enum ld_plugin_status rv; + + called_plugin = curplug; +- cur_offset = lseek (file->fd, 0, SEEK_CUR); + rv = (*curplug->claim_file_handler) (file, claimed); +- if (!*claimed) +- lseek (file->fd, cur_offset, SEEK_SET); + called_plugin = NULL; + if (rv != LDPS_OK) + set_plugin_error (curplug->name); +@@ -1126,12 +1122,6 @@ plugin_object_p (bfd *ibfd) + } + + file.handle = input; +- /* The plugin API expects that the file descriptor won't be closed +- and reused as done by the bfd file cache. So dup one. */ +- file.fd = dup (file.fd); +- if (file.fd < 0) +- return NULL; +- + input->abfd = abfd; + input->view_buffer.addr = NULL; + input->view_buffer.filesize = 0; diff --git a/toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.30/300-001_ld_makefile_patch.patch similarity index 92% rename from toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch rename to toolchain/binutils/patches/2.30/300-001_ld_makefile_patch.patch index 7b8300efac..4365197f74 100644 --- a/toolchain/binutils/patches/2.32/300-001_ld_makefile_patch.patch +++ b/toolchain/binutils/patches/2.30/300-001_ld_makefile_patch.patch @@ -11,7 +11,7 @@ EMULATION_OFILES = @EMULATION_OFILES@ --- a/ld/Makefile.in +++ b/ld/Makefile.in -@@ -563,7 +563,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) +@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. diff --git a/toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.30/300-012_check_ldrunpath_length.patch similarity index 85% rename from toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch rename to toolchain/binutils/patches/2.30/300-012_check_ldrunpath_length.patch index 1e8695f2fc..6f51a7205e 100644 --- a/toolchain/binutils/patches/2.32/300-012_check_ldrunpath_length.patch +++ b/toolchain/binutils/patches/2.30/300-012_check_ldrunpath_length.patch @@ -1,6 +1,6 @@ --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em -@@ -1471,6 +1471,8 @@ fragment <collect, &bh))) -@@ -8013,6 +8014,7 @@ _bfd_mips_elf_create_dynamic_sections (b +@@ -7889,6 +7890,7 @@ _bfd_mips_elf_create_dynamic_sections (b if (! bfd_elf_link_record_dynamic_symbol (info, h)) return FALSE; diff --git a/toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.30/500-Change-default-emulation-for-mips64-linux.patch similarity index 94% rename from toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch rename to toolchain/binutils/patches/2.30/500-Change-default-emulation-for-mips64-linux.patch index bd7f7f29ad..daf118f8c7 100644 --- a/toolchain/binutils/patches/2.32/500-Change-default-emulation-for-mips64-linux.patch +++ b/toolchain/binutils/patches/2.30/500-Change-default-emulation-for-mips64-linux.patch @@ -1,6 +1,6 @@ --- a/bfd/config.bfd +++ b/bfd/config.bfd -@@ -919,12 +919,12 @@ case "${targ}" in +@@ -1189,12 +1189,12 @@ case "${targ}" in targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" ;; mips64*el-*-linux*) @@ -19,7 +19,7 @@ targ_defvec=mips_elf32_trad_le_vec --- a/ld/configure.tgt +++ b/ld/configure.tgt -@@ -468,11 +468,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip +@@ -535,11 +535,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip mips*-*-vxworks*) targ_emul=elf32ebmipvxworks targ_extra_emuls="elf32elmipvxworks" ;; mips*-*-windiss) targ_emul=elf32mipswindiss ;; diff --git a/toolchain/fortify-headers/Makefile b/toolchain/fortify-headers/Makefile index a6151bb2f1..79dd907d0c 100644 --- a/toolchain/fortify-headers/Makefile +++ b/toolchain/fortify-headers/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=fortify-headers -PKG_VERSION:=1.1 +PKG_VERSION:=1.0 PKG_RELEASE=1 PKG_SOURCE_URL:=http://dl.2f30.org/releases PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=6ba5d860a2d2ba4c3346924b93930c34856eafe148bdbdf271ecab8065201fb6 +PKG_HASH:=026e4cc0f2aa69b7922b1bc8838491048b497faf1c8b20450741114f9ea3775b include $(INCLUDE_DIR)/toolchain-build.mk diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in index 7d7f34210a..c3208d372c 100644 --- a/toolchain/gcc/Config.in +++ b/toolchain/gcc/Config.in @@ -2,10 +2,16 @@ choice prompt "GCC compiler Version" if TOOLCHAINOPTS - default GCC_USE_VERSION_8 + default GCC_USE_VERSION_7_1_ARC if arc + default GCC_USE_VERSION_7 help Select the version of gcc you wish to use. + config GCC_USE_VERSION_7_1_ARC + select GCC_VERSION_7_1_ARC + bool "gcc 7.1.x with support of ARC cores" + depends on arc + config GCC_USE_VERSION_5 bool "gcc 5.x" depends on !arc @@ -16,9 +22,7 @@ choice config GCC_USE_VERSION_8 bool "gcc 8.x" - - config GCC_USE_VERSION_9 - bool "gcc 9.x" + depends on !arc endchoice config GCC_USE_GRAPHITE diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index 687857bd1f..9bfe1b8aaf 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -1,23 +1,23 @@ +config GCC_VERSION_7_1_ARC + default y if (!TOOLCHAINOPTS && arc) + bool + config GCC_VERSION_5 default y if GCC_USE_VERSION_5 bool -config GCC_VERSION_7 - default y if GCC_USE_VERSION_7 +config GCC_VERSION_8 + default y if GCC_USE_VERSION_8 bool -config GCC_VERSION_9 - default y if GCC_USE_VERSION_9 +config GCC_USE_EMBEDDED_PATH_REMAP + default y if GCC_VERSION_8 + default n bool config GCC_VERSION string default "5.5.0" if GCC_VERSION_5 - default "7.4.0" if GCC_VERSION_7 - default "9.2.0" if GCC_VERSION_9 - default "8.3.0" - -config GCC_USE_IREMAP - bool - default y if ( GCC_USE_VERSION_5 || GCC_USE_VERSION_7 ) - default n + default "arc-2017.09-release" if GCC_VERSION_7_1_ARC + default "8.2.0" if GCC_VERSION_8 + default "7.4.0" diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 883d2a0b4a..b75fce57ef 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -36,17 +36,23 @@ ifeq ($(PKG_VERSION),7.4.0) PKG_HASH:=eddde28d04f334aec1604456e536416549e9b1aa137fc69204e65eb0c009fe51 endif -ifeq ($(PKG_VERSION),8.3.0) - PKG_HASH:=64baadfe6cc0f4947a84cb12d7f0dfaf45bb58b7e92461639596c21e02d97d2c +ifeq ($(PKG_VERSION),8.2.0) + PKG_HASH:=196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080 endif -ifeq ($(PKG_VERSION),9.2.0) - PKG_HASH:=ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206 +ifneq ($(CONFIG_GCC_VERSION_7_1_ARC),) + PKG_VERSION:=7.1.1 + PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/archive/$(GCC_VERSION) + PKG_SOURCE:=$(PKG_NAME)-$(GCC_VERSION).tar.gz + PKG_HASH:=90596af8b9c26a434cec0a3b3d37d0c7c755ab6a65496af6ca32529fab5a6cfe + PKG_REV:=2017.09-release + GCC_DIR:=gcc-arc-$(PKG_REV) + HOST_BUILD_DIR = $(BUILD_DIR_HOST)/$(PKG_NAME)-$(GCC_VERSION) endif PATCH_DIR=../patches/$(GCC_VERSION) -BUGURL=http://bugs.openwrt.org/ +BUGURL=http://www.lede-project.org/bugs/ PKGVERSION=OpenWrt GCC $(PKG_VERSION) $(REVISION) HOST_BUILD_PARALLEL:=1 @@ -117,12 +123,15 @@ GCC_CONFIGURE:= \ --with-gmp=$(TOPDIR)/staging_dir/host \ --with-mpfr=$(TOPDIR)/staging_dir/host \ --with-mpc=$(TOPDIR)/staging_dir/host \ - --disable-decimal-float \ - --with-diagnostics-color=auto-if-env + --disable-decimal-float ifneq ($(CONFIG_mips)$(CONFIG_mipsel),) GCC_CONFIGURE += --with-mips-plt endif +ifndef GCC_VERSION_4_8 + GCC_CONFIGURE += --with-diagnostics-color=auto-if-env +endif + ifneq ($(CONFIG_GCC_DEFAULT_PIE),) GCC_CONFIGURE+= \ --enable-default-pie @@ -165,20 +174,11 @@ ifneq ($(GCC_ARCH),) GCC_CONFIGURE+= --with-arch=$(GCC_ARCH) endif -ifeq ($(CONFIG_arm),y) - GCC_CONFIGURE+= \ - --with-cpu=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE))) - - ifneq ($(CONFIG_SOFT_FLOAT),y) +ifneq ($(CONFIG_SOFT_FLOAT),y) + ifeq ($(CONFIG_arm),y) GCC_CONFIGURE+= \ - --with-fpu=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE))) \ --with-float=hard endif - - # Do not let TARGET_CFLAGS get poisoned by extra CPU optimization flags - # that do not belong here. The cpu,fpu type should be specified via - # --with-cpu and --with-fpu for ARM and not CFLAGS. - TARGET_CFLAGS:=$(filter-out -m%,$(call qstrip,$(TARGET_CFLAGS))) endif ifeq ($(CONFIG_TARGET_x86)$(CONFIG_USE_GLIBC)$(CONFIG_INSTALL_GCCGO),yyy) diff --git a/toolchain/gcc/final/Makefile b/toolchain/gcc/final/Makefile index 0315b9d1f1..b815f677d6 100644 --- a/toolchain/gcc/final/Makefile +++ b/toolchain/gcc/final/Makefile @@ -4,6 +4,7 @@ include ../common.mk GCC_CONFIGURE += \ --with-headers=$(TOOLCHAIN_DIR)/include \ + --disable-libsanitizer \ --enable-languages=$(TARGET_LANGUAGES) \ --enable-shared \ --enable-threads \ @@ -11,10 +12,6 @@ GCC_CONFIGURE += \ --enable-lto \ --with-libelf=$(TOPDIR)/staging_dir/host -ifndef CONFIG_USE_GLIBC - GCC_CONFIGURE += --disable-libsanitizer -endif - ifdef CONFIG_USE_MUSL GCC_MAKE += gcc_cv_libc_provides_ssp=yes endif diff --git a/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch b/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch deleted file mode 100644 index 5ec93f5247..0000000000 --- a/toolchain/gcc/patches/5.5.0/050-libitm-Don-t-redefine-__always_inline-in-local_atomi.patch +++ /dev/null @@ -1,1092 +0,0 @@ -From 55f12fce4ccf77513644a247f9c401a5b1fa2402 Mon Sep 17 00:00:00 2001 -From: torvald -Date: Thu, 20 Aug 2015 17:55:24 +0000 -Subject: [PATCH] libitm: Don't redefine __always_inline in local_atomic. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227040 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - libitm/ChangeLog | 6 + - libitm/local_atomic | 299 ++++++++++++++++++++++---------------------- - 2 files changed, 155 insertions(+), 150 deletions(-) - -diff --git a/libitm/ChangeLog b/libitm/ChangeLog -index 569d5bbbf14..6285c85fd44 100644 ---- a/libitm/ChangeLog -+++ b/libitm/ChangeLog -@@ -1,3 +1,9 @@ -+2015-08-20 Gleb Fotengauer-Malinovskiy (tiny change) -+ -+ PR libitm/61164 -+ * local_atomic (__always_inline): Rename to... -+ (__libitm_always_inline): ... this. -+ - 2017-10-10 Release Manager - - PR target/52482 -diff --git a/libitm/local_atomic b/libitm/local_atomic -index 3119be40d09..e536275dc9f 100644 ---- a/libitm/local_atomic -+++ b/libitm/local_atomic -@@ -41,8 +41,7 @@ - #ifndef _GLIBCXX_ATOMIC - #define _GLIBCXX_ATOMIC 1 - --#undef __always_inline --#define __always_inline __attribute__((always_inline)) -+#define __libitm_always_inline __attribute__((always_inline)) - - // #pragma GCC system_header - -@@ -74,7 +73,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - memory_order_seq_cst - } memory_order; - -- inline __always_inline memory_order -+ inline __libitm_always_inline memory_order - __calculate_memory_order(memory_order __m) noexcept - { - const bool __cond1 = __m == memory_order_release; -@@ -84,13 +83,13 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __mo2; - } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_thread_fence(memory_order __m) noexcept - { - __atomic_thread_fence (__m); - } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_signal_fence(memory_order __m) noexcept - { - __atomic_thread_fence (__m); -@@ -280,19 +279,19 @@ namespace std // _GLIBCXX_VISIBILITY(default) - // Conversion to ATOMIC_FLAG_INIT. - atomic_flag(bool __i) noexcept : __atomic_flag_base({ __i }) { } - -- __always_inline bool -+ __libitm_always_inline bool - test_and_set(memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_test_and_set (&_M_i, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - test_and_set(memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_test_and_set (&_M_i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - clear(memory_order __m = memory_order_seq_cst) noexcept - { - // __glibcxx_assert(__m != memory_order_consume); -@@ -302,7 +301,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_clear (&_M_i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - clear(memory_order __m = memory_order_seq_cst) volatile noexcept - { - // __glibcxx_assert(__m != memory_order_consume); -@@ -455,7 +454,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return __atomic_is_lock_free (sizeof (_M_i), &_M_i); } - -- __always_inline void -+ __libitm_always_inline void - store(__int_type __i, memory_order __m = memory_order_seq_cst) noexcept - { - // __glibcxx_assert(__m != memory_order_acquire); -@@ -465,7 +464,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_i, __i, __m); - } - -- __always_inline void -+ __libitm_always_inline void - store(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -476,7 +475,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_i, __i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -485,7 +484,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -494,21 +493,21 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - exchange(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_exchange_n(&_M_i, __i, __m); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - exchange(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_exchange_n(&_M_i, __i, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m1, memory_order __m2) noexcept - { -@@ -519,7 +518,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -531,7 +530,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 1, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -539,7 +538,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -547,7 +546,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m1, memory_order __m2) noexcept - { -@@ -558,7 +557,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -570,7 +569,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -578,7 +577,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__int_type& __i1, __int_type __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -586,52 +585,52 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_add(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_add(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_add(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_add(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_sub(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_sub(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_sub(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_sub(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_and(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_and(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_and(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_and(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_or(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_or(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_or(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_or(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_xor(__int_type __i, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_xor(&_M_i, __i, __m); } - -- __always_inline __int_type -+ __libitm_always_inline __int_type - fetch_xor(__int_type __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_xor(&_M_i, __i, __m); } -@@ -733,7 +732,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return __atomic_is_lock_free (sizeof (_M_p), &_M_p); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -744,7 +743,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_p, __p, __m); - } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -755,7 +754,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __atomic_store_n(&_M_p, __p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -764,7 +763,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { - // __glibcxx_assert(__m != memory_order_release); -@@ -773,21 +772,21 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_load_n(&_M_p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { - return __atomic_exchange_n(&_M_p, __p, __m); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { - return __atomic_exchange_n(&_M_p, __p, __m); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) noexcept -@@ -799,7 +798,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept -@@ -811,22 +810,22 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return __atomic_compare_exchange_n(&_M_p, &__p1, __p2, 0, __m1, __m2); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_add(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_add(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return __atomic_fetch_sub(&_M_p, __d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return __atomic_fetch_sub(&_M_p, __d, __m); } -@@ -870,67 +869,67 @@ namespace std // _GLIBCXX_VISIBILITY(default) - bool - is_lock_free() const volatile noexcept { return _M_base.is_lock_free(); } - -- __always_inline void -+ __libitm_always_inline void - store(bool __i, memory_order __m = memory_order_seq_cst) noexcept - { _M_base.store(__i, __m); } - -- __always_inline void -+ __libitm_always_inline void - store(bool __i, memory_order __m = memory_order_seq_cst) volatile noexcept - { _M_base.store(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - load(memory_order __m = memory_order_seq_cst) const noexcept - { return _M_base.load(__m); } - -- __always_inline bool -+ __libitm_always_inline bool - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { return _M_base.load(__m); } - -- __always_inline bool -+ __libitm_always_inline bool - exchange(bool __i, memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.exchange(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - exchange(bool __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.exchange(__i, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.compare_exchange_weak(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(bool& __i1, bool __i2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_base.compare_exchange_strong(__i1, __i2, __m); } -@@ -980,11 +979,11 @@ namespace std // _GLIBCXX_VISIBILITY(default) - store(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept - { __atomic_store(&_M_i, &__i, _m); } - -- __always_inline void -+ __libitm_always_inline void - store(_Tp __i, memory_order _m = memory_order_seq_cst) volatile noexcept - { __atomic_store(&_M_i, &__i, _m); } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - load(memory_order _m = memory_order_seq_cst) const noexcept - { - _Tp tmp; -@@ -992,7 +991,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - load(memory_order _m = memory_order_seq_cst) const volatile noexcept - { - _Tp tmp; -@@ -1000,7 +999,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - exchange(_Tp __i, memory_order _m = memory_order_seq_cst) noexcept - { - _Tp tmp; -@@ -1008,7 +1007,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline _Tp -+ __libitm_always_inline _Tp - exchange(_Tp __i, - memory_order _m = memory_order_seq_cst) volatile noexcept - { -@@ -1017,50 +1016,50 @@ namespace std // _GLIBCXX_VISIBILITY(default) - return tmp; - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) volatile noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, true, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) noexcept - { return compare_exchange_weak(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return compare_exchange_weak(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, memory_order __s, - memory_order __f) volatile noexcept - { - return __atomic_compare_exchange(&_M_i, &__e, &__i, false, __s, __f); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) noexcept - { return compare_exchange_strong(__e, __i, __m, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(_Tp& __e, _Tp __i, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return compare_exchange_strong(__e, __i, __m, __m); } -@@ -1153,46 +1152,46 @@ namespace std // _GLIBCXX_VISIBILITY(default) - is_lock_free() const volatile noexcept - { return _M_b.is_lock_free(); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.store(__p, __m); } - -- __always_inline void -+ __libitm_always_inline void - store(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.store(__p, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const noexcept - { return _M_b.load(__m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - load(memory_order __m = memory_order_seq_cst) const volatile noexcept - { return _M_b.load(__m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.exchange(__p, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - exchange(__pointer_type __p, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.exchange(__p, __m); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, memory_order __m2) noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -1200,7 +1199,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_weak(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -1208,18 +1207,18 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, memory_order __m2) noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m1, - memory_order __m2) volatile noexcept - { return _M_b.compare_exchange_strong(__p1, __p2, __m1, __m2); } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) noexcept - { -@@ -1227,7 +1226,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline bool -+ __libitm_always_inline bool - compare_exchange_strong(__pointer_type& __p1, __pointer_type __p2, - memory_order __m = memory_order_seq_cst) volatile noexcept - { -@@ -1235,22 +1234,22 @@ namespace std // _GLIBCXX_VISIBILITY(default) - __calculate_memory_order(__m)); - } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.fetch_add(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_add(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.fetch_add(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) noexcept - { return _M_b.fetch_sub(__d, __m); } - -- __always_inline __pointer_type -+ __libitm_always_inline __pointer_type - fetch_sub(ptrdiff_t __d, - memory_order __m = memory_order_seq_cst) volatile noexcept - { return _M_b.fetch_sub(__d, __m); } -@@ -1544,98 +1543,98 @@ namespace std // _GLIBCXX_VISIBILITY(default) - - - // Function definitions, atomic_flag operations. -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set_explicit(atomic_flag* __a, - memory_order __m) noexcept - { return __a->test_and_set(__m); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, - memory_order __m) noexcept - { return __a->test_and_set(__m); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept - { __a->clear(__m); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear_explicit(volatile atomic_flag* __a, - memory_order __m) noexcept - { __a->clear(__m); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set(atomic_flag* __a) noexcept - { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline bool -+ inline __libitm_always_inline bool - atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept - { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear(atomic_flag* __a) noexcept - { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } - -- inline __always_inline void -+ inline __libitm_always_inline void - atomic_flag_clear(volatile atomic_flag* __a) noexcept - { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } - - - // Function templates generally applicable to atomic types. - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_is_lock_free(const atomic<_ITp>* __a) noexcept - { return __a->is_lock_free(); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_is_lock_free(const volatile atomic<_ITp>* __a) noexcept - { return __a->is_lock_free(); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_init(atomic<_ITp>* __a, _ITp __i) noexcept; - - template -- __always_inline void -+ __libitm_always_inline void - atomic_init(volatile atomic<_ITp>* __a, _ITp __i) noexcept; - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store_explicit(atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { __a->store(__i, __m); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store_explicit(volatile atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { __a->store(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load_explicit(const atomic<_ITp>* __a, memory_order __m) noexcept - { return __a->load(__m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load_explicit(const volatile atomic<_ITp>* __a, - memory_order __m) noexcept - { return __a->load(__m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange_explicit(atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->exchange(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange_explicit(volatile atomic<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->exchange(__i, __m); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak_explicit(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1643,7 +1642,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak_explicit(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1651,7 +1650,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_weak(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong_explicit(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1659,7 +1658,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - { return __a->compare_exchange_strong(*__i1, __i2, __m1, __m2); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong_explicit(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2, - memory_order __m1, -@@ -1668,37 +1667,37 @@ namespace std // _GLIBCXX_VISIBILITY(default) - - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store(atomic<_ITp>* __a, _ITp __i) noexcept - { atomic_store_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline void -+ __libitm_always_inline void - atomic_store(volatile atomic<_ITp>* __a, _ITp __i) noexcept - { atomic_store_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load(const atomic<_ITp>* __a) noexcept - { return atomic_load_explicit(__a, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_load(const volatile atomic<_ITp>* __a) noexcept - { return atomic_load_explicit(__a, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange(atomic<_ITp>* __a, _ITp __i) noexcept - { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_exchange(volatile atomic<_ITp>* __a, _ITp __i) noexcept - { return atomic_exchange_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1708,7 +1707,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_weak(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1718,7 +1717,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong(atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1728,7 +1727,7 @@ namespace std // _GLIBCXX_VISIBILITY(default) - } - - template -- __always_inline bool -+ __libitm_always_inline bool - atomic_compare_exchange_strong(volatile atomic<_ITp>* __a, - _ITp* __i1, _ITp __i2) noexcept - { -@@ -1742,158 +1741,158 @@ namespace std // _GLIBCXX_VISIBILITY(default) - // intergral types as specified in the standard, excluding address - // types. - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_add(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_add(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_sub(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_sub(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_and(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_and(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_or(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_or(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor_explicit(__atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_xor(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor_explicit(volatile __atomic_base<_ITp>* __a, _ITp __i, - memory_order __m) noexcept - { return __a->fetch_xor(__i, __m); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_add(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_add_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_sub(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_sub_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_and(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_and_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_or(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_or_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor(__atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } - - template -- __always_inline _ITp -+ __libitm_always_inline _ITp - atomic_fetch_xor(volatile __atomic_base<_ITp>* __a, _ITp __i) noexcept - { return atomic_fetch_xor_explicit(__a, __i, memory_order_seq_cst); } - - - // Partial specializations for pointers. - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_add(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add_explicit(volatile atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_add(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_add(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_add(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_add(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub_explicit(volatile atomic<_ITp*>* __a, - ptrdiff_t __d, memory_order __m) noexcept - { return __a->fetch_sub(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub_explicit(atomic<_ITp*>* __a, ptrdiff_t __d, - memory_order __m) noexcept - { return __a->fetch_sub(__d, __m); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub(volatile atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_sub(__d); } - - template -- __always_inline _ITp* -+ __libitm_always_inline _ITp* - atomic_fetch_sub(atomic<_ITp*>* __a, ptrdiff_t __d) noexcept - { return __a->fetch_sub(__d); } - // @} group atomics --- -2.19.2 - diff --git a/toolchain/gcc/patches/8.3.0/002-case_insensitive.patch b/toolchain/gcc/patches/8.2.0/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/002-case_insensitive.patch rename to toolchain/gcc/patches/8.2.0/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/8.3.0/010-documentation.patch b/toolchain/gcc/patches/8.2.0/010-documentation.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/010-documentation.patch rename to toolchain/gcc/patches/8.2.0/010-documentation.patch diff --git a/toolchain/gcc/patches/8.3.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/8.2.0/110-Fix-MIPS-PR-84790.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/110-Fix-MIPS-PR-84790.patch rename to toolchain/gcc/patches/8.2.0/110-Fix-MIPS-PR-84790.patch diff --git a/toolchain/gcc/patches/8.3.0/230-musl_libssp.patch b/toolchain/gcc/patches/8.2.0/230-musl_libssp.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/230-musl_libssp.patch rename to toolchain/gcc/patches/8.2.0/230-musl_libssp.patch diff --git a/toolchain/gcc/patches/8.3.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/8.2.0/300-mips_Os_cpu_rtx_cost_model.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches/8.2.0/300-mips_Os_cpu_rtx_cost_model.patch diff --git a/toolchain/gcc/patches/8.3.0/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/8.2.0/800-arm_v5te_no_ldrd_strd.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/800-arm_v5te_no_ldrd_strd.patch rename to toolchain/gcc/patches/8.2.0/800-arm_v5te_no_ldrd_strd.patch diff --git a/toolchain/gcc/patches/8.3.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/8.2.0/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches/8.2.0/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/8.3.0/820-libgcc_pic.patch b/toolchain/gcc/patches/8.2.0/820-libgcc_pic.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/820-libgcc_pic.patch rename to toolchain/gcc/patches/8.2.0/820-libgcc_pic.patch diff --git a/toolchain/gcc/patches/8.3.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/8.2.0/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches/8.2.0/840-armv4_pass_fix-v4bx_to_ld.patch diff --git a/toolchain/gcc/patches/8.3.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/8.2.0/850-use_shared_libgcc.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches/8.2.0/850-use_shared_libgcc.patch diff --git a/toolchain/gcc/patches/8.3.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/8.2.0/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches/8.2.0/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/8.3.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch similarity index 84% rename from toolchain/gcc/patches/8.3.0/870-ppc_no_crtsavres.patch rename to toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch index 2aa4b8e373..ecaf75a476 100644 --- a/toolchain/gcc/patches/8.3.0/870-ppc_no_crtsavres.patch +++ b/toolchain/gcc/patches/8.2.0/870-ppc_no_crtsavres.patch @@ -1,6 +1,6 @@ --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c -@@ -24632,7 +24632,7 @@ rs6000_savres_strategy (rs6000_stack_t * +@@ -24501,7 +24501,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) { diff --git a/toolchain/gcc/patches/8.3.0/881-no_tm_section.patch b/toolchain/gcc/patches/8.2.0/881-no_tm_section.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/881-no_tm_section.patch rename to toolchain/gcc/patches/8.2.0/881-no_tm_section.patch diff --git a/toolchain/gcc/patches/8.3.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/8.2.0/900-bad-mips16-crt.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/900-bad-mips16-crt.patch rename to toolchain/gcc/patches/8.2.0/900-bad-mips16-crt.patch diff --git a/toolchain/gcc/patches/8.3.0/910-mbsd_multi.patch b/toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch similarity index 97% rename from toolchain/gcc/patches/8.3.0/910-mbsd_multi.patch rename to toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch index fb8e25cb18..d9802b6d61 100644 --- a/toolchain/gcc/patches/8.3.0/910-mbsd_multi.patch +++ b/toolchain/gcc/patches/8.2.0/910-mbsd_multi.patch @@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 ; On SVR4 targets, it also controls whether or not to emit a --- a/gcc/opts.c +++ b/gcc/opts.c -@@ -2065,6 +2065,9 @@ common_handle_option (struct gcc_options +@@ -2056,6 +2056,9 @@ common_handle_option (struct gcc_options opts, opts_set, loc, dc); break; @@ -126,7 +126,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 opts->x_warn_larger_than = value != -1; --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -7014,6 +7014,17 @@ This option is only supported for C and +@@ -7012,6 +7012,17 @@ This option is only supported for C and @option{-Wall} and by @option{-Wpedantic}, which can be disabled with @option{-Wno-pointer-sign}. diff --git a/toolchain/gcc/patches/8.3.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/8.2.0/920-specs_nonfatal_getenv.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches/8.2.0/920-specs_nonfatal_getenv.patch diff --git a/toolchain/gcc/patches/8.3.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/8.2.0/930-fix-mips-noexecstack.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches/8.2.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/8.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/8.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/931-libffi-fix-MIPS-softfloat-build-issue.patch rename to toolchain/gcc/patches/8.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch diff --git a/toolchain/gcc/patches/8.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/8.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch similarity index 100% rename from toolchain/gcc/patches/8.3.0/960-gotools-fix-compilation-when-making-cross-compiler.patch rename to toolchain/gcc/patches/8.2.0/960-gotools-fix-compilation-when-making-cross-compiler.patch diff --git a/toolchain/gcc/patches/9.2.0/100-Fix_uninitialised_use_in_mips_split_move.patch b/toolchain/gcc/patches/9.2.0/100-Fix_uninitialised_use_in_mips_split_move.patch deleted file mode 100644 index 3529a19d8c..0000000000 --- a/toolchain/gcc/patches/9.2.0/100-Fix_uninitialised_use_in_mips_split_move.patch +++ /dev/null @@ -1,55 +0,0 @@ -From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001 -From: rsandifo -Date: Sun, 7 Jul 2019 09:49:14 +0000 -Subject: [PATCH] Fix uninitialised use in mips_split_move - -While testing the fix for PR91068, I hit an rtl checking failure -while building newlib. mips_split_move was decomposing an address that -happened to be symbolic and then tried to access the REGNO of the base -register field, which wasn't initialised but which by chance pointed to -valid memory. - -2019-07-07 Richard Sandiford - -gcc/ - * config/mips/mips.c (mips_split_move): Zero-initialize addr - and check whether addr.reg is nonnull before using it. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/ChangeLog | 5 +++++ - gcc/config/mips/mips.c | 4 ++-- - 2 files changed, 7 insertions(+), 2 deletions(-) - ---- a/gcc/ChangeLog -+++ b/gcc/ChangeLog -@@ -1,3 +1,8 @@ -+2019-07-07 Richard Sandiford -+ -+ * config/mips/mips.c (mips_split_move): Zero-initialize addr -+ and check whether addr.reg is nonnull before using it. -+ - 2019-08-12 Release Manager - - * GCC 9.2.0 released. ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum - can forward SRC for DEST. This is most useful if the next insn is a - simple store. */ - rtx_insn *insn = (rtx_insn *)insn_; -- struct mips_address_info addr; -+ struct mips_address_info addr = {}; - if (insn) - { - rtx_insn *next = next_nonnote_nondebug_insn_bb (insn); -@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum - { - rtx tmp = XEXP (src, 0); - mips_classify_address (&addr, tmp, GET_MODE (tmp), true); -- if (REGNO (addr.reg) != REGNO (dest)) -+ if (addr.reg && REGNO (addr.reg) != REGNO (dest)) - validate_change (next, &SET_SRC (set), src, false); - } - else diff --git a/toolchain/gcc/patches/9.2.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/9.2.0/110-Fix-MIPS-PR-84790.patch deleted file mode 100644 index c7e60e3157..0000000000 --- a/toolchain/gcc/patches/9.2.0/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 -@@ -3131,6 +3131,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/9.2.0/230-musl_libssp.patch b/toolchain/gcc/patches/9.2.0/230-musl_libssp.patch deleted file mode 100644 index 41d75b0206..0000000000 --- a/toolchain/gcc/patches/9.2.0/230-musl_libssp.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/gcc/gcc.c -+++ b/gcc/gcc.c -@@ -876,7 +876,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/9.2.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/9.2.0/870-ppc_no_crtsavres.patch deleted file mode 100644 index 06bb0efda2..0000000000 --- a/toolchain/gcc/patches/9.2.0/870-ppc_no_crtsavres.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gcc/config/rs6000/rs6000.c -+++ b/gcc/config/rs6000/rs6000.c -@@ -24365,7 +24365,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/9.2.0/881-no_tm_section.patch b/toolchain/gcc/patches/9.2.0/881-no_tm_section.patch deleted file mode 100644 index fab5db3be5..0000000000 --- a/toolchain/gcc/patches/9.2.0/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 - #endif - - /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/9.2.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/9.2.0/900-bad-mips16-crt.patch deleted file mode 100644 index dd6e9dc889..0000000000 --- a/toolchain/gcc/patches/9.2.0/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/9.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/9.2.0/931-libffi-fix-MIPS-softfloat-build-issue.patch deleted file mode 100644 index fb4cb1533a..0000000000 --- a/toolchain/gcc/patches/9.2.0/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/toolchain/gcc/patches/arc-2017.09-release/001-revert_register_mode_search.patch b/toolchain/gcc/patches/arc-2017.09-release/001-revert_register_mode_search.patch new file mode 100644 index 0000000000..63e3fee003 --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/001-revert_register_mode_search.patch @@ -0,0 +1,77 @@ +commit 31285a20390a5e53a74a2a71d1b5c82f366ddd5a +Author: Felix Fietkau +Date: Tue May 6 11:49:05 2014 +0000 + + gcc: revert an upstream patch that is causing a regression on powerpc + + https://forum.openwrt.org/viewtopic.php?pid=232494#p232494 + + Signed-off-by: Felix Fietkau + + SVN-Revision: 40709 + +Revert of: + +commit 275035b56823b26d5fb7e90fad945b998648edf2 +Author: bergner +Date: Thu Sep 5 14:09:07 2013 +0000 + + PR target/58139 + * reginfo.c (choose_hard_reg_mode): Scan through all mode classes + looking for widest mode. + + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202286 138bc75d-0d04-0410-961f-82ee72b054a4 + + +--- a/gcc/reginfo.c ++++ b/gcc/reginfo.c +@@ -637,35 +637,40 @@ choose_hard_reg_mode (unsigned int regno + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + ++ if (found_mode != VOIDmode) ++ return found_mode; ++ + for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT); + mode != VOIDmode; + mode = GET_MODE_WIDER_MODE (mode)) + if ((unsigned) hard_regno_nregs[regno][mode] == nregs + && HARD_REGNO_MODE_OK (regno, mode) +- && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode)) +- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (found_mode)) ++ && (! call_saved || ! HARD_REGNO_CALL_PART_CLOBBERED (regno, mode))) + found_mode = mode; + + if (found_mode != VOIDmode) diff --git a/toolchain/gcc/patches/9.2.0/002-case_insensitive.patch b/toolchain/gcc/patches/arc-2017.09-release/002-case_insensitive.patch similarity index 100% rename from toolchain/gcc/patches/9.2.0/002-case_insensitive.patch rename to toolchain/gcc/patches/arc-2017.09-release/002-case_insensitive.patch diff --git a/toolchain/gcc/patches/9.2.0/010-documentation.patch b/toolchain/gcc/patches/arc-2017.09-release/010-documentation.patch similarity index 94% rename from toolchain/gcc/patches/9.2.0/010-documentation.patch rename to toolchain/gcc/patches/arc-2017.09-release/010-documentation.patch index 2ceb997960..0106814f41 100644 --- a/toolchain/gcc/patches/9.2.0/010-documentation.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/010-documentation.patch @@ -12,7 +12,7 @@ Date: Tue Feb 26 16:16:33 2013 +0000 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in -@@ -3202,18 +3202,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) +@@ -3121,18 +3121,10 @@ doc/gcc.info: $(TEXI_GCC_FILES) doc/gccint.info: $(TEXI_GCCINT_FILES) doc/cppinternals.info: $(TEXI_CPPINT_FILES) diff --git a/toolchain/gcc/patches/arc-2017.09-release/230-musl_libssp.patch b/toolchain/gcc/patches/arc-2017.09-release/230-musl_libssp.patch new file mode 100644 index 0000000000..eebee9175c --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/230-musl_libssp.patch @@ -0,0 +1,28 @@ +commit 1877bc9d8f2be143fbe530347a945850d0ecd234 +Author: Steven Barth +Date: Mon Jun 22 10:31:07 2015 +0000 + + gcc/musl: rework SSP-support + + Make musl provide libssp_nonshared.a and make GCC link it unconditionally + if musl is used. This should be a no-op if SSP is disabled and seems to be + the only reliable way of dealing with SSP over all packages due to the mess + that is linkerflags handling in packages. + + Signed-off-by: Steven Barth + + SVN-Revision: 46108 + +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -861,7 +861,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/9.2.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/arc-2017.09-release/300-mips_Os_cpu_rtx_cost_model.patch similarity index 91% rename from toolchain/gcc/patches/9.2.0/300-mips_Os_cpu_rtx_cost_model.patch rename to toolchain/gcc/patches/arc-2017.09-release/300-mips_Os_cpu_rtx_cost_model.patch index 5caa852a16..84c0fdab66 100644 --- a/toolchain/gcc/patches/9.2.0/300-mips_Os_cpu_rtx_cost_model.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/300-mips_Os_cpu_rtx_cost_model.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c -@@ -19994,7 +19994,7 @@ mips_option_override (void) +@@ -19784,7 +19784,7 @@ mips_option_override (void) flag_pcc_struct_return = 0; /* Decide which rtx_costs structure to use. */ diff --git a/toolchain/gcc/patches/arc-2017.09-release/800-arm_v5te_no_ldrd_strd.patch b/toolchain/gcc/patches/arc-2017.09-release/800-arm_v5te_no_ldrd_strd.patch new file mode 100644 index 0000000000..76200a1661 --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/800-arm_v5te_no_ldrd_strd.patch @@ -0,0 +1,32 @@ +commit b050f87d13b5dc7ed82feb9a90f4529de58bdf25 +Author: Felix Fietkau +Date: Wed Feb 19 19:20:10 2014 +0000 + + gcc: prevent the use of LDRD/STRD on ARMv5TE + + These instructions are for 64-bit load/store. On ARMv5TE, the CPU + requires addresses to be aligned to 64-bit. When misaligned, behavior is + undefined (effectively either loads the same word twice on LDRD, or + corrupts surrounding memory on STRD). + + On ARMv6 and newer, unaligned access is safe. + + Removing these instructions for ARMv5TE is necessary, because GCC + ignores alignment information in pointers and does unsafe optimizations + that have shown up as bugs in various places. + + Signed-off-by: Felix Fietkau + + SVN-Revision: 39638 + +--- a/gcc/config/arm/arm.h ++++ b/gcc/config/arm/arm.h +@@ -150,7 +150,7 @@ extern tree arm_fp16_type_node; + /* Thumb-1 only. */ + #define TARGET_THUMB1_ONLY (TARGET_THUMB1 && !arm_arch_notm) + +-#define TARGET_LDRD (arm_arch5e && ARM_DOUBLEWORD_ALIGN \ ++#define TARGET_LDRD (arm_arch6 && ARM_DOUBLEWORD_ALIGN \ + && !TARGET_THUMB1) + + #define TARGET_CRC32 (arm_arch_crc) diff --git a/toolchain/gcc/patches/9.2.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/arc-2017.09-release/810-arm-softfloat-libgcc.patch similarity index 100% rename from toolchain/gcc/patches/9.2.0/810-arm-softfloat-libgcc.patch rename to toolchain/gcc/patches/arc-2017.09-release/810-arm-softfloat-libgcc.patch diff --git a/toolchain/gcc/patches/9.2.0/820-libgcc_pic.patch b/toolchain/gcc/patches/arc-2017.09-release/820-libgcc_pic.patch similarity index 90% rename from toolchain/gcc/patches/9.2.0/820-libgcc_pic.patch rename to toolchain/gcc/patches/arc-2017.09-release/820-libgcc_pic.patch index 0a316d35bf..0cc1e07e2b 100644 --- a/toolchain/gcc/patches/9.2.0/820-libgcc_pic.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/820-libgcc_pic.patch @@ -8,7 +8,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in -@@ -927,11 +927,12 @@ $(libgcov-driver-objects): %$(objext): $ +@@ -920,11 +920,12 @@ $(libgcov-driver-objects): %$(objext): $ # Static libraries. libgcc.a: $(libgcc-objects) @@ -22,7 +22,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000 -rm -f $@ objects="$(objects)"; \ -@@ -955,7 +956,7 @@ all: libunwind.a +@@ -945,7 +946,7 @@ all: libunwind.a endif ifeq ($(enable_shared),yes) @@ -31,7 +31,7 @@ Date: Mon Oct 19 23:26:09 2009 +0000 ifneq ($(LIBUNWIND),) all: libunwind$(SHLIB_EXT) libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT) -@@ -1161,6 +1162,10 @@ install-shared: +@@ -1151,6 +1152,10 @@ install-shared: chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a $(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a diff --git a/toolchain/gcc/patches/9.2.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/arc-2017.09-release/840-armv4_pass_fix-v4bx_to_ld.patch similarity index 97% rename from toolchain/gcc/patches/9.2.0/840-armv4_pass_fix-v4bx_to_ld.patch rename to toolchain/gcc/patches/arc-2017.09-release/840-armv4_pass_fix-v4bx_to_ld.patch index 18aa021b93..b9c9b161ad 100644 --- a/toolchain/gcc/patches/9.2.0/840-armv4_pass_fix-v4bx_to_ld.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/840-armv4_pass_fix-v4bx_to_ld.patch @@ -9,7 +9,7 @@ Date: Wed Feb 2 19:34:36 2011 +0000 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -91,10 +91,15 @@ +@@ -88,10 +88,15 @@ #define MUSL_DYNAMIC_LINKER \ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" diff --git a/toolchain/gcc/patches/9.2.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/arc-2017.09-release/850-use_shared_libgcc.patch similarity index 89% rename from toolchain/gcc/patches/9.2.0/850-use_shared_libgcc.patch rename to toolchain/gcc/patches/arc-2017.09-release/850-use_shared_libgcc.patch index a765e55a46..1d07efed80 100644 --- a/toolchain/gcc/patches/9.2.0/850-use_shared_libgcc.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/850-use_shared_libgcc.patch @@ -7,7 +7,7 @@ Date: Sun Feb 12 20:25:47 2012 +0000 SVN-Revision: 30486 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h -@@ -129,10 +129,6 @@ +@@ -126,10 +126,6 @@ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) @@ -20,8 +20,8 @@ Date: Sun Feb 12 20:25:47 2012 +0000 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"); \ +@@ -53,6 +53,10 @@ see the files COPYING3 and COPYING.RUNTI + builtin_assert ("system=posix"); \ } while (0) +#ifndef LIBGCC_SPEC @@ -42,7 +42,7 @@ Date: Sun Feb 12 20:25:47 2012 +0000 } --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h -@@ -62,6 +62,9 @@ +@@ -60,6 +60,9 @@ #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" @@ -50,5 +50,5 @@ Date: Sun Feb 12 20:25:47 2012 +0000 +#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}" + #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}" + diff --git a/toolchain/gcc/patches/9.2.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/arc-2017.09-release/851-libgcc_no_compat.patch similarity index 100% rename from toolchain/gcc/patches/9.2.0/851-libgcc_no_compat.patch rename to toolchain/gcc/patches/arc-2017.09-release/851-libgcc_no_compat.patch diff --git a/toolchain/gcc/patches/arc-2017.09-release/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/arc-2017.09-release/870-ppc_no_crtsavres.patch new file mode 100644 index 0000000000..156468b45e --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/870-ppc_no_crtsavres.patch @@ -0,0 +1,18 @@ +commit d8c570a1531035c3e26bcd94741e5f5b9c36b5d9 +Author: Felix Fietkau +Date: Mon Mar 5 00:51:01 2012 +0000 + + gcc: do not emit references to _savegpr_* and _restgpr_* on powerpc, as they are tricky to deal with wrt. libgcc. they cannot be linked dynamically + + SVN-Revision: 30814 +--- a/gcc/config/rs6000/rs6000.c ++++ b/gcc/config/rs6000/rs6000.c +@@ -26936,7 +26936,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/arc-2017.09-release/881-no_tm_section.patch b/toolchain/gcc/patches/arc-2017.09-release/881-no_tm_section.patch new file mode 100644 index 0000000000..a58dc27e64 --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/881-no_tm_section.patch @@ -0,0 +1,22 @@ +commit 565988ab47bd9b96b50608564aee2104aeb4b7ae +Author: Felix Fietkau +Date: Tue Dec 13 14:20:49 2016 +0100 + + gcc: rip out transactional memory related bloat from crtbegin + + Slightly improves compression for each executable, saving about 4k from + the default ar71xx rootfs + + Signed-off-by: Felix Fietkau + +--- 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 + #endif + + /* We do not want to add the weak attribute to the declarations of these diff --git a/toolchain/gcc/patches/arc-2017.09-release/900-bad-mips16-crt.patch b/toolchain/gcc/patches/arc-2017.09-release/900-bad-mips16-crt.patch new file mode 100644 index 0000000000..f5cc0a74ee --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/900-bad-mips16-crt.patch @@ -0,0 +1,30 @@ +commit 9dc38e48f7a6f88b7ac7bfaced91f53660204e46 +Author: Florian Fainelli +Date: Fri Apr 5 12:36:06 2013 +0000 + + toolchain/gcc: .init and .fini need to pick one ISA + + The .init and .fini sections are built by concatenating code + fragments. Putting mips16 code in the middle of a mips32 code block + doesn't work. Make gcc built the magic crt stuff in no-mips16 mode. + + This is specific to 4.6-linaro but is probably portable to other gcc + flavors. Adding this to the t-libgcc-mips16 makefile fragment is a + hack not suitable for pushing upstream, but there is no mips/t-linux + or mips/t-uclibc and I am not going to touch gcc/configure for two + lines. + + Signed-off-by: Jay Carlson + Signed-off-by: Florian Fainelli + + SVN-Revision: 36200 + +--- 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/9.2.0/910-mbsd_multi.patch b/toolchain/gcc/patches/arc-2017.09-release/910-mbsd_multi.patch similarity index 84% rename from toolchain/gcc/patches/9.2.0/910-mbsd_multi.patch rename to toolchain/gcc/patches/arc-2017.09-release/910-mbsd_multi.patch index 3d47bf16ad..286cfadae7 100644 --- a/toolchain/gcc/patches/9.2.0/910-mbsd_multi.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/910-mbsd_multi.patch @@ -17,7 +17,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 --- 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; +@@ -108,6 +108,9 @@ static int class_dump_flags; /* Whether any standard preincluded header has been preincluded. */ static bool done_preinclude; @@ -27,7 +27,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 static void handle_OPT_d (const char *); static void set_std_cxx98 (int); static void set_std_cxx11 (int); -@@ -452,6 +455,12 @@ c_common_handle_option (size_t scode, co +@@ -456,6 +459,12 @@ c_common_handle_option (size_t scode, co flag_no_builtin = !value; break; @@ -40,7 +40,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 case OPT_fconstant_string_class_: constant_string_class_name = arg; break; -@@ -1138,6 +1147,47 @@ c_common_init (void) +@@ -1084,6 +1093,47 @@ c_common_init (void) return false; } @@ -80,7 +80,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 + } + } else if (evv == 0) { + if (honour_copts != 1) -+ inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times", ++ inform (0, "someone does not honour COPTS correctly, passed %d times", + honour_copts); + } + } @@ -90,9 +90,9 @@ Date: Tue Jul 31 00:52:27 2007 +0000 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt -@@ -1521,6 +1521,9 @@ C++ ObjC++ Optimization Alias(fexception +@@ -1412,6 +1412,9 @@ C++ ObjC++ Optimization Alias(fexception fhonor-std - C++ ObjC++ Deprecated + C++ ObjC++ Ignore Warn(switch %qs is no longer supported) +fhonour-copts +C ObjC C++ ObjC++ RejectNegative @@ -102,7 +102,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000 Assume normal C execution environment. --- a/gcc/common.opt +++ b/gcc/common.opt -@@ -1589,6 +1589,9 @@ fguess-branch-probability +@@ -1510,6 +1510,9 @@ fguess-branch-probability Common Report Var(flag_guess_branch_prob) Optimization Enable guessing of branch probabilities. @@ -112,9 +112,21 @@ Date: Tue Jul 31 00:52:27 2007 +0000 ; 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/opts.c ++++ b/gcc/opts.c +@@ -1928,6 +1928,9 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_fhonour_copts: ++ break; ++ + case OPT_Wlarger_than_: + opts->x_larger_than_size = value; + opts->x_warn_larger_than = value != -1; --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi -@@ -7657,6 +7657,17 @@ This option is only supported for C and +@@ -6567,6 +6567,17 @@ This option is only supported for C and @option{-Wall} and by @option{-Wpedantic}, which can be disabled with @option{-Wno-pointer-sign}. @@ -132,15 +144,3 @@ Date: Tue Jul 31 00:52:27 2007 +0000 @item -Wstack-protector @opindex Wstack-protector @opindex Wno-stack-protector ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -2314,6 +2314,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/9.2.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/arc-2017.09-release/920-specs_nonfatal_getenv.patch similarity index 87% rename from toolchain/gcc/patches/9.2.0/920-specs_nonfatal_getenv.patch rename to toolchain/gcc/patches/arc-2017.09-release/920-specs_nonfatal_getenv.patch index db27950de8..69b40621dc 100644 --- a/toolchain/gcc/patches/9.2.0/920-specs_nonfatal_getenv.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/920-specs_nonfatal_getenv.patch @@ -7,8 +7,8 @@ Date: Sat Apr 21 03:02:39 2012 +0000 --- a/gcc/gcc.c +++ b/gcc/gcc.c -@@ -9318,8 +9318,10 @@ getenv_spec_function (int argc, const ch - } +@@ -9280,8 +9280,10 @@ getenv_spec_function (int argc, const ch + value = varname; if (!value) - fatal_error (input_location, diff --git a/toolchain/gcc/patches/9.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/arc-2017.09-release/930-fix-mips-noexecstack.patch similarity index 95% rename from toolchain/gcc/patches/9.2.0/930-fix-mips-noexecstack.patch rename to toolchain/gcc/patches/arc-2017.09-release/930-fix-mips-noexecstack.patch index 95d13abad0..90d10f11e4 100644 --- a/toolchain/gcc/patches/9.2.0/930-fix-mips-noexecstack.patch +++ b/toolchain/gcc/patches/arc-2017.09-release/930-fix-mips-noexecstack.patch @@ -48,9 +48,9 @@ sellcey@mips.com --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c -@@ -22822,6 +22822,9 @@ mips_starting_frame_offset (void) - #undef TARGET_STARTING_FRAME_OFFSET - #define TARGET_STARTING_FRAME_OFFSET mips_starting_frame_offset +@@ -22561,6 +22561,9 @@ mips_promote_function_mode (const_tree t + #undef TARGET_CUSTOM_FUNCTION_DESCRIPTORS + #define TARGET_CUSTOM_FUNCTION_DESCRIPTORS 2 +#undef TARGET_ASM_FILE_END +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack diff --git a/toolchain/gcc/patches/arc-2017.09-release/940-no-clobber-stamp-bits.patch b/toolchain/gcc/patches/arc-2017.09-release/940-no-clobber-stamp-bits.patch new file mode 100644 index 0000000000..8b88b4066d --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/940-no-clobber-stamp-bits.patch @@ -0,0 +1,33 @@ +commit 548d9a008ff265e9eaa3c7e0e6e301c6bd5645e6 +Author: Felix Fietkau +Date: Fri Dec 12 17:01:57 2014 +0000 + + gcc: don't clobber stamp-bits with a symlink to itself + + Several versions of gcc have an issue in libstdc++v3 where the build may + clobber stamp-bits with a link to itself. This doesn't manifest itself + on all systems. On several Ubuntu systems, this doesn't appear to be a + problem, but it is an issue on Fedora 16 systems. + + To fix the issue, we'll simply filter out stamp-bits from the symlinks + to be generated. + + Note: gcc 4.4.7 is unaffected by this issue, so no fix is necessary + there. + + Signed-off-by: John Szakmeister + + SVN-Revision: 43669 + + +--- a/libstdc++-v3/include/Makefile.in ++++ b/libstdc++-v3/include/Makefile.in +@@ -1476,7 +1476,7 @@ stamp-bits: ${bits_headers} + @$(STAMP) stamp-bits + + stamp-bits-sup: stamp-bits ${bits_sup_headers} +- @-cd ${bits_builddir} && $(LN_S) $? . 2>/dev/null ++ @-cd ${bits_builddir} && $(LN_S) $(filter-out stamp-bits,$?) . 2>/dev/null + @$(STAMP) stamp-bits-sup + + stamp-c_base: ${c_base_headers} diff --git a/toolchain/gcc/patches/arc-2017.09-release/950-cpp_file_path_translation.patch b/toolchain/gcc/patches/arc-2017.09-release/950-cpp_file_path_translation.patch new file mode 100644 index 0000000000..60729dd7fe --- /dev/null +++ b/toolchain/gcc/patches/arc-2017.09-release/950-cpp_file_path_translation.patch @@ -0,0 +1,181 @@ +commit 331735a357a73c7b8adc205241ac3cc6543d985e +Author: Felix Fietkau +Date: Tue Nov 17 12:38:22 2015 +0000 + + gcc: add a patch to 5.x that supports translation of __FILE__ paths + + Signed-off-by: Felix Fietkau + + SVN-Revision: 47490 + +Forward ported from attachment to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047 + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -588,6 +588,10 @@ c_common_handle_option (size_t scode, co + add_path (xstrdup (arg), SYSTEM, 0, true); + break; + ++ case OPT_iremap: ++ add_cpp_remap_path (arg); ++ break; ++ + case OPT_iwithprefix: + add_prefixed_path (arg, SYSTEM); + break; +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -1825,6 +1825,10 @@ iquote + C ObjC C++ ObjC++ Joined Separate MissingArgError(missing path after %qs) + -iquote Add to the end of the quote include path. + ++iremap ++C ObjC C++ ObjC++ Joined Separate ++-iremap Convert to if it occurs as prefix in __FILE__. ++ + iwithprefix + C ObjC C++ ObjC++ Joined Separate + -iwithprefix Add to the end of the system include path. +--- a/gcc/doc/cpp.texi ++++ b/gcc/doc/cpp.texi +@@ -4272,6 +4272,7 @@ Refer to the GCC manual for full documen + @c man begin SYNOPSIS + cpp [@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}] + [@option{-I}@var{dir}@dots{}] [@option{-iquote}@var{dir}@dots{}] ++ [@option{-iremap}@var{src}:@var{dst}] + [@option{-M}|@option{-MM}] [@option{-MG}] [@option{-MF} @var{filename}] + [@option{-MP}] [@option{-MQ} @var{target}@dots{}] + [@option{-MT} @var{target}@dots{}] +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -220,6 +220,12 @@ extensions @samp{.i}, @samp{.ii} or @sam + extensions that GCC uses for preprocessed files created by + @option{-save-temps}. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -fdirectives-only + @opindex fdirectives-only + When preprocessing, handle directives, but do not expand macros. +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -11863,6 +11863,12 @@ by @option{-fplugin=@var{name}} instead + @option{-fplugin=@var{path}/@var{name}.so}. This option is not meant + to be used by the user, but only passed by the driver. + ++@item -iremap @var{src}:@var{dst} ++@opindex iremap ++Replace the prefix @var{src} in __FILE__ with @var{dst} at expansion time. ++This option can be specified more than once. Processing stops at the first ++match. ++ + @item -L@var{dir} + @opindex L + Add directory @var{dir} to the list of directories to be searched +--- a/libcpp/include/cpplib.h ++++ b/libcpp/include/cpplib.h +@@ -820,6 +820,9 @@ extern void cpp_set_lang (cpp_reader *, + /* Set the include paths. */ + extern void cpp_set_include_chains (cpp_reader *, cpp_dir *, cpp_dir *, int); + ++/* Provide src:dst pair for __FILE__ remapping. */ ++extern void add_cpp_remap_path (const char *); ++ + /* Call these to get pointers to the options, callback, and deps + structures for a given reader. These pointers are good until you + call cpp_finish on that reader. You can either edit the callbacks +--- a/libcpp/macro.c ++++ b/libcpp/macro.c +@@ -227,6 +227,64 @@ static const char * const monthnames[] = + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; + ++static size_t remap_pairs; ++static char **remap_src; ++static char **remap_dst; ++ ++void ++add_cpp_remap_path (const char *arg) ++{ ++ const char *arg_dst; ++ size_t len; ++ ++ arg_dst = strchr(arg, ':'); ++ if (arg_dst == NULL) ++ { ++ fprintf(stderr, "Invalid argument for -iremap\n"); ++ exit(1); ++ } ++ ++ len = arg_dst - arg; ++ ++arg_dst; ++ ++ remap_src = (char **) xrealloc(remap_src, sizeof(char *) * (remap_pairs + 1)); ++ remap_dst = (char **) xrealloc(remap_dst, sizeof(char *) * (remap_pairs + 1)); ++ ++ remap_src[remap_pairs] = (char *) xmalloc(len + 1); ++ memcpy(remap_src[remap_pairs], arg, len); ++ remap_src[remap_pairs][len] = '\0'; ++ remap_dst[remap_pairs] = xstrdup(arg_dst); ++ ++remap_pairs; ++} ++ ++static const char * ++cpp_remap_file (const char *arg, char **tmp_name) ++{ ++ char *result; ++ size_t i, len; ++ ++ for (i = 0; i < remap_pairs; ++i) ++ { ++ len = strlen (remap_src[i]); ++ if (strncmp (remap_src[i], arg, len)) ++ continue; ++ if (arg[len] == '\0') ++ return xstrdup (remap_dst[i]); ++ if (arg[len] != '/') ++ continue; ++ arg += len; ++ len = strlen (remap_dst[i]); ++ result = (char *) xmalloc (len + strlen (arg) + 1); ++ memcpy(result, remap_dst[i], len); ++ strcpy(result + len, arg); ++ *tmp_name = result; ++ ++ return result; ++ } ++ ++ return arg; ++} ++ + /* Helper function for builtin_macro. Returns the text generated by + a builtin macro. */ + const uchar * +@@ -290,6 +348,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + { + unsigned int len; + const char *name; ++ char *tmp_name = NULL; + uchar *buf; + + if (node->value.builtin == BT_FILE) +@@ -301,6 +360,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + if (!name) + abort (); + } ++ name = cpp_remap_file (name, &tmp_name); + len = strlen (name); + buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); + result = buf; +@@ -308,6 +368,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi + buf = cpp_quote_string (buf + 1, (const unsigned char *) name, len); + *buf++ = '"'; + *buf = '\0'; ++ free (tmp_name); + } + break; + diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 41ba9853fd..49816618ff 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -17,11 +17,11 @@ PKG_HASH:=7e3c2a763bf500a40c5c4591a7e22c591dafc1f214b1d514895c1096e85c883a GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) PATCH_DIR:=./patches-arc else -PKG_VERSION:=8.3.1 +PKG_VERSION:=8.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb -PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4 +PKG_HASH:=c3a441a29c7c89720b734e5a9c6289c0a06be7e0c76ef538f7bbcef389347c39 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) endif diff --git a/toolchain/gdb/patches/100-no_extern_inline.patch b/toolchain/gdb/patches/100-no_extern_inline.patch index 4036f70301..8c18c6e2e7 100644 --- a/toolchain/gdb/patches/100-no_extern_inline.patch +++ b/toolchain/gdb/patches/100-no_extern_inline.patch @@ -1,16 +1,24 @@ --- a/sim/common/sim-arange.c +++ b/sim/common/sim-arange.c -@@ -277,9 +277,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a +@@ -280,11 +280,7 @@ sim_addr_range_delete (ADDR_RANGE *ar, a build_search_tree (ar); } --#else /* SIM_ARANGE_C_INCLUDED */ +-#endif /* DEFINE_NON_INLINE_P */ +- +-#if DEFINE_INLINE_P - -SIM_ARANGE_INLINE int +int sim_addr_range_hit_p (ADDR_RANGE *ar, address_word addr) { ADDR_RANGE_TREE *t = ar->range_tree; +@@ -301,4 +297,4 @@ sim_addr_range_hit_p (ADDR_RANGE *ar, ad + return 0; + } + +-#endif /* DEFINE_INLINE_P */ ++#endif /* DEFINE_NON_INLINE_P */ --- a/sim/common/sim-arange.h +++ b/sim/common/sim-arange.h @@ -73,7 +73,7 @@ extern void sim_addr_range_delete (ADDR_ diff --git a/toolchain/gdb/patches/110-no_testsuite.patch b/toolchain/gdb/patches/110-no_testsuite.patch index f4a2cde5c8..bcb10e69b4 100644 --- a/toolchain/gdb/patches/110-no_testsuite.patch +++ b/toolchain/gdb/patches/110-no_testsuite.patch @@ -1,16 +1,16 @@ --- a/gdb/configure +++ b/gdb/configure -@@ -918,8 +918,7 @@ MAKEINFOFLAGS +@@ -915,8 +915,7 @@ MAKEINFOFLAGS YACC YFLAGS XMKMF' -ac_subdirs_all='testsuite -gdbtk +ac_subdirs_all='gdbtk + multi-ice gdbserver' - # Initialize some variables set by options. -@@ -6628,7 +6627,7 @@ $as_echo "$with_auto_load_safe_path" >&6 +@@ -6577,7 +6576,7 @@ $as_echo "$with_auto_load_safe_path" >&6 diff --git a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch b/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch index 2b6610673c..d971e28d88 100644 --- a/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch +++ b/toolchain/gdb/patches/120-fix-compile-flag-mismatch.patch @@ -1,6 +1,6 @@ --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure -@@ -2511,7 +2511,7 @@ $as_echo "$as_me: error: \`$ac_var' was +@@ -2508,7 +2508,7 @@ $as_echo "$as_me: error: \`$ac_var' was ac_cache_corrupted=: ;; ,);; *) diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index ef182e4475..500122fec9 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -11,8 +11,8 @@ PKG_VERSION:=2.27 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=5b4f7382af46b4187a958e40fb3123ac3ce16810 -PKG_MIRROR_HASH:=8ab4c8c1f769c4d5d482c30e7aa029f1cc2c8163c347ca5f0d8224a7b4b61ddd +PKG_SOURCE_VERSION:=3981fc3453641368d2edbe480e7089dc9abf6555 +PKG_MIRROR_HASH:=9782c54e990d6b4626a7b03879fc5dfcd2d8625d49f3f3bff91f470322f1aebf PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile index a4120d587d..f7842cb9bd 100644 --- a/toolchain/kernel-headers/Makefile +++ b/toolchain/kernel-headers/Makefile @@ -41,14 +41,14 @@ HOST_EXTRACFLAGS= LINUX_HAS_HEADERS_INSTALL:=y -HOST_KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ +KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \ $(KERNEL_MAKE_FLAGS) \ CC="$(KERNEL_CC)" \ - HOSTCFLAGS="$(HOST_CFLAGS)" + CFLAGS="$(TARGET_CFLAGS)" define Host/Configure/all mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev - $(HOST_KMAKE) \ + $(KMAKE) \ INSTALL_HDR_PATH="$(BUILD_DIR_TOOLCHAIN)/linux-dev/" \ headers_install endef @@ -82,7 +82,7 @@ endef define Host/Configure env - yes '' | $(HOST_KMAKE) oldconfig + yes '' | $(KMAKE) oldconfig $(call Host/Configure/all) $(call Host/Configure/post/$(ARCH)) endef diff --git a/toolchain/musl/Config.in b/toolchain/musl/Config.in deleted file mode 100644 index 7e83b6fa53..0000000000 --- a/toolchain/musl/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -# Password crypt stubbing - -config MUSL_DISABLE_CRYPT_SIZE_HACK - bool "Include crypt() support for SHA256, SHA512 and Blowfish ciphers" - depends on TOOLCHAINOPTS && USE_MUSL && !EXTERNAL_TOOLCHAIN - default n - help - Enable this option to re-include crypt() support for the SHA256, SHA512 and - Blowfish ciphers. Without this option, attempting to hash a string with a salt - requesting one of these ciphers will cause the crypt() function to call stub - implementations which will always fail with errno ENOSYS. Including the ciphers - will increase the library size by about 14KB after LZMA compression. diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk index e1354f2635..234709103c 100644 --- a/toolchain/musl/common.mk +++ b/toolchain/musl/common.mk @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk PKG_NAME:=musl -PKG_VERSION:=1.1.24 -PKG_RELEASE:=1 +PKG_VERSION:=1.1.20 +PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=ea9525c8bcf6170df59364c4bcd616de1acf8703 -PKG_MIRROR_HASH:=6975c45b9bfe586ac00dbfcd1b1a13ab110af0528028ab3dee03e23e2c0763e5 -PKG_SOURCE_URL:=https://git.musl-libc.org/git/musl +PKG_SOURCE_VERSION:=0fa1e638e87cf257e9f96b4019b2076afd674a19 +PKG_MIRROR_HASH:=0a49559e845f51aaf006539176a36d6527957affd2838e71fd43275b737e90fe +PKG_SOURCE_URL:=git://git.musl-libc.org/musl PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz LIBC_SO_VERSION:=$(PKG_VERSION) @@ -29,7 +29,6 @@ include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/hardening.mk TARGET_CFLAGS:= $(filter-out -O%,$(TARGET_CFLAGS)) -TARGET_CFLAGS+= $(if $(CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK),,-DCRYPT_SIZE_HACK) MUSL_CONFIGURE:= \ $(TARGET_CONFIGURE_OPTS) \ diff --git a/toolchain/musl/patches/100-add_glob_onlydir.patch b/toolchain/musl/patches/100-add_glob_onlydir.patch index a784e770df..db0bc22afa 100644 --- a/toolchain/musl/patches/100-add_glob_onlydir.patch +++ b/toolchain/musl/patches/100-add_glob_onlydir.patch @@ -1,8 +1,8 @@ --- a/include/glob.h +++ b/include/glob.h -@@ -34,6 +34,8 @@ void globfree(glob_t *); - #define GLOB_TILDE 0x1000 - #define GLOB_TILDE_CHECK 0x4000 +@@ -31,6 +31,8 @@ void globfree(glob_t *); + #define GLOB_NOESCAPE 0x40 + #define GLOB_PERIOD 0x80 +#define GLOB_ONLYDIR 0x100 + diff --git a/toolchain/musl/patches/110-read_timezone_from_fs.patch b/toolchain/musl/patches/110-read_timezone_from_fs.patch index f92781f7ed..fb98f7d10e 100644 --- a/toolchain/musl/patches/110-read_timezone_from_fs.patch +++ b/toolchain/musl/patches/110-read_timezone_from_fs.patch @@ -1,6 +1,6 @@ --- a/src/time/__tz.c +++ b/src/time/__tz.c -@@ -25,6 +25,9 @@ static int r0[5], r1[5]; +@@ -23,6 +23,9 @@ static int r0[5], r1[5]; static const unsigned char *zi, *trans, *index, *types, *abbrevs, *abbrevs_end; static size_t map_size; diff --git a/toolchain/musl/patches/200-add_libssp_nonshared.patch b/toolchain/musl/patches/200-add_libssp_nonshared.patch index 05bd2fe54a..b8fa7b4b4f 100644 --- a/toolchain/musl/patches/200-add_libssp_nonshared.patch +++ b/toolchain/musl/patches/200-add_libssp_nonshared.patch @@ -24,7 +24,7 @@ Signed-off-by: Steven Barth +OBJ_DIRS = $(sort $(patsubst %/,%,$(dir $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(GENH) $(GENH_INT))) obj/include obj/libssp_nonshared) $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.lo) $(GENH) $(GENH_INT): | $(OBJ_DIRS) - + @@ -113,6 +113,8 @@ obj/crt/rcrt1.o: $(srcdir)/ldso/dlstart. obj/crt/Scrt1.o obj/crt/rcrt1.o: CFLAGS_ALL += -fPIC @@ -34,7 +34,7 @@ Signed-off-by: Steven Barth OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=$(srcdir)/src/%)) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.o) $(OPTIMIZE_SRCS:$(srcdir)/%.c=obj/%.lo): CFLAGS += -O3 -@@ -165,6 +167,11 @@ lib/libc.a: $(AOBJS) +@@ -165,6 +166,11 @@ lib/libc.a: $(AOBJS) $(AR) rc $@ $(AOBJS) $(RANLIB) $@ diff --git a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch index 06aeb34ced..f7eff9141f 100644 --- a/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch +++ b/toolchain/musl/patches/400-Add-format-attribute-to-some-function-declarations.patch @@ -87,7 +87,7 @@ Signed-off-by: Hauke Mehrtens } --- a/include/stdio.h +++ b/include/stdio.h -@@ -25,6 +25,14 @@ extern "C" { +@@ -21,6 +21,14 @@ extern "C" { #include @@ -102,7 +102,7 @@ Signed-off-by: Hauke Mehrtens #ifdef __cplusplus #define NULL 0L #else -@@ -107,19 +115,19 @@ int puts(const char *); +@@ -103,19 +111,19 @@ int puts(const char *); int printf(const char *__restrict, ...); int fprintf(FILE *__restrict, const char *__restrict, ...); int sprintf(char *__restrict, const char *__restrict, ...); @@ -127,7 +127,7 @@ Signed-off-by: Hauke Mehrtens void perror(const char *); -@@ -140,8 +148,8 @@ int pclose(FILE *); +@@ -136,8 +144,8 @@ int pclose(FILE *); int fileno(FILE *); int fseeko(FILE *, off_t, int); off_t ftello(FILE *); @@ -138,7 +138,7 @@ Signed-off-by: Hauke Mehrtens void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); -@@ -180,8 +188,8 @@ int fileno_unlocked(FILE *); +@@ -176,8 +184,8 @@ int fileno_unlocked(FILE *); int getw(FILE *); int putw(int, FILE *); char *fgetln(FILE *, size_t *); @@ -149,7 +149,7 @@ Signed-off-by: Hauke Mehrtens #endif #ifdef _GNU_SOURCE -@@ -203,6 +211,9 @@ typedef struct _IO_cookie_io_functions_t +@@ -199,6 +207,9 @@ typedef struct _IO_cookie_io_functions_t FILE *fopencookie(void *, const char *, cookie_io_functions_t); #endif diff --git a/toolchain/musl/patches/901-crypt_size_hack.patch b/toolchain/musl/patches/901-crypt_size_hack.patch index 75f196abca..8cd7b1989c 100644 --- a/toolchain/musl/patches/901-crypt_size_hack.patch +++ b/toolchain/musl/patches/901-crypt_size_hack.patch @@ -1,74 +1,59 @@ +--- a/src/crypt/crypt_r.c ++++ b/src/crypt/crypt_r.c +@@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c + if (salt[0] == '$' && salt[1] && salt[2]) { + if (salt[1] == '1' && salt[2] == '$') + return __crypt_md5(key, salt, output); +- if (salt[1] == '2' && salt[3] == '$') +- return __crypt_blowfish(key, salt, output); +- if (salt[1] == '5' && salt[2] == '$') +- return __crypt_sha256(key, salt, output); +- if (salt[1] == '6' && salt[2] == '$') +- return __crypt_sha512(key, salt, output); + } + return __crypt_des(key, salt, output); + } --- a/src/crypt/crypt_sha512.c +++ b/src/crypt/crypt_sha512.c -@@ -13,6 +13,17 @@ +@@ -12,6 +12,7 @@ + #include #include #include ++#if 0 -+#ifdef CRYPT_SIZE_HACK -+#include -+ -+char *__crypt_sha512(const char *key, const char *setting, char *output) -+{ -+ errno = ENOSYS; -+ return NULL; -+} -+ -+#else -+ /* public domain sha512 implementation based on fips180-3 */ /* >=2^64 bits messages are not supported (about 2000 peta bytes) */ - -@@ -369,3 +380,4 @@ char *__crypt_sha512(const char *key, co +@@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co return "*"; return p; } +#endif --- a/src/crypt/crypt_blowfish.c +++ b/src/crypt/crypt_blowfish.c -@@ -50,6 +50,17 @@ +@@ -50,6 +50,7 @@ #include #include -+#ifdef CRYPT_SIZE_HACK -+#include -+ -+char *__crypt_blowfish(const char *key, const char *setting, char *output) -+{ -+ errno = ENOSYS; -+ return NULL; -+} -+ -+#else -+ ++#if 0 typedef uint32_t BF_word; typedef int32_t BF_word_signed; -@@ -796,3 +807,4 @@ char *__crypt_blowfish(const char *key, +@@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key, return "*"; } +#endif --- a/src/crypt/crypt_sha256.c +++ b/src/crypt/crypt_sha256.c -@@ -13,6 +13,17 @@ +@@ -13,6 +13,7 @@ #include #include -+#ifdef CRYPT_SIZE_HACK -+#include -+ -+char *__crypt_sha256(const char *key, const char *setting, char *output) -+{ -+ errno = ENOSYS; -+ return NULL; -+} -+ -+#else -+ ++#if 0 /* public domain sha256 implementation based on fips180-3 */ struct sha256 { -@@ -320,3 +331,4 @@ char *__crypt_sha256(const char *key, co +@@ -320,3 +321,4 @@ char *__crypt_sha256(const char *key, co return "*"; return p; } diff --git a/toolchain/nasm/Makefile b/toolchain/nasm/Makefile index 3efcc86203..53b7848caf 100644 --- a/toolchain/nasm/Makefile +++ b/toolchain/nasm/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=nasm -PKG_VERSION:=2.14 +PKG_VERSION:=2.13.03 PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_HASH:=97c615dbf02ef80e4e2b6c385f7e28368d51efc214daa98e600ca4572500eec0 +PKG_HASH:=812ecfb0dcbc5bd409aaa8f61c7de94c5b8752a7b00c632883d15b2ed6452573 HOST_BUILD_PARALLEL:=1 diff --git a/toolchain/nasm/patches/100-backport-upstream-GCC8-compatibility-fixes.patch b/toolchain/nasm/patches/100-backport-upstream-GCC8-compatibility-fixes.patch new file mode 100644 index 0000000000..a6c5027bec --- /dev/null +++ b/toolchain/nasm/patches/100-backport-upstream-GCC8-compatibility-fixes.patch @@ -0,0 +1,15 @@ +--- a/include/nasmlib.h ++++ b/include/nasmlib.h +@@ -188,11 +188,9 @@ int64_t readnum(char *str, bool *error); + int64_t readstrnum(char *str, int length, bool *warn); + + /* +- * seg_init: Initialise the segment-number allocator. + * seg_alloc: allocate a hitherto unused segment number. + */ +-void pure_func seg_init(void); +-int32_t pure_func seg_alloc(void); ++int32_t seg_alloc(void); + + /* + * many output formats will be able to make use of this: a standard diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk index 6f4c50c380..b561fa1b1e 100644 --- a/toolchain/uClibc/common.mk +++ b/toolchain/uClibc/common.mk @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk -PKG_VERSION:=1.0.31 +PKG_VERSION:=1.0.30 PKG_NAME:=uClibc-ng PKG_SOURCE_URL = http://downloads.uclibc-ng.org/releases/$(PKG_VERSION)/ @@ -16,7 +16,7 @@ CONFIG_DIR:=$(PATH_PREFIX)/config PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz LIBC_SO_VERSION:=$(PKG_VERSION) -PKG_HASH:=2215d7377118434d1697fd575f10d7a6be3f29e460d6b0e1ee9f6f5306288060 +PKG_HASH:=992bd9a2889ea385902b87e3d3d30603741eb16728288fbf537ff2027f770496 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)-$(PKG_VERSION) From 177d33049e7a9c0ae78b82be3bda1e15d7deea09 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 01:21:22 -0700 Subject: [PATCH 2/6] "libjson-c: bump version" This reverts commit 438f06ab11b6be96c52dafbdeaef93bb1645102c. --- package/lean/v2ray/Makefile | 8 +++-- package/libs/libjson-c/Makefile | 7 ++--- package/libs/libjson-c/patches/000-libm.patch | 31 +++++++++---------- 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index fb4c2923e6..138ff75c9e 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray PKG_VERSION:=4.20 -PKG_RELEASE:=2 +PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk @@ -41,13 +41,15 @@ ifeq ($(ARCH),i386) endif ifeq ($(ARCH),arm) PKG_ARCH_V2RAY:=arm - ifneq ($(BOARD),bcm53xx) or ($(BOARD),kirkwood) or ($(BOARD),bcm2708) + ifneq ($(BOARD),bcm53xx) V2RAY_BIN:=v2ray_armv7 endif + ifeq ($(BOARD),kirkwood) + V2RAY_BIN:=v2ray + endif endif ifeq ($(ARCH),aarch64) PKG_ARCH_V2RAY:=arm64 - V2RAY_BIN:=v2ray endif define Build/Prepare diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index b61d99cc99..118d618a6f 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json-c -PKG_VERSION:=0.13.1 -PKG_RELEASE:=1 +PKG_VERSION:=0.12.1 +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:=94a26340c0785fcff4f46ff38609cf84ebcd670df0c8efd75d039cc951d80132 +PKG_HASH:=5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) @@ -38,7 +38,6 @@ define Package/libjson-c CATEGORY:=Libraries TITLE:=javascript object notation URL:=https://json-c.github.io/json-c/ - ABI_VERSION:=4 endef define Package/libjson-c/description diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch index de98e35d43..45adb0597f 100644 --- a/package/libs/libjson-c/patches/000-libm.patch +++ b/package/libs/libjson-c/patches/000-libm.patch @@ -1,8 +1,8 @@ --- a/configure.ac +++ b/configure.ac -@@ -76,12 +76,6 @@ AC_FUNC_VPRINTF - AC_FUNC_MEMCMP - AC_CHECK_FUNCS([realloc]) +@@ -43,12 +43,6 @@ + AC_FUNC_MALLOC + AC_FUNC_REALLOC AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale) -AC_CHECK_DECLS([INFINITY], [], [], [[#include ]]) -AC_CHECK_DECLS([nan], [], [], [[#include ]]) @@ -10,16 +10,16 @@ -AC_CHECK_DECLS([isinf], [], [], [[#include ]]) -AC_CHECK_DECLS([_isnan], [], [], [[#include ]]) -AC_CHECK_DECLS([_finite], [], [], [[#include ]]) - AC_MSG_CHECKING(for GCC atomic builtins) - AC_LINK_IFELSE( - [ + + #check if .section.gnu.warning accepts long strings (for __warn_references) + AC_LANG_PUSH([C]) --- a/math_compat.h +++ b/math_compat.h -@@ -6,31 +6,9 @@ - * @brief Do not use, json-c internal, may be changed or removed at any time. - */ +@@ -1,28 +1,9 @@ + #ifndef __math_compat_h + #define __math_compat_h --/* Define isnan, isinf, infinity and nan on Windows/MSVC */ +-/* Define isnan and isinf on Windows/MSVC */ - -#ifndef HAVE_DECL_ISNAN -# ifdef HAVE_DECL__ISNAN @@ -35,15 +35,12 @@ -# endif -#endif - --#ifndef HAVE_DECL_INFINITY --#include --#define INFINITY (DBL_MAX + DBL_MAX) --#define HAVE_DECL_INFINITY +-#ifndef HAVE_DECL_NAN +-#error This platform does not have nan() -#endif - --#ifndef HAVE_DECL_NAN --#define NAN (INFINITY - INFINITY) --#define HAVE_DECL_NAN +-#ifndef HAVE_DECL_INFINITY +-#error This platform does not have INFINITY -#endif +#undef isnan +#define isnan(x) __builtin_isnan(x) From 217cc81b58b68fea59a1eb2f4f74d22db43208e6 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 01:22:20 -0700 Subject: [PATCH 3/6] Revert "ustream-ssl: bump version" This reverts commit cd903a7e25fe1cc1995cd0b91a7d2e7f2554debe. --- package/lean/open-vm-tools/Makefile | 129 ++++++++++++++++++ package/lean/open-vm-tools/files/shutdown | 8 ++ package/lean/open-vm-tools/files/tools.conf | 2 + .../lean/open-vm-tools/files/vmtoolsd.init | 14 ++ ...1-configure.ac-don-t-use-dnet-config.patch | 21 +++ .../0002-add-include-sys-sysmacros.h.patch | 13 ++ ...e-configure-test-for-struct-timespec.patch | 29 ++++ ...finition-of-ALLPERMS-and-ACCESSPERMS.patch | 40 ++++++ ...-test-for-feature-instead-of-platfor.patch | 105 ++++++++++++++ ...onfigure-test-for-sys-stat.h-include.patch | 12 ++ ...include-poll.h-instead-of-sys-poll.h.patch | 13 ++ .../0008-Rename-poll.h-to-vm_poll.h.patch | 94 +++++++++++++ ...strerror_r-unless-on-gnu-libc-system.patch | 28 ++++ ...10-Use-uintmax_t-for-handling-rlim_t.patch | 14 ++ ...011-Use-off64_t-instead-of-__off64_t.patch | 16 +++ package/libs/ustream-ssl/Makefile | 10 +- package/network/services/uhttpd/Makefile | 10 +- .../services/uhttpd/files/uhttpd.config | 8 -- .../network/services/uhttpd/files/uhttpd.init | 6 +- 19 files changed, 550 insertions(+), 22 deletions(-) create mode 100644 package/lean/open-vm-tools/Makefile create mode 100644 package/lean/open-vm-tools/files/shutdown create mode 100644 package/lean/open-vm-tools/files/tools.conf create mode 100644 package/lean/open-vm-tools/files/vmtoolsd.init create mode 100644 package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch create mode 100644 package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch create mode 100644 package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch create mode 100644 package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch create mode 100644 package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch create mode 100644 package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch create mode 100644 package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch create mode 100644 package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch create mode 100644 package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch create mode 100644 package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch create mode 100644 package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch diff --git a/package/lean/open-vm-tools/Makefile b/package/lean/open-vm-tools/Makefile new file mode 100644 index 0000000000..a5ed2ff281 --- /dev/null +++ b/package/lean/open-vm-tools/Makefile @@ -0,0 +1,129 @@ +# +# Copyright (C) 2018 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:=open-vm-tools +PKG_VERSION:=10.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/vmware/open-vm-tools.git +PKG_SOURCE_VERSION:=stable-$(PKG_VERSION) + +PKG_FIXUP:=autoreconf +PKG_LICENSE:=LGPL-2.1 + +include $(INCLUDE_DIR)/package.mk + +define Package/open-vm-tools + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=@TARGET_x86 +glib2 +libpthread +libtirpc + TITLE:=open-vm-tools + URL:=https://github.com/vmware/open-vm-tools +endef + +define Package/open-vm-tools-vm-tools/description + Open Virtual Machine Tools for VMware guest OS +endef + + +CONFIGURE_PATH = open-vm-tools +MAKE_PATH = open-vm-tools + +CONFIGURE_ARGS+= \ + --without-icu \ + --disable-multimon \ + --disable-docs \ + --disable-tests \ + --without-gtkmm \ + --without-gtkmm3 \ + --without-xerces \ + --without-pam \ + --disable-grabbitmqproxy \ + --disable-vgauth \ + --disable-deploypkg \ + --without-root-privileges \ + --without-kernel-modules \ + --without-dnet \ + --with-tirpc \ + --without-x \ + --without-gtk2 \ + --without-gtk3 \ + --without-xerces + + +define Package/open-vm-tools/install + $(INSTALL_DIR) $(1)/etc/init.d/ + $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd + + $(INSTALL_DIR) $(1)/etc/vmware-tools/ + $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/poweroff-vm-default $(1)/etc/vmware-tools/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/poweron-vm-default $(1)/etc/vmware-tools/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/resume-vm-default $(1)/etc/vmware-tools/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/suspend-vm-default $(1)/etc/vmware-tools/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/scripts/common/statechange.subr $(1)/etc/vmware-tools/ + + $(INSTALL_DIR) $(1)/etc/vmware-tools/scripts/vmware/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/linux/network $(1)/etc/vmware-tools/scripts/vmware/ + + $(INSTALL_DIR) $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/checkvm/.libs/vmware-checkvm $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/namespacetool/.libs/vmware-namespace-cmd $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/xferlogs/.libs/vmware-xferlogs $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/hgfsclient/.libs/vmware-hgfsclient $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/.libs/vmtoolsd $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/rpctool/vmware-rpctool $(1)/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/.libs/vmware-toolbox-cmd $(1)/bin/ + + $(INSTALL_DIR) $(1)/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/hgfsmounter/mount.vmhgfs $(1)/sbin/ + $(INSTALL_BIN) ./files/shutdown $(1)/sbin/ + + $(INSTALL_DIR) $(1)/lib/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libhgfs/.libs/libhgfs.so.0.0.0 $(1)/lib/ + $(LN) libhgfs.so.0.0.0 $(1)/lib/libhgfs.so.0 + $(LN) libhgfs.so.0.0.0 $(1)/lib/libhgfs.so + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libguestlib/.libs/libguestlib.so.0.0.0 $(1)/lib/ + $(LN) libguestlib.so.0.0.0 $(1)/lib/libguestlib.so.0 + $(LN) libguestlib.so.0.0.0 $(1)/lib/libguestlib.so + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libvmtools/.libs/libvmtools.so.0.0.0 $(1)/lib/ + $(LN) libvmtools.so.0.0.0 $(1)/lib/libvmtools.so.0 + $(LN) libvmtools.so.0.0.0 $(1)/lib/libvmtools.so + + $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/vix/.libs/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/hgfsServer/.libs/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/ + + $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/resolutionKMS/.libs/libresolutionKMS.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/powerOps/.libs/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/timeSync/.libs/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/guestInfo/.libs/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/vmbackup/.libs/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ + + $(INSTALL_DIR) $(1)/lib/udev/rules.d/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/udev/99-vmware-scsi-udev.rules $(1)/lib/udev/rules.d/ + + $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/ko/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/ko.vmsg $(1)/share/open-vm-tools/messages/ko/vmtoolsd.vmsg + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/ko.vmsg $(1)/share/open-vm-tools/messages/ko/toolboxcmd.vmsg + $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/de/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/de.vmsg $(1)/share/open-vm-tools/messages/de/vmtoolsd.vmsg + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/de.vmsg $(1)/share/open-vm-tools/messages/de/toolboxcmd.vmsg + $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/ja/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg $(1)/share/open-vm-tools/messages/ja/vmtoolsd.vmsg + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/ja.vmsg $(1)/share/open-vm-tools/messages/ja/toolboxcmd.vmsg + $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/zh_CN/ + $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/zh_CN.vmsg $(1)/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg +endef + +$(eval $(call BuildPackage,open-vm-tools)) diff --git a/package/lean/open-vm-tools/files/shutdown b/package/lean/open-vm-tools/files/shutdown new file mode 100644 index 0000000000..e814571ff3 --- /dev/null +++ b/package/lean/open-vm-tools/files/shutdown @@ -0,0 +1,8 @@ +#!/bin/sh +#compatibility script for openvmtools + +if [ "$1" == "-r" ]; then + /sbin/reboot +else + /sbin/poweroff +fi diff --git a/package/lean/open-vm-tools/files/tools.conf b/package/lean/open-vm-tools/files/tools.conf new file mode 100644 index 0000000000..f6cae70cc5 --- /dev/null +++ b/package/lean/open-vm-tools/files/tools.conf @@ -0,0 +1,2 @@ +[guestinfo] +disable-perf-mon=1 diff --git a/package/lean/open-vm-tools/files/vmtoolsd.init b/package/lean/open-vm-tools/files/vmtoolsd.init new file mode 100644 index 0000000000..22a0020881 --- /dev/null +++ b/package/lean/open-vm-tools/files/vmtoolsd.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common + +START=10 + +USE_PROCD=1 +PROG=/bin/vmtoolsd + +start_service() { + procd_open_instance + procd_set_param command "$PROG" + procd_set_param respawn + procd_close_instance +} + diff --git a/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch b/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch new file mode 100644 index 0000000000..893beb9863 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch @@ -0,0 +1,21 @@ +diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -949,7 +949,7 @@ + AC_VMW_CHECK_LIB([dnet], + [DNET], + [], +- [dnet-config], ++ [], + [], + [dnet.h], + [intf_open], +@@ -959,7 +959,7 @@ + + if test $have_dnet = "no"; then + AC_MSG_ERROR( +- [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) ++ [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) + fi + fi + diff --git a/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch b/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch new file mode 100644 index 0000000000..accdb10a38 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch @@ -0,0 +1,13 @@ +diff -urN a/open-vm-tools/lib/wiper/wiperPosix.c b/open-vm-tools/lib/wiper/wiperPosix.c +--- a/open-vm-tools/lib/wiper/wiperPosix.c ++++ b/open-vm-tools/lib/wiper/wiperPosix.c +@@ -43,6 +43,9 @@ + # include + # endif /* __FreeBSD_version >= 500000 */ + #endif ++#if defined(__linux__) ++#include ++#endif + #include + + #include "vmware.h" diff --git a/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch b/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch new file mode 100644 index 0000000000..5b67856154 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch @@ -0,0 +1,29 @@ +diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -1208,6 +1208,7 @@ + AC_TYPE_PID_T + AC_TYPE_SIZE_T + AC_CHECK_MEMBERS([struct stat.st_rdev]) ++AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include ]]) + AC_HEADER_TIME + AC_STRUCT_TM + AC_C_VOLATILE +diff -urN a/open-vm-tools/lib/include/hgfsUtil.h b/open-vm-tools/lib/include/hgfsUtil.h +--- a/open-vm-tools/lib/include/hgfsUtil.h ++++ b/open-vm-tools/lib/include/hgfsUtil.h +@@ -53,13 +53,7 @@ + # include + # endif + # include "vm_basic_types.h" +-# if !defined _STRUCT_TIMESPEC && \ +- !defined _TIMESPEC_DECLARED && \ +- !defined __timespec_defined && \ +- !defined sun && \ +- !defined __FreeBSD__ && \ +- !__APPLE__ && \ +- !defined _WIN32 ++# if !defined HAVE_STRUCT_TIMESPEC_TV_SEC + struct timespec { + time_t tv_sec; + long tv_nsec; diff --git a/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch b/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch new file mode 100644 index 0000000000..8c7aea9935 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch @@ -0,0 +1,40 @@ +diff -urN a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c ++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +@@ -105,11 +105,13 @@ + #endif + + /* +- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the +- * Solaris version of . ++ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in ++ * POSIX. + */ +-#ifdef sun ++#ifndef ACCESSPERMS + # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) ++#endif ++#ifndef ALLPERMS + # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) + #endif + +diff -urN a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c +--- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c ++++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c +@@ -52,7 +52,7 @@ + + #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO) + #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) +-#ifdef sun ++#ifndef ACCESSPERMS + #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) + #endif + #ifdef __ANDROID__ +@@ -61,7 +61,6 @@ + */ + #define NO_SETMNTENT + #define NO_ENDMNTENT +-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) + #endif + + diff --git a/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch b/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch new file mode 100644 index 0000000000..de9882eac3 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch @@ -0,0 +1,105 @@ +diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac +--- a/open-vm-tools/configure.ac ++++ b/open-vm-tools/configure.ac +@@ -897,6 +897,7 @@ + + AC_CHECK_FUNCS([ecvt]) + AC_CHECK_FUNCS([fcvt]) ++AC_CHECK_FUNCS([getifaddrs getauxval issetugid __secure_getenv]) + + AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) + +@@ -1145,10 +1146,13 @@ + ### + + AC_CHECK_HEADERS([crypt.h]) ++AC_CHECK_HEADERS([ifaddrs.h]) + AC_CHECK_HEADERS([inttypes.h]) + AC_CHECK_HEADERS([stdint.h]) + AC_CHECK_HEADERS([stdlib.h]) + AC_CHECK_HEADERS([wchar.h]) ++AC_CHECK_HEADERS([net/if.h]) ++AC_CHECK_HEADERS([sys/auxv.h]) + AC_CHECK_HEADERS([sys/inttypes.h]) + AC_CHECK_HEADERS([sys/io.h]) + AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD +diff -urN a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c +--- a/open-vm-tools/lib/misc/idLinux.c ++++ b/open-vm-tools/lib/misc/idLinux.c +@@ -27,12 +27,9 @@ + #include + #include + #include +-#ifdef __linux__ +-#if defined(__GLIBC__) && \ +- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) ++#ifdef HAVE_SYS_AUXV_H + #include + #endif +-#endif + #ifdef __APPLE__ + #include + #include +@@ -997,31 +994,32 @@ + static Bool + IdIsSetUGid(void) + { +-#if defined(__ANDROID__) +- /* Android does not have a secure_getenv, so be conservative. */ +- return TRUE; +-#else + /* + * We use __secure_getenv, which returns NULL if the binary is +- * setuid or setgid. Alternatives include, ++ * setuid or setgid, when issetugid or getauxval(AT_SECURE) is not ++ * available. Alternatives include, + * +- * a) getauxval(AT_SECURE); not available until glibc 2.16. +- * b) __libc_enable_secure; may not be exported. ++ * a) issetugid(); not (yet?) available in glibc. ++ * b) getauxval(AT_SECURE); not available until glibc 2.16. ++ * c) __libc_enable_secure; may not be exported. + * +- * Use (a) when we are based on glibc 2.16, or newer. ++ * Use (b) when we are based on glibc 2.16, or newer. + */ + +-#if defined(__GLIBC__) && \ +- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) ++#if HAVE_ISSETUGID ++ return issetugid(); ++#elif HAVE_GETAUXVAL + return getauxval(AT_SECURE) != 0; +-#else ++#elif HAVE___SECURE_GETENV + static const char envName[] = "VMW_SETUGID_TEST"; + + if (setenv(envName, "1", TRUE) == -1) { + return TRUE; /* Conservative */ + } + return __secure_getenv(envName) == NULL; +-#endif ++#else ++ /* Android does not have a secure_getenv, so be conservative. */ ++ return TRUE; + #endif + } + #endif +diff -urN a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c +--- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c ++++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c +@@ -34,9 +34,13 @@ + #include + #include + #include +-#if defined(__FreeBSD__) || defined(__APPLE__) ++#if HAVE_SYS_SYSCTL_H + # include ++#endif ++#if HAVE_IFADDRS_H + # include ++#endif ++#if HAVE_NET_IF_H + # include + #endif + #ifndef NO_DNET diff --git a/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch b/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch new file mode 100644 index 0000000000..b680558aeb --- /dev/null +++ b/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch @@ -0,0 +1,12 @@ +diff -urN a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c +--- a/open-vm-tools/services/plugins/vix/vixTools.c ++++ b/open-vm-tools/services/plugins/vix/vixTools.c +@@ -66,7 +66,7 @@ + #include + #endif + +-#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__) ++#ifdef HAVE_SYS_STAT_H + #include + #endif + diff --git a/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch b/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch new file mode 100644 index 0000000000..f01c79012e --- /dev/null +++ b/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch @@ -0,0 +1,13 @@ +diff -urN a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c +--- a/open-vm-tools/lib/asyncsocket/asyncsocket.c ++++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c +@@ -69,8 +69,8 @@ + #else + #include + #include ++#include + #include +-#include + #include + #include + #include diff --git a/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch b/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch new file mode 100644 index 0000000000..455259917a --- /dev/null +++ b/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch @@ -0,0 +1,94 @@ +diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c +index e0a68e7e..b9675674 100644 +--- a/open-vm-tools/lib/asyncsocket/asyncsocket.c ++++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c +@@ -86,7 +86,7 @@ + #include "random.h" + #include "asyncsocket.h" + #include "asyncSocketBase.h" +-#include "poll.h" ++#include "vm_poll.h" + #include "log.h" + #include "err.h" + #include "hostinfo.h" +diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c +index 991a7941..ed0c09f9 100644 +--- a/open-vm-tools/lib/hgfsServer/hgfsServer.c ++++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c +@@ -48,7 +48,7 @@ + #include "hgfsServerOplock.h" + #include "hgfsDirNotify.h" + #include "userlock.h" +-#include "poll.h" ++#include "vm_poll.h" + #include "mutexRankLib.h" + #include "vm_basic_asm.h" + #include "unicodeOperations.h" +diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h +index 524147ea..103f944f 100644 +--- a/open-vm-tools/lib/include/asyncsocket.h ++++ b/open-vm-tools/lib/include/asyncsocket.h +@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket; + * Or the client can specify its favorite poll class and locking behavior. + * Use of IVmdbPoll is only supported for regular sockets and for Attach. + */ +-#include "poll.h" ++#include "vm_poll.h" + struct IVmdbPoll; + typedef struct AsyncSocketPollParams { + int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */ +diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h +index 46442e55..8bc66997 100644 +--- a/open-vm-tools/lib/include/pollImpl.h ++++ b/open-vm-tools/lib/include/pollImpl.h +@@ -44,7 +44,7 @@ + #define INCLUDE_ALLOW_USERLEVEL + #include "includeCheck.h" + +-#include "poll.h" ++#include "vm_poll.h" + #include "vm_basic_asm.h" + + #if defined(__cplusplus) +diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/vm_poll.h +similarity index 99% +rename from a/open-vm-tools/lib/include/poll.h +rename to a/open-vm-tools/lib/include/vm_poll.h +index 988fe6d0..e9e74fb5 100644 +--- a/open-vm-tools/lib/include/poll.h ++++ b/open-vm-tools/lib/include/vm_poll.h +@@ -60,7 +60,7 @@ extern "C" { + #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 + #include + #endif +-#include ++#include + #define HZ 100 + #endif + #ifdef __ANDROID__ +diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c +index c2c51583..d6c62f10 100644 +--- a/open-vm-tools/lib/rpcIn/rpcin.c ++++ b/open-vm-tools/lib/rpcIn/rpcin.c +@@ -57,7 +57,7 @@ + + #if defined(VMTOOLS_USE_VSOCKET) + # include +-# include "poll.h" ++# include "vm_poll.h" + # include "asyncsocket.h" + # include "vmci_defs.h" + #include "dataMap.h" +diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c +index 03700937..f0b49ad7 100644 +--- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c ++++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c +@@ -48,7 +48,7 @@ + #include "rpcout.h" + #include "rabbitmqProxyConst.h" + #include "vm_basic_types.h" +-#include "poll.h" ++#include "vm_poll.h" + #ifdef OPEN_VM_TOOLS + #include "vmci_sockets.h" + #include "sslDirect.h" diff --git a/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch b/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch new file mode 100644 index 0000000000..22735334d9 --- /dev/null +++ b/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch @@ -0,0 +1,28 @@ +diff -urN a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c +--- a/open-vm-tools/lib/err/errPosix.c ++++ b/open-vm-tools/lib/err/errPosix.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "vmware.h" + #include "errInt.h" +@@ -63,11 +64,13 @@ + { + char *p; + +-#if defined(__linux__) && !defined(__ANDROID__) ++#if defined(__GLIBC__) && !defined(__ANDROID__) + p = strerror_r(errorNumber, buf, bufSize); + #else +- p = strerror(errorNumber); +-#endif ++ if (strerror_r(errorNumber, buf, bufSize) != 0) ++ snprintf(buf, bufSize, "unknown error %i", errorNumber); ++ p = buf; ++#endif /* defined __GLIBC__ */ + ASSERT(p != NULL); + return p; + } diff --git a/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch b/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch new file mode 100644 index 0000000000..73eb40307e --- /dev/null +++ b/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch @@ -0,0 +1,14 @@ +diff -urN a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +--- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c ++++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c +@@ -5294,8 +5294,8 @@ + goto exit; + } + +- LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", +- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max)); ++ LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n", ++ __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max)); + + /* + * Check the offset is within the file size range. diff --git a/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch b/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch new file mode 100644 index 0000000000..2f68ac8a0d --- /dev/null +++ b/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch @@ -0,0 +1,16 @@ +diff -urN a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c +--- a/open-vm-tools/lib/file/fileIOPosix.c ++++ b/open-vm-tools/lib/file/fileIOPosix.c +@@ -206,10 +206,10 @@ + * the symbols (and anyone building XOPEN<700 gets nothing). + */ + extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt, +- __off64_t offset) __attribute__ ((weak)); ++ off64_t offset) __attribute__ ((weak)); + + extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt, +- __off64_t offset) __attribute__ ((weak)); ++ off64_t offset) __attribute__ ((weak)); + #else + #error "Large file support unavailable. Aborting." + #endif diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile index 5d94ada4d8..2ea5bf0bd5 100644 --- a/package/libs/ustream-ssl/Makefile +++ b/package/libs/ustream-ssl/Makefile @@ -5,11 +5,13 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git -PKG_SOURCE_DATE:=2019-08-17 -PKG_SOURCE_VERSION:=e8f9c22d02fccde1d992f324280fb9966d3b4be6 -PKG_MIRROR_HASH:=b735fc259337c0ea3cc93fc05ad9151b841a8f85a4168f37b1d20979415d5a19 +PKG_SOURCE_DATE:=2018-07-30 +PKG_SOURCE_VERSION:=23a3f2830341acd1db149175baf7315a33bd0edb +PKG_MIRROR_HASH:=289bef5dac684015b6a40cfd72cf1c8c297bb77cf2efd54e562b628ba3afd83d CMAKE_INSTALL:=1 +PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR) + PKG_LICENSE:=ISC PKG_LICENSE_FILES:= @@ -23,7 +25,7 @@ define Package/libustream/default CATEGORY:=Libraries TITLE:=ustream SSL Library DEPENDS:=+libubox - ABI_VERSION:=20150806 + ABI_VERSION:=$(PKG_VERSION) endef define Package/libustream-openssl diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 85b7be7607..2a6fa3bbb0 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uhttpd -PKG_RELEASE:=4 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2019-08-17 -PKG_SOURCE_VERSION:=6b03f9605323df23d12e3876feb466f53f8d50c4 -PKG_MIRROR_HASH:=4df96054a4fce659e6c849feae7850d542b37ad5caffc1485b7a63c7c2764cb1 +PKG_SOURCE_DATE:=2018-11-28 +PKG_SOURCE_VERSION:=cdfc902a4cb77bc538a729f9e1c8a8578454a0e5 +PKG_MIRROR_HASH:=6b21111547a4453355bd6c941a47f0116a652a77d87c1e05a035168b8ab2aa6f PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC @@ -34,7 +34,7 @@ endef define Package/uhttpd $(Package/uhttpd/default) - DEPENDS:=+libubox +libblobmsg-json +libjson-script +libjson-c + DEPENDS:=+libubox +libblobmsg-json +libjson-script endef define Package/uhttpd/description diff --git a/package/network/services/uhttpd/files/uhttpd.config b/package/network/services/uhttpd/files/uhttpd.config index 3bfc03c4a8..2ad572cc31 100644 --- a/package/network/services/uhttpd/files/uhttpd.config +++ b/package/network/services/uhttpd/files/uhttpd.config @@ -114,17 +114,9 @@ config cert defaults # Validity time option days 730 - # key type: rsa or ec - option key_type rsa - # RSA key size option bits 2048 - # EC curve name - # Curve names vary between mbedtls/px5g and openssl - # P-256 or P-384 are guaranteed to work - option ec_curve P-256 - # Location option country ZZ option state Somewhere diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 6322473b97..dc496b3e28 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -43,19 +43,15 @@ generate_keys() { config_get state "$cfg" state config_get location "$cfg" location config_get commonname "$cfg" commonname - config_get key_type "$cfg" key_type - config_get ec_curve "$cfg" ec_curve # Prefer px5g for certificate generation (existence evaluated last) local GENKEY_CMD="" - local KEY_OPTS="rsa:${bits:-2048}" local UNIQUEID=$(dd if=/dev/urandom bs=1 count=4 | hexdump -e '1/1 "%02x"') - [ "$key_type" = "ec" ] && KEY_OPTS="ec -pkeyopt ec_paramgen_curve:${ec_curve:-P-256}" [ -x "$OPENSSL_BIN" ] && GENKEY_CMD="$OPENSSL_BIN req -x509 -sha256 -outform der -nodes" [ -x "$PX5G_BIN" ] && GENKEY_CMD="$PX5G_BIN selfsigned -der" [ -n "$GENKEY_CMD" ] && { $GENKEY_CMD \ - -days ${days:-730} -newkey ${KEY_OPTS} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \ + -days ${days:-730} -newkey rsa:${bits:-2048} -keyout "${UHTTPD_KEY}.new" -out "${UHTTPD_CERT}.new" \ -subj /C="${country:-ZZ}"/ST="${state:-Somewhere}"/L="${location:-Unknown}"/O="${commonname:-OpenWrt}$UNIQUEID"/CN="${commonname:-OpenWrt}" sync mv "${UHTTPD_KEY}.new" "${UHTTPD_KEY}" From 67cd77db04b4fdcbae25931f4b53651684d74246 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 01:36:05 -0700 Subject: [PATCH 4/6] open-vm-tools: move to feeds --- package/lean/open-vm-tools/Makefile | 129 ------------------ package/lean/open-vm-tools/files/shutdown | 8 -- package/lean/open-vm-tools/files/tools.conf | 2 - .../lean/open-vm-tools/files/vmtoolsd.init | 14 -- ...1-configure.ac-don-t-use-dnet-config.patch | 21 --- .../0002-add-include-sys-sysmacros.h.patch | 13 -- ...e-configure-test-for-struct-timespec.patch | 29 ---- ...finition-of-ALLPERMS-and-ACCESSPERMS.patch | 40 ------ ...-test-for-feature-instead-of-platfor.patch | 105 -------------- ...onfigure-test-for-sys-stat.h-include.patch | 12 -- ...include-poll.h-instead-of-sys-poll.h.patch | 13 -- .../0008-Rename-poll.h-to-vm_poll.h.patch | 94 ------------- ...strerror_r-unless-on-gnu-libc-system.patch | 28 ---- ...10-Use-uintmax_t-for-handling-rlim_t.patch | 14 -- ...011-Use-off64_t-instead-of-__off64_t.patch | 16 --- 15 files changed, 538 deletions(-) delete mode 100644 package/lean/open-vm-tools/Makefile delete mode 100644 package/lean/open-vm-tools/files/shutdown delete mode 100644 package/lean/open-vm-tools/files/tools.conf delete mode 100644 package/lean/open-vm-tools/files/vmtoolsd.init delete mode 100644 package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch delete mode 100644 package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch delete mode 100644 package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch delete mode 100644 package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch delete mode 100644 package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch delete mode 100644 package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch delete mode 100644 package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch delete mode 100644 package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch delete mode 100644 package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch delete mode 100644 package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch delete mode 100644 package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch diff --git a/package/lean/open-vm-tools/Makefile b/package/lean/open-vm-tools/Makefile deleted file mode 100644 index a5ed2ff281..0000000000 --- a/package/lean/open-vm-tools/Makefile +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright (C) 2018 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:=open-vm-tools -PKG_VERSION:=10.3.0 -PKG_RELEASE:=1 - -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_PROTO:=git -PKG_SOURCE_URL=https://github.com/vmware/open-vm-tools.git -PKG_SOURCE_VERSION:=stable-$(PKG_VERSION) - -PKG_FIXUP:=autoreconf -PKG_LICENSE:=LGPL-2.1 - -include $(INCLUDE_DIR)/package.mk - -define Package/open-vm-tools - SECTION:=utils - CATEGORY:=Utilities - DEPENDS:=@TARGET_x86 +glib2 +libpthread +libtirpc - TITLE:=open-vm-tools - URL:=https://github.com/vmware/open-vm-tools -endef - -define Package/open-vm-tools-vm-tools/description - Open Virtual Machine Tools for VMware guest OS -endef - - -CONFIGURE_PATH = open-vm-tools -MAKE_PATH = open-vm-tools - -CONFIGURE_ARGS+= \ - --without-icu \ - --disable-multimon \ - --disable-docs \ - --disable-tests \ - --without-gtkmm \ - --without-gtkmm3 \ - --without-xerces \ - --without-pam \ - --disable-grabbitmqproxy \ - --disable-vgauth \ - --disable-deploypkg \ - --without-root-privileges \ - --without-kernel-modules \ - --without-dnet \ - --with-tirpc \ - --without-x \ - --without-gtk2 \ - --without-gtk3 \ - --without-xerces - - -define Package/open-vm-tools/install - $(INSTALL_DIR) $(1)/etc/init.d/ - $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd - - $(INSTALL_DIR) $(1)/etc/vmware-tools/ - $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/poweroff-vm-default $(1)/etc/vmware-tools/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/poweron-vm-default $(1)/etc/vmware-tools/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/resume-vm-default $(1)/etc/vmware-tools/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/suspend-vm-default $(1)/etc/vmware-tools/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/scripts/common/statechange.subr $(1)/etc/vmware-tools/ - - $(INSTALL_DIR) $(1)/etc/vmware-tools/scripts/vmware/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/scripts/linux/network $(1)/etc/vmware-tools/scripts/vmware/ - - $(INSTALL_DIR) $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/checkvm/.libs/vmware-checkvm $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/namespacetool/.libs/vmware-namespace-cmd $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/xferlogs/.libs/vmware-xferlogs $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/hgfsclient/.libs/vmware-hgfsclient $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/.libs/vmtoolsd $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/rpctool/vmware-rpctool $(1)/bin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/.libs/vmware-toolbox-cmd $(1)/bin/ - - $(INSTALL_DIR) $(1)/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/open-vm-tools/hgfsmounter/mount.vmhgfs $(1)/sbin/ - $(INSTALL_BIN) ./files/shutdown $(1)/sbin/ - - $(INSTALL_DIR) $(1)/lib/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libhgfs/.libs/libhgfs.so.0.0.0 $(1)/lib/ - $(LN) libhgfs.so.0.0.0 $(1)/lib/libhgfs.so.0 - $(LN) libhgfs.so.0.0.0 $(1)/lib/libhgfs.so - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libguestlib/.libs/libguestlib.so.0.0.0 $(1)/lib/ - $(LN) libguestlib.so.0.0.0 $(1)/lib/libguestlib.so.0 - $(LN) libguestlib.so.0.0.0 $(1)/lib/libguestlib.so - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/libvmtools/.libs/libvmtools.so.0.0.0 $(1)/lib/ - $(LN) libvmtools.so.0.0.0 $(1)/lib/libvmtools.so.0 - $(LN) libvmtools.so.0.0.0 $(1)/lib/libvmtools.so - - $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/vix/.libs/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/hgfsServer/.libs/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/ - - $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/resolutionKMS/.libs/libresolutionKMS.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/powerOps/.libs/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/timeSync/.libs/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/guestInfo/.libs/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/plugins/vmbackup/.libs/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/ - - $(INSTALL_DIR) $(1)/lib/udev/rules.d/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/udev/99-vmware-scsi-udev.rules $(1)/lib/udev/rules.d/ - - $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/ko/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/ko.vmsg $(1)/share/open-vm-tools/messages/ko/vmtoolsd.vmsg - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/ko.vmsg $(1)/share/open-vm-tools/messages/ko/toolboxcmd.vmsg - $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/de/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/de.vmsg $(1)/share/open-vm-tools/messages/de/vmtoolsd.vmsg - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/de.vmsg $(1)/share/open-vm-tools/messages/de/toolboxcmd.vmsg - $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/ja/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/services/vmtoolsd/l10n/ja.vmsg $(1)/share/open-vm-tools/messages/ja/vmtoolsd.vmsg - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/ja.vmsg $(1)/share/open-vm-tools/messages/ja/toolboxcmd.vmsg - $(INSTALL_DIR) $(1)/share/open-vm-tools/messages/zh_CN/ - $(INSTALL_DATA) $(PKG_BUILD_DIR)/open-vm-tools/toolbox/l10n/zh_CN.vmsg $(1)/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg -endef - -$(eval $(call BuildPackage,open-vm-tools)) diff --git a/package/lean/open-vm-tools/files/shutdown b/package/lean/open-vm-tools/files/shutdown deleted file mode 100644 index e814571ff3..0000000000 --- a/package/lean/open-vm-tools/files/shutdown +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -#compatibility script for openvmtools - -if [ "$1" == "-r" ]; then - /sbin/reboot -else - /sbin/poweroff -fi diff --git a/package/lean/open-vm-tools/files/tools.conf b/package/lean/open-vm-tools/files/tools.conf deleted file mode 100644 index f6cae70cc5..0000000000 --- a/package/lean/open-vm-tools/files/tools.conf +++ /dev/null @@ -1,2 +0,0 @@ -[guestinfo] -disable-perf-mon=1 diff --git a/package/lean/open-vm-tools/files/vmtoolsd.init b/package/lean/open-vm-tools/files/vmtoolsd.init deleted file mode 100644 index 22a0020881..0000000000 --- a/package/lean/open-vm-tools/files/vmtoolsd.init +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=10 - -USE_PROCD=1 -PROG=/bin/vmtoolsd - -start_service() { - procd_open_instance - procd_set_param command "$PROG" - procd_set_param respawn - procd_close_instance -} - diff --git a/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch b/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch deleted file mode 100644 index 893beb9863..0000000000 --- a/package/lean/open-vm-tools/patches/0001-configure.ac-don-t-use-dnet-config.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac ---- a/open-vm-tools/configure.ac -+++ b/open-vm-tools/configure.ac -@@ -949,7 +949,7 @@ - AC_VMW_CHECK_LIB([dnet], - [DNET], - [], -- [dnet-config], -+ [], - [], - [dnet.h], - [intf_open], -@@ -959,7 +959,7 @@ - - if test $have_dnet = "no"; then - AC_MSG_ERROR( -- [dnet-config was not found on your PATH. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) -+ [dnet was not found. Please configure without dnet (using --without-dnet) or install dnet - http://libdnet.sourceforge.net]) - fi - fi - diff --git a/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch b/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch deleted file mode 100644 index accdb10a38..0000000000 --- a/package/lean/open-vm-tools/patches/0002-add-include-sys-sysmacros.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urN a/open-vm-tools/lib/wiper/wiperPosix.c b/open-vm-tools/lib/wiper/wiperPosix.c ---- a/open-vm-tools/lib/wiper/wiperPosix.c -+++ b/open-vm-tools/lib/wiper/wiperPosix.c -@@ -43,6 +43,9 @@ - # include - # endif /* __FreeBSD_version >= 500000 */ - #endif -+#if defined(__linux__) -+#include -+#endif - #include - - #include "vmware.h" diff --git a/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch b/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch deleted file mode 100644 index 5b67856154..0000000000 --- a/package/lean/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac ---- a/open-vm-tools/configure.ac -+++ b/open-vm-tools/configure.ac -@@ -1208,6 +1208,7 @@ - AC_TYPE_PID_T - AC_TYPE_SIZE_T - AC_CHECK_MEMBERS([struct stat.st_rdev]) -+AC_CHECK_MEMBERS([struct timespec.tv_sec],[],[],[[#include ]]) - AC_HEADER_TIME - AC_STRUCT_TM - AC_C_VOLATILE -diff -urN a/open-vm-tools/lib/include/hgfsUtil.h b/open-vm-tools/lib/include/hgfsUtil.h ---- a/open-vm-tools/lib/include/hgfsUtil.h -+++ b/open-vm-tools/lib/include/hgfsUtil.h -@@ -53,13 +53,7 @@ - # include - # endif - # include "vm_basic_types.h" --# if !defined _STRUCT_TIMESPEC && \ -- !defined _TIMESPEC_DECLARED && \ -- !defined __timespec_defined && \ -- !defined sun && \ -- !defined __FreeBSD__ && \ -- !__APPLE__ && \ -- !defined _WIN32 -+# if !defined HAVE_STRUCT_TIMESPEC_TV_SEC - struct timespec { - time_t tv_sec; - long tv_nsec; diff --git a/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch b/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch deleted file mode 100644 index 8c7aea9935..0000000000 --- a/package/lean/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -urN a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c ---- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -@@ -105,11 +105,13 @@ - #endif - - /* -- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the -- * Solaris version of . -+ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in -+ * POSIX. - */ --#ifdef sun -+#ifndef ACCESSPERMS - # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) -+#endif -+#ifndef ALLPERMS - # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) - #endif - -diff -urN a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c ---- a/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c -+++ b/open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c -@@ -52,7 +52,7 @@ - - #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO) - #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) --#ifdef sun -+#ifndef ACCESSPERMS - #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) - #endif - #ifdef __ANDROID__ -@@ -61,7 +61,6 @@ - */ - #define NO_SETMNTENT - #define NO_ENDMNTENT --#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) - #endif - - diff --git a/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch b/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch deleted file mode 100644 index de9882eac3..0000000000 --- a/package/lean/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff -urN a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac ---- a/open-vm-tools/configure.ac -+++ b/open-vm-tools/configure.ac -@@ -897,6 +897,7 @@ - - AC_CHECK_FUNCS([ecvt]) - AC_CHECK_FUNCS([fcvt]) -+AC_CHECK_FUNCS([getifaddrs getauxval issetugid __secure_getenv]) - - AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes]) - -@@ -1145,10 +1146,13 @@ - ### - - AC_CHECK_HEADERS([crypt.h]) -+AC_CHECK_HEADERS([ifaddrs.h]) - AC_CHECK_HEADERS([inttypes.h]) - AC_CHECK_HEADERS([stdint.h]) - AC_CHECK_HEADERS([stdlib.h]) - AC_CHECK_HEADERS([wchar.h]) -+AC_CHECK_HEADERS([net/if.h]) -+AC_CHECK_HEADERS([sys/auxv.h]) - AC_CHECK_HEADERS([sys/inttypes.h]) - AC_CHECK_HEADERS([sys/io.h]) - AC_CHECK_HEADERS([sys/param.h]) # Required to make the sys/user.h check work correctly on FreeBSD -diff -urN a/open-vm-tools/lib/misc/idLinux.c b/open-vm-tools/lib/misc/idLinux.c ---- a/open-vm-tools/lib/misc/idLinux.c -+++ b/open-vm-tools/lib/misc/idLinux.c -@@ -27,12 +27,9 @@ - #include - #include - #include --#ifdef __linux__ --#if defined(__GLIBC__) && \ -- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) -+#ifdef HAVE_SYS_AUXV_H - #include - #endif --#endif - #ifdef __APPLE__ - #include - #include -@@ -997,31 +994,32 @@ - static Bool - IdIsSetUGid(void) - { --#if defined(__ANDROID__) -- /* Android does not have a secure_getenv, so be conservative. */ -- return TRUE; --#else - /* - * We use __secure_getenv, which returns NULL if the binary is -- * setuid or setgid. Alternatives include, -+ * setuid or setgid, when issetugid or getauxval(AT_SECURE) is not -+ * available. Alternatives include, - * -- * a) getauxval(AT_SECURE); not available until glibc 2.16. -- * b) __libc_enable_secure; may not be exported. -+ * a) issetugid(); not (yet?) available in glibc. -+ * b) getauxval(AT_SECURE); not available until glibc 2.16. -+ * c) __libc_enable_secure; may not be exported. - * -- * Use (a) when we are based on glibc 2.16, or newer. -+ * Use (b) when we are based on glibc 2.16, or newer. - */ - --#if defined(__GLIBC__) && \ -- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) -+#if HAVE_ISSETUGID -+ return issetugid(); -+#elif HAVE_GETAUXVAL - return getauxval(AT_SECURE) != 0; --#else -+#elif HAVE___SECURE_GETENV - static const char envName[] = "VMW_SETUGID_TEST"; - - if (setenv(envName, "1", TRUE) == -1) { - return TRUE; /* Conservative */ - } - return __secure_getenv(envName) == NULL; --#endif -+#else -+ /* Android does not have a secure_getenv, so be conservative. */ -+ return TRUE; - #endif - } - #endif -diff -urN a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c ---- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c -+++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c -@@ -34,9 +34,13 @@ - #include - #include - #include --#if defined(__FreeBSD__) || defined(__APPLE__) -+#if HAVE_SYS_SYSCTL_H - # include -+#endif -+#if HAVE_IFADDRS_H - # include -+#endif -+#if HAVE_NET_IF_H - # include - #endif - #ifndef NO_DNET diff --git a/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch b/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch deleted file mode 100644 index b680558aeb..0000000000 --- a/package/lean/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN a/open-vm-tools/services/plugins/vix/vixTools.c b/open-vm-tools/services/plugins/vix/vixTools.c ---- a/open-vm-tools/services/plugins/vix/vixTools.c -+++ b/open-vm-tools/services/plugins/vix/vixTools.c -@@ -66,7 +66,7 @@ - #include - #endif - --#if defined(sun) || defined(__FreeBSD__) || defined(__APPLE__) -+#ifdef HAVE_SYS_STAT_H - #include - #endif - diff --git a/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch b/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch deleted file mode 100644 index f01c79012e..0000000000 --- a/package/lean/open-vm-tools/patches/0007-include-poll.h-instead-of-sys-poll.h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -urN a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c ---- a/open-vm-tools/lib/asyncsocket/asyncsocket.c -+++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c -@@ -69,8 +69,8 @@ - #else - #include - #include -+#include - #include --#include - #include - #include - #include diff --git a/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch b/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch deleted file mode 100644 index 455259917a..0000000000 --- a/package/lean/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch +++ /dev/null @@ -1,94 +0,0 @@ -diff --git a/open-vm-tools/lib/asyncsocket/asyncsocket.c b/open-vm-tools/lib/asyncsocket/asyncsocket.c -index e0a68e7e..b9675674 100644 ---- a/open-vm-tools/lib/asyncsocket/asyncsocket.c -+++ b/open-vm-tools/lib/asyncsocket/asyncsocket.c -@@ -86,7 +86,7 @@ - #include "random.h" - #include "asyncsocket.h" - #include "asyncSocketBase.h" --#include "poll.h" -+#include "vm_poll.h" - #include "log.h" - #include "err.h" - #include "hostinfo.h" -diff --git a/open-vm-tools/lib/hgfsServer/hgfsServer.c b/open-vm-tools/lib/hgfsServer/hgfsServer.c -index 991a7941..ed0c09f9 100644 ---- a/open-vm-tools/lib/hgfsServer/hgfsServer.c -+++ b/open-vm-tools/lib/hgfsServer/hgfsServer.c -@@ -48,7 +48,7 @@ - #include "hgfsServerOplock.h" - #include "hgfsDirNotify.h" - #include "userlock.h" --#include "poll.h" -+#include "vm_poll.h" - #include "mutexRankLib.h" - #include "vm_basic_asm.h" - #include "unicodeOperations.h" -diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h -index 524147ea..103f944f 100644 ---- a/open-vm-tools/lib/include/asyncsocket.h -+++ b/open-vm-tools/lib/include/asyncsocket.h -@@ -164,7 +164,7 @@ typedef struct AsyncSocket AsyncSocket; - * Or the client can specify its favorite poll class and locking behavior. - * Use of IVmdbPoll is only supported for regular sockets and for Attach. - */ --#include "poll.h" -+#include "vm_poll.h" - struct IVmdbPoll; - typedef struct AsyncSocketPollParams { - int flags; /* Default 0, only POLL_FLAG_NO_BULL is valid */ -diff --git a/open-vm-tools/lib/include/pollImpl.h b/open-vm-tools/lib/include/pollImpl.h -index 46442e55..8bc66997 100644 ---- a/open-vm-tools/lib/include/pollImpl.h -+++ b/open-vm-tools/lib/include/pollImpl.h -@@ -44,7 +44,7 @@ - #define INCLUDE_ALLOW_USERLEVEL - #include "includeCheck.h" - --#include "poll.h" -+#include "vm_poll.h" - #include "vm_basic_asm.h" - - #if defined(__cplusplus) -diff --git a/open-vm-tools/lib/include/poll.h b/open-vm-tools/lib/include/vm_poll.h -similarity index 99% -rename from a/open-vm-tools/lib/include/poll.h -rename to a/open-vm-tools/lib/include/vm_poll.h -index 988fe6d0..e9e74fb5 100644 ---- a/open-vm-tools/lib/include/poll.h -+++ b/open-vm-tools/lib/include/vm_poll.h -@@ -60,7 +60,7 @@ extern "C" { - #if !defined(TARGET_OS_IPHONE) || TARGET_OS_IPHONE == 0 - #include - #endif --#include -+#include - #define HZ 100 - #endif - #ifdef __ANDROID__ -diff --git a/open-vm-tools/lib/rpcIn/rpcin.c b/open-vm-tools/lib/rpcIn/rpcin.c -index c2c51583..d6c62f10 100644 ---- a/open-vm-tools/lib/rpcIn/rpcin.c -+++ b/open-vm-tools/lib/rpcIn/rpcin.c -@@ -57,7 +57,7 @@ - - #if defined(VMTOOLS_USE_VSOCKET) - # include --# include "poll.h" -+# include "vm_poll.h" - # include "asyncsocket.h" - # include "vmci_defs.h" - #include "dataMap.h" -diff --git a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -index 03700937..f0b49ad7 100644 ---- a/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -+++ b/open-vm-tools/services/plugins/grabbitmqProxy/grabbitmqProxyPlugin.c -@@ -48,7 +48,7 @@ - #include "rpcout.h" - #include "rabbitmqProxyConst.h" - #include "vm_basic_types.h" --#include "poll.h" -+#include "vm_poll.h" - #ifdef OPEN_VM_TOOLS - #include "vmci_sockets.h" - #include "sslDirect.h" diff --git a/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch b/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch deleted file mode 100644 index 22735334d9..0000000000 --- a/package/lean/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urN a/open-vm-tools/lib/err/errPosix.c b/open-vm-tools/lib/err/errPosix.c ---- a/open-vm-tools/lib/err/errPosix.c -+++ b/open-vm-tools/lib/err/errPosix.c -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - - #include "vmware.h" - #include "errInt.h" -@@ -63,11 +64,13 @@ - { - char *p; - --#if defined(__linux__) && !defined(__ANDROID__) -+#if defined(__GLIBC__) && !defined(__ANDROID__) - p = strerror_r(errorNumber, buf, bufSize); - #else -- p = strerror(errorNumber); --#endif -+ if (strerror_r(errorNumber, buf, bufSize) != 0) -+ snprintf(buf, bufSize, "unknown error %i", errorNumber); -+ p = buf; -+#endif /* defined __GLIBC__ */ - ASSERT(p != NULL); - return p; - } diff --git a/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch b/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch deleted file mode 100644 index 73eb40307e..0000000000 --- a/package/lean/open-vm-tools/patches/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -urN a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c ---- a/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -+++ b/open-vm-tools/lib/hgfsServer/hgfsServerLinux.c -@@ -5294,8 +5294,8 @@ - goto exit; - } - -- LOG(6, ("%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n", -- __FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max)); -+ LOG(6, ("%s: File Size limits: 0x%jx 0x%jx\n", -+ __FUNCTION__, (uintmax_t)fileSize.rlim_cur, (uintmax_t)fileSize.rlim_max)); - - /* - * Check the offset is within the file size range. diff --git a/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch b/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch deleted file mode 100644 index 2f68ac8a0d..0000000000 --- a/package/lean/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -urN a/open-vm-tools/lib/file/fileIOPosix.c b/open-vm-tools/lib/file/fileIOPosix.c ---- a/open-vm-tools/lib/file/fileIOPosix.c -+++ b/open-vm-tools/lib/file/fileIOPosix.c -@@ -206,10 +206,10 @@ - * the symbols (and anyone building XOPEN<700 gets nothing). - */ - extern ssize_t preadv64(int fd, const struct iovec *iov, int iovcnt, -- __off64_t offset) __attribute__ ((weak)); -+ off64_t offset) __attribute__ ((weak)); - - extern ssize_t pwritev64(int fd, const struct iovec *iov, int iovcnt, -- __off64_t offset) __attribute__ ((weak)); -+ off64_t offset) __attribute__ ((weak)); - #else - #error "Large file support unavailable. Aborting." - #endif From 6b1b71e667ce08c34fbf3af39da24d55c0c60304 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 02:46:48 -0700 Subject: [PATCH 5/6] toolchain: ARM: Fix toolchain compilation for gcc 8.x --- include/target.mk | 20 -------------------- package/lean/qt5/Makefile | 2 +- toolchain/gcc/common.mk | 8 ++++++-- 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/include/target.mk b/include/target.mk index 2a74838263..22f81fefbf 100644 --- a/include/target.mk +++ b/include/target.mk @@ -188,26 +188,6 @@ ifeq ($(DUMP),1) endif ifneq ($(findstring arm,$(ARCH)),) CPU_TYPE ?= xscale - CPU_CFLAGS_arm920t = -mcpu=arm920t - CPU_CFLAGS_arm926ej-s = -mcpu=arm926ej-s - CPU_CFLAGS_arm1136j-s = -mcpu=arm1136j-s - CPU_CFLAGS_arm1176jzf-s = -mcpu=arm1176jzf-s - CPU_CFLAGS_cortex-a5 = -mcpu=cortex-a5 - CPU_CFLAGS_cortex-a7 = -mcpu=cortex-a7 - CPU_CFLAGS_cortex-a8 = -mcpu=cortex-a8 - CPU_CFLAGS_cortex-a9 = -mcpu=cortex-a9 - CPU_CFLAGS_cortex-a15 = -mcpu=cortex-a15 - CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53 - CPU_CFLAGS_cortex-a72 = -mcpu=cortex-a72 - CPU_CFLAGS_fa526 = -mcpu=fa526 - CPU_CFLAGS_mpcore = -mcpu=mpcore - CPU_CFLAGS_xscale = -mcpu=xscale - ifeq ($(CONFIG_SOFT_FLOAT),) - CPU_CFLAGS_neon = -mfpu=neon - CPU_CFLAGS_vfp = -mfpu=vfp - CPU_CFLAGS_vfpv3 = -mfpu=vfpv3-d16 - CPU_CFLAGS_neon-vfpv4 = -mfpu=neon-vfpv4 - endif endif ifeq ($(ARCH),powerpc) CPU_CFLAGS_603e:=-mcpu=603e diff --git a/package/lean/qt5/Makefile b/package/lean/qt5/Makefile index 739bfb33f4..734d26a5cb 100644 --- a/package/lean/qt5/Makefile +++ b/package/lean/qt5/Makefile @@ -114,7 +114,7 @@ define Build/Configure -no-opengl \ -no-directfb \ -no-xcb \ - -openssl-runtime \ + -no-openssl \ -qt-zlib \ -qt-pcre \ -qt-freetype \ diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index b75fce57ef..654599ca57 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -174,9 +174,13 @@ ifneq ($(GCC_ARCH),) GCC_CONFIGURE+= --with-arch=$(GCC_ARCH) endif -ifneq ($(CONFIG_SOFT_FLOAT),y) - ifeq ($(CONFIG_arm),y) +ifeq ($(CONFIG_arm),y) + GCC_CONFIGURE+= \ + --with-cpu=$(word 1, $(subst +," ,$(CONFIG_CPU_TYPE))) + + ifneq ($(CONFIG_SOFT_FLOAT),y) GCC_CONFIGURE+= \ + --with-fpu=$(word 2, $(subst +, ",$(CONFIG_CPU_TYPE))) \ --with-float=hard endif endif From 745e6ff58e478f8a1dcd24d07e9bf87c64a7ed2c Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Mon, 28 Oct 2019 03:39:56 -0700 Subject: [PATCH 6/6] kernel: refresh modules --- package/kernel/linux/modules/block.mk | 6 +- package/kernel/linux/modules/can.mk | 16 +- package/kernel/linux/modules/fs.mk | 6 +- package/kernel/linux/modules/hwmon.mk | 32 +++- package/kernel/linux/modules/i2c.mk | 17 ++ package/kernel/linux/modules/iio.mk | 68 +++++++- package/kernel/linux/modules/input.mk | 19 +++ package/kernel/linux/modules/lib.mk | 4 +- package/kernel/linux/modules/netdevices.mk | 51 ++---- package/kernel/linux/modules/netfilter.mk | 33 ++-- package/kernel/linux/modules/netsupport.mk | 150 +++++++++++++++++- package/kernel/linux/modules/other.mk | 94 ++++++++--- package/kernel/linux/modules/sound.mk | 1 + package/kernel/linux/modules/usb.mk | 34 +++- package/kernel/linux/modules/video.mk | 8 +- package/kernel/linux/modules/w1.mk | 2 +- package/kernel/linux/modules/wpan.mk | 18 ++- target/linux/x86/Makefile | 2 +- ...ings-on-Intel-if-BIOS-hasn-t-already.patch | 53 +++++++ 19 files changed, 498 insertions(+), 116 deletions(-) create mode 100644 target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk index 2198d94614..c486a433c2 100644 --- a/package/kernel/linux/modules/block.mk +++ b/package/kernel/linux/modules/block.mk @@ -209,7 +209,7 @@ $(eval $(call KernelPackage,block2mtd)) define KernelPackage/dax SUBMENU:=$(BLOCK_MENU) TITLE:=DAX: direct access to differentiated memory - DEPENDS:=@!LINUX_3_18 @!LINUX_4_9 + DEPENDS:=@!LINUX_4_9 KCONFIG:=CONFIG_DAX FILES:=$(LINUX_DIR)/drivers/dax/dax.ko endef @@ -220,7 +220,7 @@ $(eval $(call KernelPackage,dax)) define KernelPackage/dm SUBMENU:=$(BLOCK_MENU) TITLE:=Device Mapper - DEPENDS:=+kmod-crypto-manager +!(LINUX_3_18||LINUX_4_9):kmod-dax + DEPENDS:=+kmod-crypto-manager +!LINUX_4_9:kmod-dax # All the "=n" are unnecessary, they're only there # to stop the config from asking the question. # MIRROR is M because I've needed it for pvmove. @@ -359,7 +359,7 @@ $(eval $(call KernelPackage,md-raid10)) define KernelPackage/md-raid456 -$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +!LINUX_3_18:kmod-lib-crc32c) +$(call KernelPackage/md/Depends,+kmod-lib-raid6 +kmod-lib-xor +kmod-lib-crc32c) TITLE:=RAID Level 456 Driver KCONFIG:= \ CONFIG_ASYNC_CORE \ diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk index b0d254511b..c2c7411c6e 100644 --- a/package/kernel/linux/modules/can.mk +++ b/package/kernel/linux/modules/can.mk @@ -26,7 +26,6 @@ define KernelPackage/can CONFIG_CAN_MSCAN=n \ CONFIG_CAN_SJA1000=n \ CONFIG_CAN_SOFTING=n \ - CONFIG_CAN_XILINXCAN=n \ CONFIG_NET_EMATCH_CANID=n \ CONFIG_CAN_DEBUG_DEVICES=n FILES:=$(LINUX_DIR)/drivers/net/can/can-dev.ko \ @@ -99,7 +98,7 @@ $(eval $(call KernelPackage,can-c-can-pci)) define KernelPackage/can-c-can-platform TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM - DEPENDS:=kmod-can-c-can +!LINUX_3_18:kmod-regmap-core + DEPENDS:=kmod-can-c-can +kmod-regmap-core FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko AUTOLOAD:=$(call AutoProbe,c_can_platform) $(call AddDepends/can) @@ -277,4 +276,17 @@ endef $(eval $(call KernelPackage,can-vcan)) +define KernelPackage/can-xilinx-can + TITLE:=Xilinx CAN IP + KCONFIG:=CONFIG_CAN_XILINXCAN + FILES:=$(LINUX_DIR)/drivers/net/can/xilinx_can.ko + AUTOLOAD:=$(call AutoProbe,xilinx_can) + $(call AddDepends/can,@TARGET_zynq) +endef +define KernelPackage/can-xilinx-can/description + Xilinx CAN driver. This driver supports both + soft AXI CAN IP and Zynq CANPS IP. +endef + +$(eval $(call KernelPackage,can-xilinx-can)) diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk index edd2774a63..3ffe82cbe8 100644 --- a/package/kernel/linux/modules/fs.mk +++ b/package/kernel/linux/modules/fs.mk @@ -68,7 +68,7 @@ $(eval $(call KernelPackage,fs-autofs4)) define KernelPackage/fs-btrfs SUBMENU:=$(FS_MENU) TITLE:=BTRFS filesystem support - DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +!(LINUX_3_18||LINUX_4_9):kmod-lib-zstd + DEPENDS:=+kmod-lib-crc32c +kmod-lib-lzo +kmod-lib-zlib-inflate +kmod-lib-zlib-deflate +kmod-lib-raid6 +kmod-lib-xor +!LINUX_4_9:kmod-lib-zstd KCONFIG:=\ CONFIG_BTRFS_FS \ CONFIG_BTRFS_FS_POSIX_ACL=n \ @@ -98,6 +98,7 @@ define KernelPackage/fs-cifs AUTOLOAD:=$(call AutoLoad,30,cifs) $(call AddDepends/nls) DEPENDS+= \ + +kmod-crypto-arc4 \ +kmod-crypto-hmac \ +kmod-crypto-md5 \ +kmod-crypto-md4 \ @@ -388,7 +389,8 @@ define KernelPackage/fs-nfs-common-rpcsec +kmod-crypto-md5 \ +kmod-crypto-sha1 \ +kmod-crypto-hmac \ - +kmod-crypto-ecb + +kmod-crypto-ecb \ + +kmod-crypto-arc4 KCONFIG:= \ CONFIG_SUNRPC_GSS \ CONFIG_RPCSEC_GSS_KRB5 diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index 5f54b4af22..e79304b4fe 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -112,7 +112,7 @@ define KernelPackage/hwmon-ina2xx KCONFIG:=CONFIG_SENSORS_INA2XX FILES:=$(LINUX_DIR)/drivers/hwmon/ina2xx.ko AUTOLOAD:=$(call AutoProbe,ina2xx) - $(call AddDepends/hwmon,+kmod-i2c-core +!LINUX_3_18:kmod-regmap-i2c) + $(call AddDepends/hwmon,+kmod-i2c-core +kmod-regmap-i2c) endef define KernelPackage/hwmon-ina2xx/description @@ -287,6 +287,36 @@ endef $(eval $(call KernelPackage,hwmon-pc87360)) +define KernelPackage/pmbus-core + TITLE:=PMBus support + KCONFIG:= CONFIG_PMBUS + FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/pmbus_core.ko + $(call AddDepends/hwmon,+kmod-i2c-core) +endef + +define KernelPackage/pmbus-core/description + Kernel modules for Power Management Bus +endef + +$(eval $(call KernelPackage,pmbus-core)) + + +define KernelPackage/pmbus-zl6100 + TITLE:=Intersil / Zilker Labs ZL6100 hardware monitoring + KCONFIG:=CONFIG_SENSORS_ZL6100 + FILES:=$(LINUX_DIR)/drivers/hwmon/pmbus/zl6100.ko + AUTOLOAD:=$(call AutoProbe,zl6100) + $(call AddDepends/hwmon, +kmod-pmbus-core) +endef + +define KernelPackage/hwmon-sht21/description + Kernel module for Intersil / Zilker Labs ZL6100 and +compatible digital DC-DC controllers +endef + +$(eval $(call KernelPackage,pmbus-zl6100)) + + define KernelPackage/hwmon-pwmfan TITLE:=Generic PWM FAN support KCONFIG:=CONFIG_SENSORS_PWM_FAN diff --git a/package/kernel/linux/modules/i2c.mk b/package/kernel/linux/modules/i2c.mk index 4cf37dae07..0b23b2439c 100644 --- a/package/kernel/linux/modules/i2c.mk +++ b/package/kernel/linux/modules/i2c.mk @@ -209,6 +209,23 @@ endef $(eval $(call KernelPackage,i2c-piix4)) +I2C_PXA_MODULES:= \ + CONFIG_I2C_PXA_SLAVE=y \ + CONFIG_I2C_PXA:drivers/i2c/busses/i2c-pxa + +define KernelPackage/i2c-pxa + $(call i2c_defaults,$(I2C_PXA_MODULES),50) + TITLE:=Intel PXA I2C bus driver + DEPENDS:=kmod-i2c-core +endef + +define KernelPackage/i2c-pxa/description + Kernel module for Intel PXA2XX I2C adapter +endef + +$(eval $(call KernelPackage,i2c-pxa)) + + I2C_SMBUS_MODULES:= \ CONFIG_I2C_SMBUS:drivers/i2c/i2c-smbus diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk index fe682b3100..1ec3c968d3 100644 --- a/package/kernel/linux/modules/iio.mk +++ b/package/kernel/linux/modules/iio.mk @@ -129,10 +129,55 @@ endef $(eval $(call KernelPackage,iio-dht11)) + +define KernelPackage/iio-bme680 + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor + DEPENDS:=@LINUX_4_19 +kmod-iio-core +kmod-regmap-core + KCONFIG:=CONFIG_BME680 + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_core.ko +endef + +define KernelPackage/iio-bme680/description + This driver adds support for Bosch Sensortec BME680 sensor with gas, + humidity, pressure and temperatue sensing capability. +endef + +$(eval $(call KernelPackage,iio-bme680)) + +define KernelPackage/iio-bme680-i2c + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor (I2C) + DEPENDS:=+kmod-iio-bme680 +kmod-regmap-i2c + KCONFIG:=CONFIG_BME680_I2C + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_i2c.ko + AUTOLOAD:=$(call AutoProbe,bme680-i2c) +endef +define KernelPackage/iio-bme680-i2c/description + This driver adds support for Bosch Sensortec's BME680 connected via I2C. +endef + +$(eval $(call KernelPackage,iio-bme680-i2c)) + +define KernelPackage/iio-bme680-spi + SUBMENU:=$(IIO_MENU) + TITLE:=BME680 gas/humidity/pressure/temperature sensor (SPI) + DEPENDS:=+kmod-iio-bme680 +kmod-regmap-spi + KCONFIG:=CONFIG_BME680_SPI + FILES:=$(LINUX_DIR)/drivers/iio/chemical/bme680_spi.ko + AUTOLOAD:=$(call AutoProbe,bme680-spi) +endef +define KernelPackage/iio-bme680-spi/description + This driver adds support for Bosch Sensortec's BME680 connected via SPI. +endef + +$(eval $(call KernelPackage,iio-bme680-spi)) + + define KernelPackage/iio-bmp280 SUBMENU:=$(IIO_MENU) TITLE:=BMP180/BMP280/BME280 pressure/temperatur sensor - DEPENDS:=@!LINUX_3_18 +kmod-iio-core +kmod-regmap-core + DEPENDS:=+kmod-iio-core +kmod-regmap-core KCONFIG:=CONFIG_BMP280 FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280.ko endef @@ -152,7 +197,7 @@ define KernelPackage/iio-bmp280-i2c DEPENDS:=+kmod-iio-bmp280 +kmod-i2c-core +kmod-regmap-i2c KCONFIG:=CONFIG_BMP280_I2C FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-i2c.ko - AUTOLOAD:=$(call AutoProbe,iio-bmp280-i2c) + AUTOLOAD:=$(call AutoProbe,bmp280-i2c) endef define KernelPackage/iio-bmp280-i2c/description This driver adds support for Bosch Sensortec's digital pressure and @@ -168,7 +213,7 @@ define KernelPackage/iio-bmp280-spi DEPENDS:=+kmod-iio-bmp280 +kmod-spi-bitbang KCONFIG:=CONFIG_BMP280_SPI FILES:=$(LINUX_DIR)/drivers/iio/pressure/bmp280-spi.ko - AUTOLOAD:=$(call AutoProbe,iio-bmp280-spi) + AUTOLOAD:=$(call AutoProbe,bmp280-spi) endef define KernelPackage/iio-bmp280-spi/description This driver adds support for Bosch Sensortec's digital pressure and @@ -200,6 +245,23 @@ endef $(eval $(call KernelPackage,iio-htu21)) +define KernelPackage/iio-ccs811 + SUBMENU:=$(IIO_MENU) + DEPENDS:=+kmod-i2c-core +kmod-iio-core + TITLE:=AMS CCS811 VOC sensor + KCONFIG:= \ + CONFIG_CCS811 + FILES:= $(LINUX_DIR)/drivers/iio/chemical/ccs811.ko + AUTOLOAD:=$(call AutoLoad,56,ccs811) +endef + +define KernelPackage/iio-ccs811/description + Support for the AMS CCS811 VOC (Volatile Organic Compounds) sensor +endef + +$(eval $(call KernelPackage,iio-ccs811)) + + define KernelPackage/iio-si7020 SUBMENU:=$(IIO_MENU) DEPENDS:=+kmod-i2c-core +kmod-iio-core diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index e410fe8d0c..99257b6725 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -173,6 +173,25 @@ endef $(eval $(call KernelPackage,input-matrixkmap)) +define KernelPackage/input-touchscreen-ads7846 + SUBMENU:=$(INPUT_MODULES_MENU) + TITLE:=ADS7846/TSC2046/AD7873 and AD(S)7843 based touchscreens + DEPENDS:=+kmod-hwmon-core +kmod-input-core +kmod-spi-bitbang + KCONFIG:= \ + CONFIG_INPUT_TOUCHSCREEN=y \ + CONFIG_TOUCHSCREEN_PROPERTIES=y \ + CONFIG_TOUCHSCREEN_ADS7846 + FILES:=$(LINUX_DIR)/drivers/input/touchscreen/ads7846.ko + AUTOLOAD:=$(call AutoProbe,ads7846) +endef + +define KernelPackage/input-touchscreen-ads7846/description + Kernel module for ADS7846/TSC2046/AD7873 and AD(S)7843 based touchscreens +endef + +$(eval $(call KernelPackage,input-touchscreen-ads7846)) + + define KernelPackage/keyboard-imx SUBMENU:=$(INPUT_MODULES_MENU) TITLE:=IMX keypad support diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index b0d19ff8bd..3e5a12e926 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -101,7 +101,7 @@ $(eval $(call KernelPackage,lib-crc32c)) define KernelPackage/lib-lzo SUBMENU:=$(LIB_MENU) TITLE:=LZO support - DEPENDS:=+!(LINUX_3_18||LINUX_4_9):kmod-crypto-acompress + DEPENDS:=+!LINUX_4_9:kmod-crypto-acompress KCONFIG:= \ CONFIG_CRYPTO_LZO@ge4.9 \ CONFIG_LZO_COMPRESS \ @@ -146,7 +146,7 @@ $(eval $(call KernelPackage,lib-zstd)) define KernelPackage/lib-lz4 SUBMENU:=$(LIB_MENU) TITLE:=LZ4 support - DEPENDS:=+!(LINUX_3_18||LINUX_4_9):kmod-crypto-acompress + DEPENDS:=+!LINUX_4_9:kmod-crypto-acompress HIDDEN:=1 KCONFIG:= \ CONFIG_CRYPTO_LZ4@ge4.9 \ diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk index 5aa33bebf2..5f8d767679 100644 --- a/package/kernel/linux/modules/netdevices.mk +++ b/package/kernel/linux/modules/netdevices.mk @@ -33,6 +33,18 @@ endef $(eval $(call KernelPackage,skge)) +define KernelPackage/alx + SUBMENU:=$(NETWORK_DEVICES_MENU) + TITLE:=Qualcomm Atheros AR816x/AR817x PCI-E Ethernet Network Driver + DEPENDS:=@PCI_SUPPORT +kmod-mdio + KCONFIG:=CONFIG_ALX + FILES:=$(LINUX_DIR)/drivers/net/ethernet/atheros/alx/alx.ko + AUTOLOAD:=$(call AutoProbe,alx) +endef + +$(eval $(call KernelPackage,alx)) + + define KernelPackage/atl2 SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Atheros L2 Fast Ethernet support @@ -113,7 +125,7 @@ $(eval $(call KernelPackage,mii)) define KernelPackage/mdio-gpio SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:= Supports GPIO lib-based MDIO busses - DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_brcm2708_bcm2708||TARGET_samsung):kmod-of-mdio + DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armvirt||TARGET_brcm2708_bcm2708||TARGET_samsung||TARGET_tegra):kmod-of-mdio KCONFIG:= \ CONFIG_MDIO_BITBANG \ CONFIG_MDIO_GPIO @@ -261,7 +273,7 @@ $(eval $(call KernelPackage,switch-rtl8306)) define KernelPackage/switch-rtl8366-smi SUBMENU:=$(NETWORK_DEVICES_MENU) TITLE:=Realtek RTL8366 SMI switch interface support - DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_brcm2708_bcm2708||TARGET_samsung):kmod-of-mdio + DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armvirt||TARGET_brcm2708_bcm2708||TARGET_samsung||TARGET_tegra):kmod-of-mdio KCONFIG:=CONFIG_RTL8366_SMI FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366_smi.ko AUTOLOAD:=$(call AutoLoad,42,rtl8366_smi) @@ -642,39 +654,6 @@ endef $(eval $(call KernelPackage,ixgbevf)) -define KernelPackage/i40e - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) Ethernet Controller XL710 Family support - DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core - KCONFIG:=CONFIG_I40E \ - CONFIG_I40E_DCB=n - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko - AUTOLOAD:=$(call AutoProbe,i40e) -endef - -define KernelPackage/i40e/description - Kernel modules for Intel(R) Ethernet Controller XL710 Family 40 Gigabit Ethernet adapters. -endef - -$(eval $(call KernelPackage,i40e)) - - -define KernelPackage/i40evf - SUBMENU:=$(NETWORK_DEVICES_MENU) - TITLE:=Intel(R) Ethernet Adaptive Virtual Function support - DEPENDS:=@PCI_SUPPORT +kmod-i40e - KCONFIG:=CONFIG_I40EVF - FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40evf/i40evf.ko - AUTOLOAD:=$(call AutoProbe,i40evf) -endef - -define KernelPackage/i40evf/description - Kernel modules for Intel(R) Ethernet Controller XL710 Family Virtual Function Ethernet adapters. -endef - -$(eval $(call KernelPackage,i40evf)) - - define KernelPackage/b44 TITLE:=Broadcom 44xx driver KCONFIG:=CONFIG_B44 @@ -733,7 +712,7 @@ define KernelPackage/tg3 TITLE:=Broadcom Tigon3 Gigabit Ethernet KCONFIG:=CONFIG_TIGON3 \ CONFIG_TIGON3_HWMON=n - DEPENDS:=+!TARGET_brcm47xx:kmod-libphy +(LINUX_3_18||LINUX_4_9):kmod-hwmon-core +kmod-ptp + DEPENDS:=+!TARGET_brcm47xx:kmod-libphy +LINUX_4_9:kmod-hwmon-core +kmod-ptp SUBMENU:=$(NETWORK_DEVICES_MENU) FILES:=$(LINUX_DIR)/drivers/net/ethernet/broadcom/tg3.ko AUTOLOAD:=$(call AutoLoad,19,tg3,1) diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index d2841a4d19..cc4c5ecb2a 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -152,7 +152,7 @@ define KernelPackage/nf-flow CONFIG_NETFILTER_INGRESS=y \ CONFIG_NF_FLOW_TABLE \ CONFIG_NF_FLOW_TABLE_HW - DEPENDS:=+kmod-nf-conntrack @!LINUX_3_18 @!LINUX_4_9 + DEPENDS:=+kmod-nf-conntrack @!LINUX_4_9 FILES:= \ $(LINUX_DIR)/net/netfilter/nf_flow_table.ko \ $(LINUX_DIR)/net/netfilter/nf_flow_table_hw.ko @@ -245,7 +245,7 @@ $(eval $(call KernelPackage,ipt-filter)) define KernelPackage/ipt-offload TITLE:=Netfilter routing/NAT offload support - KCONFIG:=CONFIG_NETFILTER_XT_TARGET_FLOWOFFLOAD + KCONFIG:=$(KCONFIG_IPT_FLOW) FILES:=$(foreach mod,$(IPT_FLOW-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FLOW-m))) $(call AddDepends/ipt,+kmod-nf-flow) @@ -330,6 +330,7 @@ define KernelPackage/ipt-ipset CONFIG_IP_SET_BITMAP_IPMAC \ CONFIG_IP_SET_BITMAP_PORT \ CONFIG_IP_SET_HASH_IP \ + CONFIG_IP_SET_HASH_IPMAC \ CONFIG_IP_SET_HASH_IPMARK \ CONFIG_IP_SET_HASH_IPPORT \ CONFIG_IP_SET_HASH_IPPORTIP \ @@ -645,11 +646,8 @@ $(eval $(call KernelPackage,ipt-led)) define KernelPackage/ipt-tproxy TITLE:=Transparent proxying support DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +IPV6:kmod-ip6tables - KCONFIG:= \ - CONFIG_NETFILTER_XT_MATCH_SOCKET \ - CONFIG_NETFILTER_XT_TARGET_TPROXY - FILES:= \ - $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko) + KCONFIG:=$(KCONFIG_IPT_TPROXY) + FILES:=$(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_TPROXY-m))) $(call AddDepends/ipt) endef @@ -663,11 +661,8 @@ $(eval $(call KernelPackage,ipt-tproxy)) define KernelPackage/ipt-tee TITLE:=TEE support DEPENDS:=+kmod-ipt-conntrack - KCONFIG:= \ - CONFIG_NETFILTER_XT_TARGET_TEE - FILES:= \ - $(LINUX_DIR)/net/netfilter/xt_TEE.ko \ - $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko) + KCONFIG:=$(KCONFIG_IPT_TEE) + FILES:=$(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m))) $(call AddDepends/ipt) endef @@ -681,11 +676,8 @@ $(eval $(call KernelPackage,ipt-tee)) define KernelPackage/ipt-u32 TITLE:=U32 support - KCONFIG:= \ - CONFIG_NETFILTER_XT_MATCH_U32 - FILES:= \ - $(LINUX_DIR)/net/netfilter/xt_u32.ko \ - $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko) + KCONFIG:=$(KCONFIG_IPT_U32) + FILES:=$(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_U32-m))) $(call AddDepends/ipt) endef @@ -698,11 +690,8 @@ $(eval $(call KernelPackage,ipt-u32)) define KernelPackage/ipt-checksum TITLE:=CHECKSUM support - KCONFIG:= \ - CONFIG_NETFILTER_XT_TARGET_CHECKSUM - FILES:= \ - $(LINUX_DIR)/net/netfilter/xt_CHECKSUM.ko \ - $(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko) + KCONFIG:=$(KCONFIG_IPT_CHECKSUM) + FILES:=$(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CHECKSUM-m))) $(call AddDepends/ipt) endef diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 236931ac09..44408a720b 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -128,6 +128,23 @@ endef $(eval $(call KernelPackage,geneve)) +define KernelPackage/nsh + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Network Service Header (NSH) protocol + DEPENDS:= + KCONFIG:=CONFIG_NET_NSH + FILES:=$(LINUX_DIR)/net/nsh/nsh.ko@ge4.14 + AUTOLOAD:=$(call AutoLoad,13,nsh) +endef + +define KernelPackage/nsh/description + Network Service Header is an implementation of Service Function + Chaining (RFC 7665). Requires kernel 4.14 or newer +endef + +$(eval $(call KernelPackage,nsh)) + + define KernelPackage/capi SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=CAPI (ISDN) Support @@ -383,6 +400,22 @@ endef $(eval $(call KernelPackage,ip6-vti)) +define KernelPackage/xfrm-interface + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=IPsec XFRM Interface + DEPENDS:=+kmod-ipsec4 +kmod-ipsec6 @!LINUX_4_14 @!LINUX_4_9 + KCONFIG:=CONFIG_XFRM_INTERFACE + FILES:=$(LINUX_DIR)/net/xfrm/xfrm_interface.ko + AUTOLOAD:=$(call AutoProbe,xfrm_interface) +endef + +define KernelPackage/xfrm-interface/description + Kernel module for XFRM interface support +endef + +$(eval $(call KernelPackage,xfrm-interface)) + + define KernelPackage/iptunnel4 SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=IPv4 tunneling @@ -700,7 +733,7 @@ $(eval $(call KernelPackage,ipoa)) define KernelPackage/mppe SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Microsoft PPP compression/encryption - DEPENDS:=kmod-ppp +kmod-crypto-sha1 +kmod-crypto-ecb + DEPENDS:=kmod-ppp +kmod-crypto-arc4 +kmod-crypto-sha1 +kmod-crypto-ecb KCONFIG:= \ CONFIG_PPP_MPPE_MPPC \ CONFIG_PPP_MPPE @@ -716,8 +749,8 @@ $(eval $(call KernelPackage,mppe)) SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko)) -SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit -SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark sch_netem +SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit cls_matchall +SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES)) SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES))) SCHED_FILES_EXTRA = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(SCHED_MODULES_EXTRA)) @@ -734,6 +767,7 @@ define KernelPackage/sched-core CONFIG_NET_SCH_FQ_CODEL \ CONFIG_NET_CLS=y \ CONFIG_NET_CLS_ACT=y \ + CONFIG_NET_CLS_BASIC \ CONFIG_NET_CLS_FLOW \ CONFIG_NET_CLS_FW \ CONFIG_NET_CLS_ROUTE4 \ @@ -741,6 +775,7 @@ define KernelPackage/sched-core CONFIG_NET_CLS_U32 \ CONFIG_NET_ACT_MIRRED \ CONFIG_NET_ACT_SKBEDIT \ + CONFIG_NET_CLS_MATCHALL \ CONFIG_NET_EMATCH=y \ CONFIG_NET_EMATCH_U32 FILES:=$(SCHED_FILES) @@ -754,6 +789,53 @@ endef $(eval $(call KernelPackage,sched-core)) +define KernelPackage/sched-flower + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Flower traffic classifier + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_CLS_FLOWER + FILES:=$(LINUX_DIR)/net/sched/cls_flower.ko + AUTOLOAD:=$(call AutoProbe, cls_flower) +endef + +define KernelPackage/sched-flower/description + Allows to classify packets based on a configurable combination of packet keys and masks. +endef + +$(eval $(call KernelPackage,sched-flower)) + + +define KernelPackage/sched-act-vlan + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic VLAN manipulation + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_ACT_VLAN + FILES:=$(LINUX_DIR)/net/sched/act_vlan.ko + AUTOLOAD:=$(call AutoProbe, act_vlan) +endef + +define KernelPackage/sched-act-vlan/description + Allows to configure rules to push or pop vlan headers. +endef + +$(eval $(call KernelPackage,sched-act-vlan)) + + +define KernelPackage/sched-mqprio + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Multi-queue priority scheduler (MQPRIO) + DEPENDS:=+kmod-sched-core + KCONFIG:=CONFIG_NET_SCH_MQPRIO + FILES:=$(LINUX_DIR)/net/sched/sch_mqprio.ko + AUTOLOAD:=$(call AutoProbe, sch_mqprio) +endef + +define KernelPackage/sched-mqprio/description + This scheduler allows QOS to be offloaded on NICs that have support for offloading QOS schedulers. +endef + +$(eval $(call KernelPackage,sched-mqprio)) + define KernelPackage/sched-connmark SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Traffic shaper conntrack mark support @@ -764,10 +846,59 @@ define KernelPackage/sched-connmark endef $(eval $(call KernelPackage,sched-connmark)) +define KernelPackage/sched-ctinfo + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper ctinfo support + DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-ipt-conntrack-extra + KCONFIG:=CONFIG_NET_ACT_CTINFO + FILES:=$(LINUX_DIR)/net/sched/act_ctinfo.ko + AUTOLOAD:=$(call AutoLoad,71, act_ctinfo) +endef +$(eval $(call KernelPackage,sched-ctinfo)) + +define KernelPackage/sched-ipset + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper ipset support + DEPENDS:=+kmod-sched-core +kmod-ipt-ipset + KCONFIG:= \ + CONFIG_NET_EMATCH_IPSET + FILES:= \ + $(LINUX_DIR)/net/sched/em_ipset.ko + AUTOLOAD:=$(call AutoLoad,72,em_ipset) +endef + +$(eval $(call KernelPackage,sched-ipset)) + + +define KernelPackage/sched-bpf + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Traffic shaper support for Berkeley Packet Filter + KCONFIG:= \ + CONFIG_NET_CLS_BPF \ + CONFIG_NET_ACT_BPF + FILES:= \ + $(LINUX_DIR)/net/sched/cls_bpf.ko \ + $(LINUX_DIR)/net/sched/act_bpf.ko + AUTOLOAD:=$(call AutoLoad,72,cls_bpf act_bpf) +endef + +$(eval $(call KernelPackage,sched-bpf)) + + +define KernelPackage/bpf-test + SUBMENU:=$(NETWORK_SUPPORT_MENU) + TITLE:=Test Berkeley Packet Filter functionality + KCONFIG:=CONFIG_TEST_BPF + FILES:=$(LINUX_DIR)/lib/test_bpf.ko +endef + +$(eval $(call KernelPackage,bpf-test)) + + define KernelPackage/sched SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=Extra traffic schedulers - DEPENDS:=+kmod-sched-core +kmod-ipt-core + DEPENDS:=+kmod-sched-core +kmod-ipt-core +kmod-lib-crc32c KCONFIG:= \ CONFIG_NET_SCH_CODEL \ CONFIG_NET_SCH_DSMARK \ @@ -780,9 +911,12 @@ define KernelPackage/sched CONFIG_NET_SCH_TEQL \ CONFIG_NET_SCH_FQ \ CONFIG_NET_SCH_PIE \ - CONFIG_NET_CLS_BASIC \ CONFIG_NET_ACT_POLICE \ + CONFIG_NET_ACT_GACT \ CONFIG_NET_ACT_IPT \ + CONFIG_NET_ACT_PEDIT \ + CONFIG_NET_ACT_SIMP \ + CONFIG_NET_ACT_CSUM \ CONFIG_NET_EMATCH_CMP \ CONFIG_NET_EMATCH_NBYTE \ CONFIG_NET_EMATCH_META \ @@ -801,7 +935,7 @@ $(eval $(call KernelPackage,sched)) define KernelPackage/tcp-bbr SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=BBR TCP congestion control - DEPENDS:=@!LINUX_3_18 +LINUX_4_9:kmod-sched + DEPENDS:=+LINUX_4_9:kmod-sched KCONFIG:= \ CONFIG_TCP_CONG_ADVANCED=y \ CONFIG_TCP_CONG_BBR=m @@ -1017,7 +1151,7 @@ $(eval $(call KernelPackage,rxrpc)) define KernelPackage/mpls SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=MPLS support - DEPENDS:=@!LINUX_3_18 +LINUX_4_19:kmod-iptunnel + DEPENDS:=+LINUX_4_19:kmod-iptunnel KCONFIG:= \ CONFIG_MPLS=y \ CONFIG_LWTUNNEL=y \ @@ -1094,7 +1228,7 @@ $(eval $(call KernelPackage,mdio)) define KernelPackage/macsec SUBMENU:=$(NETWORK_SUPPORT_MENU) TITLE:=IEEE 802.1AE MAC-level encryption (MAC) - DEPENDS:=+kmod-crypto-gcm @!LINUX_3_18 + DEPENDS:=+kmod-crypto-gcm KCONFIG:=CONFIG_MACSEC FILES:=$(LINUX_DIR)/drivers/net/macsec.ko AUTOLOAD:=$(call AutoLoad,13,macsec) diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk index 653e8f9312..0ffaac2014 100644 --- a/package/kernel/linux/modules/other.mk +++ b/package/kernel/linux/modules/other.mk @@ -30,7 +30,7 @@ $(eval $(call KernelPackage,6lowpan)) define KernelPackage/bluetooth SUBMENU:=$(OTHER_MENU) TITLE:=Bluetooth support - DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-crypto-hash +kmod-crypto-ecb +kmod-lib-crc16 +kmod-hid +!LINUX_3_18:kmod-crypto-cmac +!LINUX_3_18:kmod-regmap-core +!(LINUX_3_18||LINUX_4_9):kmod-crypto-ecdh + DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-crypto-hash +kmod-crypto-ecb +kmod-lib-crc16 +kmod-hid +kmod-crypto-cmac +kmod-regmap-core +!LINUX_4_9:kmod-crypto-ecdh KCONFIG:= \ CONFIG_BT \ CONFIG_BT_BREDR=y \ @@ -219,7 +219,7 @@ $(eval $(call KernelPackage,gpio-dev)) define KernelPackage/gpio-mcp23s08 SUBMENU:=$(OTHER_MENU) TITLE:=Microchip MCP23xxx I/O expander - DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +!(LINUX_3_18||LINUX_4_9):kmod-regmap-i2c + DEPENDS:=@GPIO_SUPPORT +kmod-i2c-core +!LINUX_4_9:kmod-regmap-i2c KCONFIG:= \ CONFIG_GPIO_MCP23S08 \ CONFIG_PINCTRL_MCP23S08 @@ -476,7 +476,7 @@ define KernelPackage/rtc-ds1307 SUBMENU:=$(OTHER_MENU) TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support DEFAULT:=m if ALL_KMODS && RTC_SUPPORT - DEPENDS:=+kmod-i2c-core +!(LINUX_3_18||LINUX_4_9):kmod-regmap-i2c +!(LINUX_3_18||LINUX_4_9):kmod-hwmon-core + DEPENDS:=+kmod-i2c-core +!LINUX_4_9:kmod-regmap-i2c +!LINUX_4_9:kmod-hwmon-core KCONFIG:=CONFIG_RTC_DRV_DS1307 \ CONFIG_RTC_CLASS=y FILES:=$(LINUX_DIR)/drivers/rtc/rtc-ds1307.ko @@ -528,6 +528,24 @@ endef $(eval $(call KernelPackage,rtc-ds1672)) +define KernelPackage/rtc-em3027 + SUBMENU:=$(OTHER_MENU) + TITLE:=Microelectronic EM3027 RTC support + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + DEPENDS:=+kmod-i2c-core + KCONFIG:=CONFIG_RTC_DRV_EM3027 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-em3027.ko + AUTOLOAD:=$(call AutoProbe,rtc-em3027) +endef + +define KernelPackage/rtc-em3027/description + Kernel module for Microelectronic EM3027 RTC. +endef + +$(eval $(call KernelPackage,rtc-em3027)) + + define KernelPackage/rtc-isl1208 SUBMENU:=$(OTHER_MENU) TITLE:=Intersil ISL1208 RTC support @@ -581,6 +599,23 @@ endef $(eval $(call KernelPackage,rtc-pcf2123)) +define KernelPackage/rtc-pcf2127 + SUBMENU:=$(OTHER_MENU) + TITLE:=NXP PCF2127 and PCF2129 RTC support + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + DEPENDS:=+kmod-i2c-core +kmod-regmap-spi + KCONFIG:=CONFIG_RTC_DRV_PCF2127 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-pcf2127.ko + AUTOLOAD:=$(call AutoProbe,rtc-pcf2127) +endef + +define KernelPackage/rtc-pcf2127/description + Kernel module for NXP PCF2127 and PCF2129 RTC chip +endef + +$(eval $(call KernelPackage,rtc-pcf2127)) + define KernelPackage/rtc-pt7c4338 SUBMENU:=$(OTHER_MENU) TITLE:=Pericom PT7C4338 RTC support @@ -615,6 +650,23 @@ endef $(eval $(call KernelPackage,rtc-rs5c372a)) +define KernelPackage/rtc-rx8025 + SUBMENU:=$(OTHER_MENU) + TITLE:=Epson RX-8025 / RX-8035 + DEFAULT:=m if ALL_KMODS && RTC_SUPPORT + DEPENDS:=+kmod-i2c-core + KCONFIG:=CONFIG_RTC_DRV_RX8025 \ + CONFIG_RTC_CLASS=y + FILES:=$(LINUX_DIR)/drivers/rtc/rtc-rx8025.ko + AUTOLOAD:=$(call AutoLoad,50,rtc-rx8025,1) +endef + +define KernelPackage/rtc-rx8025/description + Kernel module for Epson RX-8025 and RX-8035 I2C RTC chip +endef + +$(eval $(call KernelPackage,rtc-rx8025)) + define KernelPackage/mtdtests SUBMENU:=$(OTHER_MENU) @@ -891,7 +943,7 @@ $(eval $(call KernelPackage,ptp)) define KernelPackage/ptp-gianfar SUBMENU:=$(OTHER_MENU) TITLE:=Freescale Gianfar PTP support - DEPENDS:=@TARGET_mpc85xx +kmod-ptp + DEPENDS:=@TARGET_mpc85xx +kmod-ptp @!LINUX_4_19 KCONFIG:=CONFIG_PTP_1588_CLOCK_GIANFAR FILES:=$(LINUX_DIR)/drivers/net/ethernet/freescale/gianfar_ptp.ko AUTOLOAD:=$(call AutoProbe,gianfar_ptp) @@ -904,6 +956,22 @@ endef $(eval $(call KernelPackage,ptp-gianfar)) +define KernelPackage/ptp-qoriq + SUBMENU:=$(OTHER_MENU) + TITLE:=Freescale QorIQ PTP support + DEPENDS:=@TARGET_mpc85xx +kmod-ptp @LINUX_4_19 + KCONFIG:=CONFIG_PTP_1588_CLOCK_QORIQ + FILES:=$(LINUX_DIR)/drivers/ptp/ptp_qoriq.o + AUTOLOAD:=$(call AutoProbe,ptp_qoriq) +endef + + +define KernelPackage/ptp-qoriq/description + Kernel module for IEEE 1588 support for Freescale + QorIQ Ethernet drivers +endef + +$(eval $(call KernelPackage,ptp-qoriq)) define KernelPackage/random-core SUBMENU:=$(OTHER_MENU) @@ -918,21 +986,6 @@ endef $(eval $(call KernelPackage,random-core)) -define KernelPackage/random-omap - SUBMENU:=$(OTHER_MENU) - TITLE:=Hardware Random Number Generator OMAP support - KCONFIG:=CONFIG_HW_RANDOM_OMAP - FILES:=$(LINUX_DIR)/drivers/char/hw_random/omap-rng.ko - DEPENDS:=@TARGET_omap24xx +kmod-random-core - AUTOLOAD:=$(call AutoProbe,random-omap) -endef - -define KernelPackage/random-omap/description - Kernel module for the OMAP Random Number Generator - found on OMAP16xx, OMAP2/3/4/5 and AM33xx/AM43xx multimedia processors. -endef - -$(eval $(call KernelPackage,random-omap)) define KernelPackage/random-tpm SUBMENU:=$(OTHER_MENU) @@ -1019,7 +1072,7 @@ $(eval $(call KernelPackage,echo)) define KernelPackage/bmp085 SUBMENU:=$(OTHER_MENU) TITLE:=BMP085/BMP18x pressure sensor - DEPENDS:= +kmod-regmap-core @!LINUX_3_18 + DEPENDS:= +kmod-regmap-core KCONFIG:= CONFIG_BMP085 FILES:= $(LINUX_DIR)/drivers/misc/bmp085.ko endef @@ -1066,6 +1119,7 @@ $(eval $(call KernelPackage,bmp085-spi)) define KernelPackage/tpm SUBMENU:=$(OTHER_MENU) TITLE:=TPM Hardware Support + DEPENDS:= +!LINUX_4_14:kmod-random-core KCONFIG:= CONFIG_TCG_TPM FILES:= $(LINUX_DIR)/drivers/char/tpm/tpm.ko AUTOLOAD:=$(call AutoLoad,10,tpm,1) diff --git a/package/kernel/linux/modules/sound.mk b/package/kernel/linux/modules/sound.mk index bf4bd5d7c0..c83e553d8f 100644 --- a/package/kernel/linux/modules/sound.mk +++ b/package/kernel/linux/modules/sound.mk @@ -191,6 +191,7 @@ define KernelPackage/sound-soc-core DEPENDS:=+kmod-regmap-core +kmod-ac97 KCONFIG:= \ CONFIG_SND_SOC \ + CONFIG_SND_SOC_ADI=n \ CONFIG_SND_SOC_DMAENGINE_PCM=y \ CONFIG_SND_SOC_ALL_CODECS=n FILES:=$(LINUX_DIR)/sound/soc/snd-soc-core.ko diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 8ac4f76e20..45c409f4cb 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -39,7 +39,6 @@ endef define KernelPackage/usb-ledtrig-usbport TITLE:=LED trigger for USB ports KCONFIG:=CONFIG_USB_LEDS_TRIGGER_USBPORT - DEPENDS:=@!LINUX_3_18 FILES:=$(LINUX_DIR)/drivers/usb/core/ledtrig-usbport.ko AUTOLOAD:=$(call AutoLoad,50,ledtrig-usbport) $(call AddDepends/usb) @@ -73,7 +72,7 @@ $(eval $(call KernelPackage,usb-phy-nop)) define KernelPackage/usb-phy-qcom-dwc3 TITLE:=DWC3 USB QCOM PHY driver - DEPENDS:=@!LINUX_4_19 @TARGET_ipq806x +kmod-usb-dwc3-of-simple + DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3-of-simple KCONFIG:= CONFIG_PHY_QCOM_DWC3 FILES:= \ $(LINUX_DIR)/drivers/phy/phy-qcom-dwc3.ko@lt4.13 \ @@ -237,6 +236,22 @@ endef $(eval $(call KernelPackage,usb-gadget-mass-storage)) +define KernelPackage/usb-gadget-cdc-composite + TITLE:= USB CDC Composite (Ethernet + ACM) + KCONFIG:=CONFIG_USB_CDC_COMPOSITE + DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \ + +kmod-usb-gadget-eth +kmod-usb-gadget-serial + FILES:= $(LINUX_DIR)/drivers/usb/gadget/legacy/g_cdc.ko + $(call AddDepends/usb) +endef + +define KernelPackage/usb-gadget-cdc-composite/description + Kernel support for the USB CDC Composite gadget. + This appears as an ethernet + ACM serial gadget. +endef + +$(eval $(call KernelPackage,usb-gadget-cdc-composite)) + define KernelPackage/usb-uhci TITLE:=Support for UHCI controllers @@ -379,7 +394,13 @@ define KernelPackage/usb2 ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ehci-atmel.ko),) FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-atmel.ko endif - AUTOLOAD:=$(call AutoLoad,40,ehci-hcd ehci-platform ehci-orion ehci-atmel,1) + ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/ehci-fsl.ko),) + FILES+=$(LINUX_DIR)/drivers/usb/host/ehci-fsl.ko + endif + ifneq ($(wildcard $(LINUX_DIR)/drivers/usb/host/fsl-mph-dr-of.ko),) + FILES+=$(LINUX_DIR)/drivers/usb/host/fsl-mph-dr-of.ko + endif + AUTOLOAD:=$(call AutoLoad,40,ehci-hcd ehci-platform ehci-orion ehci-atmel ehci-fsl fsl-mph-dr-of,1) $(call AddDepends/usb) endef @@ -459,7 +480,7 @@ $(eval $(call KernelPackage,usb-dwc3)) define KernelPackage/usb-dwc3-of-simple TITLE:=DWC3 USB simple OF driver - DEPENDS:=@!LINUX_4_19 @TARGET_ipq40xx||@TARGET_ipq806x +kmod-usb-dwc3 + DEPENDS:=@!LINUX_4_19 @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3 KCONFIG:= CONFIG_USB_DWC3_OF_SIMPLE FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-of-simple.ko AUTOLOAD:=$(call AutoLoad,53,dwc3-of-simple,1) @@ -477,7 +498,7 @@ $(eval $(call KernelPackage,usb-dwc3-of-simple)) define KernelPackage/usb-dwc3-qcom TITLE:=DWC3 Qualcomm USB driver - DEPENDS:=@LINUX_4_19 @TARGET_ipq40xx||@TARGET_ipq806x +kmod-usb-dwc3 + DEPENDS:=@LINUX_4_19 @(TARGET_ipq40xx||TARGET_ipq806x) +kmod-usb-dwc3 KCONFIG:= CONFIG_USB_DWC3_QCOM FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1) @@ -1378,7 +1399,7 @@ define KernelPackage/usb-net-cdc-mbim endef define KernelPackage/usb-net-cdc-mbim/description - Kernel module for Option USB High Speed Mobile Devices + Kernel module for CDC MBIM (Mobile Broadband Interface Model) devices endef $(eval $(call KernelPackage,usb-net-cdc-mbim)) @@ -1653,7 +1674,6 @@ define KernelPackage/usb3 CONFIG_USB_XHCI_HCD \ CONFIG_USB_XHCI_PCI \ CONFIG_USB_XHCI_PLATFORM \ - CONFIG_USB_XHCI_MVEBU=y \ CONFIG_USB_XHCI_MTK \ CONFIG_USB_XHCI_HCD_DEBUGGING=n FILES:= \ diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk index f4b19e59a2..5e2484cec5 100644 --- a/package/kernel/linux/modules/video.mk +++ b/package/kernel/linux/modules/video.mk @@ -176,7 +176,7 @@ define KernelPackage/fb-sys-ram AUTOLOAD:=$(call AutoLoad,07,syscopyarea sysfillrect sysimgblt) endef -define KernelPackage/fb-sys-fops/description +define KernelPackage/fb-sys-ram/description Kernel support for framebuffers in system RAM endef @@ -187,7 +187,7 @@ define KernelPackage/fb-tft SUBMENU:=$(VIDEO_MENU) TITLE:=Support for small TFT LCD display modules DEPENDS:= \ - @GPIO_SUPPORT @!LINUX_3_18 @!LINUX_4_9 +kmod-backlight \ + @GPIO_SUPPORT @!LINUX_4_9 +kmod-backlight \ +kmod-fb +kmod-fb-sys-fops +kmod-fb-sys-ram +kmod-spi-bitbang KCONFIG:= \ CONFIG_FB_BACKLIGHT=y \ @@ -433,7 +433,7 @@ endef define KernelPackage/video-videobuf2 TITLE:=videobuf2 lib - DEPENDS:=+kmod-dma-buf @!LINUX_3_18 + DEPENDS:=+kmod-dma-buf KCONFIG:= \ CONFIG_VIDEOBUF2_CORE \ CONFIG_VIDEOBUF2_MEMOPS \ @@ -990,7 +990,7 @@ define KernelPackage/video-gspca-gl860 $(call AddDepends/camera-gspca) endef -define KernelPackage/video-gspca-gl800/description +define KernelPackage/video-gspca-gl860/description The GL860 USB Camera Driver (gl860) kernel module endef diff --git a/package/kernel/linux/modules/w1.mk b/package/kernel/linux/modules/w1.mk index baf6b06625..5055d78a18 100644 --- a/package/kernel/linux/modules/w1.mk +++ b/package/kernel/linux/modules/w1.mk @@ -14,7 +14,7 @@ define KernelPackage/w1 TITLE:=Dallas's 1-wire support KCONFIG:=CONFIG_W1 FILES:=$(LINUX_DIR)/drivers/w1/wire.ko - DEPENDS:=+!(LINUX_3_18||LINUX_4_9):kmod-hwmon-core + DEPENDS:=+!LINUX_4_9:kmod-hwmon-core endef define KernelPackage/w1/description diff --git a/package/kernel/linux/modules/wpan.mk b/package/kernel/linux/modules/wpan.mk index d8d58fa0bc..1e986ee0ca 100644 --- a/package/kernel/linux/modules/wpan.mk +++ b/package/kernel/linux/modules/wpan.mk @@ -9,7 +9,6 @@ WPAN_MENU:=WPAN 802.15.4 Support define KernelPackage/ieee802154 SUBMENU:=$(WPAN_MENU) TITLE:=IEEE-802.15.4 support - DEPENDS:=@!LINUX_3_18 KCONFIG:= \ CONFIG_IEEE802154 \ CONFIG_IEEE802154_SOCKET=y \ @@ -33,7 +32,7 @@ $(eval $(call KernelPackage,ieee802154)) define KernelPackage/mac802154 SUBMENU:=$(WPAN_MENU) TITLE:=MAC-802.15.4 support - DEPENDS:=+kmod-ieee802154 +kmod-crypto-aead +kmod-lib-crc-ccitt @!LINUX_3_18 + DEPENDS:=+kmod-ieee802154 +kmod-crypto-aead +kmod-lib-crc-ccitt KCONFIG:= \ CONFIG_MAC802154 \ CONFIG_IEEE802154_DRIVERS=y @@ -56,7 +55,7 @@ $(eval $(call KernelPackage,mac802154)) define KernelPackage/fakelb SUBMENU:=$(WPAN_MENU) TITLE:=Fake LR-WPAN driver - DEPENDS:=+kmod-mac802154 @!LINUX_3_18 + DEPENDS:=+kmod-mac802154 KCONFIG:=CONFIG_IEEE802154_FAKELB FILES:=$(LINUX_DIR)/drivers/net/ieee802154/fakelb.ko AUTOLOAD:=$(call AutoLoad,92,fakelb) @@ -69,6 +68,17 @@ endef $(eval $(call KernelPackage,fakelb)) +define KernelPackage/atusb + SUBMENU:=$(WPAN_MENU) + TITLE:=ATUSB transceiver driver + DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-mac802154 + KCONFIG:=CONFIG_IEEE802154_ATUSB + FILES:=$(LINUX_DIR)/drivers/net/ieee802154/atusb.ko + AUTOLOAD:=$(call AutoProbe,atusb) +endef + +$(eval $(call KernelPackage,atusb)) + define KernelPackage/at86rf230 SUBMENU:=$(WPAN_MENU) TITLE:=AT86RF230 transceiver driver @@ -109,7 +119,7 @@ $(eval $(call KernelPackage,cc2520)) define KernelPackage/ieee802154_6lowpan SUBMENU:=$(WPAN_MENU) TITLE:= 6LoWPAN support over IEEE-802.15.4 - DEPENDS:=@!LINUX_3_18 +kmod-6lowpan +kmod-ieee802154 + DEPENDS:=+kmod-6lowpan +kmod-ieee802154 KCONFIG:=CONFIG_IEEE802154_6LOWPAN FILES:= \ $(LINUX_DIR)/net/ieee802154/6lowpan/ieee802154_6lowpan.ko@ge4.0 \ diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index 26b13dca16..259cecd0e8 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -13,7 +13,7 @@ FEATURES:=squashfs vdi vmdk pcmcia fpu SUBTARGETS:=64 generic legacy geode MAINTAINER:=Felix Fietkau -KERNEL_PATCHVER:=4.19 +KERNEL_PATCHVER:=4.9 KERNELNAME:=bzImage diff --git a/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch b/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch new file mode 100644 index 0000000000..06e64e3d47 --- /dev/null +++ b/target/linux/x86/patches-4.14/900-x86-Enable-fast-strings-on-Intel-if-BIOS-hasn-t-already.patch @@ -0,0 +1,53 @@ +diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c +index 1905ce9..a4a3ef2 100644 +--- a/arch/x86/kernel/cpu/intel.c ++++ b/arch/x86/kernel/cpu/intel.c +@@ -164,6 +164,7 @@ + static void early_init_intel(struct cpuinfo_x86 *c) + { + u64 misc_enable; ++ bool allow_fast_string = true; + + /* Unmask CPUID levels if masked: */ + if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { +@@ -259,17 +260,35 @@ + * + * Enable PAT WC only on P4, Core 2 or later CPUs. + */ +- if (c->x86 == 6 && c->x86_model < 15) ++ if (c->x86 == 6 && c->x86_model < 15) { ++ allow_fast_string = false; + clear_cpu_cap(c, X86_FEATURE_PAT); +- ++ } + /* +- * If fast string is not enabled in IA32_MISC_ENABLE for any reason, +- * clear the fast string and enhanced fast string CPU capabilities. ++ * If BIOS didn't enable fast string operation, try to enable ++ * it ourselves. If that fails, then clear the fast string ++ * and enhanced fast string CPU capabilities. + */ + if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { + rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ ++ if (allow_fast_string && ++ !(misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING)) { ++ misc_enable |= MSR_IA32_MISC_ENABLE_FAST_STRING; ++ wrmsrl_safe(MSR_IA32_MISC_ENABLE, misc_enable); ++ ++ /* Re-read to make sure it stuck. */ ++ rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); ++ ++ if (misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING) ++ printk_once(KERN_INFO "BIOS disabled fast string operation, re-enabled sucessfully.\n"); ++ } ++ + if (!(misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING)) { +- pr_info("Disabled fast string operations\n"); ++ if (allow_fast_string) ++ printk_once(KERN_INFO FW_WARN "BIOS disabled fast string operation, re-enable failed.\n"); ++ else ++ printk_once(KERN_INFO "Disabled fast string operations\n"); + setup_clear_cpu_cap(X86_FEATURE_REP_GOOD); + setup_clear_cpu_cap(X86_FEATURE_ERMS); + }