Daniel Jacobowitz wrote:
On Tue, Mar 29, 2005 at 10:37:33PM -0800, Dan Kegel wrote:
Since I need to handle old versions of gcc, I'm
going to code up a little program to fix all
the embedded paths anyway, but I was surprised
by the paths in the pch file.  Guess I shouldn't
have been, but now I'm a little less confident
that this will work.  Has anyone else tried it?

I would guess that they're just debugging information. The PCH shouldn't care.

Thanks, I'll give it a shot and see what happens.

I'll probably write a little C program that
finds all instances of the old installation prefix,
scans forward in the file to figure out how the
string is terminated (hopefully NUL for binary
files, and whitespace or punctuation for ASCII files),
replaces the old path with the new one,
scoots anything between the path and the string termination down to fit,
and fixes the string termination.  If I'm lucky,
there won't be any special cases, and I can
do it without any particular knowledge of the
files being fixed; the search-and-replace program
shouldn't even care that the files it's modifying
are gcc binaries and spec files.

It shouldn't be needed for modern gccs, but it just
feels wrong to leave the old path embedded in the
binaries :-)
- Dan


-- Trying to get a job as a c++ developer? See http://kegel.com/academy/getting-hired.html

Reply via email to