gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PCH Support


From: Helge Hess
Subject: PCH Support
Date: Fri, 26 Aug 2005 15:32:01 +0200

Hi,

I've added some PCH support to gstep-make 1.11.0 and I'm almost ready to send it for inclusion. At least on OSX it gives a major performance boost (compilation of libSaxObjC in 13s instead of 23s on a G4/800MHz).

Problem is, it only works completely on OSX (only checked 10.4 so far). On Linux, gcc 4.0.2 seems to be able to compile the header but I get errors when trying to use it with a source file.

OSX, works fine:
---snip---
address@hidden make messages=yes all
Making all for library libSaxObjC...
cd .; \
/Users/helge/dev/SOPE-4.5-gs/.gsmake/Library/Makefiles/mkinstalldirs ./shared_debug_obj; \
rm -f obj; \
ln -s ./shared_debug_obj obj
if ! test -d ./derived_src; then \
/Users/helge/dev/SOPE-4.5-gs/.gsmake/Library/Makefiles/mkinstalldirs ./derived_src; \
fi
gcc -x objective-c-header common.h -c \
-MMD -MP -pipe -Wall -Wno-protocol -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 -DSOPE_MAJOR_VERSION=4 -DSOPE_MINOR_VERSION=5 -DSOPE_SUBMINOR_VERSION=52 -Wno-protocol -DNeXT_Foundation_LIBRARY=1 -DNeXT_RUNTIME=1 -dynamic -fno-common -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -fno-strict-aliasing -fnext-runtime -I.. -I. \
       -o derived_src/common.h.gch
gcc SaxAttributeList.m -c \
-MMD -MP -pipe -Wall -Wno-protocol -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 -DSOPE_MAJOR_VERSION=4 -DSOPE_MINOR_VERSION=5 -DSOPE_SUBMINOR_VERSION=52 -Wno-protocol -DNeXT_Foundation_LIBRARY=1 -DNeXT_RUNTIME=1 -dynamic -fno-common -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -fno-strict-aliasing -fnext-runtime -I.. -I. \
      -include ./derived_src/common.h \
       -o shared_debug_obj/SaxAttributeList.o
...
---snap---

Linux:
---snip---
address@hidden:~/dev/SOPE-4.5/sope-xml/SaxObjC$ make messages=yes
Making all for library libSaxObjC...
cd .; \
/home/helge/GNUstep/Library/Makefiles/mkinstalldirs ./shared_debug_obj; \
rm -f obj; \
ln -s ./shared_debug_obj obj
if ! test -d ./derived_src; then \
  /home/helge/GNUstep/Library/Makefiles/mkinstalldirs ./derived_src; \
fi
gcc -x objective-c-header common.h -c \
-pipe -Wall -Wno-protocol -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 -DSOPE_MAJOR_VERSION=4 -DSOPE_MINOR_VERSION=5 -DSOPE_SUBMINOR_VERSION=52 -Wno-protocol -I/home/helge/GNUstep/Library/Headers/libFoundation/ix86/linux-gnu/GNU -DGNUSTEP=1 -DWITH_GSTEP_MAKE=1 -DLIB_FOUNDATION_LIBRARY=1 -DFD_WITH_GSMAKE=1 -DGNUSTEP=1 -DGNU_RUNTIME=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -fno-strict-aliasing -fgnu-runtime -I.. -I. -I/home/helge/GNUstep/Library/Headers -I/home/helge/GNUstep//Library/Headers -I/home/helge/GNUstep/Library/Headers/libFoundation -I/home/helge/GNUstep//Library/Headers/libFoundation -I/home/helge/GNUstep//Library/Headers/libFoundation -I/home/helge/GNUstep/Library/Headers/libFoundation -I/home/helge/GNUstep/Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep//Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep//Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep/Library/Headers/libFoundation/./GNU \
       -o derived_src/common.h.gch
gcc SaxAttributeList.m -c \
-pipe -Wall -Wno-protocol -Wall -DCOMPILE_FOR_GSTEP_MAKE=1 -DSOPE_MAJOR_VERSION=4 -DSOPE_MINOR_VERSION=5 -DSOPE_SUBMINOR_VERSION=52 -Wno-protocol -I/home/helge/GNUstep/Library/Headers/libFoundation/ix86/linux-gnu/GNU -DGNUSTEP=1 -DWITH_GSTEP_MAKE=1 -DLIB_FOUNDATION_LIBRARY=1 -DFD_WITH_GSMAKE=1 -DGNUSTEP=1 -DGNU_RUNTIME=1 -D_REENTRANT -fPIC -g -Wall -DDEBUG -fno-omit-frame-pointer -DGSWARN -DGSDIAGNOSE -fno-strict-aliasing -fgnu-runtime -I.. -I. -I/home/helge/GNUstep/Library/Headers -I/home/helge/GNUstep//Library/Headers -I/home/helge/GNUstep/Library/Headers/libFoundation -I/home/helge/GNUstep//Library/Headers/libFoundation -I/home/helge/GNUstep//Library/Headers/libFoundation -I/home/helge/GNUstep/Library/Headers/libFoundation -I/home/helge/GNUstep/Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep//Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep//Library/Headers/libFoundation/./GNU -I/home/helge/GNUstep/Library/Headers/libFoundation/./GNU \
      -include ./derived_src/common.h \
       -o shared_debug_obj/SaxAttributeList.o
SaxAttributeList.m:188: error: redefinition of 'struct _objc_symtab'
SaxAttributeList.m:188: error: redefinition of 'struct _objc_module'
SaxAttributeList.m:188: error: redefinition of '__objc_gnu_init'
common.h:26: error: previous definition of '__objc_gnu_init' was here
{standard input}: Assembler messages:
{standard input}:2136: Error: symbol `_OBJC_SYMBOLS' is already defined
{standard input}:2302: Error: symbol `_OBJC_MODULES' is already defined
{standard input}:2351: Error: symbol `_OBJC_CLASS_NAME_0' is already defined
...
address@hidden:~/dev/SOPE-4.5/sope-xml/SaxObjC$ file derived_src/common.h.gch
derived_src/common.h.gch: GCC precompiled header (version 012) for Objective C
---snap---


Does someone know whether PCH is fully implemented in the GNU gcc? Any hints?

Thanks,
  Helge
--
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]