View previous topic :: View next topic |
Author |
Message |
Jackie Lin Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
nick_gentoo Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
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 |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54868 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 |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
GDH-gentoo Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/4552800915d460a483ae8d.jpg)
Joined: 20 Jul 2019 Posts: 1815 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 |
|
![](templates/gentoo/images/spacer.gif) |
Jackie Lin Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 31 May 2017 Posts: 115
|
Posted: Wed Oct 30, 2019 9:11 am Post subject: |
|
|
Thanks! _________________ peace, focus. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|