source code for gcc and glibc in openSUSE 11.0

I’m looking for the exact source code for the versions of gcc and glibc that are distributed in openSUSE 11.0. Perhaps it is in a repo somewhere?

Reason: Given the exact source code, one can recompile it with symbols, and when debugging an application one can then trace right through the stdlibc++ and glibc code - very slick. NOTE: stdlibc++ comes with gcc, which is why I need gcc.

I have from gnu.org the gcc 4.3.1 distribution; however, it is not clear that what came with openSUSE 11.0 is exactly the same. glibc 2.8 is somewhat more difficult to find, and from reading various threads I gather that nowadays one should just pick off the latest CVS tip. Net result: neither of these is provably the source code for the binaries distributed with openSUSE 11.0.

Because the compiler distributed with the system is used to compile the kernel and other parts of the system, it is non-trivial to install a completely new system compiler; stuff starts breaking in strange ways. Thus, I would prefer to simply be able to re-compile the libraries that came with the system.

I would guess that there is a repo somewhere with a snapshot of the source for gcc and glibc that was compiled to the binaries that were distributed with openSUSE 11.0.

If someone could point me to that, I would greatly appreciate it.

FWIW, I have looked in Yast for the gcc and glibc source and not found it. I have looked in Index of /distribution/11.0/repo/oss/suse/x86_64 for something that looked like source and not found it.

Thanks in advance

On Sun, 29 Jun 2008 02:26:03 GMT
henrymitchel <henrymitchel@no-mx.forums.opensuse.org> wrote:

>
> I’m looking for the exact source code for the versions of gcc and
> glibc that are distributed in openSUSE 11.0. Perhaps it is in a repo
> somewhere?
>
> Reason: Given the exact source code, one can recompile it with
> symbols, and when debugging an application one can then trace right
> through the stdlibc++ and glibc code - very slick. NOTE: stdlibc++
> comes with gcc, which is why I need gcc.
>
> I have from gnu.org the gcc 4.3.1 distribution; however, it is not
> clear that what came with openSUSE 11.0 is exactly the same. glibc 2.8
> is somewhat more difficult to find, and from reading various threads I
> gather that nowadays one should just pick off the latest CVS tip. Net
> result: neither of these is provably the source code for the binaries
> distributed with openSUSE 11.0.
>
> Because the compiler distributed with the system is used to compile
> the kernel and other parts of the system, it is non-trivial to
> install a completely new system compiler; stuff starts breaking in
> strange ways. Thus, I would prefer to simply be able to re-compile
> the libraries that came with the system.
>
> I would guess that there is a repo somewhere with a snapshot of the
> source for gcc and glibc that was compiled to the binaries that were
> distributed with openSUSE 11.0.
>
> If someone could point me to that, I would greatly appreciate it.
>
> FWIW, I have looked in Yast for the gcc and glibc source and not found
> it. I have looked in ‘Index
> of /distribution/11.0/repo/oss/suse/x86_64’ (http://download.opensuse.org/distribution/11.0/repo/oss/suse/x86_64/)
> for something that looked like source and not found it.
>
> Thanks in advance
>
>
Hi
You could download the src rpm and modify that, search at the
following link for gcc;
http://software.opensuse.org/search
or browse here and grab it from a mirror
http://download.opensuse.org/distribution/11.0/repo/src-oss/suse/src/


Cheers Malcolm °¿° (Linux Counter #276890)
SLED 10.0 SP2 x86_64 Kernel 2.6.16.60-0.23-smp
up 18 days 1:04, 0 users, load average: 0.28, 0.37, 0.26
GPU GeForce 8600 GTS Silent - Driver Version: 173.14.09

Isn’t there already a glibc package compiled with debugging enabled? A zypper search glibc turned up:

  | glibc-profile       | Libc Profiling and Debugging Versions        | package

Simply type what you want in the search box in Yast -> Software -> Software Management, e.g. glibc, and Yast will tell you what is available in whatever repositories you are subscribed to together with a description of each package

Malcolm: Thank you - the source rpm at Index of /distribution/11.0/repo/src-oss/suse/src was what I needed.

ken_yap: Thank you also - the profiling code is a useful tip, but not clear how to apply it. It contains a series of *_p.a files, for which I don’t actually know their compile switches. Very likely useful to know at some point, but I really need to be able to control the library build.

john_hudson: Thank you also - that is what I initially tried, but did not find source code (except for various projects and the kernel). Interestingly, the repo pointed to by Malcolm does not resolve to a Yast repo, so I could not include it in Yast to see the source code. The directory above it is a Yast repo, but the source .rpm’s do not show up in Yast (might be a problem between keyboard and chair).

Net: the original source code from which OpenSUSE 11.0 was built is at the repo pointed to by Malcolm.

Thanks to all who helped - I really appreciate it,
Henry

For profiling, look at the -p and -pg flags in gcc. And -d for activating the debug code for use with gdb.