View previous topic :: View next topic |
Author |
Message |
Jackie Lin Tux's lil' helper
Joined: 31 May 2017 Posts: 115
|
Posted: Sun Oct 27, 2019 10:57 am Post subject: how to find glibc sorce code |
|
|
Hi,
I want to read the source code of a function in C standard library.
How could I find the glibc source code in system?
and what about the C++ STL source code?
Thanks! _________________ peace, focus. |
|
Back to top |
|
|
nick_gentoo Tux's lil' helper
Joined: 07 Jan 2019 Posts: 140
|
Posted: Sun Oct 27, 2019 11:09 am Post subject: |
|
|
The downloaded sources of the installed packages are kept in the DISTDIR directory, defined in make.conf. There is a good chance that it is /usr/portage/distfiles.
The C library code is in the glibc archive.
The C++ standard library code is directly in gcc, I think... |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54586 Location: 56N 3W
|
Posted: Sun Oct 27, 2019 11:37 am Post subject: |
|
|
Jackie Lin,
Code: | ebuild /full/path/to/ebuild unpack | will unpack the sources for your package of choice.
See also the prepare phase.
Sources will be downloaded if they are needed. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181
|
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1719 Location: South America
|
Posted: Sun Oct 27, 2019 3:13 pm Post subject: |
|
|
nick_gentoo wrote: | The C++ standard library code is directly in gcc, I think... |
Yes, it is in library libstdc++, which is provided by GCC. Code can also be viewed here: https://gcc.gnu.org/git/?p=gcc.git |
|
Back to top |
|
|
Jackie Lin Tux's lil' helper
Joined: 31 May 2017 Posts: 115
|
Posted: Wed Oct 30, 2019 9:11 am Post subject: |
|
|
Thanks! _________________ peace, focus. |
|
Back to top |
|
|
|