diff --git a/admin/netdata/Makefile b/admin/netdata/Makefile index e471f27b2..f4d00786d 100644 --- a/admin/netdata/Makefile +++ b/admin/netdata/Makefile @@ -24,7 +24,7 @@ PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION) PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 gc-sections include $(INCLUDE_DIR)/package.mk @@ -44,9 +44,7 @@ define Package/netdata/description python3-urllib3 endef -TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -TARGET_CFLAGS += -ffunction-sections -fdata-sections -O3 -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 CONFIGURE_ARGS += \ --with-zlib \ diff --git a/admin/sudo/Makefile b/admin/sudo/Makefile index 9b90d1fc5..8b67832ca 100644 --- a/admin/sudo/Makefile +++ b/admin/sudo/Makefile @@ -23,7 +23,7 @@ PKG_CPE_ID:=cpe:/a:todd_miller:sudo PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/devel/delve/Makefile b/devel/delve/Makefile index 498b5b3f3..35183636c 100644 --- a/devel/delve/Makefile +++ b/devel/delve/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Niels Widger PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/go-delve/delve/ GO_PKG_BUILD_PKG:=github.com/go-delve/delve/cmd/dlv/ diff --git a/devel/gitlab-runner/Makefile b/devel/gitlab-runner/Makefile index 51d3a07f7..4e1ac59ac 100644 --- a/devel/gitlab-runner/Makefile +++ b/devel/gitlab-runner/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/gitlab-runner-v$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=gitlab.com/gitlab-org/gitlab-runner include $(INCLUDE_DIR)/package.mk diff --git a/devel/lttng-tools/Makefile b/devel/lttng-tools/Makefile index 3325efdaa..7e20de149 100644 --- a/devel/lttng-tools/Makefile +++ b/devel/lttng-tools/Makefile @@ -19,7 +19,7 @@ PKG_MAINTAINER:= PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/devel/packr/Makefile b/devel/packr/Makefile index 9966783c3..cffaf140e 100644 --- a/devel/packr/Makefile +++ b/devel/packr/Makefile @@ -25,7 +25,7 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/gobuffalo/packr GO_PKG_BUILD_PKG:=github.com/gobuffalo/packr/packr diff --git a/ipv6/miredo/Makefile b/ipv6/miredo/Makefile index 9e1390a23..8527db824 100644 --- a/ipv6/miredo/Makefile +++ b/ipv6/miredo/Makefile @@ -14,6 +14,7 @@ PKG_CONFIG_DEPENDS:= \ PKG_BUILD_PARALLEL:=1 PKG_CHECK_FORMAT_SECURITY:=0 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_MAINTAINER:= PKG_LICENSE:=GPL-2.0-or-later @@ -52,11 +53,7 @@ CONFIGURE_VARS += \ ac_cv_header_sys_capability_h=no TARGET_CFLAGS+= \ - $(FPIC) \ - -ffunction-sections \ - -fdata-sections - -TARGET_LDFLAGS += -Wl,--gc-sections + $(FPIC) define Package/miredo/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile index 6ae68319c..f26fc11b7 100644 --- a/lang/erlang/Makefile +++ b/lang/erlang/Makefile @@ -21,7 +21,7 @@ PKG_MAINTAINER:=Arnaud Sautaux PKG_CPE_ID:=cpe:/a:erlang:erlang PKG_BUILD_DEPENDS:=erlang/host openssl -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_ASLR_PIE:=0 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/otp_src_$(PKG_VERSION) diff --git a/lang/golang/golang/Makefile b/lang/golang/golang/Makefile index 535c6e4aa..8bffca8fa 100644 --- a/lang/golang/golang/Makefile +++ b/lang/golang/golang/Makefile @@ -30,7 +30,7 @@ PKG_CPE_ID:=cpe:/a:golang:go PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_DIR:=$(BUILD_DIR)/go-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_GO_PREFIX:=/usr PKG_GO_VERSION_ID:=$(GO_VERSION_MAJOR_MINOR) diff --git a/lang/lua-rs232/Makefile b/lang/lua-rs232/Makefile index a7b2d9505..654e21ca1 100644 --- a/lang/lua-rs232/Makefile +++ b/lang/lua-rs232/Makefile @@ -24,6 +24,7 @@ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=lua/host +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk @@ -40,8 +41,7 @@ define Package/lua-rs232/description multiplatform library for serial communications over RS-232 endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed MAKE_FLAGS += luadir='$$$${prefix}/lib/lua' luaexecdir='$$$${exec_prefix}/lib/lua' define Build/InstallDev diff --git a/lang/luajit/Makefile b/lang/luajit/Makefile index 20f0b9fa3..3ce1555b6 100644 --- a/lang/luajit/Makefile +++ b/lang/luajit/Makefile @@ -13,7 +13,7 @@ PKG_MAINTAINER:=Morteza Milani PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYRIGHT -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/node-arduino-firmata/Makefile b/lang/node-arduino-firmata/Makefile index c915afb54..90c1c5b34 100644 --- a/lang/node-arduino-firmata/Makefile +++ b/lang/node-arduino-firmata/Makefile @@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ PKG_HASH:=d7157e02867eae82887cb5e17b90c963fe7489bacd464110bfd20c672b8d5a98 PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=MIT diff --git a/lang/node-cylon/Makefile b/lang/node-cylon/Makefile index 347b6bbb7..28b3c635b 100644 --- a/lang/node-cylon/Makefile +++ b/lang/node-cylon/Makefile @@ -19,7 +19,7 @@ PKG_HASH:=06ac7a8e2e6012577d2f4b043af766bf28a1d3e2a0d50e46629dab4f0bb65104 PKG_SOURCE_SUBDIR:=$(PKG_SRC_NAME)-$(PKG_VERSION) PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=Apache-2.0 diff --git a/lang/node-hid/Makefile b/lang/node-hid/Makefile index ae9c77936..575f9d579 100644 --- a/lang/node-hid/Makefile +++ b/lang/node-hid/Makefile @@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ PKG_HASH:=6c1f05935215feed4e8d2f4aecf31abbad8fa783d252b0bd6041ed2f2e96e9ba PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=MIT or X11 diff --git a/lang/node-homebridge/Makefile b/lang/node-homebridge/Makefile index 0b71fafb8..7c6d124bc 100644 --- a/lang/node-homebridge/Makefile +++ b/lang/node-homebridge/Makefile @@ -14,7 +14,7 @@ PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ PKG_HASH:=f91ab0058707a0498d97d87f45f19682065f80660fac942e0985caf9bb205f2a PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=ISC Apache-2.0 diff --git a/lang/node-javascript-obfuscator/Makefile b/lang/node-javascript-obfuscator/Makefile index 7f4232563..48b2a6d3a 100644 --- a/lang/node-javascript-obfuscator/Makefile +++ b/lang/node-javascript-obfuscator/Makefile @@ -18,7 +18,7 @@ HOST_BUILD_PARALLEL:=1 HOST_BUILD_DEPENDS:=node/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Zbynek Kocur PKG_LICENSE:=BSD-2-Clause diff --git a/lang/node-serialport-bindings/Makefile b/lang/node-serialport-bindings/Makefile index 70731e7ff..e6352781f 100644 --- a/lang/node-serialport-bindings/Makefile +++ b/lang/node-serialport-bindings/Makefile @@ -15,7 +15,7 @@ PKG_SOURCE_URL:=https://registry.npmjs.org/@$(PKG_NPM_SCOPE)/$(PKG_NPM_NAME)/-/ PKG_HASH:=aec200860bd175e4b14b4ab1aa56a5f750172b6c8e20ccb234846206395848d4 PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=MIT diff --git a/lang/node-serialport/Makefile b/lang/node-serialport/Makefile index ee1d6e404..336d4b2e7 100644 --- a/lang/node-serialport/Makefile +++ b/lang/node-serialport/Makefile @@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://registry.npmjs.org/$(PKG_NPM_NAME)/-/ PKG_HASH:=e19fe993ad16ae0e03fc42e24cfe4babf8fd90f8358e1885d5e216277dda1086 PKG_BUILD_DEPENDS:=node/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_MAINTAINER:=Hirokazu MORIKAWA PKG_LICENSE:=MIT diff --git a/lang/node/Makefile b/lang/node/Makefile index 6da85cc12..5471d752d 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -26,7 +26,7 @@ HOST_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=python3/host PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_ASLR_PIE:=0 include $(INCLUDE_DIR)/host-build.mk diff --git a/lang/php8/Makefile b/lang/php8/Makefile index 0ca19d979..47b18d025 100644 --- a/lang/php8/Makefile +++ b/lang/php8/Makefile @@ -19,7 +19,7 @@ PKG_SOURCE_URL:=http://www.php.net/distributions/ PKG_HASH:=b9b566686e351125d67568a33291650eb8dfa26614d205d70d82e6e92613d457 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PHP8_MODULES= \ bcmath \ diff --git a/lang/python/python-greenlet/Makefile b/lang/python/python-greenlet/Makefile index 8c2d64b26..cc9b4f896 100644 --- a/lang/python/python-greenlet/Makefile +++ b/lang/python/python-greenlet/Makefile @@ -18,7 +18,7 @@ PKG_MAINTAINER:=Jan Pavlinec PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE # FIXME: remove when GCC10 is the oldest supported compiler, or the issue goes away -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include ../pypi.mk include $(INCLUDE_DIR)/package.mk @@ -42,7 +42,7 @@ define Package/python3-greenlet/description endef # FIXME: remove when GCC10 is the oldest supported compiler, or the issue goes away -# This is required in addition to PKG_USE_MIPS16:=0 because otherwise MIPS16 +# This is required in addition to PKG_BUILD_FLAGS:=no-mips16 because otherwise MIPS16 # flags are inherited from the Python base package (via sysconfig module) ifdef CONFIG_USE_MIPS16 TARGET_CFLAGS += -mno-mips16 -mno-interlink-mips16 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index b666c4112..611e4c12d 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -34,6 +34,9 @@ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 +# LTO is handled here individually, see --with-lto below +# "no-lto" prevents CONFIG_USE_LTO to add additional and interfering flags +PKG_BUILD_FLAGS:=no-lto PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION) diff --git a/libs/alsa-lib/Makefile b/libs/alsa-lib/Makefile index b59d2f3b9..95ab3730e 100644 --- a/libs/alsa-lib/Makefile +++ b/libs/alsa-lib/Makefile @@ -22,7 +22,7 @@ PKG_MAINTAINER:=Ted Hess , \ PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 no-lto include $(INCLUDE_DIR)/package.mk diff --git a/libs/boost/Makefile b/libs/boost/Makefile index 9180e9ecb..295e4b243 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -29,7 +29,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION) HOST_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -379,10 +379,10 @@ define Host/Compile endef CONFIGURE_PREFIX:=$(PKG_INSTALL_DIR) -TARGET_LDFLAGS += -pthread -lrt -lstdc++ -Wl,--gc-sections,--as-needed,--print-gc-sections +TARGET_LDFLAGS += -pthread -lrt -lstdc++ -Wl,--as-needed,--print-gc-sections TARGET_CFLAGS += \ - $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC -ffunction-sections -fdata-sections -flto + $(if $(CONFIG_SOFT_FLOAT),-DBOOST_NO_FENV_H) -fPIC ifeq ($(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION)))),5) EXTRA_CXXFLAGS += -std=gnu++14 diff --git a/libs/giflib/Makefile b/libs/giflib/Makefile index 2f8eb4c53..a6174e982 100644 --- a/libs/giflib/Makefile +++ b/libs/giflib/Makefile @@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:giflib_project:giflib PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk @@ -49,8 +50,8 @@ define Package/giflib-utils/description These are the utilities that come with giflib. endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections $(FPIC) -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -Wl,--as-needed MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/libs/glib2/Makefile b/libs/glib2/Makefile index 5493e5e69..226242dc5 100644 --- a/libs/glib2/Makefile +++ b/libs/glib2/Makefile @@ -24,6 +24,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/glib-$(PKG_VERSION) HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/glib-$(PKG_VERSION) PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS PKG_FORTIFY_SOURCE:=0 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/package.mk @@ -42,9 +43,6 @@ define Package/glib2/description The GLib library of C routines endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections - COMP_ARGS= \ -Dselinux=disabled \ -Dlibmount=disabled \ diff --git a/libs/gnutls/Makefile b/libs/gnutls/Makefile index 211470205..6ab3bfcfc 100644 --- a/libs/gnutls/Makefile +++ b/libs/gnutls/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gnutls PKG_VERSION:=3.7.8 PKG_RELEASE:=$(AUTORELEASE) -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.gnupg.org/ftp/gcrypt/gnutls/v3.7 diff --git a/libs/libaio/Makefile b/libs/libaio/Makefile index 48501f705..850199f73 100644 --- a/libs/libaio/Makefile +++ b/libs/libaio/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=LGPL-2.1-only PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libcap-ng/Makefile b/libs/libcap-ng/Makefile index b8d12ff04..ab3c6272a 100644 --- a/libs/libcap-ng/Makefile +++ b/libs/libcap-ng/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=License PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -54,7 +55,6 @@ define Package/libcap-ng-bin/description endef TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(FPIC) -TARGET_CFLAGS += -flto CONFIGURE_VARS += \ ac_cv_prog_swig_found=no diff --git a/libs/libdcwproto/Makefile b/libs/libdcwproto/Makefile index 37905b854..4ac94d7b1 100644 --- a/libs/libdcwproto/Makefile +++ b/libs/libdcwproto/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -37,8 +38,7 @@ define Package/libdcwproto/description Platform-independent C library for marshaling and serializing DCW messages endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/libs/libdcwsocket/Makefile b/libs/libdcwsocket/Makefile index 28176a8ec..602419233 100644 --- a/libs/libdcwsocket/Makefile +++ b/libs/libdcwsocket/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -37,8 +38,8 @@ define Package/libdcwsocket/description User-land C library for sending and receiving DCW "EtherType"d messages endef -TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CFLAGS += -std=c89 +TARGET_LDFLAGS += -Wl,--as-needed define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/libs/libev/Makefile b/libs/libev/Makefile index 8db14d475..61173841e 100644 --- a/libs/libev/Makefile +++ b/libs/libev/Makefile @@ -20,7 +20,7 @@ PKG_MAINTAINER:=Karl Palsson PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libffi/Makefile b/libs/libffi/Makefile index 901a4f3a4..e5ffda139 100644 --- a/libs/libffi/Makefile +++ b/libs/libffi/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk diff --git a/libs/libftdi/Makefile b/libs/libftdi/Makefile index f644b5321..7e5dccb88 100644 --- a/libs/libftdi/Makefile +++ b/libs/libftdi/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=LGPL-2.0 PKG_LICENSE_FILES:=COPYING.LIB CMAKE_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/libftdi1/Makefile b/libs/libftdi1/Makefile index dee2b6573..60985f130 100644 --- a/libs/libftdi1/Makefile +++ b/libs/libftdi1/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=LGPL-2.1-only PKG_LICENSE_FILES:=COPYING.LIB CMAKE_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/libgd/Makefile b/libs/libgd/Makefile index 9e0108915..750733fec 100644 --- a/libs/libgd/Makefile +++ b/libs/libgd/Makefile @@ -20,6 +20,8 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:libgd:libgd +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -77,7 +79,7 @@ define Package/libgd/config endif endef -TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto +TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections CMAKE_OPTIONS += \ -DENABLE_FONTCONFIG=OFF \ diff --git a/libs/libjpeg-turbo/Makefile b/libs/libjpeg-turbo/Makefile index 7aed20d33..7c530bdc5 100644 --- a/libs/libjpeg-turbo/Makefile +++ b/libs/libjpeg-turbo/Makefile @@ -12,7 +12,8 @@ PKG_MAINTAINER:=Rosen Penev PKG_LICENSE:=BSD-3-Clause IJG zlib PKG_LICENSE_FILES:=LICENSE.md -PKG_USE_MIPS16:=0 #Allows ASM compilation for speed. +# Allows ASM compilation for speed +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/libmad/Makefile b/libs/libmad/Makefile index 595c9607d..569f402b7 100644 --- a/libs/libmad/Makefile +++ b/libs/libmad/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:underbit:mad_libmad CMAKE_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/libmbim/Makefile b/libs/libmbim/Makefile index 8591b4337..0d74b542e 100644 --- a/libs/libmbim/Makefile +++ b/libs/libmbim/Makefile @@ -15,14 +15,15 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git PKG_MIRROR_HASH:=7ecc6d1e565392817311254045337907bbad015b46ec88542ea63594f47778be +PKG_BUILD_FLAGS:=gc-sections + PKG_MAINTAINER:=Nicholas Smith include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/meson.mk -TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants MESON_ARGS += \ -Dintrospection=false \ diff --git a/libs/libmraa/Makefile b/libs/libmraa/Makefile index 0a85d1f14..14868194d 100644 --- a/libs/libmraa/Makefile +++ b/libs/libmraa/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_BUILD_DEPENDS:=swig/host CMAKE_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libnpupnp/Makefile b/libs/libnpupnp/Makefile index dcfa51377..9eb961af8 100644 --- a/libs/libnpupnp/Makefile +++ b/libs/libnpupnp/Makefile @@ -15,6 +15,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=libmicrohttpd +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -32,9 +33,6 @@ venerable pupnp (https://github.com/pupnp/pupnp), based on its 1.6.x branch (around 1.6.25). endef -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -flto - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/npupnp $(CP) $(PKG_INSTALL_DIR)/usr/include/npupnp/* $(1)/usr/include/npupnp/ diff --git a/libs/libplist/Makefile b/libs/libplist/Makefile index d5cbc0e94..eb8265b1b 100644 --- a/libs/libplist/Makefile +++ b/libs/libplist/Makefile @@ -20,6 +20,7 @@ PKG_CPE_ID:=cpe:/a:libimobiledevice:libplist PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -66,7 +67,6 @@ CONFIGURE_ARGS += \ --disable-static \ --without-cython -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--gc-sections define Build/InstallDev diff --git a/libs/libqmi/Makefile b/libs/libqmi/Makefile index 8dac95155..21a7af1fc 100644 --- a/libs/libqmi/Makefile +++ b/libs/libqmi/Makefile @@ -15,14 +15,15 @@ PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libqmi.git PKG_MIRROR_HASH:=674f5848c56c11cdc2fbc82c52e5bc2a3a0fddb56315dc4220544688a7b0e17a +PKG_BUILD_FLAGS:=gc-sections + PKG_MAINTAINER:=Nicholas Smith include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/meson.mk -TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants define Package/libqmi/config source "$(SOURCE)/Config.in" diff --git a/libs/libqrtr-glib/Makefile b/libs/libqrtr-glib/Makefile index b5fabf31b..1796627a8 100644 --- a/libs/libqrtr-glib/Makefile +++ b/libs/libqrtr-glib/Makefile @@ -16,14 +16,15 @@ PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git PKG_SOURCE_VERSION:=$(PKG_VERSION) PKG_MIRROR_HASH:=ffb918edf96581d4ba310bd1e975297e9a7006a7e26f37934afde462585125f2 +PKG_BUILD_FLAGS:=gc-sections + PKG_MAINTAINER:=Nicholas Smith include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/meson.mk -TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants define Package/libqrtr-glib SECTION:=libs diff --git a/libs/libseccomp/Makefile b/libs/libseccomp/Makefile index 4ed45f8c4..248432424 100644 --- a/libs/libseccomp/Makefile +++ b/libs/libseccomp/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libseccomp PKG_VERSION:=2.5.4 PKG_RELEASE:=$(AUTORELEASE) -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/seccomp/libseccomp/releases/download/v$(PKG_VERSION)/ diff --git a/libs/libsodium/Makefile b/libs/libsodium/Makefile index dbccb9d0f..d0589dca4 100644 --- a/libs/libsodium/Makefile +++ b/libs/libsodium/Makefile @@ -20,7 +20,7 @@ PKG_MAINTAINER:=Damiano Renfer PKG_LICENSE:=ISC PKG_LICENSE_FILES:=LICENSE -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 diff --git a/libs/libssh/Makefile b/libs/libssh/Makefile index b170f679d..d2b1e7d94 100644 --- a/libs/libssh/Makefile +++ b/libs/libssh/Makefile @@ -22,7 +22,7 @@ PKG_CPE_ID:=cpe:/a:libssh:libssh CMAKE_INSTALL:=1 CMAKE_BINARY_SUBDIR:=build -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/libs/libtasn1/Makefile b/libs/libtasn1/Makefile index b97a9cdbc..7e70b2212 100644 --- a/libs/libtasn1/Makefile +++ b/libs/libtasn1/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:gnu:libtasn1 #PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -40,8 +41,6 @@ define Package/libtasn1/description endef HOST_CFLAGS += -std=gnu99 -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections HOST_CONFIGURE_ARGS += \ --disable-shared \ diff --git a/libs/libtins/Makefile b/libs/libtins/Makefile index 11b7c2f11..b9bf27322 100644 --- a/libs/libtins/Makefile +++ b/libs/libtins/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE:=BSD-2-Clause PKG_LICENSE_FILES:=LICENSE CMAKE_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -52,8 +53,7 @@ CMAKE_OPTIONS += \ -DLIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA=$(if $(CONFIG_LIBTINS_ENABLE_TCP_STREAM_CUSTOM_DATA),ON,OFF) \ -DLIBTINS_ENABLE_WPA2=$(if $(CONFIG_LIBTINS_ENABLE_WPA2),ON,OFF) -TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Package/libtins/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/libs/libupm/Makefile b/libs/libupm/Makefile index a48247ffd..058dedf9b 100644 --- a/libs/libupm/Makefile +++ b/libs/libupm/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE CMAKE_INSTALL:=1 CMAKE_BINARY_SUBDIR:=build -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PYTHON3_PKG_BUILD:=0 include $(INCLUDE_DIR)/package.mk diff --git a/libs/liburcu/Makefile b/libs/liburcu/Makefile index 6db265c89..d6afbf8a3 100644 --- a/libs/liburcu/Makefile +++ b/libs/liburcu/Makefile @@ -24,7 +24,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/userspace-rcu-$(PKG_VERSION) PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libv4l/Makefile b/libs/libv4l/Makefile index 22b3cd15f..9e60a2b3e 100644 --- a/libs/libv4l/Makefile +++ b/libs/libv4l/Makefile @@ -15,7 +15,7 @@ PKG_HASH:=65c6fbe830a44ca105c443b027182c1b2c9053a91d1e72ad849dfab388b94e31 PKG_MAINTAINER:=Ted Hess -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 @@ -73,7 +73,6 @@ define Package/v4l-utils/description This package contains the video4linux utilities. endef -TARGET_CFLAGS += -flto TARGET_LDFLAGS += \ $(if $(CONFIG_USE_GLIBC),,-largp) \ -Wl,--gc-sections,--as-needed diff --git a/libs/libvorbisidec/Makefile b/libs/libvorbisidec/Makefile index 7d751631c..079af96d4 100644 --- a/libs/libvorbisidec/Makefile +++ b/libs/libvorbisidec/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/libs/libwebp/Makefile b/libs/libwebp/Makefile index a58062f35..d16bc752a 100644 --- a/libs/libwebp/Makefile +++ b/libs/libwebp/Makefile @@ -13,6 +13,7 @@ PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=COPYING CMAKE_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -46,8 +47,6 @@ CMAKE_OPTIONS += -DWEBP_ENABLE_SIMD=OFF endif endif -TARGET_CFLAGS += -flto - define Package/libwebp/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.s* $(1)/usr/lib/ diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile index accfeb5fa..c4e103fd2 100644 --- a/libs/log4cplus/Makefile +++ b/libs/log4cplus/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE:=BSD-2-Clause Apache-2.0 PKG_LICENSE_FILES:=LICENSE CMAKE_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -50,7 +51,6 @@ OPTIONS:= \ CMAKE_HOST_OPTIONS += $(OPTIONS) -DBUILD_SHARED_LIBS=OFF CMAKE_OPTIONS += $(OPTIONS) -DBUILD_SHARED_LIBS=ON -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Package/log4cplus/install diff --git a/libs/lttng-ust/Makefile b/libs/lttng-ust/Makefile index 90e8d1e95..270d80ec0 100644 --- a/libs/lttng-ust/Makefile +++ b/libs/lttng-ust/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=LGPL-2.1 GPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:lttng:ust -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 diff --git a/libs/minizip/Makefile b/libs/minizip/Makefile index 8e4ee216b..e38ed167c 100644 --- a/libs/minizip/Makefile +++ b/libs/minizip/Makefile @@ -18,6 +18,8 @@ PKG_MAINTAINER:=David Woodhouse PKG_LICENSE:=Zlib PKG_LICENSE_FILES:=LICENSE +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -59,8 +61,6 @@ define Package/minizip/install $(CP) $(PKG_INSTALL_DIR)/usr/lib/libminizip.so.* $(1)/usr/lib/ endef -TARGET_CXXFLAGS += -flto - define Build/InstallDev $(call Build/InstallDev/cmake,$(1)) $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/minizip.pc diff --git a/libs/nacl/Makefile b/libs/nacl/Makefile index 53b76befe..5b5d9a22e 100644 --- a/libs/nacl/Makefile +++ b/libs/nacl/Makefile @@ -18,7 +18,7 @@ PKG_HASH:=4f277f89735c8b0b8a6bbd043b3efb3fa1cc68a9a5da6a076507d067fc3b3bf8 PKG_LICENSE:=PublicDomain -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/libs/nspr/Makefile b/libs/nspr/Makefile index 355322b74..4315c42e0 100644 --- a/libs/nspr/Makefile +++ b/libs/nspr/Makefile @@ -21,6 +21,7 @@ PKG_HASH:=7ea3297ea5969b5d25a5dd8d47f2443cda88e9ee746301f6e1e1426f8a6abc8f PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -35,7 +36,6 @@ endif export MUSL=$(if $(CONFIG_LIBC_USE_GLIBC),0,1) TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(FPIC) -TARGET_CFLAGS += -flto CONFIGURE_ARGS += \ --build=$(GNU_HOST_NAME) \ diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile index 7450393b9..13b167698 100644 --- a/libs/postgresql/Makefile +++ b/libs/postgresql/Makefile @@ -19,7 +19,7 @@ PKG_SOURCE_URL:=\ PKG_HASH:=64fdf23d734afad0dfe4077daca96ac51dcd697e68ae2d3d4ca6c45cb14e21ae -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_FIXUP:=autoreconf PKG_MACRO_PATHS:=config PKG_BUILD_DEPENDS:=postgresql/host diff --git a/libs/qrencode/Makefile b/libs/qrencode/Makefile index 841128480..ee1f925b1 100644 --- a/libs/qrencode/Makefile +++ b/libs/qrencode/Makefile @@ -21,6 +21,8 @@ PKG_LICENSE_FILES:=COPYING PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_qrencode +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -60,7 +62,6 @@ CMAKE_OPTIONS += \ -DWITH_TESTS=OFF \ -DBUILD_SHARED_LIBS=ON -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--gc-sections define Build/InstallDev diff --git a/libs/sbc/Makefile b/libs/sbc/Makefile index ca5b8488f..fd147174a 100644 --- a/libs/sbc/Makefile +++ b/libs/sbc/Makefile @@ -22,6 +22,7 @@ PKG_MAINTAINER:= PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -38,9 +39,6 @@ define Package/sbc/description Needed for A2DP support. endef -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -flto - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include/sbc $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/sbc/sbc.h $(1)/usr/include/sbc/ diff --git a/libs/taglib/Makefile b/libs/taglib/Makefile index 78decddcf..f75c39735 100644 --- a/libs/taglib/Makefile +++ b/libs/taglib/Makefile @@ -18,6 +18,8 @@ PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING.LGPL PKG_CPE_ID:=cpe:/a:taglib:taglib +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -43,8 +45,6 @@ CMAKE_OPTIONS += \ -DBUILD_BINDINGS=OFF \ -DNO_ITUNES_HACKS=ON -TARGET_CXXFLAGS += -flto - define Build/InstallDev $(call Build/InstallDev/cmake,$(1)) $(SED) '/^prefix=\|^exec_prefix=/s|/usr|$(STAGING_DIR)/usr|' $(1)/usr/bin/taglib-config diff --git a/mail/emailrelay/Makefile b/mail/emailrelay/Makefile index 7ec681bc3..280a3de5e 100644 --- a/mail/emailrelay/Makefile +++ b/mail/emailrelay/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CONFIG_DEPENDS:=CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG CONFIG_EMAILRELAY_SSL +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -94,8 +95,7 @@ ifeq ($(CONFIG_EMAILRELAY_SUPPORT_VERBOSE_DBG),y) --enable-debug=yes endif -TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_CXXFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CXXFLAGS += -Wl,--as-needed define Package/emailrelay/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/multimedia/graphicsmagick/Makefile b/multimedia/graphicsmagick/Makefile index 70a340864..0de3060d6 100644 --- a/multimedia/graphicsmagick/Makefile +++ b/multimedia/graphicsmagick/Makefile @@ -21,6 +21,7 @@ PKG_CPE_ID:=cpe:/a:graphicsmagick:graphicsmagick PKG_BUILD_PARALLEL:=1 DISABLE_NLS:= PKG_BUILD_DEPENDS:=zlib freetype libpng libjpeg-turbo tiff +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -73,8 +74,6 @@ CONFIGURE_ARGS += \ --without-zstd \ --without-x -TARGET_CFLAGS += $(if $(filter-out 5 6 7 8 9,$(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION))))),,-flto) - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) \ diff --git a/multimedia/gst1-libav/Makefile b/multimedia/gst1-libav/Makefile index 25a16fea9..40ddb74a6 100644 --- a/multimedia/gst1-libav/Makefile +++ b/multimedia/gst1-libav/Makefile @@ -21,7 +21,7 @@ PKG_MAINTAINER:=W. Michael Petullo \ PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later PKG_LICENSE_FILES:=COPYING COPYING.LIB -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GST_VERSION:=1.0 diff --git a/multimedia/imagemagick/Makefile b/multimedia/imagemagick/Makefile index 8c4e97775..4f0a976ab 100644 --- a/multimedia/imagemagick/Makefile +++ b/multimedia/imagemagick/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:imagemagick:imagemagick -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk @@ -110,8 +110,6 @@ CONFIGURE_ARGS += \ --with-png \ --with-tiff -TARGET_CFLAGS += $(if $(filter-out 5 6 7 8 9,$(word 1,$(subst ., ,$(call qstrip,$(CONFIG_GCC_VERSION))))),,-flto) - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) \ diff --git a/multimedia/ttymidi-sysex/Makefile b/multimedia/ttymidi-sysex/Makefile index 7839e7833..7f4fb8426 100644 --- a/multimedia/ttymidi-sysex/Makefile +++ b/multimedia/ttymidi-sysex/Makefile @@ -12,6 +12,7 @@ PKG_MIRROR_HASH:=8d6bb738a08a65c25fcc442777750abbee812a24a29236242032e2d76177454 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Daniel Golle PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -30,7 +31,6 @@ ttymidi was to make Arduino boards talk to MIDI applications without the need to use (or build) any extra hardware. endef -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -lasound -Wl,--gc-sections,--as-needed define Build/Configure diff --git a/multimedia/tvheadend/Makefile b/multimedia/tvheadend/Makefile index 4db9918c7..1af5b6dd2 100644 --- a/multimedia/tvheadend/Makefile +++ b/multimedia/tvheadend/Makefile @@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE.md PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/multimedia/v4l2rtspserver/Makefile b/multimedia/v4l2rtspserver/Makefile index 9ddcd1eaf..aee5cdce7 100644 --- a/multimedia/v4l2rtspserver/Makefile +++ b/multimedia/v4l2rtspserver/Makefile @@ -16,6 +16,8 @@ PKG_SOURCE_URL:=https://github.com/mpromonet/v4l2rtspserver PKG_SOURCE_VERSION:=v$(PKG_VERSION) PKG_MIRROR_HASH:=f2eca75c8af9933f4ceb67cab74af488e1e9ec8af9cbef2534fda5b701b1d63d +PKG_BUILD_FLAGS:=gc-sections lto + LIVE555_VERSION:=2022.10.01 LIVE555_HASH:=429de73061e3fc6901c4d2f0b7562ae3f6233060ca4b5e182fe555d065cbdd45 LIVE555_FILE:=live.$(LIVE555_VERSION).tar.gz @@ -49,8 +51,7 @@ define Download/live555 HASH:=$(LIVE555_HASH) endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed CMAKE_OPTIONS += \ -DALSA=OFF \ diff --git a/net/adguardhome/Makefile b/net/adguardhome/Makefile index 328c1329e..da7e9f534 100644 --- a/net/adguardhome/Makefile +++ b/net/adguardhome/Makefile @@ -20,7 +20,7 @@ PKG_MAINTAINER:=Dobroslaw Kijowski PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/AdguardTeam/AdGuardHome GO_PKG_BUILD_PKG:=github.com/AdguardTeam/AdGuardHome diff --git a/net/aircrack-ng/Makefile b/net/aircrack-ng/Makefile index 3333aedd4..1323a0e6b 100644 --- a/net/aircrack-ng/Makefile +++ b/net/aircrack-ng/Makefile @@ -20,6 +20,7 @@ PKG_HASH:=4f0bfd486efc6ea7229f7fbc54340ff8b2094a0d73e9f617e0a39f878999a247 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_MAINTAINER:=Rick Farina @@ -90,15 +91,12 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \ $(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3=$(STAGING_DIR)/usr,--without-sqlite3) -TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections -fcommon +TARGET_CFLAGS += -Wall -Wextra -fcommon ifeq ($(CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED),y) TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 endif -TARGET_LDFLAGS+= \ - -Wl,--gc-sections - define Package/aircrack-ng/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ diff --git a/net/aria2/Makefile b/net/aria2/Makefile index 726ca35d6..af441bf52 100644 --- a/net/aria2/Makefile +++ b/net/aria2/Makefile @@ -15,6 +15,7 @@ PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_V PKG_HASH:=58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5 PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto PKG_MAINTAINER:=Imre Kaloz , \ Hsing-Wang Liao @@ -83,9 +84,6 @@ CONFIGURE_ARGS += \ --without-libuv \ --with-libz -TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections -flto - define Package/aria2/conffiles /etc/config/aria2 endef diff --git a/net/bind/Makefile b/net/bind/Makefile index dfa48cb52..f98a4fd2c 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -28,7 +28,7 @@ PKG_FIXUP:=autoreconf PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS := \ diff --git a/net/chrony/Makefile b/net/chrony/Makefile index bf233f347..f4c277b75 100644 --- a/net/chrony/Makefile +++ b/net/chrony/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:tuxfamily:chrony PKG_BUILD_DEPENDS:=pps-tools +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -79,9 +80,6 @@ CONFIGURE_ARGS+= \ CONFIGURE_VARS+=CPPFLAGS=-DNDEBUG -TARGET_CFLAGS += -flto -TARGET_LDFLAGS += -flto - define Package/chrony/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/sbin/ diff --git a/net/cifs-utils/Makefile b/net/cifs-utils/Makefile index 0662315ba..fcc4b4773 100644 --- a/net/cifs-utils/Makefile +++ b/net/cifs-utils/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:samba:cifs-utils PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -57,7 +58,7 @@ CONFIGURE_ARGS += \ CONFIGURE_ARGS += \ ac_cv_lib_cap_ng_capng_clear=no -TARGET_CFLAGS += $(FPIC) -ffunction-sections -flto +TARGET_CFLAGS += $(FPIC) -ffunction-sections TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Build/InstallDev diff --git a/net/clamav/Makefile b/net/clamav/Makefile index cf903f4ca..035d91fc3 100644 --- a/net/clamav/Makefile +++ b/net/clamav/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING* PKG_CPE_ID:=cpe:/a:clamav:clamav PKG_BUILD_DEPENDS:=ncurses +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -72,8 +73,8 @@ CMAKE_OPTIONS += \ -DENABLE_SYSTEMD=OFF \ -DHAVE_SYSTEM_LFS_FTS=O$(if $(CONFIG_USE_GLIBC),N,FF) -TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -fno-rtti -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CXXFLAGS += -fno-rtti +TARGET_LDFLAGS += -Wl,--as-needed define Package/clamav/conffiles /etc/config/clamav diff --git a/net/cloudflared/Makefile b/net/cloudflared/Makefile index fb2c2f1ec..aa91da866 100644 --- a/net/cloudflared/Makefile +++ b/net/cloudflared/Makefile @@ -18,7 +18,7 @@ PKG_MAINTAINER:=Tianling Shen PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/cloudflare/cloudflared GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION) diff --git a/net/cloudreve/Makefile b/net/cloudreve/Makefile index 21a1443b1..1d6a65e9a 100644 --- a/net/cloudreve/Makefile +++ b/net/cloudreve/Makefile @@ -19,7 +19,7 @@ PKG_MAINTAINER:=Tianling Shen PKG_BUILD_DEPENDS:=golang/host node/host node-yarn/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/cloudreve/Cloudreve/v3 GO_PKG_LDFLAGS_X:= \ diff --git a/net/cni-route-override/Makefile b/net/cni-route-override/Makefile index 6208eea36..d24228bb6 100644 --- a/net/cni-route-override/Makefile +++ b/net/cni-route-override/Makefile @@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/redhat-nfvpe/$(PKG_NAME)/ GO_PKG_BUILD_PKG:=github.com/redhat-nfvpe/$(PKG_NAME)/cmd/route-override diff --git a/net/crowdsec-firewall-bouncer/Makefile b/net/crowdsec-firewall-bouncer/Makefile index b8ea0b18e..713bd740a 100644 --- a/net/crowdsec-firewall-bouncer/Makefile +++ b/net/crowdsec-firewall-bouncer/Makefile @@ -19,7 +19,7 @@ PKG_MAINTAINER:=Gerald Kerma PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_DIR:=$(BUILD_DIR)/cs-firewall-bouncer-$(PKG_VERSION) CSFB_BUILD_VERSION?=v$(PKG_VERSION) diff --git a/net/crowdsec/Makefile b/net/crowdsec/Makefile index d3b235996..aa939df95 100644 --- a/net/crowdsec/Makefile +++ b/net/crowdsec/Makefile @@ -19,7 +19,7 @@ PKG_MAINTAINER:=Gerald Kerma PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 CWD_SYSTEM:=openwrt diff --git a/net/curl/Makefile b/net/curl/Makefile index c3ba55ac0..c79ca80d8 100644 --- a/net/curl/Makefile +++ b/net/curl/Makefile @@ -26,6 +26,7 @@ PKG_CPE_ID:=cpe:/a:haxx:libcurl PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_CONFIG_DEPENDS:= \ CONFIG_IPV6 \ @@ -105,9 +106,8 @@ define Package/libcurl/config source "$(SOURCE)/Config.in" endef -TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections +TARGET_CFLAGS += $(FPIC) TARGET_CPPFLAGS += $(if $(CONFIG_LIBCURL_NTLM),,-DCURL_DISABLE_NTLM) -TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_ARGS += \ --disable-debug \ diff --git a/net/dcstad/Makefile b/net/dcstad/Makefile index 3112b0c1c..12da6fdca 100644 --- a/net/dcstad/Makefile +++ b/net/dcstad/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -38,9 +39,6 @@ define Package/dcstad/description Implementation of the Dual-Channel WiFi client daemon endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections - define Package/dcstad/install $(INSTALL_DIR) $(1)/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dcstad $(1)/bin/ diff --git a/net/dcwapd/Makefile b/net/dcwapd/Makefile index 0599e5a60..28a9698db 100644 --- a/net/dcwapd/Makefile +++ b/net/dcwapd/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -42,8 +43,8 @@ CONFIGURE_ARGS += \ --enable-platform=linuxjsonstatic \ --enable-shared -TARGET_CXXFLAGS += -std=c++11 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=0 -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -ldcwproto -ldcwsocket -lmrmfilterparser -luci -Wl,--gc-sections,--as-needed +TARGET_CXXFLAGS += -std=c++11 -DRAPIDJSON_HAS_CXX11_RVALUE_REFS=0 +TARGET_LDFLAGS += -ldcwproto -ldcwsocket -lmrmfilterparser -luci -Wl,--as-needed define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib diff --git a/net/dns-over-https/Makefile b/net/dns-over-https/Makefile index a5722fb2e..48f6f296c 100644 --- a/net/dns-over-https/Makefile +++ b/net/dns-over-https/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/m13253/dns-over-https GO_PKG_INSTALL_BIN_PATH:=/usr/sbin diff --git a/net/dnscrypt-proxy/Makefile b/net/dnscrypt-proxy/Makefile index 9d8883aab..060f9acda 100644 --- a/net/dnscrypt-proxy/Makefile +++ b/net/dnscrypt-proxy/Makefile @@ -23,6 +23,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_CONFIG_DEPENDS:= \ CONFIG_DNSCRYPT_ENABLE_PLUGINS @@ -84,12 +85,7 @@ define Build/Configure endef TARGET_CFLAGS += \ - -fomit-frame-pointer \ - -fdata-sections \ - -ffunction-sections - -TARGET_LDFLAGS += \ - -Wl,-gc-sections + -fomit-frame-pointer MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ diff --git a/net/dnscrypt-proxy2/Makefile b/net/dnscrypt-proxy2/Makefile index 137e71bb9..5e1226892 100644 --- a/net/dnscrypt-proxy2/Makefile +++ b/net/dnscrypt-proxy2/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/DNSCrypt/dnscrypt-proxy diff --git a/net/dnslookup/Makefile b/net/dnslookup/Makefile index d4da7b21b..1c178a76b 100644 --- a/net/dnslookup/Makefile +++ b/net/dnslookup/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/ameshkov/dnslookup GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION) diff --git a/net/dnsproxy/Makefile b/net/dnsproxy/Makefile index 2e5724ed9..072716053 100644 --- a/net/dnsproxy/Makefile +++ b/net/dnsproxy/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/AdguardTeam/dnsproxy GO_PKG_LDFLAGS_X:=main.VersionString=v$(PKG_VERSION) diff --git a/net/dnstap/Makefile b/net/dnstap/Makefile index 774c84a4c..78ee90681 100644 --- a/net/dnstap/Makefile +++ b/net/dnstap/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/golang-dnstap-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/dnstap/golang-dnstap diff --git a/net/foolsm/Makefile b/net/foolsm/Makefile index 2d67aa6e0..1badaed19 100644 --- a/net/foolsm/Makefile +++ b/net/foolsm/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-2.0-only PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -43,8 +44,7 @@ endef MAKE_FLAGS += \ PREFIX="$(CONFIGURE_PREFIX)" -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Package/foolsm/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/net/frp/Makefile b/net/frp/Makefile index 7adbac02c..fb8ee9af4 100644 --- a/net/frp/Makefile +++ b/net/frp/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/fatedier/frp GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/... diff --git a/net/frr/Makefile b/net/frr/Makefile index 997b55401..0f9f7fba8 100644 --- a/net/frr/Makefile +++ b/net/frr/Makefile @@ -15,7 +15,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz PKG_SOURCE_VERSION:=410d78b7a4f2c8b4d4c3736c6d6cdb710287ca80 PKG_SOURCE_URL:=https://codeload.github.com/FRRouting/frr/tar.gz/$(PKG_SOURCE_VERSION)? - PKG_HASH:=1334b050ea3d4144efeb7bdfe9c6976ebc91744810c5d8a7381a53fac2877ea9 PKG_MAINTAINER:=Lucian Cristian @@ -58,6 +57,7 @@ PKG_CONFIG_DEPENDS:= \ PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto PKG_BUILD_DEPENDS:=frr/host HOST_BUILD_DEPENDS:=python3/host @@ -166,7 +166,6 @@ define Package/frr-libfrr/conffiles endef TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -latomic -TARGET_CFLAGS += -flto define Host/Configure $(Host/Configure/Default) diff --git a/net/gateway-go/Makefile b/net/gateway-go/Makefile index dd8430393..01536c3e3 100644 --- a/net/gateway-go/Makefile +++ b/net/gateway-go/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/gateway-go-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/OpenIoTHub/gateway-go diff --git a/net/geoipupdate/Makefile b/net/geoipupdate/Makefile index 6348bfc8f..4cb37a3a8 100644 --- a/net/geoipupdate/Makefile +++ b/net/geoipupdate/Makefile @@ -16,7 +16,7 @@ PKG_MAINTAINER:=Matthew Hagan PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/maxmind/geoipupdate GO_PKG_LDFLAGS_X:= \ diff --git a/net/geth/Makefile b/net/geth/Makefile index 373cf48ea..29024e2a4 100644 --- a/net/geth/Makefile +++ b/net/geth/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE_FILES:=COPYING COPYING.LESSER PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_CONFIG_DEPENDS:=CONFIG_BUILD_NLS GO_PKG:=github.com/ethereum/go-ethereum diff --git a/net/gg/Makefile b/net/gg/Makefile index 4d68c343e..deaab9d16 100644 --- a/net/gg/Makefile +++ b/net/gg/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/mzz2017/gg GO_PKG_LDFLAGS_X:=$(GO_PKG)/cmd.Version=$(PKG_VERSION) diff --git a/net/git-lfs/Makefile b/net/git-lfs/Makefile index 104c1c445..2576bb6b0 100644 --- a/net/git-lfs/Makefile +++ b/net/git-lfs/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE_FILES:=LICENSE.md PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/git-lfs/git-lfs diff --git a/net/iperf/Makefile b/net/iperf/Makefile index 3c320bff7..3e13a04a2 100644 --- a/net/iperf/Makefile +++ b/net/iperf/Makefile @@ -19,6 +19,7 @@ PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto PKG_CONFIG_DEPENDS:=CONFIG_IPERF_ENABLE_MULTICAST @@ -49,8 +50,7 @@ CONFIGURE_ARGS += \ $(call autoconf_bool,CONFIG_IPERF_ENABLE_MULTICAST,multicast) \ $(call autoconf_bool,CONFIG_IPV6,ipv6) -TARGET_CFLAGS += -flto -TARGET_CXXFLAGS += -fno-rtti -static-libstdc++ -flto -std=c++11 +TARGET_CXXFLAGS += -fno-rtti -static-libstdc++ -std=c++11 TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lpthread -lm) define Package/iperf/install diff --git a/net/irtt/Makefile b/net/irtt/Makefile index 102391f76..61d04a0f0 100644 --- a/net/irtt/Makefile +++ b/net/irtt/Makefile @@ -20,7 +20,7 @@ PKG_MAINTAINER:=Marcel Vital PKG_BUILD_DIR:=$(BUILD_DIR)/irtt-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/heistp/irtt diff --git a/net/kadnode/Makefile b/net/kadnode/Makefile index 1adfdf168..2b93f6a51 100644 --- a/net/kadnode/Makefile +++ b/net/kadnode/Makefile @@ -14,6 +14,7 @@ PKG_MAINTAINER:=Moritz Warning PKG_LICENSE:=MIT PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk @@ -71,10 +72,6 @@ endif MAKE_FLAGS += FEATURES="$(FEATURES)" -# Make binary smaller -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections - define Package/kadnode/conffiles /etc/config/kadnode endef diff --git a/net/kcptun/Makefile b/net/kcptun/Makefile index 18829384d..a52cc6750 100644 --- a/net/kcptun/Makefile +++ b/net/kcptun/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE.md PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/xtaci/kcptun diff --git a/net/kea/Makefile b/net/kea/Makefile index 372ce54bc..a630f41c0 100644 --- a/net/kea/Makefile +++ b/net/kea/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE:=MPL-2.0 PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_INSTALL:=1 PKG_FIXUP:=autoreconf @@ -204,12 +205,10 @@ CONFIGURE_VARS += \ TARGET_CXXFLAGS += \ $(FPIC) \ - -fdata-sections \ - -ffunction-sections \ -std=c++17 TARGET_LDFLAGS += \ - -Wl,--gc-sections,--as-needed + -Wl,--as-needed define Package/kea-libs/install $(INSTALL_DIR) $(1)/usr/lib diff --git a/net/krb5/Makefile b/net/krb5/Makefile index bdad2543b..e02337b50 100644 --- a/net/krb5/Makefile +++ b/net/krb5/Makefile @@ -23,7 +23,7 @@ PKG_HASH:=704aed49b19eb5a7178b34b2873620ec299db08752d6a8574f95d41879ab8851 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/net/ksmbd-tools/Makefile b/net/ksmbd-tools/Makefile index 1612bd0d2..a526cfe2a 100644 --- a/net/ksmbd-tools/Makefile +++ b/net/ksmbd-tools/Makefile @@ -12,6 +12,7 @@ PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_BUILD_DEPENDS:=glib2 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -70,8 +71,7 @@ MESON_ARGS += \ -Db_lto=true \ -Dkrb5=disabled -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Package/ksmbd-server/install $(INSTALL_DIR) $(1)/usr/libexec diff --git a/net/librespeed-go/Makefile b/net/librespeed-go/Makefile index bb5557b0d..8ff5570a1 100644 --- a/net/librespeed-go/Makefile +++ b/net/librespeed-go/Makefile @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/librespeed/speedtest diff --git a/net/libreswan/Makefile b/net/libreswan/Makefile index cbbb33cad..6a8329b83 100644 --- a/net/libreswan/Makefile +++ b/net/libreswan/Makefile @@ -21,6 +21,7 @@ PKG_CPE_ID:=cpe:/a:libreswan:libreswan PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -65,7 +66,6 @@ define Package/libreswan/conffiles /etc/ipsec.secrets endef TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -TARGET_CFLAGS += -flto MAKE_FLAGS+= \ WERROR_CFLAGS=" " \ diff --git a/net/mac-telnet/Makefile b/net/mac-telnet/Makefile index 0e4e4c1b9..93b8d7c0b 100644 --- a/net/mac-telnet/Makefile +++ b/net/mac-telnet/Makefile @@ -13,13 +13,14 @@ PKG_SOURCE_DATE:=2015-09-02 PKG_SOURCE_VERSION:=37d83cbc9c07266d6c957d27bf75285b305eceab PKG_MIRROR_HASH:=ed414f3fb08f1e2bb4313d00fb99327df697de7c60284fe588fc7eb3769adb7a +PKG_BUILD_FLAGS:=gc-sections + PKG_LICENSE:=GPL-2.0-or-later PKG_MAINTAINER:=Jo-Philipp Wich include $(INCLUDE_DIR)/package.mk -TARGET_CFLAGS += -ffunction-sections -fdata-sections $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT) -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT) # 1: name # 2: executable diff --git a/net/microsocks/Makefile b/net/microsocks/Makefile index e16e577b3..82abec56a 100644 --- a/net/microsocks/Makefile +++ b/net/microsocks/Makefile @@ -12,6 +12,8 @@ PKG_MAINTAINER:=Mateusz Korniak PKG_LICENSE:=MIT PKG_LICENSE_FILES:=COPYING +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk define Package/microsocks @@ -30,8 +32,7 @@ define Package/microsocks/conffiles /etc/config/microsocks endef -TARGET_CFLAGS+= -flto -TARGET_LDFLAGS+= -flto -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS+= -Wl,--gc-sections,--as-needed define Package/microsocks/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/modemmanager/Makefile b/net/modemmanager/Makefile index e27988733..a79f65f67 100644 --- a/net/modemmanager/Makefile +++ b/net/modemmanager/Makefile @@ -20,13 +20,13 @@ PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_BUILD_DEPENDS:=glib2/host libxslt/host +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include $(INCLUDE_DIR)/meson.mk -TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants define Package/modemmanager/config source "$(SOURCE)/Config.in" diff --git a/net/mosh/Makefile b/net/mosh/Makefile index 1c3341a32..0b840f399 100644 --- a/net/mosh/Makefile +++ b/net/mosh/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=protobuf/host +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -95,8 +96,8 @@ CONFIGURE_ARGS += \ CONFIGURE_VARS += \ ac_cv_have_decl_ffs=yes -TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto -std=c++11 -TARGET_LDFLAGS += -Wl,--gc-sections -lncurses +TARGET_CXXFLAGS += -std=c++11 +TARGET_LDFLAGS += -lncurses define Package/mosh-client/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/net/mrmctl/Makefile b/net/mrmctl/Makefile index a595cecbe..44480bfdb 100644 --- a/net/mrmctl/Makefile +++ b/net/mrmctl/Makefile @@ -22,6 +22,7 @@ PKG_LICENSE_FILES:=userland/COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -43,8 +44,8 @@ CONFIGURE_PATH:=userland CONFIGURE_ARGS += \ --enable-shared -TARGET_CFLAGS += -std=c89 -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CFLAGS += -std=c89 +TARGET_LDFLAGS += -Wl,--as-needed define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/net/mtr/Makefile b/net/mtr/Makefile index 5e20e4faa..a340898ce 100644 --- a/net/mtr/Makefile +++ b/net/mtr/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:matt_kimball_and_roger_wolff:mtr PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf +PKG_BUILD_FLAGS:=gc-sections CONFIGURE_ARGS += \ --without-gtk \ @@ -68,8 +69,7 @@ define Package/mtr/description running statistics about each machine. endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed CONFIGURE_VARS += ac_cv_lib_cap_cap_set_proc=no diff --git a/net/natmap/Makefile b/net/natmap/Makefile index 7c70475b3..a8b7221c7 100644 --- a/net/natmap/Makefile +++ b/net/natmap/Makefile @@ -12,7 +12,7 @@ PKG_MAINTAINER:=Richard Yu PKG_LICENSE:=MIT PKG_LICENSE_FILES:=License -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/net/nebula/Makefile b/net/nebula/Makefile index 2fdac24f5..d9befd3f2 100644 --- a/net/nebula/Makefile +++ b/net/nebula/Makefile @@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/slackhq/nebula GO_PKG_BUILD_PKG:= \ diff --git a/net/netbird/Makefile b/net/netbird/Makefile index 44defd354..da1881eb6 100644 --- a/net/netbird/Makefile +++ b/net/netbird/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/netbirdio/netbird GO_PKG_BUILD_PKG:=$(GO_PKG)/client diff --git a/net/netifyd/Makefile b/net/netifyd/Makefile index 6695acc65..8f05f6b7c 100644 --- a/net/netifyd/Makefile +++ b/net/netifyd/Makefile @@ -13,6 +13,7 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gitlab.com/netify.ai/public/netify-agent.git @@ -50,9 +51,8 @@ define Package/netifyd/conffiles /etc/netify.d/site.uuid endef -TARGET_CFLAGS+=-ffunction-sections -fdata-sections -Wno-psabi -TARGET_CXXFLAGS+=-std=c++11 -ffunction-sections -fdata-sections -Wno-psabi -TARGET_LDFLAGS+=-Wl,--gc-sections +TARGET_CFLAGS+=-Wno-psabi +TARGET_CXXFLAGS+=-std=c++11 -Wno-psabi CONFIGURE_ARGS+= \ --sharedstatedir=/var/run \ diff --git a/net/netsniff-ng/Makefile b/net/netsniff-ng/Makefile index 396cc6c86..aa6dfc420 100644 --- a/net/netsniff-ng/Makefile +++ b/net/netsniff-ng/Makefile @@ -12,7 +12,7 @@ PKG_MAINTAINER:=Toni Uhlig PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 PKG_CONFIG_DEPENDS:= \ diff --git a/net/nextdns/Makefile b/net/nextdns/Makefile index fb9ca8c88..f5ca3a677 100644 --- a/net/nextdns/Makefile +++ b/net/nextdns/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/nextdns/nextdns GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION) diff --git a/net/nfdump/Makefile b/net/nfdump/Makefile index f1879b984..0af7f2ad1 100644 --- a/net/nfdump/Makefile +++ b/net/nfdump/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -39,7 +40,6 @@ define Package/nfdump/conffiles /etc/config/nfcapd endef -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--as-needed $(if $(CONFIG_USE_MUSL),-lfts) define Package/nfdump/install diff --git a/net/nginx/Makefile b/net/nginx/Makefile index 438ee8525..aa43193ca 100644 --- a/net/nginx/Makefile +++ b/net/nginx/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:nginx:nginx PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_CONFIG_DEPENDS := \ CONFIG_NGINX_DAV \ @@ -328,8 +329,7 @@ define Package/nginx-mod-luci/description endef -TARGET_CFLAGS += -fvisibility=hidden -ffunction-sections -fdata-sections -DNGX_LUA_NO_BY_LUA_BLOCK -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -fvisibility=hidden -DNGX_LUA_NO_BY_LUA_BLOCK ifeq ($(CONFIG_NGINX_LUA),y) CONFIGURE_VARS += LUA_INC=$(STAGING_DIR)/usr/include \ diff --git a/net/obfs4proxy/Makefile b/net/obfs4proxy/Makefile index 39d9b2d1a..794ecec20 100644 --- a/net/obfs4proxy/Makefile +++ b/net/obfs4proxy/Makefile @@ -22,7 +22,7 @@ PKG_MAINTAINER:=Jeffery To PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=gitlab.com/yawning/obfs4.git diff --git a/net/ocserv/Makefile b/net/ocserv/Makefile index b969a8e43..4b197ad4e 100644 --- a/net/ocserv/Makefile +++ b/net/ocserv/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ocserv PKG_VERSION:=1.1.6 PKG_RELEASE:=2 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_DIR :=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz diff --git a/net/ola/Makefile b/net/ola/Makefile index 3a2f1a85b..a434b90dd 100644 --- a/net/ola/Makefile +++ b/net/ola/Makefile @@ -23,7 +23,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 HOST_BUILD_DEPENDS:=protobuf/host PKG_BUILD_DEPENDS:=ola/host diff --git a/net/ooniprobe/Makefile b/net/ooniprobe/Makefile index 01f5fd041..01a7006ff 100644 --- a/net/ooniprobe/Makefile +++ b/net/ooniprobe/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE.md PKG_BUILD_DIR:=$(BUILD_DIR)/probe-cli-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/ooni/probe-cli diff --git a/net/open-iscsi/Makefile b/net/open-iscsi/Makefile index b7b7891bf..755c29cba 100644 --- a/net/open-iscsi/Makefile +++ b/net/open-iscsi/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -58,7 +59,7 @@ define Build/Configure endef TARGET_CFLAGS += \ - $(FPIC) -flto \ + $(FPIC) \ -D_GNU_SOURCE -DNO_SYSTEMD TARGET_LDFLAGS += -lkmod diff --git a/net/open-isns/Makefile b/net/open-isns/Makefile index f2a0991e5..6aaffa6c4 100644 --- a/net/open-isns/Makefile +++ b/net/open-isns/Makefile @@ -18,6 +18,7 @@ PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -36,7 +37,7 @@ endef CONFIGURE_ARGS += \ --enable-shared -TARGET_CFLAGS += $(FPIC) -flto +TARGET_CFLAGS += $(FPIC) TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Build/InstallDev diff --git a/net/openconnect/Makefile b/net/openconnect/Makefile index 6bf724eeb..e4c776726 100644 --- a/net/openconnect/Makefile +++ b/net/openconnect/Makefile @@ -23,7 +23,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_OPENCONNECT_GNUTLS \ CONFIG_OPENCONNECT_OPENSSL \ -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/net/openvpn/Makefile b/net/openvpn/Makefile index a512e364f..fd6e7bd54 100644 --- a/net/openvpn/Makefile +++ b/net/openvpn/Makefile @@ -23,6 +23,7 @@ PKG_MAINTAINER:=Magnus Kroken PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections PKG_LICENSE:=GPL-2.0 PKG_CPE_ID:=cpe:/a:openvpn:openvpn @@ -66,9 +67,6 @@ CONFIGURE_VARS += \ IPROUTE=/sbin/ip \ NETSTAT=/sbin/netstat -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections - define Build/Configure $(call Build/Configure/Default, \ $(if $(CONFIG_OPENVPN_$(BUILD_VARIANT)_ENABLE_SMALL),--enable-small) \ diff --git a/net/openvswitch/Makefile b/net/openvswitch/Makefile index a10fb8572..fa1fa5d34 100644 --- a/net/openvswitch/Makefile +++ b/net/openvswitch/Makefile @@ -28,7 +28,7 @@ PKG_CPE_ID:=cpe:/a:openvswitch:openvswitch PKG_BUILD_DIR:=$(ovs_builddir) PKG_BUILD_DEPENDS+=python3/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -267,7 +267,7 @@ ifneq ($(ovs_intree_kmod_enabled),) endif endif -TARGET_CFLAGS += -flto -std=gnu99 +TARGET_CFLAGS += -std=gnu99 MAKE_VARS += PYTHONPATH="$(HOST_PYTHON3PATH)" export OVS_KERNEL_MAKE_FLAGS=$(KERNEL_MAKE_FLAGS) diff --git a/net/overture/Makefile b/net/overture/Makefile index d11748c6f..528311386 100644 --- a/net/overture/Makefile +++ b/net/overture/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/shawn1m/overture GO_PKG_BUILD_PKG:=$(GO_PKG)/main diff --git a/net/ovn/Makefile b/net/ovn/Makefile index 8d6d8ef97..999986f93 100644 --- a/net/ovn/Makefile +++ b/net/ovn/Makefile @@ -23,7 +23,7 @@ PKG_CPE_ID:=cpe:/a:openvswitch:openvswitch PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DEPENDS+=python3/host -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto PKG_BUILD_PARALLEL:=1 PKG_FIXUP:=autoreconf PKG_INSTALL:=1 @@ -87,7 +87,7 @@ CONFIGURE_VARS += \ ovs_cv_python3=$(HOST_PYTHON3_BIN) \ -TARGET_CFLAGS += -flto -std=gnu99 +TARGET_CFLAGS += -std=gnu99 # This is needed otherwise libtool --mode=install libovn.la will fail with # "cannot find -lopenvswitch" when doing libtool --mode=relink. Likely this # was caused by libovn now depends on libopenvswitch.la (installed=no) since diff --git a/net/rclone/Makefile b/net/rclone/Makefile index 43806bfbc..731a0582e 100644 --- a/net/rclone/Makefile +++ b/net/rclone/Makefile @@ -20,7 +20,7 @@ PKG_MAINTAINER:=Elon Huang \ PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/rclone/rclone GO_PKG_EXCLUDES:=test diff --git a/net/reaver/Makefile b/net/reaver/Makefile index a95529e6e..7d8dd3958 100644 --- a/net/reaver/Makefile +++ b/net/reaver/Makefile @@ -20,7 +20,7 @@ PKG_HASH:=e329a0da0b6dd888916046535ff86a6aa144644561937954e560bb1810ab6702 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=docs/LICENSE -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_AUTOMAKE_PATHS:=src PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 diff --git a/net/restic-rest-server/Makefile b/net/restic-rest-server/Makefile index e33e46dcc..fedd526fa 100644 --- a/net/restic-rest-server/Makefile +++ b/net/restic-rest-server/Makefile @@ -15,7 +15,7 @@ PKG_MAINTAINER:=Tom Stöveken PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/restic/rest-server/ GO_PKG_BUILD_PKG:=github.com/restic/rest-server/cmd/rest-server/ diff --git a/net/samba4/Makefile b/net/samba4/Makefile index ee1ac2620..cdd05443c 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -15,6 +15,8 @@ PKG_SOURCE_URL:= \ https://download.samba.org/pub/samba/stable/ PKG_HASH:=70348656ef807be9c8be4465ca157cef4d99818e234253d2c684cc18b8408149 +PKG_BUILD_FLAGS:=gc-sections + PKG_LICENSE:=GPL-3.0-only PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:samba:samba @@ -125,8 +127,8 @@ define Package/samba4-utils/description Utilities collection endef -TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += -Wl,--as-needed # dont mess with sambas private rpath! RSTRIP:=: diff --git a/net/shadowsocks-libev/Makefile b/net/shadowsocks-libev/Makefile index fe6953e28..3642746e9 100644 --- a/net/shadowsocks-libev/Makefile +++ b/net/shadowsocks-libev/Makefile @@ -27,7 +27,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=c-ares pcre @@ -120,7 +120,6 @@ CONFIGURE_ARGS += \ --disable-assert \ --disable-ssp \ -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed $(eval $(call BuildPackage,shadowsocks-libev-config)) diff --git a/net/sing-box/Makefile b/net/sing-box/Makefile index 15d4368f6..a20a2b401 100644 --- a/net/sing-box/Makefile +++ b/net/sing-box/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Van Waholtz PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/sagernet/sing-box GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/sing-box diff --git a/net/snowflake/Makefile b/net/snowflake/Makefile index cba160c64..c29fe98d4 100644 --- a/net/snowflake/Makefile +++ b/net/snowflake/Makefile @@ -15,7 +15,7 @@ PKG_MAINTAINER:=Daniel Golle , Nick Hainke PKG_LICENSE:=GPL-2.0-only PKG_CPE_ID:=cpe:/a:zaal:tgt -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/net/tor-fw-helper/Makefile b/net/tor-fw-helper/Makefile index f0a6d438d..e46159d12 100644 --- a/net/tor-fw-helper/Makefile +++ b/net/tor-fw-helper/Makefile @@ -23,7 +23,7 @@ PKG_MAINTAINER:=Jeffery To PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=git.torproject.org/tor-fw-helper.git diff --git a/net/tor/Makefile b/net/tor/Makefile index ad320ac3d..a8edb3227 100644 --- a/net/tor/Makefile +++ b/net/tor/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:torproject:tor PKG_INSTALL:=1 PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -140,10 +141,7 @@ ifeq ($(BUILD_VARIANT),basic) endif -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto \ - $(if $(CONFIG_OPENSSL_ENGINE),,-DDISABLE_ENGINES) - -TARGET_LDFLAGS += -Wl,--gc-sections -flto +TARGET_CFLAGS += $(if $(CONFIG_OPENSSL_ENGINE),,-DDISABLE_ENGINES) CONFIGURE_VARS += \ CROSS_COMPILE="yes" \ diff --git a/net/transmission/Makefile b/net/transmission/Makefile index e0c03f3ca..7cec51794 100644 --- a/net/transmission/Makefile +++ b/net/transmission/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:transmissionbt:transmission PKG_INSTALL:=1 PKG_BUILD_DEPENDS:=libb64 node/host PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto PKG_CONFIG_DEPENDS:= \ CONFIG_LIBCURL_GNUTLS \ CONFIG_LIBCURL_MBEDTLS \ @@ -91,8 +92,8 @@ define Package/transmission-daemon/conffiles /etc/config/transmission endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -DHAVE_SIZE_T -latomic -TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed +TARGET_CFLAGS += -DHAVE_SIZE_T -latomic +TARGET_LDFLAGS += -Wl,--as-needed CMAKE_OPTIONS += \ -DENABLE_CLI:BOOL=YES \ diff --git a/net/trojan-go/Makefile b/net/trojan-go/Makefile index 0fe239e0e..1f05030e7 100644 --- a/net/trojan-go/Makefile +++ b/net/trojan-go/Makefile @@ -18,7 +18,7 @@ PKG_MAINTAINER:=Tianling Shen PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/p4gefau1t/trojan-go GO_PKG_BUILD_PKG:=$(GO_PKG) diff --git a/net/v2ray-core/Makefile b/net/v2ray-core/Makefile index 1263b9dcc..49980c364 100644 --- a/net/v2ray-core/Makefile +++ b/net/v2ray-core/Makefile @@ -18,7 +18,7 @@ PKG_MAINTAINER:=Tianling Shen PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/v2fly/v2ray-core/v5 GO_PKG_BUILD_PKG:=$(GO_PKG)/main diff --git a/net/v2raya/Makefile b/net/v2raya/Makefile index 9bb77c928..658a11d40 100644 --- a/net/v2raya/Makefile +++ b/net/v2raya/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2rayA -PKG_VERSION:=2.0.4 +PKG_VERSION:=2.0.5 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=fb0c60d95cd208e3306cf9c5488f41fe7cf6697d58dc377e5e7d471e37ce9060 +PKG_HASH:=a454f382bf199f939e4930c1ee260b212ad66e04fa5dcf9065bb92dd2be274fe PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service PKG_LICENSE:=AGPL-3.0-only @@ -19,7 +19,7 @@ PKG_MAINTAINER:=Tianling Shen PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/v2rayA/v2rayA GO_PKG_LDFLAGS_X:= \ @@ -59,7 +59,7 @@ define Download/v2raya-web URL:=https://codeload.github.com/v2rayA/v2raya-web/tar.gz/v$(PKG_VERSION)? URL_FILE:=$(WEB_FILE) FILE:=$(WEB_FILE) - HASH:=39eacb70753b309a0f44ede282ad01b5c6a13d51bed72d0f5563574de9bea0b7 + HASH:=e0460ea4b251339258e037712dc7d7426e2929ce592becbd2182facaedbe7b81 endef define Build/Prepare diff --git a/net/wifi-presence/Makefile b/net/wifi-presence/Makefile index 6f9f6f89b..8a0bd79ea 100644 --- a/net/wifi-presence/Makefile +++ b/net/wifi-presence/Makefile @@ -13,7 +13,7 @@ PKG_MAINTAINER:=Adam Williams PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/awilliams/wifi-presence GO_PKG_BUILD_PKG:=$(GO_PKG)/cmd/wifi-presence diff --git a/net/xray-core/Makefile b/net/xray-core/Makefile index eb5246b40..fe5843287 100644 --- a/net/xray-core/Makefile +++ b/net/xray-core/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/xtls/xray-core GO_PKG_BUILD_PKG:=github.com/xtls/xray-core/main diff --git a/net/yggdrasil/Makefile b/net/yggdrasil/Makefile index bdc3157e4..a40a9f5be 100644 --- a/net/yggdrasil/Makefile +++ b/net/yggdrasil/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/yggdrasil-network/yggdrasil-go GO_PKG_BUILD_PKG:=github.com/yggdrasil-network/yggdrasil-go/cmd/... diff --git a/net/zerotier/Makefile b/net/zerotier/Makefile index 01ad05248..98551b062 100644 --- a/net/zerotier/Makefile +++ b/net/zerotier/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=LICENSE.txt PKG_ASLR_PIE:=0 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk @@ -58,8 +59,8 @@ endif endef # Make binary smaller -TARGET_CFLAGS += -ffunction-sections -fdata-sections -Wl,-z,noexecstack -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed -Wl,-z,noexecstack +TARGET_CFLAGS += -Wl,-z,noexecstack +TARGET_LDFLAGS += -Wl,--as-needed -Wl,-z,noexecstack define Package/zerotier/conffiles /etc/config/zerotier diff --git a/net/znc/Makefile b/net/znc/Makefile index 694247e36..20af11197 100644 --- a/net/znc/Makefile +++ b/net/znc/Makefile @@ -21,7 +21,7 @@ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:znc:znc -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_CONFIG_DEPENDS:= CONFIG_ZNC_ICU diff --git a/net/ztdns/Makefile b/net/ztdns/Makefile index d5517cd89..21ba5991f 100644 --- a/net/ztdns/Makefile +++ b/net/ztdns/Makefile @@ -16,7 +16,7 @@ PKG_MAINTAINER:=Oskari Rauta PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/uxbh/ztdns diff --git a/sound/espeak/Makefile b/sound/espeak/Makefile index 778647e5b..260b2c448 100644 --- a/sound/espeak/Makefile +++ b/sound/espeak/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE_FILES:=License.txt PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -50,8 +51,8 @@ MAKE_FLAGS+= \ MAKE_PATH:=./src -TARGET_CXXFLAGS += -std=c++14 -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += $(FPIC) $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--gc-sections,--as-needed +TARGET_CXXFLAGS += -std=c++14 +TARGET_LDFLAGS += $(FPIC) $(if $(CONFIG_USE_GLIBC),-lm) -Wl,--as-needed define Package/espeak/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/sound/mpd/Makefile b/sound/mpd/Makefile index b330a8ae1..c46ed1a61 100644 --- a/sound/mpd/Makefile +++ b/sound/mpd/Makefile @@ -22,7 +22,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_BUILD_PATENTED \ CONFIG_IPV6 \ -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 no-lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/sound/owntone/Makefile b/sound/owntone/Makefile index 6619a55bc..0c4ba66a9 100644 --- a/sound/owntone/Makefile +++ b/sound/owntone/Makefile @@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://github.com/owntone/owntone-server/releases/download/$(PK PKG_HASH:=c9ee0152dc488f782a25a68e72d24c109882bef3dd2914315fe499c8415fd898 PKG_FIXUP:=autoreconf -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_INSTALL:=1 PKG_MAINTAINER:=Espen Jürgensen diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile index bfc36bd86..0b400a42e 100644 --- a/sound/pulseaudio/Makefile +++ b/sound/pulseaudio/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=GPL LICENSE PKG_CPE_ID:=cpe:/a:pulseaudio:pulseaudio -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk diff --git a/sound/shine/Makefile b/sound/shine/Makefile index 680377aa2..c645f39f7 100644 --- a/sound/shine/Makefile +++ b/sound/shine/Makefile @@ -21,7 +21,7 @@ PKG_MAINTAINER:=Nicolas Thill PKG_FIXUP:=autoreconf PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/utils/acpica-unix/Makefile b/utils/acpica-unix/Makefile index 10e5a4c1d..fd5a11ce3 100644 --- a/utils/acpica-unix/Makefile +++ b/utils/acpica-unix/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=acpica-unix -PKG_VERSION:=20221020 -PKG_RELEASE:=2 +PKG_VERSION:=20230331 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar_0.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_CAT:=gzip -dc PKG_SOURCE_URL:=https://acpica.org/sites/$(patsubst %-unix,%,$(PKG_NAME))/files/ -PKG_HASH:=33a2e394aca0ca57d4018afe3da340dfad5eb45b1b9300e81dd595fda07cf1c5 +PKG_HASH:=0c5d695d605aaa61709f3c63f57a1a99b8902291723998446b0813b57ac310e2 PKG_MAINTAINER:=Philip Prindeville PKG_LICENSE:=GPL-2.0 diff --git a/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch b/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch deleted file mode 100644 index 71510df53..000000000 --- a/utils/acpica-unix/patches/0001-ACPI_CAST_PTR-cast-through-void.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0f814783ef9ed3a50e15cab08579218ec45b4640 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sat, 21 May 2022 12:15:16 +0200 -Subject: [PATCH 1/3] ACPI_CAST_PTR: cast through "void *" - -Not all pointer are castable to integers directly and ACPI_UINTPTR_T is -not guaranteed to be "void *". ---- - source/include/actypes.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/source/include/actypes.h -+++ b/source/include/actypes.h -@@ -649,7 +649,7 @@ typedef UINT64 - - /* Pointer manipulation */ - --#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p)) -+#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (void *) (p)) - #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p)) - #define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b))) - #define ACPI_SUB_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) - (ACPI_SIZE)(b))) diff --git a/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch b/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch deleted file mode 100644 index 92fb3cdb6..000000000 --- a/utils/acpica-unix/patches/0002-Linux-non-kernel-Use-use-uintptr_t-for-ACPI_UINTPTR_.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6b7a78c41c04772a30923c8c0ba71770d55ac815 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sat, 21 May 2022 12:17:14 +0200 -Subject: [PATCH 2/3] Linux non-kernel: Use use uintptr_t for ACPI_UINTPTR_T - ---- - source/include/platform/aclinux.h | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - ---- a/source/include/platform/aclinux.h -+++ b/source/include/platform/aclinux.h -@@ -168,6 +168,8 @@ - #define ACPI_USE_DO_WHILE_0 - #define ACPI_IGNORE_PACKAGE_RESOLUTION_ERRORS - -+#define ACPI_UINTPTR_T uintptr_t -+ - - #ifdef __KERNEL__ - -@@ -252,8 +254,6 @@ - #define ACPI_SPINLOCK spinlock_t * - #define ACPI_CPU_FLAGS unsigned long - --#define ACPI_UINTPTR_T uintptr_t -- - #define ACPI_TO_INTEGER(p) ((uintptr_t)(p)) - #define ACPI_OFFSET(d, f) offsetof(d, f) - -@@ -311,6 +311,7 @@ - - #ifdef ACPI_USE_STANDARD_HEADERS - #include -+#include - #endif - - /* Define/disable kernel-specific declarators */ diff --git a/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch b/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch deleted file mode 100644 index b0c1bef6e..000000000 --- a/utils/acpica-unix/patches/0003-debug-use-UINT_PTR_T-to-store-stack-boundaries.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 2185f7d5d7a5650dbcb6a05e9de41f340cd3b865 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= -Date: Sat, 21 May 2022 12:17:58 +0200 -Subject: [PATCH 3/3] debug: use UINT_PTR_T to store stack boundaries - -GCC12 complains about storing invalid pointers, store them as integers -instead. - -obj/acpiexec ../../../source/components/utilities/utdebug.c -../../../source/components/utilities/utdebug.c: In function 'AcpiUtInitStackPtrTrace': -../../../source/components/utilities/utdebug.c:188:31: error: storing the address of local variable 'CurrentSp' in 'AcpiGbl_EntryStackPointer' [-Werror=dangling-pointer=] - 188 | AcpiGbl_EntryStackPointer = &CurrentSp; - | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ -../../../source/components/utilities/utdebug.c:185:29: note: 'CurrentSp' declared here - 185 | ACPI_SIZE CurrentSp; - | ^~~~~~~~~ - -Fixes #771 ---- - source/components/debugger/dbstats.c | 4 ++-- - source/components/utilities/utdebug.c | 6 +++--- - source/components/utilities/utinit.c | 2 +- - source/include/acglobal.h | 4 ++-- - 4 files changed, 8 insertions(+), 8 deletions(-) - ---- a/source/components/debugger/dbstats.c -+++ b/source/components/debugger/dbstats.c -@@ -647,8 +647,8 @@ AcpiDbDisplayStatistics ( - AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer); - - AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n"); -- AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer); -- AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer); -+ AcpiOsPrintf ("Entry Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_EntryStackPointer)); -+ AcpiOsPrintf ("Lowest Stack Pointer %p\n", ACPI_TO_POINTER(AcpiGbl_LowestStackPointer)); - AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp); - AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting); - #endif ---- a/source/components/utilities/utdebug.c -+++ b/source/components/utilities/utdebug.c -@@ -185,7 +185,7 @@ AcpiUtInitStackPtrTrace ( - ACPI_SIZE CurrentSp; - - -- AcpiGbl_EntryStackPointer = &CurrentSp; -+ AcpiGbl_EntryStackPointer = ACPI_TO_INTEGER(&CurrentSp); - } - - -@@ -208,9 +208,9 @@ AcpiUtTrackStackPtr ( - ACPI_SIZE CurrentSp; - - -- if (&CurrentSp < AcpiGbl_LowestStackPointer) -+ if (ACPI_TO_INTEGER(&CurrentSp) < AcpiGbl_LowestStackPointer) - { -- AcpiGbl_LowestStackPointer = &CurrentSp; -+ AcpiGbl_LowestStackPointer = ACPI_TO_INTEGER(&CurrentSp); - } - - if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting) ---- a/source/components/utilities/utinit.c -+++ b/source/components/utilities/utinit.c -@@ -359,7 +359,7 @@ AcpiUtInitGlobals ( - #endif - - #ifdef ACPI_DEBUG_OUTPUT -- AcpiGbl_LowestStackPointer = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX); -+ AcpiGbl_LowestStackPointer = ACPI_SIZE_MAX; - #endif - - #ifdef ACPI_DBG_TRACK_ALLOCATIONS ---- a/source/include/acglobal.h -+++ b/source/include/acglobal.h -@@ -332,8 +332,8 @@ extern const ACPI_PREDEFINED_NAMES - ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeCount); - ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeSize); - ACPI_GLOBAL (UINT32, AcpiGbl_MaxConcurrentNodeCount); --ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); --ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); -+ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_EntryStackPointer); -+ACPI_GLOBAL (ACPI_UINTPTR_T, AcpiGbl_LowestStackPointer); - ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); - ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); - #endif diff --git a/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch b/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch new file mode 100644 index 000000000..c137560e3 --- /dev/null +++ b/utils/acpica-unix/patches/0004-need-stdint.h-for-uintptr_t.patch @@ -0,0 +1,13 @@ +We use the type uintptr_t but we don't directly include the header +file from which it comes. + +--- a/source/include/platform/aclinux.h ++++ b/source/include/platform/aclinux.h +@@ -312,6 +312,7 @@ + #ifdef ACPI_USE_STANDARD_HEADERS + #include + #include ++#include + + #define ACPI_OFFSET(d, f) offsetof(d, f) + #endif diff --git a/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch b/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch new file mode 100644 index 000000000..cd903238f --- /dev/null +++ b/utils/acpica-unix/patches/0005-pragma-dangling-pointer-CurrentSp.patch @@ -0,0 +1,16 @@ +Storing the address of an ephemeral variable into a persistent pointer +is flagged by GCC 12 as a dangling-pointer error. + +--- a/source/components/utilities/utdebug.c ++++ b/source/components/utilities/utdebug.c +@@ -185,7 +185,10 @@ AcpiUtInitStackPtrTrace ( + ACPI_SIZE CurrentSp; + + ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wdangling-pointer=" + AcpiGbl_EntryStackPointer = &CurrentSp; ++#pragma GCC diagnostic pop + } + + diff --git a/utils/acpid/Makefile b/utils/acpid/Makefile index 9328cbd7e..dc9421426 100644 --- a/utils/acpid/Makefile +++ b/utils/acpid/Makefile @@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:tedfelix:acpid PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -37,8 +38,7 @@ define Package/acpid/description The ACPI Daemon (acpid) With Netlink Support endef -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Package/acpid/install $(INSTALL_DIR) $(1)/usr/sbin diff --git a/utils/ap51-flash/Makefile b/utils/ap51-flash/Makefile index 26eb1f0f1..c7181205e 100644 --- a/utils/ap51-flash/Makefile +++ b/utils/ap51-flash/Makefile @@ -18,6 +18,8 @@ PKG_MAINTAINER:=Russell Senior PKG_LICENSE:=GPL-3.0-or-later CC0-1.0 PKG_LICENSE_FILES:=LICENSES/GPL-3.0-or-later.txt LICENSES/CC0-1.0.txt +PKG_BUILD_FLAGS:=lto + include $(INCLUDE_DIR)/package.mk define Package/ap51-flash @@ -32,7 +34,6 @@ MAKE_FLAGS += \ REVISION="$(PKG_VERSION)" \ ap51-flash -TARGET_CFLAGS += -flto TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed define Package/ap51-flash/install diff --git a/utils/audit/Makefile b/utils/audit/Makefile index 80f3416c8..b376a18d6 100644 --- a/utils/audit/Makefile +++ b/utils/audit/Makefile @@ -21,7 +21,7 @@ PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit PKG_FIXUP:=autoreconf PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-packages/$(PKG_NAME)-$(PKG_VERSION) -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/utils/bluez/Makefile b/utils/bluez/Makefile index c585593cc..bee4e79a9 100644 --- a/utils/bluez/Makefile +++ b/utils/bluez/Makefile @@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:bluez:bluez PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk @@ -79,8 +80,7 @@ define Package/bluez-daemon/conffiles /etc/config/bluetooth endef -TARGET_CFLAGS += -D_GNU_SOURCE -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -D_GNU_SOURCE CONFIGURE_ARGS += \ --enable-static \ diff --git a/utils/btrfs-progs/Makefile b/utils/btrfs-progs/Makefile index 0db5d69ca..8e6f306cf 100644 --- a/utils/btrfs-progs/Makefile +++ b/utils/btrfs-progs/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 PKG_BUILD_DEPENDS:=acl +PKG_BUILD_FLAGS:=gc-sections include $(INCLUDE_DIR)/package.mk @@ -56,8 +57,7 @@ endef boxprogs = btrfsck mkfs.btrfs btrfs-image btrfstune btrfs-find-root progs = btrfs-map-logical btrfs-select-super -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections -Wl,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed EXTRA_CFLAGS=$(TARGET_CPPFLAGS) diff --git a/utils/cni-plugins-nft/Makefile b/utils/cni-plugins-nft/Makefile index b82a162b7..771f728e8 100644 --- a/utils/cni-plugins-nft/Makefile +++ b/utils/cni-plugins-nft/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/greenpau/cni-plugins/ GO_PKG_BUILD_PKG:=github.com/greenpau/cni-plugins/cmd/cni-nftables-portmap \ diff --git a/utils/cni-plugins/Makefile b/utils/cni-plugins/Makefile index 31495b68c..3615de5f4 100644 --- a/utils/cni-plugins/Makefile +++ b/utils/cni-plugins/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Daniel Golle , Paul Spooren , Paul Spooren PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/containerd/containerd diff --git a/utils/coremark/Makefile b/utils/coremark/Makefile index dc7c13eeb..06a05c875 100644 --- a/utils/coremark/Makefile +++ b/utils/coremark/Makefile @@ -22,7 +22,7 @@ PKG_MAINTAINER:=Lim Guo Wei \ PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE.md -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto include $(INCLUDE_DIR)/package.mk @@ -60,8 +60,6 @@ define Package/coremark/config Number of threads to run in parallel endef -TARGET_CFLAGS += -flto - ifeq ($(CONFIG_COREMARK_OPTIMIZE_O3),y) TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3 endif diff --git a/utils/ctop/Makefile b/utils/ctop/Makefile index 65180fad6..09b8722b0 100644 --- a/utils/ctop/Makefile +++ b/utils/ctop/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/bcicen/ctop diff --git a/utils/docker-compose/Makefile b/utils/docker-compose/Makefile index b172870e0..6ea5c0e59 100644 --- a/utils/docker-compose/Makefile +++ b/utils/docker-compose/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Javier Marcet PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/docker/compose/v2 GO_PKG_BUILD_PKG:=github.com/docker/compose/v2/cmd diff --git a/utils/docker/Makefile b/utils/docker/Makefile index 7586bd4dc..e099a5dce 100644 --- a/utils/docker/Makefile +++ b/utils/docker/Makefile @@ -17,7 +17,7 @@ PKG_MAINTAINER:=Gerard Ryan PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=$(PKG_GIT_URL) diff --git a/utils/dockerd/Makefile b/utils/dockerd/Makefile index 4246fe1ad..80cdf0531 100644 --- a/utils/dockerd/Makefile +++ b/utils/dockerd/Makefile @@ -17,7 +17,7 @@ PKG_MAINTAINER:=Gerard Ryan PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/docker/docker diff --git a/utils/domoticz/Makefile b/utils/domoticz/Makefile index 8fde8c25a..c1a2b0269 100644 --- a/utils/domoticz/Makefile +++ b/utils/domoticz/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=License.txt PKG_BUILD_DEPENDS:=python3 minizip cereal -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 lto include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -73,8 +73,7 @@ CMAKE_OPTIONS += \ -DUSE_PYTHON=yes \ -DWITH_LIBUSB=no -TARGET_CFLAGS += -flto -TARGET_CXXFLAGS += -DWITH_GPIO -flto +TARGET_CXXFLAGS += -DWITH_GPIO define Build/Prepare $(call Build/Prepare/Default) diff --git a/utils/dump1090/Makefile b/utils/dump1090/Makefile index 26ec46b16..ad3fbac36 100644 --- a/utils/dump1090/Makefile +++ b/utils/dump1090/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING LICENSE PKG_BUILD_DEPENDS:=libusb PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -56,8 +57,7 @@ MAKE_FLAGS += \ CFLAGS="$(TARGET_CFLAGS)" \ UNAME="Linux" -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--as-needed define Package/dump1090/conffiles /etc/config/dump1090 diff --git a/utils/gptfdisk/Makefile b/utils/gptfdisk/Makefile index 68badcc14..f466377cf 100644 --- a/utils/gptfdisk/Makefile +++ b/utils/gptfdisk/Makefile @@ -20,6 +20,7 @@ PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -72,8 +73,8 @@ define Package/fixparts/description Master Boot Record (MBR) partition tables endef -TARGET_CXXFLAGS += -std=c++11 -ffunction-sections -fdata-sections -fno-rtti -flto -Wno-format-security -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_CXXFLAGS += -std=c++11 -fno-rtti -Wno-format-security +TARGET_LDFLAGS += -Wl,--as-needed define Package/gdisk/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/utils/haveged/Makefile b/utils/haveged/Makefile index 05cdc5929..bbb60cff6 100644 --- a/utils/haveged/Makefile +++ b/utils/haveged/Makefile @@ -20,7 +20,7 @@ PKG_LICENSE:=GPLv3 PKG_MAINTAINER:=Hannu Nyman PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk diff --git a/utils/librespeed-cli/Makefile b/utils/librespeed-cli/Makefile index a816fdaec..07117a8d4 100644 --- a/utils/librespeed-cli/Makefile +++ b/utils/librespeed-cli/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/speedtest-cli-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/librespeed/speedtest-cli diff --git a/utils/lxc/Makefile b/utils/lxc/Makefile index 94b606afc..15ebd3001 100644 --- a/utils/lxc/Makefile +++ b/utils/lxc/Makefile @@ -19,7 +19,7 @@ PKG_HASH:=bea08d2e49efcee34fa58acd2bc95c0adc64d291c07f4cfaf4ac1d8ac5a36f45 PKG_MAINTAINER:=Marko Ratkaj PKG_LICENSE:=LGPL-2.1-or-later BSD-2-Clause GPL-2.0 PKG_LICENSE_FILES:=COPYING LICENSE.GPL2 LICENSE.LGPL2.1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/meson.mk diff --git a/utils/mariadb/Makefile b/utils/mariadb/Makefile index 6bbf2f657..1f9f50922 100644 --- a/utils/mariadb/Makefile +++ b/utils/mariadb/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=COPYING THIRDPARTY PKG_CPE_ID:=cpe:/a:mariadb:mariadb -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 HOST_BUILD_DEPENDS:=libxml2/host # Without libevent2 tests/async_queries sporadically fails on the bots diff --git a/utils/miniflux/Makefile b/utils/miniflux/Makefile index 99a7f34ff..3d633c30a 100644 --- a/utils/miniflux/Makefile +++ b/utils/miniflux/Makefile @@ -22,7 +22,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DIR:=$(BUILD_DIR)/v2-$(PKG_VERSION) PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=miniflux.app GO_PKG_LDFLAGS_X:=miniflux.app/version.Version=$(PKG_VERSION) diff --git a/utils/oci-runtime-tools/Makefile b/utils/oci-runtime-tools/Makefile index e0ae1126c..7b69ddebb 100644 --- a/utils/oci-runtime-tools/Makefile +++ b/utils/oci-runtime-tools/Makefile @@ -17,7 +17,7 @@ PKG_MAINTAINER:=Daniel Golle PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/opencontainers/runtime-tools/ GO_PKG_LDFLAGS_X:=main.gitCommit=$(PKG_SOURCE_VERSION) main.version=$(PKG_SOURCE_VERSION) diff --git a/utils/podman/Makefile b/utils/podman/Makefile index 4584f4a2c..441082cb0 100644 --- a/utils/podman/Makefile +++ b/utils/podman/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Oskari Rauta PKG_BUILD_DEPENDS:=golang/host protobuf/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk diff --git a/utils/prometheus-statsd-exporter/Makefile b/utils/prometheus-statsd-exporter/Makefile index e9682a543..27c7a958b 100644 --- a/utils/prometheus-statsd-exporter/Makefile +++ b/utils/prometheus-statsd-exporter/Makefile @@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/prometheus/statsd_exporter diff --git a/utils/prometheus/Makefile b/utils/prometheus/Makefile index b06f667dc..c511b70dd 100644 --- a/utils/prometheus/Makefile +++ b/utils/prometheus/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Paul Spooren PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/prometheus/prometheus/ GO_PKG_BUILD_PKG:=github.com/prometheus/prometheus/cmd/prometheus/ diff --git a/utils/qemu/Makefile b/utils/qemu/Makefile index 7f97b392c..8e5819c40 100644 --- a/utils/qemu/Makefile +++ b/utils/qemu/Makefile @@ -21,7 +21,7 @@ PKG_CPE_ID:=cpe:/a:qemu:qemu PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_DEPENDS+=spice-protocol diff --git a/utils/readsb/Makefile b/utils/readsb/Makefile index e9ed05bde..844fc0d51 100644 --- a/utils/readsb/Makefile +++ b/utils/readsb/Makefile @@ -20,6 +20,7 @@ PKG_MAINTAINER:=Stijn Tintel PKG_BUILD_DEPENDS:=!USE_GLIBC:argp-standalone PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -48,10 +49,9 @@ MAKE_FLAGS += \ RTLSDR=yes \ UNAME="Linux" -TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto TARGET_LDFLAGS += \ $(if $(CONFIG_USE_GLIBC),,-largp) \ - -Wl,--gc-sections,--as-needed + -Wl,--as-needed define Package/readsb/conffiles /etc/config/readsb diff --git a/utils/restic/Makefile b/utils/restic/Makefile index e3cde4282..7f08ccf4f 100644 --- a/utils/restic/Makefile +++ b/utils/restic/Makefile @@ -14,7 +14,7 @@ PKG_MAINTAINER:=Tom Stöveken PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/restic/restic/ GO_PKG_BUILD_PKG:=github.com/restic/restic/cmd/restic/ diff --git a/utils/runc/Makefile b/utils/runc/Makefile index 568f26ef3..ea2529184 100644 --- a/utils/runc/Makefile +++ b/utils/runc/Makefile @@ -15,7 +15,7 @@ PKG_MAINTAINER:=Gerard Ryan PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/opencontainers/runc diff --git a/utils/smartmontools/Makefile b/utils/smartmontools/Makefile index 9db02d0d0..8281736b5 100644 --- a/utils/smartmontools/Makefile +++ b/utils/smartmontools/Makefile @@ -21,6 +21,7 @@ PKG_LICENSE_FILES:=COPYING PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -78,9 +79,7 @@ define Package/smartd-mail/description A script for mailing about SMART issues endef -TARGET_LDFLAGS += -flto - -TARGET_CXXFLAGS +=-fno-rtti -flto +TARGET_CXXFLAGS +=-fno-rtti MAKE_FLAGS +=BUILD_INFO='"(localbuild)"' CONFIGURE_ARGS += \ diff --git a/utils/syncthing/Makefile b/utils/syncthing/Makefile index ecd21ad7d..be1d98372 100644 --- a/utils/syncthing/Makefile +++ b/utils/syncthing/Makefile @@ -17,7 +17,7 @@ PKG_CPE_ID:=cpe:/a:syncthing:syncthing PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/syncthing/syncthing GO_PKG_BUILD_PKG:=\ diff --git a/utils/telegraf/Makefile b/utils/telegraf/Makefile index c0a5676b2..d8764e167 100644 --- a/utils/telegraf/Makefile +++ b/utils/telegraf/Makefile @@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/influxdata/telegraf GO_PKG_BUILD_PKG:=github.com/influxdata/telegraf/cmd/telegraf diff --git a/utils/unrar/Makefile b/utils/unrar/Makefile index 270120700..22e194ca3 100644 --- a/utils/unrar/Makefile +++ b/utils/unrar/Makefile @@ -22,10 +22,11 @@ PKG_CPE_ID:=cpe:/a:rarlab:unrar PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk -TARGET_CXXFLAGS +=-fno-rtti -flto +TARGET_CXXFLAGS +=-fno-rtti TARGET_LDFLAGS +=$(FPIC) -Wl,--gc-sections $(if $(CONFIG_USE_GLIBC),-lpthread) define Package/unrar/Default diff --git a/utils/xz/Makefile b/utils/xz/Makefile index 3d26b1f52..834bfdbc7 100644 --- a/utils/xz/Makefile +++ b/utils/xz/Makefile @@ -23,6 +23,7 @@ PKG_CPE_ID:=cpe:/a:tukaani:xz PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=lto include $(INCLUDE_DIR)/package.mk @@ -71,7 +72,7 @@ define BuildSubPackage $$(eval $$(call BuildPackage,$(1))) endef -TARGET_LDFLAGS += -Wl,--gc-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_ARGS += \ --enable-small \ diff --git a/utils/yq/Makefile b/utils/yq/Makefile index 4349a9898..4f5bfd373 100644 --- a/utils/yq/Makefile +++ b/utils/yq/Makefile @@ -14,7 +14,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_BUILD_DEPENDS:=golang/host PKG_BUILD_PARALLEL:=1 -PKG_USE_MIPS16:=0 +PKG_BUILD_FLAGS:=no-mips16 GO_PKG:=github.com/mikefarah/yq/v4 GO_PKG_LDFLAGS_X:=$(GO_PKG)/cmd.Version=$(PKG_VERSION) diff --git a/utils/zsh/Makefile b/utils/zsh/Makefile index 8a95c1511..6fc713a5d 100644 --- a/utils/zsh/Makefile +++ b/utils/zsh/Makefile @@ -22,6 +22,7 @@ PKG_CPE_ID:=cpe:/a:zsh_project:zsh PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 +PKG_BUILD_FLAGS:=gc-sections lto include $(INCLUDE_DIR)/package.mk @@ -82,8 +83,8 @@ define Build/Configure $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" prep endef -TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto -TARGET_LDFLAGS += $(FPIC) -Wl,--gc-sections -flto +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += $(FPIC) define Package/zsh/postinst #!/bin/sh