Discussion:
gcc precompiled headers
Michael Barton
2006-08-14 14:50:01 UTC
Permalink
Is anyone using pre-compiled headers with GCC? It seems like this
would be nice to apply to merc.h. I tried doing this in my Makefile:

rom: merc.h.gch $(O_FILES)
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)

merc.h.gch: merc.h
$(CC) $(C_FLAGS) merc.h

merc.h.gch is created, and it compiles fine, but there doesn't seem to
be any measurable increase in compilation speed (i.e. using time(1)).
Makes me think it is probably silently failing to use the pre-compiled
version.

--Palrich.
--
ROM mailing list
***@rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
David Wilson
2006-08-14 14:57:45 UTC
Permalink
A couple years ago, I tried and tried to get PCH to work with C++ and
never figured it out. That was pre gcc-4, though. Things may have
improved now.

But really, ROM doesn't take long at all to compile on modern hardware
and I don't think using pch would result in any significant gains.

-David
Post by Michael Barton
Is anyone using pre-compiled headers with GCC? It seems like this
rom: merc.h.gch $(O_FILES)
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)
merc.h.gch: merc.h
$(CC) $(C_FLAGS) merc.h
merc.h.gch is created, and it compiles fine, but there doesn't seem to
be any measurable increase in compilation speed (i.e. using time(1)).
Makes me think it is probably silently failing to use the pre-compiled
version.
--Palrich.
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
***@rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
Michael Barton
2006-08-14 15:11:30 UTC
Permalink
Well yeah... I wasn't worried about optimizing an extra 20 seconds out
of my busy schedule. I was just curious as to why it didn't work, and
if anyone had gotten it to.
Post by David Wilson
A couple years ago, I tried and tried to get PCH to work with C++ and
never figured it out. That was pre gcc-4, though. Things may have
improved now.
But really, ROM doesn't take long at all to compile on modern hardware
and I don't think using pch would result in any significant gains.
-David
Post by Michael Barton
Is anyone using pre-compiled headers with GCC? It seems like this
rom: merc.h.gch $(O_FILES)
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)
merc.h.gch: merc.h
$(CC) $(C_FLAGS) merc.h
merc.h.gch is created, and it compiles fine, but there doesn't seem to
be any measurable increase in compilation speed (i.e. using time(1)).
Makes me think it is probably silently failing to use the pre-compiled
version.
--Palrich.
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
***@rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
Michael Gerner Andreasen
2006-08-14 18:30:14 UTC
Permalink
Ccache seem to come to mind. It will give you quite fastere compiles...

btw. sorry michael that I send you the first reply directly..
Post by Michael Barton
Well yeah... I wasn't worried about optimizing an extra 20 seconds out
of my busy schedule. I was just curious as to why it didn't work, and
if anyone had gotten it to.
Post by David Wilson
A couple years ago, I tried and tried to get PCH to work with C++ and
never figured it out. That was pre gcc-4, though. Things may have
improved now.
But really, ROM doesn't take long at all to compile on modern hardware
and I don't think using pch would result in any significant gains.
-David
Post by Michael Barton
Is anyone using pre-compiled headers with GCC? It seems like this
rom: merc.h.gch $(O_FILES)
$(CC) $(L_FLAGS) -o rom $(O_FILES) $(LIBS)
merc.h.gch: merc.h
$(CC) $(C_FLAGS) merc.h
merc.h.gch is created, and it compiles fine, but there doesn't seem to
be any measurable increase in compilation speed (i.e. using time(1)).
Makes me think it is probably silently failing to use the pre-compiled
version.
--Palrich.
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
--
ROM mailing list
***@rom.org
Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom
Loading...