mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
e1d6013935
Source archive format changed to tar.xz Removed upstreamed 020-treewide-use-uint-instead-of-u_int.patch 030-revert-fix-build-for-missing-ETH_ALEN-definition.patch 040-xshared-Fix-build-for-Werror-format-security.patch 050-build-fix-error-during-out-of-tree-build.patch 060-libxtables-unexport-init_extensions-declarations.patch 070-extensions-string-Review-parse_string-function.patch 104-nft-track-each-register-individually.patch Manually rebased 600-shared-libext.patch Change netfiletr.mk due to module name change https://git.netfilter.org/iptables/commit/?id=f30c5edce0413b2b2346c7f58e801f10f6e9bc5a Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com> Link: https://github.com/openwrt/openwrt/pull/16641 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
80 lines
4.0 KiB
Diff
80 lines
4.0 KiB
Diff
--- a/extensions/GNUmakefile.in
|
|
+++ b/extensions/GNUmakefile.in
|
|
@@ -50,11 +50,31 @@ pfb_build_mod := $(filter-out @blacklist
|
|
pfa_build_mod := $(filter-out @blacklist_modules@ @blacklist_a_modules@,${pfa_build_mod})
|
|
pf4_build_mod := $(filter-out @blacklist_modules@ @blacklist_4_modules@,${pf4_build_mod})
|
|
pf6_build_mod := $(filter-out @blacklist_modules@ @blacklist_6_modules@,${pf6_build_mod})
|
|
-pfx_objs := $(patsubst %,libxt_%.o,${pfx_build_mod})
|
|
-pfb_objs := $(patsubst %,libebt_%.o,${pfb_build_mod})
|
|
-pfa_objs := $(patsubst %,libarpt_%.o,${pfa_build_mod})
|
|
-pf4_objs := $(patsubst %,libipt_%.o,${pf4_build_mod})
|
|
-pf6_objs := $(patsubst %,libip6t_%.o,${pf6_build_mod})
|
|
+ifdef BUILTIN_MODULES
|
|
+pfx_build_static := $(filter $(BUILTIN_MODULES),${pfx_build_mod})
|
|
+pfb_build_static := $(filter $(BUILTIN_MODULES),${pfb_build_mod})
|
|
+pfa_build_static := $(filter $(BUILTIN_MODULES),${pfa_build_mod})
|
|
+pf4_build_static := $(filter $(BUILTIN_MODULES),${pf4_build_mod})
|
|
+pf6_build_static := $(filter $(BUILTIN_MODULES),${pf6_build_mod})
|
|
+else
|
|
+@ENABLE_STATIC_TRUE@ pfx_build_static := $(pfx_build_mod)
|
|
+@ENABLE_STATIC_TRUE@ pfb_build_static := $(pfb_build_mod)
|
|
+@ENABLE_STATIC_TRUE@ pfa_build_static := $(pfa_build_mod)
|
|
+@ENABLE_STATIC_TRUE@ pf4_build_static := $(pf4_build_mod)
|
|
+@ENABLE_STATIC_TRUE@ pf6_build_static := $(pf6_build_mod)
|
|
+endif
|
|
+
|
|
+pfx_build_mod := $(filter-out $(pfx_build_static),$(pfx_build_mod))
|
|
+pfb_build_mod := $(filter-out $(pfb_build_static),$(pfb_build_mod))
|
|
+pfa_build_mod := $(filter-out $(pfa_build_static),$(pfa_build_mod))
|
|
+pf4_build_mod := $(filter-out $(pf4_build_static),$(pf4_build_mod))
|
|
+pf6_build_mod := $(filter-out $(pf6_build_static),$(pf6_build_mod))
|
|
+
|
|
+pfx_objs := $(patsubst %,libxt_%.o,${pfx_build_static})
|
|
+pfb_objs := $(patsubst %,libebt_%.o,${pfb_build_static})
|
|
+pfa_objs := $(patsubst %,libarpt_%.o,${pfa_build_static})
|
|
+pf4_objs := $(patsubst %,libipt_%.o,${pf4_build_static})
|
|
+pf6_objs := $(patsubst %,libip6t_%.o,${pf6_build_static})
|
|
pfx_solibs := $(patsubst %,libxt_%.so,${pfx_build_mod})
|
|
pfb_solibs := $(patsubst %,libebt_%.so,${pfb_build_mod})
|
|
pfa_solibs := $(patsubst %,libarpt_%.so,${pfa_build_mod})
|
|
@@ -68,14 +88,14 @@ pfx_symlink_files := $(patsubst %,libxt_
|
|
#
|
|
targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man
|
|
targets_install :=
|
|
-@ENABLE_STATIC_TRUE@ libext_objs := ${pfx_objs}
|
|
-@ENABLE_STATIC_TRUE@ libext_ebt_objs := ${pfb_objs}
|
|
-@ENABLE_STATIC_TRUE@ libext_arpt_objs := ${pfa_objs}
|
|
-@ENABLE_STATIC_TRUE@ libext4_objs := ${pf4_objs}
|
|
-@ENABLE_STATIC_TRUE@ libext6_objs := ${pf6_objs}
|
|
-@ENABLE_STATIC_FALSE@ targets += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs} ${pfx_symlink_files}
|
|
-@ENABLE_STATIC_FALSE@ targets_install += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs}
|
|
-@ENABLE_STATIC_FALSE@ symlinks_install := ${pfx_symlink_files}
|
|
+libext_objs := ${pfx_objs}
|
|
+libext_ebt_objs := ${pfb_objs}
|
|
+libext_arpt_objs := ${pfa_objs}
|
|
+libext4_objs := ${pf4_objs}
|
|
+libext6_objs := ${pf6_objs}
|
|
+targets += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs} ${pfx_symlink_files}
|
|
+targets_install := $(strip ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs})
|
|
+symlinks_install := ${pfx_symlink_files}
|
|
|
|
.SECONDARY:
|
|
|
|
@@ -170,11 +190,11 @@ libext4.a: initext4.o ${libext4_objs}
|
|
libext6.a: initext6.o ${libext6_objs}
|
|
${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
|
|
|
-initext_func := $(addprefix xt_,${pfx_build_mod})
|
|
-initextb_func := $(addprefix ebt_,${pfb_build_mod})
|
|
-initexta_func := $(addprefix arpt_,${pfa_build_mod})
|
|
-initext4_func := $(addprefix ipt_,${pf4_build_mod})
|
|
-initext6_func := $(addprefix ip6t_,${pf6_build_mod})
|
|
+initext_func := $(addprefix xt_,${pfx_build_static})
|
|
+initextb_func := $(addprefix ebt_,${pfb_build_static})
|
|
+initexta_func := $(addprefix arpt_,${pfa_build_static})
|
|
+initext4_func := $(addprefix ipt_,${pf4_build_static})
|
|
+initext6_func := $(addprefix ip6t_,${pf6_build_static})
|
|
|
|
initexts := ext exta extb ext4 ext6
|
|
initext_depfiles = $(patsubst %,.init%.dd,${initexts})
|