脚本
build.sh
wget http://ftp.gnu.org/gnu/bison/bison-3.7.tar.gz
tar xvf bison-3.7.tar.gz
chmod +x run.sh
cp run.sh bison-3.7
cd bison-3.7
./run.sh
~
run.sh
ARM_CROSS_TOOL=/home/z/cross_tool/gcc-linaro-4.9-2016.02-x86_64_arm-linuxgnueabihf/bin
export PATH=${PATH}:${ARM_CROSS_TOOL}
TYPE=arm-linux-gnueabihf
OUTPUT=`pwd`/../output
mkdir -p $OUTPUT
./configure --host=$TYPE --prefix=$OUTPUT
make
make install
编译
chmod +x build.sh
chmod +x run.sh
./build.sh
输出
$ file output/bin/bison
output/bin/bison: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=a068c542a09be433064793134e7c9a1354ee1f04, with debug_info, not stripped