From 99daecdac917d149f4643e090cb705df135e2ed1 Mon Sep 17 00:00:00 2001 From: Ron Yorston <rmy@pobox.com> Date: Fri, 2 Mar 2018 13:18:18 +0000 Subject: Minor improvements to build Exclude source files in libbb that aren't used by busybox-w32. This speeds up the build marginally. They can always be reinstated if necessary. Provide fake routines for everything in inode_hash.c so that it can be excluded. inode_hash.c is now unchanged from upstream. Use last_char_is in has_exe_suffix_or_dot. It doesn't save any bytes but it makes the code neater. --- libbb/Kbuild.src | 31 +++++++++++++++---------------- libbb/inode_hash.c | 2 -- 2 files changed, 15 insertions(+), 18 deletions(-) (limited to 'libbb') diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 4b838ab7a..9323a8968 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src @@ -13,12 +13,10 @@ INSERT lib-y += appletlib.o lib-y += ask_confirmation.o lib-y += bb_bswap_64.o -lib-y += bb_do_delay.o lib-y += bb_pwd.o lib-y += bb_qsort.o #lib-y += bb_strtod.o lib-y += bb_strtonum.o -lib-y += change_identity.o lib-y += chomp.o lib-y += compare_string_array.o lib-y += concat_path_file.o @@ -27,23 +25,18 @@ lib-y += copy_file.o lib-y += copyfd.o lib-y += crc32.o lib-y += default_error_retval.o -lib-y += device_open.o lib-y += dump.o lib-y += executable.o lib-y += fclose_nonstdin.o lib-y += fflush_stdout_and_exit.o lib-y += fgets_str.o lib-y += find_pid_by_name.o -lib-y += find_root_device.o lib-y += full_write.o lib-y += get_last_path_component.o lib-y += get_line_from_file.o lib-y += getopt32.o -lib-y += get_volsize.o lib-y += herror_msg.o lib-y += human_readable.o -lib-y += inet_common.o -lib-y += inode_hash.o lib-y += isdirectory.o lib-y += last_char_is.o lib-y += lineedit.o lineedit_ptr_hack.o @@ -56,16 +49,12 @@ lib-y += messages.o lib-y += mode_string.o lib-y += parse_mode.o lib-y += perror_msg.o -lib-y += perror_nomsg.o lib-y += perror_nomsg_and_die.o -lib-y += pidfile.o lib-y += platform.o lib-y += printable.o lib-y += printable_string.o -lib-y += print_flags.o lib-y += process_escape_sequence.o lib-y += procps.o -lib-y += progress.o lib-y += ptr_to_globals.o lib-y += read.o lib-y += read_printf.o @@ -78,12 +67,9 @@ lib-y += safe_strncpy.o lib-y += safe_write.o lib-y += securetty.o lib-y += setup_environment.o -lib-y += simplify_path.o lib-y += single_argv.o lib-y += skip_whitespace.o -lib-y += speed_table.o lib-y += str_tolower.o -lib-y += strrstr.o lib-y += sysconf.o lib-y += time.o lib-y += trim.o @@ -91,10 +77,8 @@ lib-y += u_signal_names.o lib-y += uuencode.o lib-y += verror_msg.o lib-y += vfork_daemon_rexec.o -lib-y += warn_ignoring_args.o lib-y += wfopen.o lib-y += wfopen_input.o -lib-y += write.o lib-y += xatonum.o lib-y += xconnect.o lib-y += xfuncs.o @@ -105,15 +89,30 @@ lib-y += xreadlink.o lib-y += xrealloc_vector.o lib-$(CONFIG_PLATFORM_POSIX) += bb_askpass.o +lib-$(CONFIG_PLATFORM_POSIX) += bb_do_delay.o +lib-$(CONFIG_PLATFORM_POSIX) += change_identity.o +lib-$(CONFIG_PLATFORM_POSIX) += device_open.o +lib-$(CONFIG_PLATFORM_POSIX) += find_root_device.o lib-$(CONFIG_PLATFORM_POSIX) += get_console.o lib-$(CONFIG_PLATFORM_POSIX) += getpty.o +lib-$(CONFIG_PLATFORM_POSIX) += get_volsize.o lib-$(CONFIG_PLATFORM_POSIX) += inet_common.o +lib-$(CONFIG_PLATFORM_POSIX) += inode_hash.o lib-$(CONFIG_PLATFORM_POSIX) += kernel_version.o lib-$(CONFIG_PLATFORM_POSIX) += login.o lib-$(CONFIG_PLATFORM_POSIX) += makedev.o +lib-$(CONFIG_PLATFORM_POSIX) += perror_nomsg.o +lib-$(CONFIG_PLATFORM_POSIX) += pidfile.o +lib-$(CONFIG_PLATFORM_POSIX) += print_flags.o +lib-$(CONFIG_PLATFORM_POSIX) += progress.o lib-$(CONFIG_PLATFORM_POSIX) += read_key.o lib-$(CONFIG_PLATFORM_POSIX) += signals.o +lib-$(CONFIG_PLATFORM_POSIX) += simplify_path.o +lib-$(CONFIG_PLATFORM_POSIX) += speed_table.o +lib-$(CONFIG_PLATFORM_POSIX) += strrstr.o lib-$(CONFIG_PLATFORM_POSIX) += udp_io.o +lib-$(CONFIG_PLATFORM_POSIX) += warn_ignoring_args.o +lib-$(CONFIG_PLATFORM_POSIX) += write.o lib-$(CONFIG_PLATFORM_POSIX) += xgethostbyname.o lib-$(CONFIG_PLATFORM_LINUX) += match_fstype.o diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c index 770d1a286..4142813e3 100644 --- a/libbb/inode_hash.c +++ b/libbb/inode_hash.c @@ -55,7 +55,6 @@ char* FAST_FUNC is_in_ino_dev_hashtable(const struct stat *statbuf) return NULL; } -#if !ENABLE_PLATFORM_MINGW32 /* Add statbuf to statbuf hash table */ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) { @@ -77,7 +76,6 @@ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char * bucket->next = ino_dev_hashtable[i]; ino_dev_hashtable[i] = bucket; } -#endif #if ENABLE_DU || ENABLE_FEATURE_CLEAN_UP /* Clear statbuf hash table */ -- cgit v1.2.3-55-g6feb