Re: [AD] Fix profiling on BeOS

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, 2003-04-23 at 03:27, Peter Wang wrote:
> On 2003-04-22, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > ./configure --disable-stdlib --enable-proflib
> > 
> > And it does seem to start building the standard lib.. didn't really look
> > close at it though..
> 
> It's dumb, but you need to do --enable-profprog otherwise the example
> programs will want the standard library.

I see. But still - the examples never get linked with the profiling
code. This could be intended, but adding -pg to the linker actually
allows to build the exampes in profiling mode:

--- configure.in        11 Apr 2003 12:51:47 -0000      1.57
+++ configure.in        23 Apr 2003 12:21:43 -0000
@@ -215,6 +215,7 @@
   LIB_TO_LINK=allp
   PLUGIN_LIB=lib/unix/libapdat.a
   allegro_build_profiling_library=yes
+  LDFLAGS="-pg $LDFLAGS"
 else
   COMPILE_PROGRAM=COMPILE_NORMAL
   COMPILE_S_PROGRAM=COMPILE_S_NORMAL

(I still have no idea where in configure.in things like this go, so I
did a search for "LDFLAGS", and added it near the occurence already
there.)
Profiling shows very interesting results btw., I think I'll use it more
often from now on.

> -- 
> 王浩禎

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/