Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3BF97E29.39FC7C7E@phekda.freeserve.co.uk> Date: Mon, 19 Nov 2001 21:48:25 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Building a profiled version of libc References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > That's because mcount.c cannot be compiled with -pg. Recompile > mcount.c manually without -pg -a, put it into libc.a, then rebuild the > distribution, and it will work (at least it does for me with > djlsr203.zip). Yes! Thanks to you and Hans for pointing out the problem in the problem. ;) I assumed gcc would add some stand-alone magic to the objects, but I guess it's not suprising it needs some help from the C library to do the timing. > If this does solve the problem, could you please fix > src/libc/crt0/makefile to DTRT? This does fix the problem. I'm not quite sure how to DTRT. How about this: Presumably we want to compile mcount.c with the same options as the rest of the code, but without -pg and -a. So should I add a new command to src/makefile.inc that defines a new XGCC - XGCC_NO_PG - to be used for mcount.c? This would use a version of src/gcc.opt passed through sed to remove -pg and -a. (Requiring sed to build library sources must be OK, since we use sed in src/libc/crt0/makefile.) Thanks, bye, Rich =] -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/