Hi Eric, On Tue, 26 Feb 2008 08:18:52 +0900, Eric Kow <[EMAIL PROTECTED]> wrote: > Mon Feb 25 23:16:35 GMT 2008 Eric Kow <[EMAIL PROTECTED]> > * Add wxcore-prof target for compiling profiling versions of wxcore. > > (snip) >hunk ./configure 817 > HCBASENAME=3D$hcbasename > HCFLAGS=3D > HCPKG=3D$hcpkg > +HC-PROF-FLAGS=3D-prof -auto-all > =
GHC's profiling option is not only -auto-all but also -caf-all and others. http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id353897 http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html And user usually wants to specify his own profiling option. So, Cabal has Ghc-Prof-Options field to get profiling options. http://www.haskell.org/ghc/docs/latest/html/Cabal/authors.html#buildinfo How about use this field to get profiling option instead of just using -auto-all? And I found two bugs in your patch. > hunk ./makefile 478 > > (snip) > > +WXCORE-PROF-OBJ =3D$(WXCORE-OUTDIR)/$(WXCORE).p_o > +WXCORE-PROF-LIB =3D$(WXCORE-OUTDIR)/lib$(WXCORE).p_a > +WXCORE-CORE-A-PROF-OBJ =3D$(WXCORE-OUTDIR)/$(WXCORE)0.p_o > +WXCORE-CORE-A-PROF-LIB =3D$(WXCORE-OUTDIR)/lib$(WXCORE)0.p_a > +WXCORE-CORE-B-PROF-OBJ =3D$(WXCORE-OUTDIR)/$(WXCORE)1.p_o > +WXCORE-CORE-B-PROF-LIB =3D$(WXCORE-OUTDIR)/lib$(WXCORE)1.p_a > +WXCORE-CORE-C-PROF-OBJ =3D$(WXCORE-OUTDIR)/$(WXCORE)2.p_o > +WXCORE-CORE-C-PROF-LIB =3D$(WXCORE-OUTDIR)/lib$(WXCORE)2.p_a Profiling library name is *_p.a, not *.p_a. This is different from other files name. It's confusing point. See your ghc libraries' names. So you must change following. WXCORE-PROF-LIB =$(WXCORE-OUTDIR)/lib$(WXCORE)_p.a > hunk ./makefile.lib 60 > # usage: $(call make-objs,<object root path>,<file base names>) > make-hs =3D$(patsubst %,$(1)/%.hs,$(2)) > make-objs =3D$(patsubst %,$(1)/%.o,$(2)) > +make-prof-objs =3D$(patsubst %,$(1)/%.p_o,$(2)) >(snip) > > +# compile-hs(<output .o>,<input .hs>,<compile flags>,<top output directory= >> ,<hs directories>) > +compile-prof-hs =3D$(call make-hs-obj,$(1),$(2),$(3),$(4)) && \ > + $(call silent-move-stubs,$(1),$(2)) && \ > + $(call make-hs-prof-deps,$(1),$(2),$(3),$(4),$(5)) I think you must add make-hs-prof-obj and use it in this part. Because we want to generate profiling version of interface file (*.p_hi). ghc search*.p_hi for profiling version, but ghc doesn't use *.p_hi to generate interafe file in default. So we must use -ohi option to generate *.p_hi. e.g. ghc Graphics/UI/WXCore/WxcClasses.hs -ohi Graphics/UI/WXCore/WxcClasses.p_hi http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id350122 Or renaming from *.hi to *.p_hi for profiling version. http://www.haskell.org/pipermail/haskell-cafe/2007-May/025681.html Best Regards, -- shelarcy <shelarcy hotmail.co.jp> http://page.freett.com/shelarcy/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ wxhaskell-devel mailing list wxhaskell-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-devel