Le 10/12/2013 19:00, John Burrell a écrit :
> I'm trying to create some package archives.
> 
> I've started with linux_headers. I then did glibc and used 
> --with-headers=<location of the linux-headers> so it picked up the correct 
> headers.
> 
> Now I need to build binutils and make sure that it sees the correct toolchain 
> -
> 
> I created the specs file and edited it so it points to the correct headers 
> and the dynamic linker from the glibc archive.
> 
> When I test the specs file - 
> 
> readelf -l a.out | grep interpreter 
> 
> gives me:
> 
> '[Requesting program interpreter: 
> /home/john/lfs/glibc/glibc/usr/lib/ld-linux-x86-64.so.2]'
> 
> grep -B1 '^ /home/john' dummy.log 
> 
> gives me:
> 
> '#include <...> search starts here:
>  /home/john/lfs/linux_headers/api-headers/usr/include'
> 
> grep 'SEARCH.*' dummy.log |sed 's|; |\n|g'
> 
> gives me:
> 
> 'SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
> SEARCH_DIR("/usr/local/lib64")
> SEARCH_DIR("/lib64")
> SEARCH_DIR("/usr/lib64")
> SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
> SEARCH_DIR("/usr/local/lib")
> SEARCH_DIR("/lib")
> SEARCH_DIR("/usr/lib");'
> 
> i.e. no sign of the library dir from the glibc archive - 
> 
> because when I try
> grep "libc.so.6 " dummy.log
> 
> I get:
> 
> 'attempt to open /lib64/libc.so.6 succeeded'
> 
> which is clearly not correct.
> 
> How can I get it to search the glibc lib dir so it picks up the correct 
> libc.so.6?
> 
> TIA
> 
> jb.                                     
> 
I do not quite understand what you have done. Your first build was linux
headers then glibc? Without doing anything with gcc? If so, you cannot expect
gcc to know about the glibc you built. All those SEARCH_DIR lines come from gcc.

You can tweak the spec file of gcc. How to do that is described in the gcc
manual "gcc.info", section 3.15 "Specifying subprocesses and switches to pass
to them". It used to be described in LFS as "a bit of black magic"

basically, you run:
gcc -dumpspecs > spec-filename
then you edit spec-filename
then each time you use gcc, you have to type:
gcc -specs=spec-filename

Regards
Pierre
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to