diff --git a/config/Config-build.in b/config/Config-build.in index 5ee0667f3d..4cd86d8e07 100644 --- a/config/Config-build.in +++ b/config/Config-build.in @@ -93,6 +93,15 @@ menu "Global build settings" help If enabled, config.seed will be stored in /etc/build.config of firmware. + config REPRODUCIBLE_DEBUG_INFO + bool "Make debug information reproducible" + default BUILDBOT + help + This strips the local build path out of debug information. This has the + advantage of making it reproducible, but the disadvantage of making local + debugging using ./scripts/remote-gdb harder, since the debug data will + no longer point to the full path on the build host. + config COLLECT_KERNEL_DEBUG bool prompt "Collect kernel debug information" diff --git a/include/kernel-version.mk b/include/kernel-version.mk index fc165a1fda..c6d03a36aa 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -7,13 +7,13 @@ ifdef CONFIG_TESTING_KERNEL endif LINUX_VERSION-4.9 = .232 -LINUX_VERSION-4.14 = .192 -LINUX_VERSION-4.19 = .137 +LINUX_VERSION-4.14 = .193 +LINUX_VERSION-4.19 = .138 LINUX_VERSION-5.4 = .57 LINUX_KERNEL_HASH-4.9.232 = 58f472e82345dc719a1d6d7bae01e5aa73387cd83308acd2c92371f7d5bc4f60 -LINUX_KERNEL_HASH-4.14.192 = d2b5b0739f1559fc70146da50ff175b20a63e97e688a36dab16927d4ebd0f9d1 -LINUX_KERNEL_HASH-4.19.137 = 18f836dfe93fdfe267f07baaa7a239d3d6702fdad6b2866609c76e33c1486c59 +LINUX_KERNEL_HASH-4.14.193 = 0b0fb41d4430e1a42738b341cbfd2f41951aa5cd02acabbd53f076119c8b9f03 +LINUX_KERNEL_HASH-4.19.138 = d15c27d05f6c527269b75b30cc72972748e55720e7e00ad8abbaa4fe3b1d5e02 LINUX_KERNEL_HASH-5.4.57 = 280d1bb8163c1f1c1a04e0ba2b85558cef2ab3c253c3fecd8fc680c3a6cd17ba remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index 83dad0f2dc..4637c6ca50 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -114,6 +114,10 @@ $(eval $(call SetupHostCommand,grep,Please install GNU 'grep', \ ggrep --version 2>&1 | grep GNU, \ grep --version 2>&1 | grep GNU)) +$(eval $(call SetupHostCommand,egrep,Please install GNU 'grep', \ + gegrep --version 2>&1 | grep GNU, \ + egrep --version 2>&1 | grep GNU)) + $(eval $(call SetupHostCommand,getopt, \ Please install an extended getopt version that supports --long, \ gnugetopt -o t --long test -- --test | grep '^ *--test *--', \ diff --git a/package/ctcgfw/openwrt-v2ray-plugin/Makefile b/package/ctcgfw/openwrt-v2ray-plugin/Makefile index 7fed1062a6..201c5c943b 100644 --- a/package/ctcgfw/openwrt-v2ray-plugin/Makefile +++ b/package/ctcgfw/openwrt-v2ray-plugin/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray-plugin -PKG_VERSION:=1.3.4 +PKG_VERSION:=1.3.5 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/teddysun/v2ray-plugin/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=59f91575953e8289d0f6d007836eab169b8ee62e44b31b1a3eef61525db1e69c +PKG_HASH:=46b3b9aec066df710f7ff27518c73c94ed63bbcdd6827e759da8627bf300a8d9 PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index e04611f5d3..6ad326efa0 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.27 +PKG_VERSION:=2.34 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88 +PKG_HASH:=f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952 PKG_FIXUP:=autoreconf PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof binutils ld libiberty gold intl @@ -37,10 +37,17 @@ define Package/libbfd DEPENDS:=+zlib $(ICONV_DEPENDS) $(INTL_DEPENDS) endef +define Package/libctf + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libctf + DEPENDS:=+libbfd +endef + define Package/libopcodes SECTION:=libs CATEGORY:=Libraries - TITLE:=libbfd + TITLE:=libopcodes DEPENDS:=+libbfd endef @@ -56,7 +63,7 @@ define Package/objdump SECTION:=devel CATEGORY:=Development TITLE:=objdump - DEPENDS:=+libopcodes + DEPENDS:=+libopcodes +libctf endef define Package/ar @@ -94,7 +101,12 @@ endef define Package/libbfd/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbfd*.so* $(1)/usr/lib/ +endef + +define Package/libctf/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libctf.so* $(1)/usr/lib/ endef define Package/libopcodes/install @@ -121,6 +133,7 @@ define Package/binutils/install endef $(eval $(call BuildPackage,libbfd)) +$(eval $(call BuildPackage,libctf)) $(eval $(call BuildPackage,libopcodes)) $(eval $(call BuildPackage,binutils)) $(eval $(call BuildPackage,objdump)) diff --git a/package/devel/binutils/patches/0001-Do-not-pass-host-compiler-sanitization-flags-on-to-l.patch b/package/devel/binutils/patches/0001-Do-not-pass-host-compiler-sanitization-flags-on-to-l.patch deleted file mode 100644 index 823527a2bc..0000000000 --- a/package/devel/binutils/patches/0001-Do-not-pass-host-compiler-sanitization-flags-on-to-l.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 183eb37e25d903ccd68cc2d8f8a37e75872c03d2 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -Date: Tue, 6 Sep 2016 17:35:35 +0100 -Subject: [PATCH 1/2] Do not pass host compiler sanitization flags on to linker - testsuite. - - * Makefile.am (CFLAGS_FOR_TARGET): Define as a copy of CFLAGS but - without any sanitization options. - (CXXFLAGS_FOR_TARGET): Define as a copy of CXXFLAGS but without - any sanitization options. - (check-DEJAGNU): Pass CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET - as CFLAGS and CXXFLAGS respectively. ---- - ld/Makefile.am | 8 ++++++-- - ld/Makefile.in | 8 ++++++-- - 2 files changed, 12 insertions(+), 4 deletions(-) - ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -136,6 +136,10 @@ CXX_FOR_TARGET = ` \ - fi; \ - fi` - -+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia -+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` -+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` -+ - transform = s/^ld-new$$/$(installed_linker)/;@program_transform_name@ - bin_PROGRAMS = ld-new - info_TEXINFOS = ld.texinfo -@@ -2075,8 +2079,8 @@ check-DEJAGNU: site.exp - runtest=$(RUNTEST); \ - if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ - $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ -- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \ -- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \ -+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \ -+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \ - OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \ - LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -507,6 +507,10 @@ CXX_FOR_TARGET = ` \ - fi; \ - fi` - -+ -+# Strip out sanitization options as they require special host libraries. -+CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` -+CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` - info_TEXINFOS = ld.texinfo - ld_TEXINFOS = configdoc.texi - noinst_TEXINFOS = ldint.texinfo -@@ -3644,8 +3648,8 @@ check-DEJAGNU: site.exp - runtest=$(RUNTEST); \ - if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ - $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \ -- CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS)" \ -- CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \ -+ CC="$(CC_FOR_TARGET)" CFLAGS="$(CFLAGS_FOR_TARGET)" \ -+ CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \ - CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \ - OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \ - LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \ diff --git a/package/devel/binutils/patches/0002-When-building-target-binaries-ensure-that-the-warnin.patch b/package/devel/binutils/patches/0002-When-building-target-binaries-ensure-that-the-warnin.patch deleted file mode 100644 index b87c58ec77..0000000000 --- a/package/devel/binutils/patches/0002-When-building-target-binaries-ensure-that-the-warnin.patch +++ /dev/null @@ -1,1258 +0,0 @@ -From b8ff24c72174effd5c5527866313982e28507275 Mon Sep 17 00:00:00 2001 -From: Vlad Zakharov -Date: Mon, 26 Sep 2016 16:36:08 +0100 -Subject: [PATCH 2/2] When building target binaries, ensure that the warning - flags selected for the command line match the target compiler. - -bfd * warning.m4 (AC_EGREP_CPP_FOR_BUILD): Introduce macro - to verify CC_FOR_BUILD compiler. - (AM_BINUTILS_WARNINGS): Introduce ac_cpp_for_build variable - and add CC_FOR_BUILD compiler checks. - * Makefile.in: Regenerate. - * configure: Likewise. - * doc/Makefile.in: Likewise. - -binutils * Makefile.am: Replace AM_CLFAGS with AM_CFLAGS_FOR_BUILD - when building with CC_FOR_BUILD compiler. - * Makefile.in: Regenerate. - * configure: Likewise. - * doc/Makefile.in: Likewise. - -gas * Makefile.in: Regenerate. - * configure: Likewise. - * doc/Makefile.in: Likewise. - -gold * Makefile.in: Regenerate. - * configure: Likewise. - * testsuite/Makefile.in: Likewise. - -gprof * Makefile.in: Regenerate. - * configure: Likewise. - -ld * Makefile.in: Regenerate. - * configure: Likewise. - -opcodes * Makefile.in: Regenerate. - * configure: Likewise. ---- - bfd/Makefile.in | 1 + - bfd/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - bfd/doc/Makefile.in | 1 + - bfd/warning.m4 | 47 ++++++++++++++++++++++++++++++++++---- - binutils/Makefile.am | 10 +++++---- - binutils/Makefile.in | 10 +++++---- - binutils/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - binutils/doc/Makefile.in | 1 + - gas/Makefile.in | 1 + - gas/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - gas/doc/Makefile.in | 1 + - gold/Makefile.in | 5 +++-- - gold/configure | 52 ++++++++++++++++++++++++++++++++++++++---- - gold/testsuite/Makefile.in | 1 + - gprof/Makefile.in | 1 + - gprof/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - ld/Makefile.in | 3 ++- - ld/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - opcodes/Makefile.in | 1 + - opcodes/configure | 56 +++++++++++++++++++++++++++++++++++++++++----- - 20 files changed, 416 insertions(+), 55 deletions(-) - ---- a/bfd/Makefile.in -+++ b/bfd/Makefile.in -@@ -288,6 +288,7 @@ TDEFINES = @TDEFINES@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - abs_builddir = @abs_builddir@ ---- a/bfd/configure -+++ b/bfd/configure -@@ -659,6 +659,7 @@ MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - REPORT_BUGS_TEXI - REPORT_BUGS_TO -@@ -11427,7 +11428,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11430 "configure" -+#line 11431 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11533,7 +11534,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11536 "configure" -+#line 11537 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12240,8 +12241,12 @@ fi - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -12286,6 +12291,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -12301,6 +12336,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -12314,25 +12350,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -12343,6 +12386,7 @@ fi - - - -+ - - - ---- a/bfd/doc/Makefile.in -+++ b/bfd/doc/Makefile.in -@@ -248,6 +248,7 @@ TDEFINES = @TDEFINES@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - abs_builddir = @abs_builddir@ ---- a/bfd/warning.m4 -+++ b/bfd/warning.m4 -@@ -17,12 +17,34 @@ dnl along with this program; see the fil - dnl . - dnl - -+# AC_EGREP_CPP_FOR_BUILD(PATTERN, PROGRAM, -+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -+# ------------------------------------------------------ -+AC_DEFUN([AC_EGREP_CPP_FOR_BUILD], -+[AC_LANG_PREPROC_REQUIRE()dnl -+AC_REQUIRE([AC_PROG_EGREP])dnl -+AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) -+AS_IF([dnl eval is necessary to expand ac_cpp. -+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. -+(eval "$ac_cpp_for_build conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | -+dnl Quote $1 to prevent m4 from eating character classes -+ $EGREP "[$1]" >/dev/null 2>&1], -+ [$3], -+ [$4]) -+rm -f conftest* -+])# AC_EGREP_CPP_FOR_BUILD -+ -+ - AC_DEFUN([AM_BINUTILS_WARNINGS],[ - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - AC_EGREP_CPP([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wshadow") -@@ -34,6 +56,14 @@ AC_EGREP_CPP([^[0-4]$],[__GNUC__],,GCC_W - WARN_WRITE_STRINGS="" - AC_EGREP_CPP([^[0-3]$],[__GNUC__],,WARN_WRITE_STRINGS="-Wwrite-strings") - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+AC_EGREP_CPP_FOR_BUILD([^[0-3]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow") -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+AC_EGREP_CPP_FOR_BUILD([^[0-4]$],[__GNUC__],,GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144") -+ - AC_ARG_ENABLE(werror, - [ --enable-werror treat compile warnings as errors], - [case "${enableval}" in -@@ -47,6 +77,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -60,25 +91,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - AC_ARG_ENABLE(build-warnings, - [ --enable-build-warnings enable build-time compiler warnings], - [case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac]) - - if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then -@@ -86,6 +124,7 @@ if test x"$silent" != x"yes" && test x"$ - fi - - AC_SUBST(WARN_CFLAGS) -+AC_SUBST(WARN_CFLAGS_FOR_BUILD) - AC_SUBST(NO_WERROR) - AC_SUBST(WARN_WRITE_STRINGS) - ]) ---- a/binutils/Makefile.am -+++ b/binutils/Makefile.am -@@ -47,8 +47,10 @@ ZLIB = @zlibdir@ -lz - ZLIBINC = @zlibinc@ - - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - NO_WERROR = @NO_WERROR@ - AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC) - LIBICONV = @LIBICONV@ - - # these two are almost the same program -@@ -305,17 +307,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJ - $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@ - - syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h -- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c -+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c - - sysinfo.@OBJEXT@: sysinfo.c - if [ -r sysinfo.c ]; then \ -- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \ -+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \ - else \ -- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \ -+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \ - fi - - bin2c$(EXEEXT_FOR_BUILD): bin2c.c -- $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c -+ $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c - - embedspu: embedspu.sh Makefile - awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@ ---- a/binutils/Makefile.in -+++ b/binutils/Makefile.in -@@ -401,6 +401,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi` -@@ -478,6 +479,7 @@ am__skipyacc = - ZLIB = @zlibdir@ -lz - ZLIBINC = @zlibinc@ - AM_CFLAGS = $(WARN_CFLAGS) $(ZLIBINC) -+AM_CFLAGS_FOR_BUILD = $(WARN_CFLAGS_FOR_BUILD) $(ZLIBINC) - - # these two are almost the same program - AR_PROG = ar -@@ -1370,17 +1372,17 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJ - $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@ - - syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h -- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c -+ $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c - - sysinfo.@OBJEXT@: sysinfo.c - if [ -r sysinfo.c ]; then \ -- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \ -+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \ - else \ -- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \ -+ $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \ - fi - - bin2c$(EXEEXT_FOR_BUILD): bin2c.c -- $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c -+ $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c - - embedspu: embedspu.sh Makefile - awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@ ---- a/binutils/configure -+++ b/binutils/configure -@@ -652,6 +652,7 @@ YFLAGS - YACC - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - OTOOL64 - OTOOL -@@ -11225,7 +11226,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11228 "configure" -+#line 11229 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11331,7 +11332,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11334 "configure" -+#line 11335 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11945,8 +11946,12 @@ _ACEOF - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -11991,6 +11996,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -12006,6 +12041,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -12019,25 +12055,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -12048,6 +12091,7 @@ fi - - - -+ - - - ---- a/binutils/doc/Makefile.in -+++ b/binutils/doc/Makefile.in -@@ -249,6 +249,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - YACC = @YACC@ ---- a/gas/Makefile.in -+++ b/gas/Makefile.in -@@ -255,6 +255,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ @WARN_WRITE_STRINGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` ---- a/gas/configure -+++ b/gas/configure -@@ -642,6 +642,7 @@ cgen_cpu_prefix - GDBINIT - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - OTOOL64 - OTOOL -@@ -10985,7 +10986,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10988 "configure" -+#line 10989 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11091,7 +11092,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11094 "configure" -+#line 11095 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11721,8 +11722,12 @@ using_cgen=no - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -11767,6 +11772,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -11782,6 +11817,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -11795,25 +11831,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -11824,6 +11867,7 @@ fi - - - -+ - - - ---- a/gas/doc/Makefile.in -+++ b/gas/doc/Makefile.in -@@ -230,6 +230,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - YACC = @YACC@ ---- a/gold/Makefile.in -+++ b/gold/Makefile.in -@@ -87,8 +87,8 @@ subdir = . - DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/configure \ - $(am__configure_deps) $(srcdir)/config.in \ -- $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in \ -- ftruncate.c pread.c mremap.c ffsll.c yyscript.h yyscript.c \ -+ $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in ffsll.c \ -+ mremap.c ftruncate.c pread.c yyscript.h yyscript.c \ - $(srcdir)/../depcomp $(srcdir)/../ylwrap - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 - am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \ -@@ -409,6 +409,7 @@ TARGETOBJS = @TARGETOBJS@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_CXXFLAGS = @WARN_CXXFLAGS@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ ---- a/gold/configure -+++ b/gold/configure -@@ -609,6 +609,7 @@ GOLD_LDFLAGS - WARN_CXXFLAGS - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - IFUNC_STATIC_FALSE - IFUNC_STATIC_TRUE -@@ -6723,8 +6724,12 @@ fi - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -6769,6 +6774,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -6784,6 +6819,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -6797,25 +6833,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -6826,6 +6869,7 @@ fi - - - -+ - - - ---- a/gold/testsuite/Makefile.in -+++ b/gold/testsuite/Makefile.in -@@ -2568,6 +2568,7 @@ TARGETOBJS = @TARGETOBJS@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_CXXFLAGS = @WARN_CXXFLAGS@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ ---- a/gprof/Makefile.in -+++ b/gprof/Makefile.in -@@ -267,6 +267,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - abs_builddir = @abs_builddir@ ---- a/gprof/configure -+++ b/gprof/configure -@@ -604,6 +604,7 @@ LTLIBOBJS - LIBOBJS - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - GENINSRC_NEVER_FALSE - GENINSRC_NEVER_TRUE -@@ -10901,7 +10902,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10904 "configure" -+#line 10905 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11007,7 +11008,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11010 "configure" -+#line 11011 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -12101,8 +12102,12 @@ fi - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -12147,6 +12152,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -12162,6 +12197,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -12175,25 +12211,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -12204,6 +12247,7 @@ fi - - - -+ - - - ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -354,6 +354,7 @@ TESTBFDLIB = @TESTBFDLIB@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi` -@@ -508,7 +509,7 @@ CXX_FOR_TARGET = ` \ - fi` - - --# Strip out sanitization options as they require special host libraries. -+# Strip out sanitization options as we want to test building binaries without any extra paraphernalia - CFLAGS_FOR_TARGET = `echo $(CFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` - CXXFLAGS_FOR_TARGET = `echo $(CXXFLAGS) | sed -e 's/-fsanitize=address//g' -e 's/-fsanitize=undefined//g'` - info_TEXINFOS = ld.texinfo ---- a/ld/configure -+++ b/ld/configure -@@ -646,6 +646,7 @@ LIBINTL - USE_NLS - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - installed_linker - install_as_default -@@ -11723,7 +11724,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11726 "configure" -+#line 11727 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11829,7 +11830,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11832 "configure" -+#line 11833 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -15558,8 +15559,12 @@ fi - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -15604,6 +15609,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -15619,6 +15654,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -15632,25 +15668,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -15661,6 +15704,7 @@ fi - - - -+ - - - ---- a/opcodes/Makefile.in -+++ b/opcodes/Makefile.in -@@ -267,6 +267,7 @@ STRIP = @STRIP@ - USE_NLS = @USE_NLS@ - VERSION = @VERSION@ - WARN_CFLAGS = @WARN_CFLAGS@ -+WARN_CFLAGS_FOR_BUILD = @WARN_CFLAGS_FOR_BUILD@ - WARN_WRITE_STRINGS = @WARN_WRITE_STRINGS@ - XGETTEXT = @XGETTEXT@ - abs_builddir = @abs_builddir@ ---- a/opcodes/configure -+++ b/opcodes/configure -@@ -643,6 +643,7 @@ MAINTAINER_MODE_TRUE - NO_WMISSING_FIELD_INITIALIZERS - WARN_WRITE_STRINGS - NO_WERROR -+WARN_CFLAGS_FOR_BUILD - WARN_CFLAGS - OTOOL64 - OTOOL -@@ -11150,7 +11151,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11153 "configure" -+#line 11154 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11256,7 +11257,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 11259 "configure" -+#line 11260 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11508,8 +11509,12 @@ fi - # Set the 'development' global. - . $srcdir/../bfd/development.sh - -+# Set acp_cpp_for_build variable -+ac_cpp_for_build="$CC_FOR_BUILD -E $CPPFLAGS_FOR_BUILD" -+ - # Default set of GCC warnings to enable. - GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" -+GCC_WARN_CFLAGS_FOR_BUILD="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" - - # Add -Wshadow if the compiler is a sufficiently recent version of GCC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -11554,6 +11559,36 @@ fi - rm -f conftest* - - -+# Verify CC_FOR_BUILD to be compatible with waring flags -+ -+# Add -Wshadow if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-3]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wshadow" -+fi -+rm -f conftest* -+ -+ -+# Add -Wstack-usage if the compiler is a sufficiently recent version of GCC. -+cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+__GNUC__ -+_ACEOF -+if (eval "$ac_cpp_for_build conftest.$ac_ext") 2>&5 | -+ $EGREP "^[0-4]$" >/dev/null 2>&1; then : -+ -+else -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wstack-usage=262144" -+fi -+rm -f conftest* -+ -+ - # Check whether --enable-werror was given. - if test "${enable_werror+set}" = set; then : - enableval=$enable_werror; case "${enableval}" in -@@ -11569,6 +11604,7 @@ case "${host}" in - *-*-mingw32*) - if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Wno-format" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Wno-format" - fi - ;; - *) ;; -@@ -11582,25 +11618,32 @@ fi - NO_WERROR= - if test "${ERROR_ON_WARNING}" = yes ; then - GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" -+ GCC_WARN_CFLAGS_FOR_BUILD="$GCC_WARN_CFLAGS_FOR_BUILD -Werror" - NO_WERROR="-Wno-error" - fi - - if test "${GCC}" = yes ; then - WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}" - fi - - # Check whether --enable-build-warnings was given. - if test "${enable_build_warnings+set}" = set; then : - enableval=$enable_build_warnings; case "${enableval}" in -- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; -+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD}";; - no) if test "${GCC}" = yes ; then - WARN_CFLAGS="-w" -+ WARN_CFLAGS_FOR_BUILD="-w" - fi;; - ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; -+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}" -+ WARN_CFLAGS_FOR_BUILD="${GCC_WARN_CFLAGS_FOR_BUILD} ${t}";; - *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` -- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; -- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; -+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}" -+ WARN_CFLAGS_FOR_BUILD="${t} ${GCC_WARN_CFLAGS_FOR_BUILD}";; -+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"` -+ WARN_CFLAGS_FOR_BUILD=`echo "${enableval}" | sed -e "s/,/ /g"`;; - esac - fi - -@@ -11611,6 +11654,7 @@ fi - - - -+ - - - ac_ext=c diff --git a/package/lean/baidupcs-web/Makefile b/package/lean/baidupcs-web/Makefile index 0540b060d8..7f00fbb6f7 100644 --- a/package/lean/baidupcs-web/Makefile +++ b/package/lean/baidupcs-web/Makefile @@ -30,7 +30,7 @@ endef STRIP:=true ifeq ($(ARCH),i386) - PKG_ARCH_BAIDUPCS-WEB:=86 + PKG_ARCH_BAIDUPCS-WEB:=386 endif ifeq ($(ARCH),x86_64) diff --git a/package/lean/luci-app-ssr-plus/Makefile b/package/lean/luci-app-ssr-plus/Makefile index 32db9ce6e4..1572aa4f4b 100644 --- a/package/lean/luci-app-ssr-plus/Makefile +++ b/package/lean/luci-app-ssr-plus/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-ssr-plus PKG_VERSION:=180 -PKG_RELEASE:=2 +PKG_RELEASE:=3 include $(INCLUDE_DIR)/package.mk diff --git a/package/lean/luci-app-ssr-plus/root/etc/config/shadowsocksr b/package/lean/luci-app-ssr-plus/root/etc/config/shadowsocksr index 4329c7839e..e0cfa78f10 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/config/shadowsocksr +++ b/package/lean/luci-app-ssr-plus/root/etc/config/shadowsocksr @@ -13,7 +13,7 @@ config global option gfwlist_url 'https://cdn.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt' option chnroute_url 'https://ispip.clang.cn/all_cn.txt' option nfip_url 'https://cdn.jsdelivr.net/gh/QiuSimons/Netflix_IP/getflix.txt' - option adblock_url 'https://gitee.com/privacy-protection-tools/anti-ad/raw/master/anti-ad-for-dnsmasq.conf' + option adblock_url 'https://anti-ad.net/anti-ad-for-dnsmasq.conf' option threads '0' option global_server 'disable' option netflix_server 'nil' diff --git a/package/lean/luci-app-ssr-plus/root/etc/ssr/china_ssr.txt b/package/lean/luci-app-ssr-plus/root/etc/ssr/china_ssr.txt index 5c8eba7e29..e8079c796a 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/ssr/china_ssr.txt +++ b/package/lean/luci-app-ssr-plus/root/etc/ssr/china_ssr.txt @@ -3669,7 +3669,6 @@ 103.110.156.0/22 103.110.188.0/22 103.110.204.0/22 -103.111.38.0/23 103.111.64.0/22 103.111.172.0/22 103.111.252.0/22 @@ -4061,6 +4060,15 @@ 103.152.250.0/23 103.153.4.0/23 103.153.36.0/23 +103.153.98.0/23 +103.153.100.0/23 +103.153.114.0/23 +103.153.122.0/23 +103.153.128.0/23 +103.153.132.0/23 +103.153.138.0/23 +103.153.146.0/23 +103.153.160.0/23 103.192.0.0/22 103.192.4.0/22 103.192.8.0/22 @@ -4461,7 +4469,6 @@ 103.215.116.0/22 103.215.120.0/22 103.215.140.0/22 -103.215.184.0/22 103.215.228.0/22 103.216.4.0/22 103.216.8.0/22 @@ -5424,7 +5431,6 @@ 116.204.216.0/22 116.204.232.0/22 116.204.236.0/22 -116.204.244.0/22 116.205.0.0/16 116.206.92.0/22 116.206.176.0/22 @@ -6119,7 +6125,6 @@ 157.119.12.0/22 157.119.16.0/22 157.119.28.0/22 -157.119.68.0/22 157.119.132.0/22 157.119.136.0/22 157.119.140.0/22 diff --git a/package/lean/luci-app-ssr-plus/root/etc/ssr/gfw_list.conf b/package/lean/luci-app-ssr-plus/root/etc/ssr/gfw_list.conf index 83f93ce5af..7f787ddbaa 100644 --- a/package/lean/luci-app-ssr-plus/root/etc/ssr/gfw_list.conf +++ b/package/lean/luci-app-ssr-plus/root/etc/ssr/gfw_list.conf @@ -326,8 +326,6 @@ server=/airvpn.org/127.0.0.1#5335 ipset=/airvpn.org/gfwlist server=/aisex.com/127.0.0.1#5335 ipset=/aisex.com/gfwlist -server=/aiss.anws.gov.tw/127.0.0.1#5335 -ipset=/aiss.anws.gov.tw/gfwlist server=/ait.org.tw/127.0.0.1#5335 ipset=/ait.org.tw/gfwlist server=/aiweiwei.com/127.0.0.1#5335 @@ -2064,8 +2062,6 @@ server=/data-vocabulary.org/127.0.0.1#5335 ipset=/data-vocabulary.org/gfwlist server=/data.flurry.com/127.0.0.1#5335 ipset=/data.flurry.com/gfwlist -server=/data.gov.tw/127.0.0.1#5335 -ipset=/data.gov.tw/gfwlist server=/daum.net/127.0.0.1#5335 ipset=/daum.net/gfwlist server=/david-kilgour.com/127.0.0.1#5335 @@ -2560,8 +2556,6 @@ server=/entnt.com/127.0.0.1#5335 ipset=/entnt.com/gfwlist server=/environment.google/127.0.0.1#5335 ipset=/environment.google/gfwlist -server=/epa.gov.tw/127.0.0.1#5335 -ipset=/epa.gov.tw/gfwlist server=/epac.to/127.0.0.1#5335 ipset=/epac.to/gfwlist server=/episcopalchurch.org/127.0.0.1#5335 @@ -2670,6 +2664,8 @@ server=/eurekavpt.com/127.0.0.1#5335 ipset=/eurekavpt.com/gfwlist server=/euronews.com/127.0.0.1#5335 ipset=/euronews.com/gfwlist +server=/evchk.wikia.org/127.0.0.1#5335 +ipset=/evchk.wikia.org/gfwlist server=/evschool.net/127.0.0.1#5335 ipset=/evschool.net/gfwlist server=/exblog.jp/127.0.0.1#5335 @@ -2710,8 +2706,6 @@ server=/ezpeer.com/127.0.0.1#5335 ipset=/ezpeer.com/gfwlist server=/ezua.com/127.0.0.1#5335 ipset=/ezua.com/gfwlist -server=/fa.gov.tw/127.0.0.1#5335 -ipset=/fa.gov.tw/gfwlist server=/facebook.br/127.0.0.1#5335 ipset=/facebook.br/gfwlist server=/facebook.com/127.0.0.1#5335 @@ -2876,8 +2870,6 @@ server=/fc2china.com/127.0.0.1#5335 ipset=/fc2china.com/gfwlist server=/fc2cn.com/127.0.0.1#5335 ipset=/fc2cn.com/gfwlist -server=/fda.gov.tw/127.0.0.1#5335 -ipset=/fda.gov.tw/gfwlist server=/fdc64.de/127.0.0.1#5335 ipset=/fdc64.de/gfwlist server=/fdc64.org/127.0.0.1#5335 @@ -4186,6 +4178,8 @@ server=/hotshame.com/127.0.0.1#5335 ipset=/hotshame.com/gfwlist server=/hotspotshield.com/127.0.0.1#5335 ipset=/hotspotshield.com/gfwlist +server=/hottg.com/127.0.0.1#5335 +ipset=/hottg.com/gfwlist server=/hotvpn.com/127.0.0.1#5335 ipset=/hotvpn.com/gfwlist server=/hougaige.com/127.0.0.1#5335 @@ -4194,8 +4188,6 @@ server=/howtoforge.com/127.0.0.1#5335 ipset=/howtoforge.com/gfwlist server=/hoxx.com/127.0.0.1#5335 ipset=/hoxx.com/gfwlist -server=/hpa.gov.tw/127.0.0.1#5335 -ipset=/hpa.gov.tw/gfwlist server=/hqcdp.org/127.0.0.1#5335 ipset=/hqcdp.org/gfwlist server=/hqjapanesesex.com/127.0.0.1#5335 @@ -4464,8 +4456,6 @@ server=/imkev.com/127.0.0.1#5335 ipset=/imkev.com/gfwlist server=/imlive.com/127.0.0.1#5335 ipset=/imlive.com/gfwlist -server=/immigration.gov.tw/127.0.0.1#5335 -ipset=/immigration.gov.tw/gfwlist server=/immoral.jp/127.0.0.1#5335 ipset=/immoral.jp/gfwlist server=/impact.org.au/127.0.0.1#5335 @@ -4610,8 +4600,6 @@ server=/isuntv.com/127.0.0.1#5335 ipset=/isuntv.com/gfwlist server=/itaboo.info/127.0.0.1#5335 ipset=/itaboo.info/gfwlist -server=/itaiwan.gov.tw/127.0.0.1#5335 -ipset=/itaiwan.gov.tw/gfwlist server=/italiatibet.org/127.0.0.1#5335 ipset=/italiatibet.org/gfwlist server=/itasoftware.com/127.0.0.1#5335 @@ -5576,8 +5564,6 @@ server=/mixx.com/127.0.0.1#5335 ipset=/mixx.com/gfwlist server=/mizzmona.com/127.0.0.1#5335 ipset=/mizzmona.com/gfwlist -server=/mjib.gov.tw/127.0.0.1#5335 -ipset=/mjib.gov.tw/gfwlist server=/mk5000.com/127.0.0.1#5335 ipset=/mk5000.com/gfwlist server=/mlcool.com/127.0.0.1#5335 @@ -5604,12 +5590,8 @@ server=/moby.to/127.0.0.1#5335 ipset=/moby.to/gfwlist server=/mobypicture.com/127.0.0.1#5335 ipset=/mobypicture.com/gfwlist -server=/moeaic.gov.tw/127.0.0.1#5335 -ipset=/moeaic.gov.tw/gfwlist server=/moeerolibrary.com/127.0.0.1#5335 ipset=/moeerolibrary.com/gfwlist -server=/mofa.gov.tw/127.0.0.1#5335 -ipset=/mofa.gov.tw/gfwlist server=/mofaxiehui.com/127.0.0.1#5335 ipset=/mofaxiehui.com/gfwlist server=/mofos.com/127.0.0.1#5335 @@ -5622,8 +5604,6 @@ server=/mohu.ml/127.0.0.1#5335 ipset=/mohu.ml/gfwlist server=/mojim.com/127.0.0.1#5335 ipset=/mojim.com/gfwlist -server=/mol.gov.tw/127.0.0.1#5335 -ipset=/mol.gov.tw/gfwlist server=/molihua.org/127.0.0.1#5335 ipset=/molihua.org/gfwlist server=/mondex.org/127.0.0.1#5335 @@ -5718,8 +5698,6 @@ server=/muzi.com/127.0.0.1#5335 ipset=/muzi.com/gfwlist server=/muzi.net/127.0.0.1#5335 ipset=/muzi.net/gfwlist -server=/mvdis.gov.tw/127.0.0.1#5335 -ipset=/mvdis.gov.tw/gfwlist server=/mvg.jp/127.0.0.1#5335 ipset=/mvg.jp/gfwlist server=/mx981.com/127.0.0.1#5335 @@ -5852,8 +5830,6 @@ server=/naol.ca/127.0.0.1#5335 ipset=/naol.ca/gfwlist server=/naol.cc/127.0.0.1#5335 ipset=/naol.cc/gfwlist -server=/nat.gov.tw/127.0.0.1#5335 -ipset=/nat.gov.tw/gfwlist server=/nat.moe/127.0.0.1#5335 ipset=/nat.moe/gfwlist server=/national-lottery.co.uk/127.0.0.1#5335 @@ -5994,8 +5970,6 @@ server=/ngensis.com/127.0.0.1#5335 ipset=/ngensis.com/gfwlist server=/nhentai.net/127.0.0.1#5335 ipset=/nhentai.net/gfwlist -server=/nhi.gov.tw/127.0.0.1#5335 -ipset=/nhi.gov.tw/gfwlist server=/nhk-ondemand.jp/127.0.0.1#5335 ipset=/nhk-ondemand.jp/gfwlist server=/nic.cz.cc/127.0.0.1#5335 @@ -6070,8 +6044,6 @@ server=/noypf.com/127.0.0.1#5335 ipset=/noypf.com/gfwlist server=/npa.go.jp/127.0.0.1#5335 ipset=/npa.go.jp/gfwlist -server=/npa.gov.tw/127.0.0.1#5335 -ipset=/npa.gov.tw/gfwlist server=/npnt.me/127.0.0.1#5335 ipset=/npnt.me/gfwlist server=/nps.gov/127.0.0.1#5335 @@ -6098,14 +6070,6 @@ server=/ns2.name/127.0.0.1#5335 ipset=/ns2.name/gfwlist server=/ns3.name/127.0.0.1#5335 ipset=/ns3.name/gfwlist -server=/nsc.gov.tw/127.0.0.1#5335 -ipset=/nsc.gov.tw/gfwlist -server=/ntbk.gov.tw/127.0.0.1#5335 -ipset=/ntbk.gov.tw/gfwlist -server=/ntbna.gov.tw/127.0.0.1#5335 -ipset=/ntbna.gov.tw/gfwlist -server=/ntbt.gov.tw/127.0.0.1#5335 -ipset=/ntbt.gov.tw/gfwlist server=/ntd.tv/127.0.0.1#5335 ipset=/ntd.tv/gfwlist server=/ntdtv.ca/127.0.0.1#5335 @@ -6122,8 +6086,6 @@ server=/ntdtvla.com/127.0.0.1#5335 ipset=/ntdtvla.com/gfwlist server=/ntrfun.com/127.0.0.1#5335 ipset=/ntrfun.com/gfwlist -server=/ntsna.gov.tw/127.0.0.1#5335 -ipset=/ntsna.gov.tw/gfwlist server=/nubiles.net/127.0.0.1#5335 ipset=/nubiles.net/gfwlist server=/nudezz.com/127.0.0.1#5335 @@ -6434,8 +6396,6 @@ server=/pbxes.org/127.0.0.1#5335 ipset=/pbxes.org/gfwlist server=/pcanywhere.net/127.0.0.1#5335 ipset=/pcanywhere.net/gfwlist -server=/pcc.gov.tw/127.0.0.1#5335 -ipset=/pcc.gov.tw/gfwlist server=/pcdvd.com.tw/127.0.0.1#5335 ipset=/pcdvd.com.tw/gfwlist server=/pchome.com.tw/127.0.0.1#5335 @@ -7744,8 +7704,6 @@ server=/startpage.com/127.0.0.1#5335 ipset=/startpage.com/gfwlist server=/startuplivingchina.com/127.0.0.1#5335 ipset=/startuplivingchina.com/gfwlist -server=/stat.gov.tw/127.0.0.1#5335 -ipset=/stat.gov.tw/gfwlist server=/static-economist.com/127.0.0.1#5335 ipset=/static-economist.com/gfwlist server=/static.shemalez.com/127.0.0.1#5335 @@ -7922,8 +7880,6 @@ server=/taaze.tw/127.0.0.1#5335 ipset=/taaze.tw/gfwlist server=/tabtter.jp/127.0.0.1#5335 ipset=/tabtter.jp/gfwlist -server=/tacc.cwb.gov.tw/127.0.0.1#5335 -ipset=/tacc.cwb.gov.tw/gfwlist server=/tacem.org/127.0.0.1#5335 ipset=/tacem.org/gfwlist server=/taconet.com.tw/127.0.0.1#5335 @@ -7938,8 +7894,6 @@ server=/tagwalk.com/127.0.0.1#5335 ipset=/tagwalk.com/gfwlist server=/tahr.org.tw/127.0.0.1#5335 ipset=/tahr.org.tw/gfwlist -server=/taipei.gov.tw/127.0.0.1#5335 -ipset=/taipei.gov.tw/gfwlist server=/taipeisociety.org/127.0.0.1#5335 ipset=/taipeisociety.org/gfwlist server=/taiwan-sex.com/127.0.0.1#5335 @@ -7952,8 +7906,6 @@ server=/taiwandaily.net/127.0.0.1#5335 ipset=/taiwandaily.net/gfwlist server=/taiwandc.org/127.0.0.1#5335 ipset=/taiwandc.org/gfwlist -server=/taiwanjobs.gov.tw/127.0.0.1#5335 -ipset=/taiwanjobs.gov.tw/gfwlist server=/taiwanjustice.com/127.0.0.1#5335 ipset=/taiwanjustice.com/gfwlist server=/taiwanjustice.net/127.0.0.1#5335 @@ -8064,10 +8016,6 @@ server=/techviz.net/127.0.0.1#5335 ipset=/techviz.net/gfwlist server=/teck.in/127.0.0.1#5335 ipset=/teck.in/gfwlist -server=/teco-hk.org/127.0.0.1#5335 -ipset=/teco-hk.org/gfwlist -server=/teco-mo.org/127.0.0.1#5335 -ipset=/teco-mo.org/gfwlist server=/teddysun.com/127.0.0.1#5335 ipset=/teddysun.com/gfwlist server=/teeniefuck.net/127.0.0.1#5335 @@ -8106,10 +8054,10 @@ server=/textnow.me/127.0.0.1#5335 ipset=/textnow.me/gfwlist server=/tfhub.dev/127.0.0.1#5335 ipset=/tfhub.dev/gfwlist +server=/tgstat.com/127.0.0.1#5335 +ipset=/tgstat.com/gfwlist server=/thaicn.com/127.0.0.1#5335 ipset=/thaicn.com/gfwlist -server=/thb.gov.tw/127.0.0.1#5335 -ipset=/thb.gov.tw/gfwlist server=/theatrum-belli.com/127.0.0.1#5335 ipset=/theatrum-belli.com/gfwlist server=/thebcomplex.com/127.0.0.1#5335 @@ -8410,8 +8358,6 @@ server=/tinychat.com/127.0.0.1#5335 ipset=/tinychat.com/gfwlist server=/tinypaste.com/127.0.0.1#5335 ipset=/tinypaste.com/gfwlist -server=/tipo.gov.tw/127.0.0.1#5335 -ipset=/tipo.gov.tw/gfwlist server=/tistory.com/127.0.0.1#5335 ipset=/tistory.com/gfwlist server=/tkcs-collins.com/127.0.0.1#5335 @@ -8534,6 +8480,8 @@ server=/traffichaus.com/127.0.0.1#5335 ipset=/traffichaus.com/gfwlist server=/transparency.org/127.0.0.1#5335 ipset=/transparency.org/gfwlist +server=/travelinkcard.com/127.0.0.1#5335 +ipset=/travelinkcard.com/gfwlist server=/treemall.com.tw/127.0.0.1#5335 ipset=/treemall.com.tw/gfwlist server=/trendsmap.com/127.0.0.1#5335 @@ -9408,8 +9356,6 @@ server=/waveprotocol.org/127.0.0.1#5335 ipset=/waveprotocol.org/gfwlist server=/waymo.com/127.0.0.1#5335 ipset=/waymo.com/gfwlist -server=/wda.gov.tw/127.0.0.1#5335 -ipset=/wda.gov.tw/gfwlist server=/wdf5.com/127.0.0.1#5335 ipset=/wdf5.com/gfwlist server=/wearehairy.com/127.0.0.1#5335 diff --git a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules index 9dcf96803e..3f0aa2d840 100755 --- a/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules +++ b/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-rules @@ -243,7 +243,9 @@ tp_rule() { $ipt -A SS_SPEC_TPROXY -p udp $PROXY_PORTS -m set --match-set china dst \ -j TPROXY --on-port "$LOCAL_PORT" --tproxy-mark 0x01/0x01 ;; - all) $ipt -A SS_SPEC_TPROXY -p udp $PROXY_PORTS -j TPROXY --on-port "$LOCAL_PORT" --tproxy-mark 0x01/0x01 ;; + all) + $ipt -A SS_SPEC_TPROXY -p udp $PROXY_PORTS -j TPROXY --on-port "$LOCAL_PORT" --tproxy-mark 0x01/0x01 + ;; esac $ipt -I PREROUTING 1 ${IFNAME:+-i $IFNAME} -p udp $EXT_ARGS $MATCH_SET \ -m comment --comment "$TAG" -j SS_SPEC_TPROXY diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile index 081429db62..b656abad58 100644 --- a/package/lean/v2ray/Makefile +++ b/package/lean/v2ray/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2ray -PKG_VERSION:=4.26.0 +PKG_VERSION:=4.27.0 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-core-$(PKG_VERSION) PKG_SOURCE:=v2ray-core-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2fly/v2ray-core/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=233e5acaf69a612c130655fea21291ffcce81a52771310ef97871b641e5f29d6 +PKG_HASH:=5e1b0146953398a5422611b20f5e62c3a9c3efd62cd42295762f6f39d8eff31e PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/package/lienol/brook/Makefile b/package/lienol/brook/Makefile index 9a8bf46555..b6abc508ae 100644 --- a/package/lienol/brook/Makefile +++ b/package/lienol/brook/Makefile @@ -35,7 +35,7 @@ ifeq ($(ARCH),aarch64) endif PKG_NAME:=brook -PKG_VERSION:=20200701 +PKG_VERSION:=20200801 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=brook$(PKG_ARCH_BROOK) diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile index ca040073f8..7b70ac80f7 100644 --- a/package/lienol/luci-app-passwall/Makefile +++ b/package/lienol/luci-app-passwall/Makefile @@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-passwall PKG_VERSION:=3.9 -PKG_RELEASE:=29 -PKG_DATE:=20200802 +PKG_RELEASE:=31 +PKG_DATE:=20200807 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua index 3ecc304853..6a44a4cf4b 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/api/api.lua @@ -43,6 +43,14 @@ function chmod_755(file) end end +function get_customed_path(e) + return uci_get_type("global_app", e .. "_file") +end + +function is_finded(e) + return luci.sys.exec('type -t -p "%s/%s" -p "/usr/bin/v2ray/%s" "%s"' % {get_customed_path(e), e, e, e}) ~= "" and true or false +end + function get_v2ray_path() local path = uci_get_type("global_app", "v2ray_file") return path .. "/v2ray" diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua index 22464db365..7fb2112806 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua @@ -1,18 +1,8 @@ local o = require "luci.dispatcher" -local sys = require "luci.sys" -local ipkg = require("luci.model.ipkg") local uci = require"luci.model.uci".cursor() -local _api = require "luci.model.cbi.passwall.api.api" +local api = require "luci.model.cbi.passwall.api.api" local appname = "passwall" -local function is_installed(e) return ipkg.installed(e) end - -local function is_finded(e) - return - sys.exec("find /usr/*bin -iname " .. e .. " -type f") ~= "" and true or - false -end - local nodes_table = {} uci:foreach(appname, "nodes", function(e) if e.type and e.remarks then @@ -127,20 +117,19 @@ o:value("210.2.4.8", "210.2.4.8 (CNNIC DNS)") o:value("180.76.76.76", "180.76.76.76 (" .. translate("Baidu") .. "DNS)") ---- DNS Forward Mode -o = s:taboption("DNS", ListValue, "dns_mode", translate("DNS Mode")) +o = s:taboption("DNS", Value, "dns_mode", translate("DNS Mode")) -- o.description = translate("if has problem, please try another mode.
if you use no patterns are used, DNS of wan will be used by default as upstream of dnsmasq.") o.rmempty = false o:reset_values() -if is_finded("chinadns-ng") then +if api.is_finded("chinadns-ng") then o:value("chinadns-ng", "ChinaDNS-NG") end -if is_installed("pdnsd") or is_installed("pdnsd-alt") or is_finded("pdnsd") then +if api.is_finded("pdnsd") then o:value("pdnsd", "pdnsd") end -if is_finded("dns2socks") then +if api.is_finded("dns2socks") then o:value("dns2socks", "dns2socks") end -o:value("local_7913", translate("Use local port 7913 as DNS")) o:value("nonuse", translate("No patterns are used")) ---- Upstream trust DNS Server for ChinaDNS-NG @@ -148,17 +137,17 @@ o = s:taboption("DNS", ListValue, "up_trust_chinadns_ng_dns", translate("Upstream trust DNS Server for ChinaDNS-NG") .. "(UDP)") -- o.description = translate("You can use other resolving DNS services as trusted DNS, Example: dns2socks, dns-forwarder... 127.0.0.1#5353
Only use two at most, english comma separation, If you do not fill in the # and the following port, you are using port 53.") o.default = "pdnsd" -if is_installed("pdnsd") or is_installed("pdnsd-alt") or is_finded("pdnsd") then +if api.is_finded("pdnsd") then o:value("pdnsd", "pdnsd + " .. translate("Use TCP Node Resolve DNS")) end -if is_finded("dns2socks") then +if api.is_finded("dns2socks") then o:value("dns2socks", "dns2socks") end o:value("udp", translate("Use UDP Node Resolve DNS")) o:depends("dns_mode", "chinadns-ng") ---- Use TCP Node Resolve DNS ---[[ if is_installed("pdnsd") or is_installed("pdnsd-alt") or is_finded("pdnsd") then +--[[ if api.is_finded("pdnsd") then o = s:taboption("DNS", Flag, "use_tcp_node_resolve_dns", translate("Use TCP Node Resolve DNS")) o.description = translate("If checked, DNS is resolved using the TCP node.") o.default = 1 @@ -247,7 +236,7 @@ s.anonymous = true s.addremove = true s.template = "cbi/tblsection" function s.create(e, t) - TypedSection.create(e, _api.gen_uuid()) + TypedSection.create(e, api.gen_uuid()) end o = s:option(DummyValue, "status", translate("Status")) @@ -266,6 +255,7 @@ end for k, v in pairs(nodes_table) do o:value(v.id, v.remarks) end o = s:option(Value, "port", translate("Listen Port")) +o.default = 9050 o.datatype = "port" o.rmempty = false diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua index 76ed33680c..00110afd25 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua @@ -1,20 +1,8 @@ local d = require "luci.dispatcher" -local ipkg = require("luci.model.ipkg") local uci = require"luci.model.uci".cursor() local api = require "luci.model.cbi.passwall.api.api" - local appname = "passwall" -local function get_customed_path(e) - return api.uci_get_type("global_app", e .. "_file") -end - -local function is_finded(e) - return luci.sys.exec("find /usr/*bin %s -iname %s -type f" % {get_customed_path(e), e}) ~= "" and true or false -end - -local function is_installed(e) return ipkg.installed(e) end - local ss_encrypt_method_list = { "rc4-md5", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", "bf-cfb", "camellia-128-cfb", @@ -82,25 +70,25 @@ remarks.default = translate("Remarks") remarks.rmempty = false type = s:option(ListValue, "type", translate("Type")) -if is_installed("ipt2socks") or is_finded("ipt2socks") then +if api.is_finded("ipt2socks") then type:value("Socks", translate("Socks")) end -if is_finded("ss-redir") then +if api.is_finded("ss-redir") then type:value("SS", translate("Shadowsocks")) end -if is_finded("ssr-redir") then +if api.is_finded("ssr-redir") then type:value("SSR", translate("ShadowsocksR")) end -if is_installed("v2ray") or is_finded("v2ray") then +if api.is_finded("v2ray") then type:value("V2ray", translate("V2ray")) end -if is_installed("brook") or is_finded("brook") then +if api.is_finded("brook") then type:value("Brook", translate("Brook")) end -if is_installed("trojan-plus") or is_finded("trojan-plus") then - type:value("Trojan", translate("Trojan-Plus")) +if api.is_finded("trojan-plus") or api.is_finded("trojan") then + type:value("Trojan-Plus", translate("Trojan-Plus")) end -if is_installed("trojan-go") or is_finded("trojan-go") then +if api.is_finded("trojan-go") then type:value("Trojan-Go", translate("Trojan-Go")) end @@ -166,7 +154,7 @@ address:depends({ type = "V2ray", protocol = "http" }) address:depends({ type = "V2ray", protocol = "socks" }) address:depends({ type = "V2ray", protocol = "shadowsocks" }) address:depends("type", "Brook") -address:depends("type", "Trojan") +address:depends("type", "Trojan-Plus") address:depends("type", "Trojan-Go") --[[ @@ -180,7 +168,7 @@ use_ipv6:depends({ type = "V2ray", protocol = "http" }) use_ipv6:depends({ type = "V2ray", protocol = "socks" }) use_ipv6:depends({ type = "V2ray", protocol = "shadowsocks" }) use_ipv6:depends("type", "Brook") -use_ipv6:depends("type", "Trojan") +use_ipv6:depends("type", "Trojan-Plus") use_ipv6:depends("type", "Trojan-Go") --]] @@ -195,7 +183,7 @@ port:depends({ type = "V2ray", protocol = "http" }) port:depends({ type = "V2ray", protocol = "socks" }) port:depends({ type = "V2ray", protocol = "shadowsocks" }) port:depends("type", "Brook") -port:depends("type", "Trojan") +port:depends("type", "Trojan-Plus") port:depends("type", "Trojan-Go") username = s:option(Value, "username", translate("Username")) @@ -209,7 +197,7 @@ password:depends("type", "Socks") password:depends("type", "SS") password:depends("type", "SSR") password:depends("type", "Brook") -password:depends("type", "Trojan") +password:depends("type", "Trojan-Plus") password:depends("type", "Trojan-Go") password:depends("protocol", "http") password:depends("protocol", "socks") @@ -260,13 +248,13 @@ tcp_fast_open:value("false") tcp_fast_open:value("true") tcp_fast_open:depends("type", "SS") tcp_fast_open:depends("type", "SSR") -tcp_fast_open:depends("type", "Trojan") +tcp_fast_open:depends("type", "Trojan-Plus") tcp_fast_open:depends("type", "Trojan-Go") ss_plugin = s:option(ListValue, "ss_plugin", translate("plugin")) ss_plugin:value("none", translate("none")) -if is_finded("v2ray-plugin") then ss_plugin:value("v2ray-plugin") end -if is_finded("obfs-local") then ss_plugin:value("obfs-local") end +if api.is_finded("v2ray-plugin") then ss_plugin:value("v2ray-plugin") end +if api.is_finded("obfs-local") then ss_plugin:value("obfs-local") end ss_plugin:depends("type", "SS") ss_plugin_opts = s:option(Value, "ss_plugin_opts", translate("opts")) @@ -310,7 +298,7 @@ stream_security.default = "tls" stream_security:depends("protocol", "vmess") stream_security:depends("protocol", "socks") stream_security:depends("protocol", "shadowsocks") -stream_security:depends("type", "Trojan") +stream_security:depends("type", "Trojan-Plus") stream_security:depends("type", "Trojan-Go") stream_security.validate = function(self, value) if value == "none" and type:formvalue(arg[1]) == "Trojan" then diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua index 1c4948e388..dbb6b7622c 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/api/app.lua @@ -79,7 +79,7 @@ local function start() elseif type == "V2ray" then config = require("luci.model.cbi.passwall.server.api.v2ray").gen_config(user) bin = ln_start(_api.get_v2ray_path(), "v2ray", "-config=" .. config_file) - elseif type == "Trojan" then + elseif type == "Trojan-Plus" then config = require("luci.model.cbi.passwall.server.api.trojan").gen_config(user) bin = ln_start("/usr/sbin/trojan-plus", "trojan-plus", "-c " .. config_file) elseif type == "Trojan-Go" then @@ -130,4 +130,4 @@ if action then elseif action == "stop" then stop() end -end +end \ No newline at end of file diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua index eca29b7291..4b8613b241 100644 --- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua +++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/server/user.lua @@ -1,17 +1,7 @@ local d = require "luci.dispatcher" -local ipkg = require("luci.model.ipkg") local uci = require"luci.model.uci".cursor() local api = require "luci.model.cbi.passwall.api.api" -local function is_finded(e) - local function get_customed_path(e) - return api.uci_get_type("global_app", e .. "_file") - end - return luci.sys.exec("find /usr/*bin %s -iname %s -type f" % {get_customed_path(e), e}) ~= "" and true or false -end - -local function is_installed(e) return ipkg.installed(e) end - local ssr_encrypt_method_list = { "none", "table", "rc2-cfb", "rc4", "rc4-md5", "rc4-md5-6", "aes-128-cfb", "aes-192-cfb", "aes-256-cfb", "aes-128-ctr", "aes-192-ctr", "aes-256-ctr", @@ -70,19 +60,19 @@ remarks.default = translate("Remarks") remarks.rmempty = false type = s:option(ListValue, "type", translate("Type")) -if is_finded("ssr-server") then +if api.is_finded("ssr-server") then type:value("SSR", translate("ShadowsocksR")) end -if is_installed("v2ray") or is_finded("v2ray") then +if api.is_finded("v2ray") then type:value("V2ray", translate("V2ray")) end -if is_installed("brook") or is_finded("brook") then +if api.is_finded("brook") then type:value("Brook", translate("Brook")) end -if is_installed("trojan-plus") or is_finded("trojan-plus") then - type:value("Trojan", translate("Trojan-Plus")) +if api.is_finded("trojan-plus") or api.is_finded("trojan") then + type:value("Trojan-Plus", translate("Trojan-Plus")) end -if is_installed("trojan-go") or is_finded("trojan-go") then +if api.is_finded("trojan-go") then type:value("Trojan-Go", translate("Trojan-Go")) end @@ -115,7 +105,7 @@ password = s:option(Value, "password", translate("Password")) password.password = true password:depends("type", "SSR") password:depends("type", "Brook") -password:depends("type", "Trojan") +password:depends("type", "Trojan-Plus") password:depends({ type = "V2ray", protocol = "http" }) password:depends({ type = "V2ray", protocol = "socks" }) password:depends({ type = "V2ray", protocol = "shadowsocks" }) @@ -170,7 +160,7 @@ tcp_fast_open = s:option(ListValue, "tcp_fast_open", translate("TCP Fast Open"), tcp_fast_open:value("false") tcp_fast_open:value("true") tcp_fast_open:depends("type", "SSR") -tcp_fast_open:depends("type", "Trojan") +tcp_fast_open:depends("type", "Trojan-Plus") tcp_fast_open:depends("type", "Trojan-Go") udp_forward = s:option(Flag, "udp_forward", translate("UDP Forward")) @@ -203,7 +193,7 @@ stream_security:depends({ type = "V2ray", protocol = "vmess", transport = "ws" } stream_security:depends({ type = "V2ray", protocol = "vmess", transport = "h2" }) stream_security:depends({ type = "V2ray", protocol = "socks" }) stream_security:depends({ type = "V2ray", protocol = "shadowsocks" }) -stream_security:depends("type", "Trojan") +stream_security:depends("type", "Trojan-Plus") stream_security:depends("type", "Trojan-Go") stream_security.validate = function(self, value) if value == "none" and type:formvalue(arg[1]) == "Trojan" then @@ -373,7 +363,7 @@ quic_guise:depends("transport", "quic") remote_enable = s:option(Flag, "remote_enable", translate("Enable Remote"), translate("You can forward to Nginx/Caddy/V2ray WebSocket and more.")) remote_enable.default = "1" remote_enable.rmempty = false -remote_enable:depends("type", "Trojan") +remote_enable:depends("type", "Trojan-Plus") remote_enable:depends("type", "Trojan-Go") remote_address = s:option(Value, "remote_address", translate("Remote Address")) diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm index c1e00c144b..8364ac0c18 100644 --- a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm +++ b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm @@ -1,15 +1,6 @@ <% -local api = require "luci.model.cbi.passwall.api.api" local dsp = require "luci.dispatcher" -local ipkg = require "luci.model.ipkg" - -local function is_finded(e) - local result=luci.sys.exec("find /usr/*bin -iname "..e.." -type f") - if result~="" then - return true - end - return false -end +local api = require "luci.model.cbi.passwall.api.api" local tcp_node_num = api.uci_get_type("global_other", "tcp_node_num", 1) local udp_node_num = api.uci_get_type("global_other", "udp_node_num", 1) diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status2.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status2.htm index 722531d294..2bb7e3715d 100644 --- a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status2.htm +++ b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status2.htm @@ -1,15 +1,6 @@ <% -local api = require "luci.model.cbi.passwall.api.api" local dsp = require "luci.dispatcher" -local ipkg = require "luci.model.ipkg" - -local function is_finded(e) - local result=luci.sys.exec("find /usr/*bin -iname "..e.." -type f") - if result~="" then - return true - end - return false -end +local api = require "luci.model.cbi.passwall.api.api" local tcp_node_num = api.uci_get_type("global_other", "tcp_node_num", 1) local udp_node_num = api.uci_get_type("global_other", "udp_node_num", 1) @@ -81,7 +72,7 @@ local status_show_ip111 = api.uci_get_type("global_other", "status_show_ip111", - <% if ipkg.installed("kcptun") or is_finded("kcptun*") then %> + <% if api.is_finded("kcptun-client") then %>
<% end %> - <% if ipkg.installed("haproxy") or is_finded("haproxy*") then %> + <% if api.is_finded("haproxy") then %>