
Gcc on MacOSX has the ability to use precompiled headers, and I was toying with the idea of giving this a try for Python.h. Has anyone tried this, and is it worth the hassle? Also, are precompiled headers an Apple addition to gcc, or are they available on all platforms? I'm interested in trying this because when I started using precompiled headers for MacPython with the CodeWarrior compiler the build time for a complete Python tree want down by about 70%, so that's definitely worth a little effort... -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -

"JJ" == Jack Jansen <Jack.Jansen@oratrix.com> writes:
JJ> Gcc on MacOSX has the ability to use precompiled headers, and JJ> I was toying with the idea of giving this a try for JJ> Python.h. Has anyone tried this, and is it worth the hassle? JJ> Also, are precompiled headers an Apple addition to gcc, or are JJ> they available on all platforms? I don't know, but didn't the old NeXTSTEP Objective-C compilers (also based off of gcc) support pre-compiled headers? -Barry

Jack Jansen <Jack.Jansen@oratrix.com> writes:
Also, are precompiled headers an Apple addition to gcc, or are they available on all platforms?
It's an Apple addition. Apple has a long-standing plan to contribute this back, but there are several things in the way; mainly that it is a large ugly hack.
I find the compile times of the Python tree on my Pentium 930MHz system to be accceptable, so I'd personally rather avoid a feature with the potential of producing incorrect binaries. Regards, Martin

On woensdag, oktober 23, 2002, at 12:54 , Martin v. Loewis wrote:
This last sentence sounds like you know something that I don't, could you explain? Precompiled headers keep track of the preprocessor symbols they depend on, and their value at precompile time, so I've always thought that this (together with correct Makefile dependencies) would be safe... -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -

Jack Jansen <Jack.Jansen@oratrix.com> writes:
... assuming it is correctly implemented. All implementations of precompiled headers I've used so far had certain limitations (sometimes documented, sometimes undocumented), which would cause users to throw away the precompiled stuff from time to time to make sure that the compiler would really pick up their source code. I don't know the Apple gcc implementation of precompiled headers, though - it might be flawless. Regards, Martin

If it's anything like the way the old Lucid C++ compiler did it, it'll be just coredumping the preprocessor's state. We always found that it wasn't worthwhile unless you were dealing with something like OI's 1.something megabytes of headers... Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.

"JJ" == Jack Jansen <Jack.Jansen@oratrix.com> writes:
JJ> Gcc on MacOSX has the ability to use precompiled headers, and JJ> I was toying with the idea of giving this a try for JJ> Python.h. Has anyone tried this, and is it worth the hassle? JJ> Also, are precompiled headers an Apple addition to gcc, or are JJ> they available on all platforms? I don't know, but didn't the old NeXTSTEP Objective-C compilers (also based off of gcc) support pre-compiled headers? -Barry

Jack Jansen <Jack.Jansen@oratrix.com> writes:
Also, are precompiled headers an Apple addition to gcc, or are they available on all platforms?
It's an Apple addition. Apple has a long-standing plan to contribute this back, but there are several things in the way; mainly that it is a large ugly hack.
I find the compile times of the Python tree on my Pentium 930MHz system to be accceptable, so I'd personally rather avoid a feature with the potential of producing incorrect binaries. Regards, Martin

On woensdag, oktober 23, 2002, at 12:54 , Martin v. Loewis wrote:
This last sentence sounds like you know something that I don't, could you explain? Precompiled headers keep track of the preprocessor symbols they depend on, and their value at precompile time, so I've always thought that this (together with correct Makefile dependencies) would be safe... -- - Jack Jansen <Jack.Jansen@oratrix.com> http://www.cwi.nl/~jack - - If I can't dance I don't want to be part of your revolution -- Emma Goldman -

Jack Jansen <Jack.Jansen@oratrix.com> writes:
... assuming it is correctly implemented. All implementations of precompiled headers I've used so far had certain limitations (sometimes documented, sometimes undocumented), which would cause users to throw away the precompiled stuff from time to time to make sure that the compiler would really pick up their source code. I don't know the Apple gcc implementation of precompiled headers, though - it might be flawless. Regards, Martin

If it's anything like the way the old Lucid C++ compiler did it, it'll be just coredumping the preprocessor's state. We always found that it wasn't worthwhile unless you were dealing with something like OI's 1.something megabytes of headers... Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
participants (4)
-
Anthony Baxter
-
barry@python.org
-
Jack Jansen
-
martin@v.loewis.de