configure编译选项

1、rpath与rpath-link的区别

    参考链接: http://blog.csdn.net/xph23/article/details/38157491

  rpath 是 运行时候链接的库, rpath-link是在编译链接时指定的库的路径

 

2、configure 编译选项

  参考链接: http://blog.chinaunix.net/uid-20568163-id-1632905.html

 openwrt编译不能自动链接dl或pthread库, 都要指定-ldl 以及 -lpthread。

  通过 --with-libs="-lrt -lpthread -ldl"  的 --with-libs可以指定链接库。

 如果没有提供--with-libs选项。 可以通过

export LIBS="-lpthread -ldl" 这种方式指定

 

CPPFLAGS 指定的头文件路径,  LDFLAGS 指定库路径    LIBS 指定链接库名

./configure --prefix=$path/release/mips/usr/ --host=mipsel-openwrt-linux CPPFLAGS="-I/opt/JdLinuxLib/openwrt/usr/include/" LDFLAGS="-L/opt/JdLinuxLib/openwrt/usr/lib/" LIBS="-lz"

 

posted @ 2017-04-10 10:38  cogitoergosum  阅读(3122)  评论(0编辑  收藏  举报