“How to build glibc”的版本间的差异
来自个人维基
free6d1823(讨论 | 贡献) |
free6d1823(讨论 | 贡献) |
||
第27行: | 第27行: | ||
<source lang="c"> | <source lang="c"> | ||
make | make | ||
+ | make install | ||
+ | </source> | ||
+ | If success, | ||
+ | <source lang="c"> | ||
+ | ls /opt/glibc | ||
+ | bin include lib libexec sbin share | ||
</source> | </source> |
2020年3月16日 (一) 15:38的最后版本
0. Preparation
Install cross-compiler on /opt
/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu
export PATH=/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/:$PATH
export CC=aarch64-linux-gnu-gcc
1. download glibc
http://mirrors.nju.edu.cn/gnu/libc/
download glibc-2.31.tar.gz and plugins
tar -xvf glibc-2.31.tar.gz tar xvf ~/下載/glibc-crypt-2.1.tar.gz tar xvf ~/下載/glibc-libidn-2.9.tar.gz tar xvf ~/下載/glibc-linuxthreads-2.5.tar.bz2 tar xvf ~/下載/glibc-localedata-2.0.6.tar.gz tar xvf ~/下載/glibc-ports-2.9.tar.bz2 tar xvf ~/下載/nss_db-2.2.tar.gz tar xvf ~/下載/nss_lwres-0.92.tar.gz
2. make
mkdir /opt/glibc cd /opt/glibc ~/glibc-2.31/configure arm-linux --target=arm-linux --prefix=/opt/glibc --host=aarch64-linux-gnu --enable-add-ons
if succeed, Makefile will be generated.
make make install
If success,
ls /opt/glibc bin include lib libexec sbin share