Peering over the [cutting] edge

didbaba didbaba at
Fri Mar 23 07:34:36 PST 2001

Le Thu, Mar 22, 2001 at 09:09:46PM +0100 , Neven Has écrivait : 
> > My question is : what is the sed command to change 
> > 
> > `$(CC) -print-file-name=cpp | \
> >           sed 's|/cpp$$||'`
> > 
> > in
> > 
> > /usr/bin
> [ assuming s/in/to/ and that you didn't find a sed guru yet ;) ]
With a little help from Simon Perreault, I have a solution :)

sed s/\`\$\(CC\).-print-file-name=cpp.\|../"\/usr\/bin"/ glibc-2.2.2/sunrpc > file1 && sed s/\s*sed.\'\s\|.cpp\$\$\|\|\'\`// file1 > makefile && rm file1

I want to do that because I believe that it was gcc 2.95.3 fault. Apparently not.

# gcc -print-file-name=cpp
I would like to see /usr/bin/cpp, but I just see cpp.

I understand why. The command is -print-file-name=LIBRARY
and /usr/bin/cpp is a binary, but I succeed in compiling glibc by replacing /usr/lib/gcc-lib/*/cpp by this binary.

So my question : 
Is there a difference beetween the cpp binary who live in /usr/bin, and the cpp library who live in /usr/lib/gcc-lib...
(not tha same # ls cpp, but the same # file cpp) If it's tha same, why there is two places (why not a link), if it's not the same why do they got the same name (in gcc-2.95.2). Why do they change from cpp to cpp0, to distinguish ?

If you're bored with my questions, maybe you could give me some reference.

> "cpp -print-file-name=cpp" should work and give you the full absolute name:
> 	# cpp -print-file-name=cpp 
> 	/usr/lib/cpp
> or
> 	# cpp -print-file-name=cpp0
> 	/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/cpp0
> Just check if "/usr/lib/cpp" and "/lib/cpp" are not broken links.
> If they are, and point to "cpp" instead of "cpp0", fix them.
> The alternative is to have cpp -> cpp0 in "/usr/lib/gcc-lib/*/2.95.3/".
> All this, if I understand your problems correctly. :)
> Neven

I'll make the ln instead of sed command. 

powered by LinuxFromScratch 2.4

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list