diff options
| author | Ron Yorston <rmy@pobox.com> | 2018-03-02 13:18:18 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2018-03-02 13:18:18 +0000 |
| commit | 99daecdac917d149f4643e090cb705df135e2ed1 (patch) | |
| tree | 22b1e8d57d97d36b2c46f6c93983fc06a1cd5ba7 /libbb | |
| parent | 5b726f8a78c33e117c2a968739b1b4a6964905f8 (diff) | |
| download | busybox-w32-99daecdac917d149f4643e090cb705df135e2ed1.tar.gz busybox-w32-99daecdac917d149f4643e090cb705df135e2ed1.tar.bz2 busybox-w32-99daecdac917d149f4643e090cb705df135e2ed1.zip | |
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.
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/Kbuild.src | 31 | ||||
| -rw-r--r-- | libbb/inode_hash.c | 2 |
2 files changed, 15 insertions, 18 deletions
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 | |||
| 13 | lib-y += appletlib.o | 13 | lib-y += appletlib.o |
| 14 | lib-y += ask_confirmation.o | 14 | lib-y += ask_confirmation.o |
| 15 | lib-y += bb_bswap_64.o | 15 | lib-y += bb_bswap_64.o |
| 16 | lib-y += bb_do_delay.o | ||
| 17 | lib-y += bb_pwd.o | 16 | lib-y += bb_pwd.o |
| 18 | lib-y += bb_qsort.o | 17 | lib-y += bb_qsort.o |
| 19 | #lib-y += bb_strtod.o | 18 | #lib-y += bb_strtod.o |
| 20 | lib-y += bb_strtonum.o | 19 | lib-y += bb_strtonum.o |
| 21 | lib-y += change_identity.o | ||
| 22 | lib-y += chomp.o | 20 | lib-y += chomp.o |
| 23 | lib-y += compare_string_array.o | 21 | lib-y += compare_string_array.o |
| 24 | lib-y += concat_path_file.o | 22 | lib-y += concat_path_file.o |
| @@ -27,23 +25,18 @@ lib-y += copy_file.o | |||
| 27 | lib-y += copyfd.o | 25 | lib-y += copyfd.o |
| 28 | lib-y += crc32.o | 26 | lib-y += crc32.o |
| 29 | lib-y += default_error_retval.o | 27 | lib-y += default_error_retval.o |
| 30 | lib-y += device_open.o | ||
| 31 | lib-y += dump.o | 28 | lib-y += dump.o |
| 32 | lib-y += executable.o | 29 | lib-y += executable.o |
| 33 | lib-y += fclose_nonstdin.o | 30 | lib-y += fclose_nonstdin.o |
| 34 | lib-y += fflush_stdout_and_exit.o | 31 | lib-y += fflush_stdout_and_exit.o |
| 35 | lib-y += fgets_str.o | 32 | lib-y += fgets_str.o |
| 36 | lib-y += find_pid_by_name.o | 33 | lib-y += find_pid_by_name.o |
| 37 | lib-y += find_root_device.o | ||
| 38 | lib-y += full_write.o | 34 | lib-y += full_write.o |
| 39 | lib-y += get_last_path_component.o | 35 | lib-y += get_last_path_component.o |
| 40 | lib-y += get_line_from_file.o | 36 | lib-y += get_line_from_file.o |
| 41 | lib-y += getopt32.o | 37 | lib-y += getopt32.o |
| 42 | lib-y += get_volsize.o | ||
| 43 | lib-y += herror_msg.o | 38 | lib-y += herror_msg.o |
| 44 | lib-y += human_readable.o | 39 | lib-y += human_readable.o |
| 45 | lib-y += inet_common.o | ||
| 46 | lib-y += inode_hash.o | ||
| 47 | lib-y += isdirectory.o | 40 | lib-y += isdirectory.o |
| 48 | lib-y += last_char_is.o | 41 | lib-y += last_char_is.o |
| 49 | lib-y += lineedit.o lineedit_ptr_hack.o | 42 | lib-y += lineedit.o lineedit_ptr_hack.o |
| @@ -56,16 +49,12 @@ lib-y += messages.o | |||
| 56 | lib-y += mode_string.o | 49 | lib-y += mode_string.o |
| 57 | lib-y += parse_mode.o | 50 | lib-y += parse_mode.o |
| 58 | lib-y += perror_msg.o | 51 | lib-y += perror_msg.o |
| 59 | lib-y += perror_nomsg.o | ||
| 60 | lib-y += perror_nomsg_and_die.o | 52 | lib-y += perror_nomsg_and_die.o |
| 61 | lib-y += pidfile.o | ||
| 62 | lib-y += platform.o | 53 | lib-y += platform.o |
| 63 | lib-y += printable.o | 54 | lib-y += printable.o |
| 64 | lib-y += printable_string.o | 55 | lib-y += printable_string.o |
| 65 | lib-y += print_flags.o | ||
| 66 | lib-y += process_escape_sequence.o | 56 | lib-y += process_escape_sequence.o |
| 67 | lib-y += procps.o | 57 | lib-y += procps.o |
| 68 | lib-y += progress.o | ||
| 69 | lib-y += ptr_to_globals.o | 58 | lib-y += ptr_to_globals.o |
| 70 | lib-y += read.o | 59 | lib-y += read.o |
| 71 | lib-y += read_printf.o | 60 | lib-y += read_printf.o |
| @@ -78,12 +67,9 @@ lib-y += safe_strncpy.o | |||
| 78 | lib-y += safe_write.o | 67 | lib-y += safe_write.o |
| 79 | lib-y += securetty.o | 68 | lib-y += securetty.o |
| 80 | lib-y += setup_environment.o | 69 | lib-y += setup_environment.o |
| 81 | lib-y += simplify_path.o | ||
| 82 | lib-y += single_argv.o | 70 | lib-y += single_argv.o |
| 83 | lib-y += skip_whitespace.o | 71 | lib-y += skip_whitespace.o |
| 84 | lib-y += speed_table.o | ||
| 85 | lib-y += str_tolower.o | 72 | lib-y += str_tolower.o |
| 86 | lib-y += strrstr.o | ||
| 87 | lib-y += sysconf.o | 73 | lib-y += sysconf.o |
| 88 | lib-y += time.o | 74 | lib-y += time.o |
| 89 | lib-y += trim.o | 75 | lib-y += trim.o |
| @@ -91,10 +77,8 @@ lib-y += u_signal_names.o | |||
| 91 | lib-y += uuencode.o | 77 | lib-y += uuencode.o |
| 92 | lib-y += verror_msg.o | 78 | lib-y += verror_msg.o |
| 93 | lib-y += vfork_daemon_rexec.o | 79 | lib-y += vfork_daemon_rexec.o |
| 94 | lib-y += warn_ignoring_args.o | ||
| 95 | lib-y += wfopen.o | 80 | lib-y += wfopen.o |
| 96 | lib-y += wfopen_input.o | 81 | lib-y += wfopen_input.o |
| 97 | lib-y += write.o | ||
| 98 | lib-y += xatonum.o | 82 | lib-y += xatonum.o |
| 99 | lib-y += xconnect.o | 83 | lib-y += xconnect.o |
| 100 | lib-y += xfuncs.o | 84 | lib-y += xfuncs.o |
| @@ -105,15 +89,30 @@ lib-y += xreadlink.o | |||
| 105 | lib-y += xrealloc_vector.o | 89 | lib-y += xrealloc_vector.o |
| 106 | 90 | ||
| 107 | lib-$(CONFIG_PLATFORM_POSIX) += bb_askpass.o | 91 | lib-$(CONFIG_PLATFORM_POSIX) += bb_askpass.o |
| 92 | lib-$(CONFIG_PLATFORM_POSIX) += bb_do_delay.o | ||
| 93 | lib-$(CONFIG_PLATFORM_POSIX) += change_identity.o | ||
| 94 | lib-$(CONFIG_PLATFORM_POSIX) += device_open.o | ||
| 95 | lib-$(CONFIG_PLATFORM_POSIX) += find_root_device.o | ||
| 108 | lib-$(CONFIG_PLATFORM_POSIX) += get_console.o | 96 | lib-$(CONFIG_PLATFORM_POSIX) += get_console.o |
| 109 | lib-$(CONFIG_PLATFORM_POSIX) += getpty.o | 97 | lib-$(CONFIG_PLATFORM_POSIX) += getpty.o |
| 98 | lib-$(CONFIG_PLATFORM_POSIX) += get_volsize.o | ||
| 110 | lib-$(CONFIG_PLATFORM_POSIX) += inet_common.o | 99 | lib-$(CONFIG_PLATFORM_POSIX) += inet_common.o |
| 100 | lib-$(CONFIG_PLATFORM_POSIX) += inode_hash.o | ||
| 111 | lib-$(CONFIG_PLATFORM_POSIX) += kernel_version.o | 101 | lib-$(CONFIG_PLATFORM_POSIX) += kernel_version.o |
| 112 | lib-$(CONFIG_PLATFORM_POSIX) += login.o | 102 | lib-$(CONFIG_PLATFORM_POSIX) += login.o |
| 113 | lib-$(CONFIG_PLATFORM_POSIX) += makedev.o | 103 | lib-$(CONFIG_PLATFORM_POSIX) += makedev.o |
| 104 | lib-$(CONFIG_PLATFORM_POSIX) += perror_nomsg.o | ||
| 105 | lib-$(CONFIG_PLATFORM_POSIX) += pidfile.o | ||
| 106 | lib-$(CONFIG_PLATFORM_POSIX) += print_flags.o | ||
| 107 | lib-$(CONFIG_PLATFORM_POSIX) += progress.o | ||
| 114 | lib-$(CONFIG_PLATFORM_POSIX) += read_key.o | 108 | lib-$(CONFIG_PLATFORM_POSIX) += read_key.o |
| 115 | lib-$(CONFIG_PLATFORM_POSIX) += signals.o | 109 | lib-$(CONFIG_PLATFORM_POSIX) += signals.o |
| 110 | lib-$(CONFIG_PLATFORM_POSIX) += simplify_path.o | ||
| 111 | lib-$(CONFIG_PLATFORM_POSIX) += speed_table.o | ||
| 112 | lib-$(CONFIG_PLATFORM_POSIX) += strrstr.o | ||
| 116 | lib-$(CONFIG_PLATFORM_POSIX) += udp_io.o | 113 | lib-$(CONFIG_PLATFORM_POSIX) += udp_io.o |
| 114 | lib-$(CONFIG_PLATFORM_POSIX) += warn_ignoring_args.o | ||
| 115 | lib-$(CONFIG_PLATFORM_POSIX) += write.o | ||
| 117 | lib-$(CONFIG_PLATFORM_POSIX) += xgethostbyname.o | 116 | lib-$(CONFIG_PLATFORM_POSIX) += xgethostbyname.o |
| 118 | 117 | ||
| 119 | lib-$(CONFIG_PLATFORM_LINUX) += match_fstype.o | 118 | 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) | |||
| 55 | return NULL; | 55 | return NULL; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | #if !ENABLE_PLATFORM_MINGW32 | ||
| 59 | /* Add statbuf to statbuf hash table */ | 58 | /* Add statbuf to statbuf hash table */ |
| 60 | void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) | 59 | void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) |
| 61 | { | 60 | { |
| @@ -77,7 +76,6 @@ void FAST_FUNC add_to_ino_dev_hashtable(const struct stat *statbuf, const char * | |||
| 77 | bucket->next = ino_dev_hashtable[i]; | 76 | bucket->next = ino_dev_hashtable[i]; |
| 78 | ino_dev_hashtable[i] = bucket; | 77 | ino_dev_hashtable[i] = bucket; |
| 79 | } | 78 | } |
| 80 | #endif | ||
| 81 | 79 | ||
| 82 | #if ENABLE_DU || ENABLE_FEATURE_CLEAN_UP | 80 | #if ENABLE_DU || ENABLE_FEATURE_CLEAN_UP |
| 83 | /* Clear statbuf hash table */ | 81 | /* Clear statbuf hash table */ |
