“How to build glibc”的版本间的差异

来自个人维基
跳转至: 导航搜索
(以“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-g...”为内容创建页面)
 
 
(未显示1个用户的3个中间版本)
第7行: 第7行:
 
1. download glibc
 
1. download glibc
 
http://mirrors.nju.edu.cn/gnu/libc/
 
http://mirrors.nju.edu.cn/gnu/libc/
get glibc-2.31.tar.gz  
+
download glibc-2.31.tar.gz and plugins
 +
<source lang="c">
 
tar -xvf glibc-2.31.tar.gz  
 
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
 +
</source>
 
2. make
 
2. make
 
<source lang="c">
 
<source lang="c">
 
mkdir /opt/glibc
 
mkdir /opt/glibc
 
cd /opt/glibc
 
cd /opt/glibc
~/glibc-2.20/configure arm-linux --target=arm-linux --prefix=/opt/glibc --host=aarch64-linux-gun
+
~/glibc-2.31/configure arm-linux --target=arm-linux --prefix=/opt/glibc --host=aarch64-linux-gnu --enable-add-ons
 
</source>
 
</source>
 
if succeed, Makefile will be generated.
 
if succeed, Makefile will be generated.
 
<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