<commit_before>Index: iptables-1.6.0/extensions/GNUmakefile.in
===================================================================
--- iptables-1.6.0.orig/extensions/GNUmakefile.in
+++ iptables-1.6.0/extensions/GNUmakefile.in
@@ -49,11 +49,33 @@ 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@ pfx_build_static := $(pfb_build_mod)
+@ENABLE_STATIC_TRUE@ pfx_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 $(pfx_build_static),$(pfb_build_mod))
+pfa_build_mod := $(filter-out $(pfx_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,${pfx_build_static})
+pfa_objs      := $(patsubst %,libarpt_%.o,${pfx_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} ${pfx_symlinks})
 pfb_solibs    := $(patsubst %,libebt_%.so,${pfb_build_mod})
 pfa_solibs    := $(patsubst %,libarpt_%.so,${pfa_build_mod})
@@ -64,15 +86,15 @@ pf6_solibs    := $(patsubst %,libip6t_%.
 #
 # Building blocks
 #
-targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man
+targets := libiptext.so libiptext4.so libiptext6.so libiptext_ebt.so libiptext_arpt.so 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}
-@ENABLE_STATIC_FALSE@ targets_install += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs}
++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} ${pfa_solibs} ${pf4_solibs} ${pf6_solibs}
++targets_install := $(strip ${targets_install} ${pfx_solibs} ${pfb_solibs} ${pfa_solibs} ${pf4_solibs} ${pf6_solibs})
 
 .SECONDARY:
 
@@ -91,7 +113,7 @@ clean:
 distclean: clean
 
 init%.o: init%.c
-	${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
+	${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init  -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
 
 -include .*.d
 
@@ -100,7 +122,7 @@ init%.o: init%.c
 #	Shared libraries
 #
 lib%.so: lib%.oo
-	${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};<commit_msg>iptables: Fix up shared-libext patch<commit_after>Index: iptables-1.6.0/extensions/GNUmakefile.in
===================================================================
--- iptables-1.6.0.orig/extensions/GNUmakefile.in
+++ iptables-1.6.0/extensions/GNUmakefile.in
@@ -49,11 +49,33 @@ 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@ pfx_build_static := $(pfb_build_mod)
+@ENABLE_STATIC_TRUE@ pfx_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 $(pfx_build_static),$(pfb_build_mod))
+pfa_build_mod := $(filter-out $(pfx_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,${pfx_build_static})
+pfa_objs      := $(patsubst %,libarpt_%.o,${pfx_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} ${pfx_symlinks})
 pfb_solibs    := $(patsubst %,libebt_%.so,${pfb_build_mod})
 pfa_solibs    := $(patsubst %,libarpt_%.so,${pfa_build_mod})
@@ -64,15 +86,15 @@ pf6_solibs    := $(patsubst %,libip6t_%.
 #
 # Building blocks
 #
-targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man
+targets := libiptext.so libiptext4.so libiptext6.so libiptext_ebt.so libiptext_arpt.so 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}
-@ENABLE_STATIC_FALSE@ targets_install += ${pfx_solibs} ${pfb_solibs} ${pf4_solibs} ${pf6_solibs} ${pfa_solibs}
+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} ${pfa_solibs} ${pf4_solibs} ${pf6_solibs}
+targets_install := $(strip ${targets_install} ${pfx_solibs} ${pfb_solibs} ${pfa_solibs} ${pf4_solibs} ${pf6_solibs})
 
 .SECONDARY:
 
@@ -91,7 +113,7 @@ clean:
 distclean: clean
 
 init%.o: init%.c
-	${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
+	${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init  -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
 
 -include .*.d
 
@@ -100,7 +122,7 @@ init%.o: init%.c
 #	Shared libraries
 #
 lib%.so: lib%.oo
-	${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< -L../libxtables/.libs -lxtables ${$*_LIBADD};
{'fraction_non_alphanumeric': 0.20816977428851816, 'fraction_numerical': 0.022571148184494603, 'mean_word_length': 6.993137254901961, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3518798', 'n_tokens_mistral': 3718, 'n_tokens_neox': 3637, 'n_words': 471}