操作系统开发 - cross compile libelf

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"

你可能感兴趣的:(gcc,OS,makefile)