LFS7.2, problem when chapter 6.10: adjusting the toolchain, can not change gcc specs
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Maybe I'm still half asleep, but what is the actual problem?
The first gcc -dumpspecs command you posted is changed by sed and put in a file and the second gcc -dumpspecs command you post is just the bare, unchanged output.
Here is the problem, the gcc -v says gcc is using the specs file created by first gcc -dumpspecs and sed command,
but the second gcc -dumpspecs still prints out unchanged specs.
Should this be a problem? or gcc -dumpspecs just always gives original built-in specs?
IIRC there is nothing in the book on running gcc -dumpspec twice to verify, do the other tests to verify the toolchain. if they are not correct then there is a problem, but if the tests works then there is no problem and correct specs are used.
Here is the problem, the gcc -v says gcc is using the specs file created by first gcc -dumpspecs and sed command,
but the second gcc -dumpspecs still prints out unchanged specs.
Should this be a problem? or gcc -dumpspecs just always gives original built-in specs?
Curiosity is a great thing, but can also be confusing
gcc -dumpspecs prints all of the built in spec strings. gcc will use the spec file when doing its thing.
I thought it caused by wrong gcc specs, but now it seems not be that reason.
Can you see what's wrong here?
The output is indeed not correct. Or better: half is correct and the other half isn't. I'm not able to point you to anything specific, but this does need to be fixed before you continue.
I do find it curious that half the entries are correct (no /tools) and the other half does have the (incorrect) /tools part. Never seen that before.
Oh, I see, thanks. Here is the reason why I ask this question:
it is not correct:
Quote:
Quote:
attempt to open /tools/lib/libc.so.6 succeeded
I'm a newbie here. druuna knows much more than me, but this looks like "/tools" wasn't removed from your search path. So, I'd say that the changes to dumpspecs failed.
I had a similar problem. What worked for me was to break it down into pieces. I did a gcc -dumpspecs > specs.org before the sed. Then I did another gcc -dumpspecs and piped that through the first sed, and sent that to sed.out. Then the second sed on sed.out > sed2.out. Then the third sed on sed2.out > sed3.out. Then copied sed3.out into the specs file.
After each step I diffed the output against the original specs file (specs.orig) to see if there were any changes and if the changes made sense.
If they all do, then look at gcc --print-libgcc-filename, and make sure that makes sense as well, although I can't imagine how anything would work if that was wrong.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.