This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC 2.95.3 - libc.so for Linux-PPC Cross-Compiler


Hi,

I was able to successfully install GCC 2.95.3 as a cross-compiler for powerpc-unknown-linux-gnu. However, after the installation we were having problems at link time resolving libpthread.so's dependency on libc.so.6. Furthermore, we discovered that the problem was related to the file libc.so that we had copied from our target machine. The original file had the following contents:

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )

These paths were valid in the target machine but they are obviously not valid in my host. In order to fix the problem, I replaced the GROUP line in libc.so with the following one:

GROUP ( libc.so.6 libc_nonshared.a )

This fixed the issue and allowed the cross-compiler to find libc.so.6. However, we started to get an error saying that libc.so.6 needed ld.so.1 but this file was not found. Well... ld.so.1 was right there in the same directory where libc.so.6 was located. The only way I got around of this problem was by adding ld.so.1 to the list as follows:

GROUP ( libc.so.6 libc_nonshared.a ld.so.1 )

This fixed all the problems and now the compiler is working as a charm. What scares us now is the fact that we have no idea why these changes fixed the problem. What does the GROUP command in libc.so do? What is it supposed to mean? Could the changes that we have performed be harmful in any way? 

Thanks in advance,
Iran


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]