Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

how to find glibc sorce code

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
Jackie Lin
Tux's lil' helper
Tux's lil' helper
Posts: 115
Joined: Wed May 31, 2017 4:37 am

how to find glibc sorce code

  • Quote

Post by Jackie Lin » Sun Oct 27, 2019 10:57 am

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.
Top
nick_gentoo
Tux's lil' helper
Tux's lil' helper
Posts: 140
Joined: Mon Jan 07, 2019 7:42 pm

  • Quote

Post by nick_gentoo » Sun Oct 27, 2019 11:09 am

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...
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56087
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 27, 2019 11:37 am

Jackie Lin,

Code: Select all

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.
Top
fturco
Veteran
Veteran
Posts: 1181
Joined: Wed Dec 08, 2010 8:38 pm

  • Quote

Post by fturco » Sun Oct 27, 2019 2:46 pm

@Jackie Lin: See https://sourceware.org/git/?p=glibc.git
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Oct 27, 2019 3:13 pm

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
Top
Jackie Lin
Tux's lil' helper
Tux's lil' helper
Posts: 115
Joined: Wed May 31, 2017 4:37 am

  • Quote

Post by Jackie Lin » Wed Oct 30, 2019 9:11 am

Thanks!
peace, focus.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic