操作系统开发 - cross compile libelf

来源:互联网 发布:日韩和欧美护肤知乎 编辑:程序博客网 时间:2024/04/18 17:55
Dear OS developer
    the libelf can't be cross compile in mac by default, here is the tutorial to make it works. just run "./configure", use --prefix if you are going to install it in a specific directory

1) unzip your libelf-0.8.13.tar.gz2
2) don't ./configure with --target, because it won't help
3) edit config.h

change to these values:
#define HAVE_MMAP 0
#define HAVE_CATGETS 0

4) edit Makefile and lib/Makefile

change gcc,ld,ranlib to your toolchain's one


5) type "make" and "make install"

原创粉丝点击