mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
752bd72668
Update to the latest version of iproute2; see https://lwn.net/Articles/776174/ for a full overview of the changes in 4.20. Remove upstream patch 001-fix-print_0xhex-on-32-bit.patch and 002-tc-fix-xtables-incorrect-usage-of-LDFLAGS.patch Introduce a patch to include <linux/limits.h> for XATTR_SIZE_MAX in tc Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
61 lines
1.7 KiB
Diff
61 lines
1.7 KiB
Diff
--- a/configure
|
|
+++ b/configure
|
|
@@ -231,8 +231,9 @@ check_elf()
|
|
echo "HAVE_ELF:=y" >>$CONFIG
|
|
echo "yes"
|
|
|
|
- echo 'CFLAGS += -DHAVE_ELF' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
|
|
- echo 'LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
|
|
+ echo 'CFLAGS += -DHAVE_ELF' >> $CONFIG
|
|
+ echo 'ELF_CFLAGS += ' `${PKG_CONFIG} libelf --cflags` >> $CONFIG
|
|
+ echo 'ELF_LDLIBS += ' `${PKG_CONFIG} libelf --libs` >>$CONFIG
|
|
else
|
|
echo "no"
|
|
fi
|
|
--- a/lib/Makefile
|
|
+++ b/lib/Makefile
|
|
@@ -11,9 +11,17 @@ UTILOBJ = utils.o rt_names.o ll_map.o ll
|
|
inet_proto.o namespace.o json_writer.o json_print.o \
|
|
names.o color.o bpf.o exec.o fs.o
|
|
|
|
+ELFOBJ=$(patsubst %.o,%.elf.o,$(UTILOBJ))
|
|
+
|
|
NLOBJ=libgenl.o libnetlink.o
|
|
|
|
-all: libnetlink.a libutil.a
|
|
+all: libnetlink.a libutil.a libutil-elf.a
|
|
+
|
|
+%.o: %.c
|
|
+ $(QUIET_CC)$(CC) $(CFLAGS) -UHAVE_ELF $(EXTRA_CFLAGS) -c -o $@ $<
|
|
+
|
|
+%.elf.o: %.c
|
|
+ $(QUIET_CC)$(CC) $(CFLAGS) $(ELF_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
|
|
|
libnetlink.a: $(NLOBJ)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|
|
@@ -21,7 +29,10 @@ libnetlink.a: $(NLOBJ)
|
|
libutil.a: $(UTILOBJ) $(ADDLIB)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|
|
|
|
+libutil-elf.a: $(ELFOBJ) $(ADDLIB)
|
|
+ $(QUIET_AR)$(AR) rcs $@ $^
|
|
+
|
|
install:
|
|
|
|
clean:
|
|
- rm -f $(NLOBJ) $(UTILOBJ) $(ADDLIB) libnetlink.a libutil.a
|
|
+ rm -f $(NLOBJ) $(UTILOBJ) $(ELFOBJ) $(ADDLIB) libnetlink.a libutil.a libutil-elf.a
|
|
--- a/tc/Makefile
|
|
+++ b/tc/Makefile
|
|
@@ -133,8 +133,8 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
|
|
|
|
all: tc $(TCSO)
|
|
|
|
-tc: $(TCOBJ) $(LIBNETLINK) libtc.a
|
|
- $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
|
+tc: $(TCOBJ) $(subst libutil.a,libutil-elf.a,$(LIBNETLINK)) libtc.a
|
|
+ $(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) $(ELF_LDLIBS) -o $@
|
|
|
|
libtc.a: $(TCLIB)
|
|
$(QUIET_AR)$(AR) rcs $@ $^
|