如何编译一个可以在arm板子上跑的gcc,arm板如rv1126,需要完整流程的。
比如如何编译glibc、如何编译binutils、内核版本是否需要和arm板一致,gcc如何编译,什么版本。最好有详细的内容,勿要引用未经测试的文章,求
根据我先前的研究,交叉编译glibc:
../glibc-2.34/configure \
--prefix=/opt/packet/arm-linux-gnueabihf \
--build=$MACHTYPE \
--host=arm-linux-gnueabihf \
--target=arm-linux-gnueabihf \
--with-arch=armv7 \
--with-fpu=vfp \
--with-float=hard \
--with-headers=/opt/packet/arm-linux-gnueabihf/include \
--disable-multilib \
--disable-werror \
libc_cv_forced_unwind=yes
make install-bootstrap-headers=yes install-headers
make -j8 csu/subdir_lib
install csu/crt1.o csu/crti.o csu/crtn.o /opt/packet/arm-linux-gnueabihf/lib
arm-linux-gnueabihf-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /opt/packet/arm-linux-gnueabihf/lib/libc.so
touch /opt/packet/arm-linux-gnueabihf/include/gnu/stubs.h
然后执行make -j8 && make install,移植到arm板后,添加export PATH=$PATH:g++路径,export LD_LIBRARY_PATH=libc路径:$LD_LIBRARY_PATH后,支持arm-linux-gnueabihf-g++ -v,报这样的错误:
rm: relocation error: /userdata/media/gcc/packet/arm-linux-gnueabihf/lib/libc.so.6: symbol __nptl_set_robust_list_avail version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference。 如何解决?再次恳请解决方法,勿要引用未经验证的文章