我尝试使用以下命令交叉编译MPICH并静态链接库:
export CC="/buildroot-2015.02/output/host/usr/bin/arm-linux-gcc"
export CFLAGS="-march=armv5te -I/buildroot-2015.02/output/host/usr/include/"
export LDFLAGS="--static -L//buildroot-2015.02/output/host/usr/lib/"
./configure --prefix=/mpich-3.1.3/build/ --host=arm-linux --disable-shared --with-pm=hydra --with-device=ch3:nemesis --disable-fortran
构建完成后,我尝试了file mpiexec
,我得到了以下内容:
mpiexec:符号链接到`mpiexec.hydra'
$ file mpiexec.hydra
mpiexec.hydra:ELF 32位LSB可执行文件,ARM,版本1(SYSV),动态链接(使用共享库),未剥离
我想知道如何静态链接MPICH。