3

我想为arm(一个android设备)交叉编译zsh,但是是静态的。我希望结果是一堆二进制文件,不需要一堆 android 没有的库。我不在乎二进制文件的大小。我已经为android编译了(静态)ncurses,我尝试编译zsh:

ttouch zsh$ CFLAGS="-Wl,-static -static-libgcc -L/media/files/Lab/compilenv/ncurses-5.9/root/lib -lncurses" ./configure --host=arm-linux --disable-dynamic --disable-restricted-r --disable-gdbm --with-term-lib=ncurses --prefix=$(pwd)/root/
<everything ok>
ttouch zsh$ make -j16
<everything ok>
ttouch zsh$  readelf -d Src/zsh | grep NEEDED
0x00000001 (NEEDED)                     Shared library: [libncurses.so.5]
0x00000001 (NEEDED)                     Shared library: [librt.so.1]
0x00000001 (NEEDED)                     Shared library: [libm.so.6]
0x00000001 (NEEDED)                     Shared library: [libc.so.6]
0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]

那么,我怎样才能静态编译zsh呢?

4

0 回答 0