为什么我编译的bash(3.8M)比我的系统提供的更大(937K)?

Yis*_*ang 2 linux bash makefile gnu-coreutils

我在这里下载了bash shell 4.2版表单:http://ftp.gnu.org/gnu/bash/,然后使用以下命令自行编译:

./configure
make
Run Code Online (Sandbox Code Playgroud)

但是我编译的bash比一个系统提供的要大得多:

这是我的bash:

$ ls -lh bash
-rwxrwxr-x 1 unimous unimous 3.8M Oct 31 23:57 bash
Run Code Online (Sandbox Code Playgroud)

这是系统的bash:

$ ls -hl /bin/bash 
-rwxr-xr-x 1 root root 937K Sep 19 21:40 /bin/bash
Run Code Online (Sandbox Code Playgroud)

Jos*_*sey 5

如果跑步,尺寸会更紧密地匹配strip(1).正如Tim Post指出的那样,bash的生产目标不会剥离,因为他们假设用户想要调试符号.然而,分销目标确实剥离.