wget ftp://ftp.isc.org/isc/dhcp/4.2.5-P1/dhcp-4.2.5-P1.tar.gz
tar -zxvf dhcp-4.2.5-P1.tar.gz
cd dhcp-4.2.5-P1
1) 配置host
./configure --host=arm-linux ac_cv_file__dev_random=yes
widon@widon-F3JR:~/Desktop/code/dhcp-4.2.5-P1$ make
Making all in bind
make[1]: Entering directory `/home/widon/Desktop/code/dhcp-4.2.5-P1/bind'
Configuring BIND Export libraries for DHCP.
這個時候ctrl-c停掉,編輯修改一個makefile文件
2) vim ./bind/bind-9.8.4-P2/lib/export/dns/Makefile.in
把169行的{CC}改爲{BUILD_CC}
3) vim bind/Makefile
在55行左右的./configure改成 BUILD_CC=gcc ./configure --host=arm-linux --with-randomdev=/dev/random
widon@widon-F3JR:~/Desktop/code/dhcp-4.2.5-P1$ grep BUILD_CC bind/Makefile
(cd ${bindsrcdir} && BUILD_CC=gcc ./configure --host=arm-linux --with-randomdev=/dev/random --disable-kqueue --disable-epoll --disable-devpoll --without-openssl --without-libxml2 --enable-exportlib --enable-threads=no --with-export-includedir=${binddir}/include --with-export-libdir=${binddir}/lib --with-gssapi=no > ${binddir}/configure.log); \
然後再
make
交叉編譯就成功了