From: Aaron Patterson Date: 2009-11-03T02:26:43+09:00 Subject: [ruby-core:26485] Re: Building with gcov On Mon, Nov 02, 2009 at 12:26:37PM +0900, Yusuke ENDOH wrote: > Hi, > > 2009/11/2 Aaron Patterson : > > Does anyone have any pointers for building ruby with gcov? I see that > > Yusuke has done it before: > > > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/33258 > > > > But I am having problems. I run configure like this: > > > > $ CFLAGS='-fprofile-arcs -ftest-coverage' LIBS=-lgcov ./configure > > > How about > > CFLAGS="-fprofile-arcs -ftest-coverage" \ > DLDFLAGS="-Wl,-whole-archive -lgcov -Wl,-no-whole-archive" \ > ./configure It seems the linker flags are somewhat different on OS X. "-whole-archive" is supposed to be replaced with "-all_load", but I can't seem to find a replacement for "-no-whole-archive". The replacement was *supposed* to be "-noall_load", but that seems to be deprecated and ignored. I'll keep researching on OS X, but build on linux for now. Thanks for the pointers! -- Aaron Patterson http://tenderlovemaking.com/