Freer.o fix

Jeff Johnston
Thu Oct 6 19:47:00 GMT 2005

Balaji V. Iyer wrote:
> Hi Everyone,
>     I posted a question about the Makefile freezing at freer.o. The problem
> I found was that, the mallocr.c does not have a function called freer, and
> thus it is freezing there looking for it. I took out the line from the make
> file and it seems to work well. I had this problem happening in Newlib
> 1.13.0.

No, you shouldn't be doing that.  freer.o is just the name of the object 
module.  It could be x.o or y.o - it doesn't have to correlate to what 
is inside the object.

Now, freer.o is a compile of mallocr.c with the special DEFINE_FREE flag 
set on.  Among other things, this compiles the function: _free_r which 
you want to have.

I would suggest you take a closer look at your compiler.  Remember this 
code builds perfectly fine across a large number of platforms.  You 
might try obtaining the preprocessor output to see what the compiler 
thinks it is compiling and/or look to see if any fixes have been made to 
the or32 compiler.

-- Jeff J.

> Here is the "diff" of my update:
> 126,127c126,127
> < LIBADD_OBJS = reallocr.$(oext) callocr.$(oext) cfreer.$(oext) \
> < 	mallinfor.$(oext) freer.$(oext) mallstatsr.$(oext) msizer.$(oext)
> mallocr.$(oext)
> ---
>>LIBADD_OBJS = freer.$(oext) reallocr.$(oext) callocr.$(oext)
> cfreer.$(oext) \
>>	mallinfor.$(oext) mallstatsr.$(oext) msizer.$(oext) mallocr.$(oext)
> 154,155c154,155
> < #freer.$(oext): mallocr.c
> < #	$(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/mallocr.c -o $@
> ---
>>freer.$(oext): mallocr.c
>>	$(MALLOC_COMPILE) -DDEFINE_FREE -c $(srcdir)/mallocr.c -o $@
> Thanking You,
> Yours Sincerely,
> Balaji V. Iyer.
> PS. If you have any questions, please CC me in your response since I am not
> subscribing to this mailing list.

More information about the Newlib mailing list