打印

ACE交叉编译 求解

[复制链接]
2990|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zifenglin|  楼主 | 2013-3-31 12:39 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
按照http://blog.163.com/yu_hongchang ... 941382011510041187/
1.解压ace源代码到/root

2.设置环境变量ACE_ROOT如:export ACE_ROOT=”/root/ACE_wrappers”

3.将$ACE_ROOT/ace/config-linux.h复制成$ACE_ROOT/ace/config.h

4.$ACE_ROOT/include/makeinclude/platform_linux.GNU复制成 $ACE_ROOT/include/makeinclude/platform_macros.GNU并修改platform_macros.GNU文件,添加编译器名称:

CC = arm-linux-none-linux-gnueabi-gcc

CXX =arm-linux-none-linux-gnueabi-gcc

CXX_FOR_VERSION_TEST ?= $(CXX)

5.修改$ACE_ROOT/include/makeinclude/platform_g++_common.GNU文件,注释第134行:LDFLAGS += -Wl,-E
最后出现ld: skipping incompatible /usr/local/lib/libACE.so when searching for -lACE  错误。
按照http://blog.chinaunix.net/uid-20632682-id-82313.html
#(1)set env
export ACE_ROOT=$PWD
export PATH=$PATH:$ACE_ROOT/MPC
echo "ACE_ROOT is " $ACE_ROOT
export PATH=$PATH:$ACE_ROOT/MPC
#(2)build ace
cd $ACE_ROOT/ace
    #(2.1)config.h
ln -s config-linux.h config.h
    #(2.2) gen Makefile.ACE
mpc.pl -type make -include ../bin/MakeProjectCreator/config ace.mpc
    #(2.3) cross make
make -f Makefile.ACE CXX=arm-none-linux-gnueabi-g++
错误为:
/usr/local/arm/arm-2011.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/../../../../arm-none-linux-gnueabi/bin/ld: unknown architecture of input file `Atomic_Op_Sparc.o' is incompatible with arm output
/usr/local/arm/arm-2011.03/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.2/../../../../arm-none-linux-gnueabi/bin/ld: unknown architecture of input file `Rtems_init.o' is incompatible with arm output
collect2: ld returned 1 exit status

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

11

主题

34

帖子

1

粉丝