Refreshed patches. Removed upstreamed patches: 001-remove-stime-function-calls.patch 110-no_static_libgcc.patch
Run tested on x86_64 under QEMU. Signed-off-by: Petr Štetiar <yn...@true.cz> --- package/utils/busybox/Makefile | 4 +- .../001-remove-stime-function-calls.patch | 84 ------------------- .../patches/110-no_static_libgcc.patch | 11 --- .../busybox/patches/120-lto-jobserver.patch | 6 +- .../patches/200-udhcpc_reduce_msgs.patch | 4 +- .../patches/201-udhcpc_changed_ifindex.patch | 2 +- .../203-udhcpc_renew_no_deconfig.patch | 2 +- .../patches/230-add_nslookup_lede.patch | 6 +- .../busybox/patches/250-date-k-flag.patch | 14 ++-- 9 files changed, 19 insertions(+), 114 deletions(-) delete mode 100644 package/utils/busybox/patches/001-remove-stime-function-calls.patch delete mode 100644 package/utils/busybox/patches/110-no_static_libgcc.patch diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 01441d1e87d1..4a5e0aab0d59 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.31.1 +PKG_VERSION:=1.32.0 PKG_RELEASE:=1 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.busybox.net/downloads \ http://sources.buildroot.net -PKG_HASH:=d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998 +PKG_HASH:=c35d87f1d04b2b153d33c275c2632e40d388a88f19a9e71727e0bbbff51fe689 PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 diff --git a/package/utils/busybox/patches/001-remove-stime-function-calls.patch b/package/utils/busybox/patches/001-remove-stime-function-calls.patch deleted file mode 100644 index ccf9bef35657..000000000000 --- a/package/utils/busybox/patches/001-remove-stime-function-calls.patch +++ /dev/null @@ -1,84 +0,0 @@ -From d3539be8f27b8cbfdfee460fe08299158f08bcd9 Mon Sep 17 00:00:00 2001 -From: Alistair Francis <alistair.fran...@wdc.com> -Date: Tue, 19 Nov 2019 13:06:40 +0100 -Subject: Remove stime() function calls - -stime() has been deprecated in glibc 2.31 and replaced with -clock_settime(). Let's replace the stime() function calls with -clock_settime() in preperation. - -function old new delta -rdate_main 197 224 +27 -clock_settime - 27 +27 -date_main 926 941 +15 -stime 37 - -37 ------------------------------------------------------------------------------- -(add/remove: 2/2 grow/shrink: 2/0 up/down: 69/-37) Total: 32 bytes - -Signed-off-by: Alistair Francis <alistair.fran...@wdc.com> -Signed-off-by: Denys Vlasenko <vda.li...@googlemail.com> ---- - coreutils/date.c | 6 +++++- - libbb/missing_syscalls.c | 8 -------- - util-linux/rdate.c | 8 ++++++-- - 3 files changed, 11 insertions(+), 11 deletions(-) - ---- a/coreutils/date.c -+++ b/coreutils/date.c -@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, cha - time(&ts.tv_sec); - #endif - } -+#if !ENABLE_FEATURE_DATE_NANO -+ ts.tv_nsec = 0; -+#endif - localtime_r(&ts.tv_sec, &tm_time); - - /* If date string is given, update tm_time, and maybe set date */ -@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, cha - if (date_str[0] != '@') - tm_time.tm_isdst = -1; - ts.tv_sec = validate_tm_time(date_str, &tm_time); -+ ts.tv_nsec = 0; - - /* if setting time, set it */ -- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { -+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { - bb_perror_msg("can't set date"); - } - } ---- a/libbb/missing_syscalls.c -+++ b/libbb/missing_syscalls.c -@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) - return syscall(__NR_getsid, pid); - } - --int stime(const time_t *t) --{ -- struct timeval tv; -- tv.tv_sec = *t; -- tv.tv_usec = 0; -- return settimeofday(&tv, NULL); --} -- - int sethostname(const char *name, size_t len) - { - return syscall(__NR_sethostname, name, len); ---- a/util-linux/rdate.c -+++ b/util-linux/rdate.c -@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, ch - if (!(flags & 2)) { /* no -p (-s may be present) */ - if (time(NULL) == remote_time) - bb_error_msg("current time matches remote time"); -- else -- if (stime(&remote_time) < 0) -+ else { -+ struct timespec ts; -+ ts.tv_sec = remote_time; -+ ts.tv_nsec = 0; -+ if (clock_settime(CLOCK_REALTIME, &ts) < 0) - bb_perror_msg_and_die("can't set time of day"); -+ } - } - - if (flags != 1) /* not lone -s */ diff --git a/package/utils/busybox/patches/110-no_static_libgcc.patch b/package/utils/busybox/patches/110-no_static_libgcc.patch deleted file mode 100644 index 2148a09e006e..000000000000 --- a/package/utils/busybox/patches/110-no_static_libgcc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.flags -+++ b/Makefile.flags -@@ -51,7 +51,7 @@ CFLAGS += $(call cc-option,-fno-builtin- - # -fno-guess-branch-probability: prohibit pseudo-random guessing - # of branch probabilities (hopefully makes bloatcheck more stable): - CFLAGS += $(call cc-option,-fno-guess-branch-probability,) --CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,) -+CFLAGS += $(call cc-option,-funsigned-char,) - CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) - # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): - CFLAGS += $(call cc-option,-fno-unwind-tables,) diff --git a/package/utils/busybox/patches/120-lto-jobserver.patch b/package/utils/busybox/patches/120-lto-jobserver.patch index 99c5b5120172..d4f997e6d82d 100644 --- a/package/utils/busybox/patches/120-lto-jobserver.patch +++ b/package/utils/busybox/patches/120-lto-jobserver.patch @@ -1,6 +1,6 @@ --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include -@@ -130,7 +130,7 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$ +@@ -131,7 +131,7 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$ # if_changed = $(if $(strip $(filter-out $(PHONY),$?) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ @@ -9,7 +9,7 @@ $(echo-cmd) $(cmd_$(1)); \ echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd) -@@ -139,7 +139,7 @@ if_changed = $(if $(strip $(filter-out $ +@@ -140,7 +140,7 @@ if_changed = $(if $(strip $(filter-out $ if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \ $(filter-out FORCE $(wildcard $^),$^) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ @@ -18,7 +18,7 @@ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \ rm -f $(depfile); \ -@@ -150,5 +150,5 @@ if_changed_dep = $(if $(strip $(filter-o +@@ -151,5 +151,5 @@ if_changed_dep = $(if $(strip $(filter-o # and if so will execute $(rule_foo) if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch index 4bab25a8d578..162f92260b7b 100644 --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -713,6 +713,7 @@ static int bcast_or_ucast(struct dhcp_pa +@@ -673,6 +673,7 @@ static int bcast_or_ucast(struct dhcp_pa static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; @@ -8,7 +8,7 @@ /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), -@@ -730,6 +731,7 @@ static NOINLINE int send_discover(uint32 +@@ -690,6 +691,7 @@ static NOINLINE int send_discover(uint32 */ add_client_options(&packet); diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch index 256b049d9e26..e5a0941e5fbf 100644 --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1416,6 +1416,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c +@@ -1376,6 +1376,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c /* silence "uninitialized!" warning */ unsigned timestamp_before_wait = timestamp_before_wait; diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch index 3d3c0cc403ea..ea81c91c9b61 100644 --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1126,7 +1126,6 @@ static void perform_renew(void) +@@ -1086,7 +1086,6 @@ static void perform_renew(void) client_data.state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ diff --git a/package/utils/busybox/patches/230-add_nslookup_lede.patch b/package/utils/busybox/patches/230-add_nslookup_lede.patch index f0ac4b51c15a..9b0947fdc941 100644 --- a/package/utils/busybox/patches/230-add_nslookup_lede.patch +++ b/package/utils/busybox/patches/230-add_nslookup_lede.patch @@ -19,9 +19,9 @@ Signed-off-by: Jo-Philipp Wich <j...@mein.io> --- a/Makefile.flags +++ b/Makefile.flags -@@ -134,6 +134,12 @@ else - LDLIBS += m - endif +@@ -157,6 +157,12 @@ endif + # libm may be needed for dc, awk, ntpd + # librt may be needed for clock_gettime() +# nslookup_lede might need the resolv library +RESOLV_AVAILABLE := $(shell echo 'int main(void){res_init();return 0;}' >resolvtest.c; $(CC) $(CFLAGS) -include resolv.h -lresolv -o /dev/null resolvtest.c >/dev/null 2>&1 && echo "y"; rm resolvtest.c) diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch index 5aadbb233c6a..bbdd1a30df3b 100644 --- a/package/utils/busybox/patches/250-date-k-flag.patch +++ b/package/utils/busybox/patches/250-date-k-flag.patch @@ -1,6 +1,6 @@ --- a/coreutils/date.c +++ b/coreutils/date.c -@@ -123,6 +123,7 @@ +@@ -122,6 +122,7 @@ //usage: IF_FEATURE_DATE_ISOFMT( //usage: "\n -D FMT Use FMT (strptime format) for -d TIME conversion" //usage: ) @@ -8,7 +8,7 @@ //usage: "\n" //usage: "\nRecognized TIME formats:" //usage: "\n hh:mm[:ss]" -@@ -139,9 +140,8 @@ +@@ -138,9 +139,8 @@ #include "libbb.h" #include "common_bufsiz.h" @@ -20,7 +20,7 @@ enum { OPT_RFC2822 = (1 << 0), /* R */ -@@ -149,8 +149,9 @@ enum { +@@ -148,8 +148,9 @@ enum { OPT_UTC = (1 << 2), /* u */ OPT_DATE = (1 << 3), /* d */ OPT_REFERENCE = (1 << 4), /* r */ @@ -32,7 +32,7 @@ }; #if ENABLE_LONG_OPTS -@@ -162,6 +163,7 @@ static const char date_longopts[] ALIGN1 +@@ -161,6 +162,7 @@ static const char date_longopts[] ALIGN1 /* "universal\0" No_argument "u" */ "date\0" Required_argument "d" "reference\0" Required_argument "r" @@ -40,7 +40,7 @@ ; #endif -@@ -181,6 +183,8 @@ static void maybe_set_utc(int opt) +@@ -180,6 +182,8 @@ static void maybe_set_utc(int opt) int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int date_main(int argc UNUSED_PARAM, char **argv) { @@ -49,7 +49,7 @@ struct timespec ts; struct tm tm_time; char buf_fmt_dt2str[64]; -@@ -193,7 +197,7 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -192,7 +196,7 @@ int date_main(int argc UNUSED_PARAM, cha char *isofmt_arg = NULL; opt = getopt32long(argv, "^" @@ -58,7 +58,7 @@ IF_FEATURE_DATE_ISOFMT("I::D:") "\0" "d--s:s--d" -@@ -256,6 +260,31 @@ int date_main(int argc UNUSED_PARAM, cha +@@ -255,6 +259,31 @@ int date_main(int argc UNUSED_PARAM, cha if (*argv) bb_show_usage(); _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel