使用 Autoconf 为 ARM 交叉编译 [英] Cross-compiling for ARM with Autoconf

查看:45
本文介绍了使用 Autoconf 为 ARM 交叉编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 autconf 为我的 arm 板交叉编译库时遇到问题.

I am having trouble cross-compiling a library for my arm board using autconf.

我正在使用这条线:

./configure --target=arm-linux --host=arm-linux --prefix=/bla/bla/bla/linux_arm_tool CFLAGS='-m32'
make
make install

当我执行 file 来检查它时,我得到:

When I do file to check it I get:

libjpeg.so.8.4.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

这似乎根本不对,但我还是尝试使用它......我得到:

That doesn't seem right at all, but I tried using it anyway... and I get:

/usr/lib/gcc/arm-linux-gnueabi/4.5.3/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /bla/bla/bla/bla/../linux_arm_tool/lib/libjpeg.so when searching for -ljpeg

我不知所措,我已经在谷歌上搜索了一个小时......

I'm at a loss, I've been googling for an hour now...

推荐答案

所以我知道我在使用真正基本的方法调用之前已经进行了交叉编译,并且在检查输出之后我弄清楚了为什么我之前没有这样做:

So I knew I've cross compiled before using really basic method calls and I figured out why I've gotten away with this before after examining the output:

checking for arm-linux-gnueabi-gcc... no
checking for gcc... gcc
...
...
checking for arm-linux-gnueabi-gcc... gcc

在我的 /usr/bin 中没有 arm-linux-gnueabi-gcc,我不得不:

In my /usr/bin there was no arm-linux-gnueabi-gcc, I had to:

ln -s /usr/bin/arm-linux-gnueabi-gcc-4.5 /usr/bin/arm-linux-gnueabi-gcc

<小时>

我使用以下方法成功交叉编译:


I successfully cross-compiled using:

./configure --host=arm-linux-gnueabi -prefix=${CSTOOL_DIR}/linux_arm_tool

至于链接......我仍然需要检查一些东西,但我假设我可能需要在更高级的编译中抛出一些 -rpath-link 标志.

as for linking ... I still have to check some things, but I am going to assume I might need to throw some -rpath-link flags in more advanced compiles.

这篇关于使用 Autoconf 为 ARM 交叉编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆