From: Peng Yu <pengyu.ut@gmail.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: Florian Weimer <fweimer@redhat.com>,
Peng Yu via Libc-help <libc-help@sourceware.org>
Subject: Re: Directory structure of glibc and header files installed on Linux
Date: Thu, 4 Mar 2021 20:30:49 -0600 [thread overview]
Message-ID: <CABrM6wnj+yGJSv2rV-jiUddQQ+ZHYvc-DveT4uG6MVE3BocO-A@mail.gmail.com> (raw)
In-Reply-To: <e6892d00-8b5d-df60-4017-584238874cd2@linaro.org>
> A sysroot is a folder which contains a minimal filesystem (especially
> libraries, the C library and header files). I just paste the *exactly*
> sequence of command using build-many-glibcs.py to create one using
> gcc targeting glibc. You will need to read build-many-glibcs.py [3]
> to check exactly on how it accomplish it,
I am referring to the exact sequence of commands to make sysroot.
Basically, all commands need for vanilla ubuntu are needed (only
sysroot is need before running build-many-glibcs.py ?). Google search
of sysroot is not very helpful on how to use it.
https://stackoverflow.com/questions/39920712/what-is-a-sysroot-exactly-and-how-do-i-create-one
So once sysroot is create, then the following commands can be used?
All the original glibc installed in the system will not be affected?
>>> (1) glibc-git$ ./scripts/build-many-glibcs.py checkout
>>> /path/to/place/source/and/binaries
>>> (2) glibc-git$ ./scripts/build-many-glibcs.py host-libraries
>>> (3) glibc-git$ ./scripts/build-many-glibcs.py compilers x86_64-linux-gnu
>>> (4) glibc-git$ ./scripts/build-many-glibcs.py glibcs x86_64-linux-gnu
>>>
>>> The (1) will download the required source (binutils, linux, gcc,
>>> glibc, math libraries), (2) will
>>> build the math libraries used in gcc built, (3) will build a bootstrap
>>> compiler targetting
>>> x86_64-linux-gnu, and finally (4) will build a glibc using the
>>> bootstrap compiler built.
>>
>>
>
> [1] https://crosstool-ng.github.io/docs/toolchain-construction/
I don't need cross compilation. Why is this relevant?
> [2] http://www.linuxfromscratch.org/
What is the relation of the above instruction to arch linux?
> [3]
> https://sourceware.org/git/?p=glibc.git;a=blob;f=scripts/build-many-glibcs.py;h=580d25e8ee4b3ff5f99fb957e6e533035bcc4ebc;hb=HEAD
There are almost two thousand lines of code with too much code about
dealing with command-line options. It is definitely not minimal for
learning purposes. Does it really take so many lines of code. If the
target is just for intel architecture, It sounds like a bash script
with barely minimal code should be much shorter.
--
Regards,
Peng
prev parent reply other threads:[~2021-03-05 2:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 2:37 Peng Yu
2021-03-04 10:57 ` Florian Weimer
2021-03-04 14:19 ` Peng Yu
2021-03-04 14:41 ` Adhemerval Zanella
2021-03-04 16:56 ` Peng Yu
2021-03-04 19:58 ` Adhemerval Zanella
2021-03-04 22:37 ` Peng Yu
2021-03-04 23:01 ` Konstantin Kharlamov
2021-03-05 2:38 ` Peng Yu
2021-03-05 11:19 ` Adhemerval Zanella
2021-03-05 0:07 ` Adhemerval Zanella
2021-03-05 2:30 ` Peng Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABrM6wnj+yGJSv2rV-jiUddQQ+ZHYvc-DveT4uG6MVE3BocO-A@mail.gmail.com \
--to=pengyu.ut@gmail.com \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-help@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).