iperf3.0 hisi uclib 交叉编译

1. 下载iperf src


2.修改makefile.in 里面的配置.

src/Makefile.in 613行 地方两行,去掉-pg参数.修改后如下

##iperf3_profile_CFLAGS = -pg -g
iperf3_profile_CFLAGS = -g
iperf3_profile_LDADD = libiperf.la
##iperf3_profile_LDFLAGS = -pg -g
iperf3_profile_LDFLAGS = -g

# Specify the sources and various flags for the test cases
t_timer_SOURCES = t_timer.c
View Code

 hisi uclib 如果不修改上面两行则会出现如下错误

/opt/hisi-Linux/x86-arm/arm-hisiv300-linux/bin/../lib/gcc/arm-hisiv300-linux-uclibcgnueabi/4.8.3/../../../../arm-hisiv300-linux-uclibcgnueabi/bin/ld: cannotfind gcrt1.o: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3_profile] Error 1
make[2]: Leaving directory `/home/ll/work2016/opensource/iperf-3.1.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/ll/work2016/opensource/iperf-3.1.2/src'
make: *** [all-recursive] Error 1


3. hisi 35616cv200 交叉编译器arm-hisiv300-linux   静态编译即可.

./configure --host=arm-hisiv300-linux   CFLAGS=-static --enable-static LDFLAGS=-static --disable-shared 


posted @ 2016-11-24 20:08  码工木木  阅读(1927)  评论(3编辑  收藏  举报