ath10k-firmware: update Candela Tech firmware images
[openwrt/openwrt.git] / package / network / utils / iptables / patches / 600-shared-libext.patch
1 --- a/extensions/GNUmakefile.in
2 +++ b/extensions/GNUmakefile.in
3 @@ -86,7 +86,7 @@ pfx_symlink_files := $(patsubst %,libxt_
4 #
5 # Building blocks
6 #
7 -targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man
8 +targets := libiptext.so libiptext4.so libiptext6.so libiptext_ebt.so libiptext_arpt.so matches.man targets.man
9 targets_install :=
10 libext_objs := ${pfx_objs}
11 libext_ebt_objs := ${pfb_objs}
12 @@ -119,7 +119,7 @@ clean:
13 distclean: clean
14
15 init%.o: init%.c
16 - ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
17 + ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
18
19 -include .*.d
20
21 @@ -151,22 +151,22 @@ xt_connlabel_LIBADD = @libnetfilter_conn
22 # handling code in the Makefiles.
23 #
24 lib%.o: ${srcdir}/lib%.c
25 - ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $<;
26 + ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
27
28 -libext.a: initext.o ${libext_objs}
29 - ${AM_VERBOSE_AR} ${AR} crs $@ $^;
30 +libiptext.so: initext.o ${libext_objs}
31 + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables $(foreach obj,$^,${$(patsubst lib%.o,%,$(obj))_LIBADD});
32
33 -libext_ebt.a: initextb.o ${libext_ebt_objs}
34 - ${AM_VERBOSE_AR} ${AR} crs $@ $^;
35 +libiptext_ebt.so: initextb.o ${libext_ebt_objs}
36 + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables $(foreach obj,$^,${$(patsubst lib%.o,%,$(obj))_LIBADD});
37
38 -libext_arpt.a: initexta.o ${libext_arpt_objs}
39 - ${AM_VERBOSE_AR} ${AR} crs $@ $^;
40 +libiptext_arpt.so: initexta.o ${libext_arpt_objs}
41 + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables $(foreach obj,$^,${$(patsubst lib%.o,%,$(obj))_LIBADD});
42
43 -libext4.a: initext4.o ${libext4_objs}
44 - ${AM_VERBOSE_AR} ${AR} crs $@ $^;
45 +libiptext4.so: initext4.o ${libext4_objs}
46 + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables $(foreach obj,$^,${$(patsubst lib%.o,%,$(obj))_LIBADD});
47
48 -libext6.a: initext6.o ${libext6_objs}
49 - ${AM_VERBOSE_AR} ${AR} crs $@ $^;
50 +libiptext6.so: initext6.o ${libext6_objs}
51 + ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables $(foreach obj,$^,${$(patsubst lib%.o,%,$(obj))_LIBADD});
52
53 initext_func := $(addprefix xt_,${pfx_build_static})
54 initextb_func := $(addprefix ebt_,${pfb_build_static})
55 --- a/iptables/Makefile.am
56 +++ b/iptables/Makefile.am
57 @@ -8,19 +8,22 @@ BUILT_SOURCES =
58
59 xtables_legacy_multi_SOURCES = xtables-legacy-multi.c iptables-xml.c
60 xtables_legacy_multi_CFLAGS = ${AM_CFLAGS}
61 -xtables_legacy_multi_LDADD = ../extensions/libext.a
62 +xtables_legacy_multi_LDADD =
63 +xtables_legacy_multi_LDFLAGS = -L../extensions/ -liptext
64 if ENABLE_STATIC
65 xtables_legacy_multi_CFLAGS += -DALL_INCLUSIVE
66 endif
67 if ENABLE_IPV4
68 xtables_legacy_multi_SOURCES += iptables-standalone.c iptables.c
69 xtables_legacy_multi_CFLAGS += -DENABLE_IPV4
70 -xtables_legacy_multi_LDADD += ../libiptc/libip4tc.la ../extensions/libext4.a
71 +xtables_legacy_multi_LDADD += ../libiptc/libip4tc.la
72 +xtables_legacy_multi_LDFLAGS += -liptext4
73 endif
74 if ENABLE_IPV6
75 xtables_legacy_multi_SOURCES += ip6tables-standalone.c ip6tables.c
76 xtables_legacy_multi_CFLAGS += -DENABLE_IPV6
77 -xtables_legacy_multi_LDADD += ../libiptc/libip6tc.la ../extensions/libext6.a
78 +xtables_legacy_multi_LDADD += ../libiptc/libip6tc.la
79 +xtables_legacy_multi_LDFLAGS += -liptext6
80 endif
81 xtables_legacy_multi_SOURCES += xshared.c iptables-restore.c iptables-save.c
82 xtables_legacy_multi_LDADD += ../libxtables/libxtables.la -lm
83 @@ -30,7 +33,8 @@ if ENABLE_NFTABLES
84 BUILT_SOURCES += xtables-config-parser.h
85 xtables_nft_multi_SOURCES = xtables-nft-multi.c iptables-xml.c
86 xtables_nft_multi_CFLAGS = ${AM_CFLAGS}
87 -xtables_nft_multi_LDADD = ../extensions/libext.a ../extensions/libext_ebt.a
88 +xtables_nft_multi_LDADD =
89 +xtables_nft_multi_LDFLAGS = -L../extensions/ -liptext -liptext_ebt
90 if ENABLE_STATIC
91 xtables_nft_multi_CFLAGS += -DALL_INCLUSIVE
92 endif
93 @@ -45,7 +49,8 @@ xtables_nft_multi_SOURCES += xtables-sav
94 xtables-eb-standalone.c xtables-eb.c \
95 xtables-eb-translate.c \
96 xtables-translate.c
97 -xtables_nft_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a
98 +xtables_nft_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS}
99 +xtables_nft_multi_LDFLAGS += -liptext4 -liptext6 -liptext_arpt
100 # yacc and lex generate dirty code
101 xtables_nft_multi-xtables-config-parser.o xtables_nft_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls
102 xtables_nft_multi_SOURCES += xshared.c