freeswitch移植到arm--交叉编译

2019-07-12 19:50发布

准备移植freeswitch到arm平台上,主要是看好了freeswitch的良好的架构,很好的扩展性。对于后续业务的补充开发会有很大的便利。   一、创建一个cross.sh脚本,内容如下:   #!/bin/sh
 
#!/bin/sh
 
 export PATH=/opt/crosstool/gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu/bin:/bin:/sbin:/usr/bin:/usr/sbin;
 export config_TARGET_CC="arm-softfloat-linux-gnu-gcc";
   export config_BUILD_CC="gcc";
   export config_TARGET_CFLAGS=;
   export config_TARGET_LIBS=;
   export CC_FOR_BUILD="gcc";
   export CFLAGS_FOR_BUILD=" ";
   export ac_cv_file__dev_zero=no;
   export apr_cv_tcp_nodelay_with_cork=yes;
   export ac_cv_sizeof_ssize_t=4;
   export ac_cv_sizeof_size_t=4;
   export ac_cv_file_dbd_apr_dbd_mysql_c=no;
   export apr_cv_mutex_recursive=yes;
   export ac_cv_func_pthread_rwlock_init=yes;
   export ac_cv_func_setpgrp_void=yes;
   export apr_cv_process_shared_works="yes"
   export apr_cv_type_rwlock_t=yes;
   export apr_cv_mutex_robust_shared="no";
   export ac_cv_func_malloc_0_nonnull=yes
   export enable_core_libedit_support=no;
  
      ./configure
       --host=arm-softfloat-linux-gnu
       --build=i386-pc-linux-gnu
       --with-devrandom=/dev/urandom
       --disable-tcl
       --with-expat=builtin
       --prefix=/home/james/freeswitch/app
       --disable-cpp
       --without-openssl
       --disable-core-libedit-support         二、打开freeswitch目录下的configure脚本,找到-Werror,去掉,否则会把简单告警当做错误   三、运行 ./rebootstarp.sh   四、执行 ./cross.sh