The feature works much better with:

    CXXFLAGS = -DNDEBUG -g -O2 -DUSE_PRECOMPILED_HEADERS=1

I also added <string>, <algorithm>, and <memory> to the list in pch.h.

Using precompiled headers on a particular Core 2 Duo (circa mid-2008)
reduced compile times by 38% (3 min, 51 sec versus 2 min, 22 sec).

Jeff

On Oct 7, 5:01 pm, Jeffrey Walton <[email protected]> wrote:
> Hi All,
>
> Does anyone have any experience with Linux/GCC precompiled headers? I
> found no difference (makefile mods attached) - each took exactly 2:11
> (m:s).
>
> Any ideas? Or is this a GCC rabbit hole?
>
> Jeff
>
> jeff...@bruno:~/cryptopp$ cat GNUmakefile.diff
>
> Index: GNUmakefile
> ===================================================================
> --- GNUmakefile (revision 521)
> +++ GNUmakefile (working copy)
> @@ -131,9 +131,12 @@
>  TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
>  DLLTESTOBJS = dlltest.dllonly.o
>
> -all: cryptest.exe
> +all: precompile cryptest.exe
>
> -test: cryptest.exe
> +precompile: pch.h
> +       $(CXX) $(CXXFLAGS) pch.h -o pch.h.gch
> +
> +test: precompile cryptest.exe
>         ./cryptest.exe v
>
>  clean:
> @@ -153,7 +156,7 @@
>  libcryptopp.so: $(LIBOBJS)
>         $(CXX) -shared -o $@ $(LIBOBJS)
>
> -cryptest.exe: libcryptopp.a $(TESTOBJS)
> +cryptest.exe: precompile libcryptopp.a $(TESTOBJS)
>         $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) 
> $(LDLIBS)
>
>  nolib: $(OBJS)         # makes it faster to test changes

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to