When a package is building, how does it know where to find the libraries? I haven't been able to find anywhere that manages to explain it very well.
Normally I would expect make to go look in /lib, /usr/lib and /usr/local/lib for libraries when compiling, but in the case of a multilib system, there are libraries in /lib64, /usr/lib64, and /usr/local/lib64 as well. If make were to go immediately to the lib variety (as opposed to lib64) it would not properly link in the case of 64-bit compilation. So, it must have another way to decide which set of directories to go looking in. I'd like to know how this is accomplished. To get packages to correctly located libraries do I always have to use libdir=/lib64 or alter their makefiles - even if the package does not compile any new libraries? Do the -m32 and -64 flags for gcc tell it where to look? Or is there some other way that the package determines where to go hunting for libraries when it compiles? Once compiled, I assume that a binary know what it needs to link to based on what it was compiled with. However, I want to make sure that I understand how to properly deal with 64-bit libraries before I get far into BCLFS so that I can avoid having problems like all of my 64-bit programs attempting to link against 32-bit libraries (or vice versa). Thanks for any help that you can give me. - Jonathan Davis _______________________________________________ Clfs-support mailing list [email protected] http://lists.cross-lfs.org/cgi-bin/mailman/listinfo/clfs-support
