Step1:configure
#!/bin/sh
echo ac_cv_file__dev_random=yes > config.cache
./configure -C CC=arm-buildroot-linux-uclibcgnueabihf-gcc --prefix=$(pwd)/__install --host=arm-buildroot-linux --with-randomdev=no ac_cv_file__dev_random=yes
Step2:修改bind的Makefile
2.1 先把bind.tar.gz解压出来的文件夹删了,避免修改了Makefile再编译不起作用。
2.2 修改dhcp-4.3.5/bind/Makefile
找到下面的代码,增加:
BUILD_CC=gcc CC=arm-buildroot-linux-uclibcgnueabihf-gcc ac_cv_file__dev_random=yes
......前面省略......
bindconfig = --disable-kqueue --disable-epoll --disable-devpoll \
--without-openssl --without-libxml2 --enable-exportlib \
--with-gssapi=no --enable-threads=no BUILD_CC=gcc CC=arm-buildroot-linux-uclibcgnueabihf-gcc ac_cv_file__dev_random=yes --host=arm-buildroot-linux-gnu --with-randomdev=no \
--with-export-includedir=${binddir}/include \
--with-export-libdir=${binddir}/lib
......后面省略......
注:BUILD_CC就配gcc,CC就配你的交叉编译工具。
Step3: make && make install
补充:
换了个平台:
#!/bin/sh
./configure CC=arm-cvitek-linux-uclibcgnueabihf-gcc BUILD_CC=gcc --prefix=${PWD}/__install --host=arm-cvitek-linux-uclibcgnueabihf ac_cv_file__dev_random=yes --with-randomdev=no
这样就行了