[Coco] MAKE woes? Was: rlink woes? was Re: nasty bug in cprep19!!!

Stephen H. Fischer SFischer1 at Mindspring.com
Sat May 28 18:04:47 EDT 2011


Hi,

Sorry, I was not clear. It's "MAKE" that gets the stack overflow.

make -d -n -p
----------------------------------------------------------
Reading default rules from "/dd/sys/make.default".
Setting Object Dir to "".
Setting Rel Dir to "".
Getting macros from command line.
Opening makefile.
Reading makefile.
Macros:
    rlink = /dd/lib/cos9.l -o=archive
    $ = $
    RDIR =
    ODIR =
    RFLAGS =
    RMA = rma
    LFLAGS =
    LINK = rlink
    CFLAGS = -dOS9
    CC = 3 archive.p4.c

.r:
     Commands:
        $(LINK) $(LFLAGS) $< -o=$(ODIR/)$@

.a:

.c:
     Commands:
        $(CC) $(CFLAGS) $(LFLAGS) $< -f=$(ODIR/)$@

.SUFFIXES:
     Depends on:  .r .a .c

.c.r:
     Commands:
        $(CC) $(CFLAGS) -r=$(RDIR) $<

.a.r:
     Commands:
        $(RMA) $(RFLAGS) $< -o=$(RDIR/)$@

archive.p1.r:
     Depends on:  archive.h archive.p1.c

archive.p2.r:
     Depends on:  archive.h archive.p2.c

archive.p3.r:
     Depends on:  archive.h archive.p3.c

archive.p4.r:
     Depends on:  archive.h archive.p4.c

archive:   (MAIN NAME)
     Depends on:  archive.p1.r archive.p2.r archive.p3.r archive.p4.r

archive.h:

archive.p1.c:

archive.p2.c:

archive.p3.c:

archive.p4.c:

Checking target definitions for circles.
**** STACK OVERFLOW ****

----------------------------------------------------------

I am not sure about your comments about "cstart.r".

The previous make did not require it. That would be a step back.

----------------------------------------------------------

archive.p1.r: archive.h archive.p1.c
=CC2 -r -e=2 archive.p1.c*

archive.p2.r: archive.h archive.p2.c
=CC2 -r -e=2 archive.p2.c*

archive.p3.r: archive.h archive.p3.c
=CC2 -r -e=2 archive.p3.c*

archive.p4.r: archive.h archive.p4.c
=CC2 -r -e=2 archive.p4.c*

/D0/CMDS/archive: archive.p1.r archive.p2.r archive.p3.r archive.p4.r
=CC2 -e=2 -f=archive archive.p1.r archive.p2.r archive.p3.r 
archive.p4.r -l=/d1/lib/cos9.l*

----------------------------------------------------------

The last line may be wrapped!

I think that much of the new makefile can be eliminated.

SHF


----- Original Message ----- 
From: "Willard Goosey" <goosey at virgo.sdc.org>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Saturday, May 28, 2011 12:45 PM
Subject: [Coco] rlink woes? was Re: nasty bug in cprep19!!!


> On Sat, May 28, 2011 at 11:30:50AM -0700, Stephen H. Fischer wrote:
>> Moving back to the original c.prep eliminated the errors.
>
> This evening (after it cools down enough to run my CoCo) I'll package up
> and upload the newest version and it'll be one less reason for people to
> have to go back to the original c.prep.
>
>> But I am stuck, the .c files have been transformed to .r files but I get 
>> a
>> stack overflow when the target is attempted. The two needed lines have 
>> been
>> changed in the header file.
>
> Is rlink stack overflowing, or when you try to run the program?
>
>> rlink  archive.p1.r archive.p2.r archive.p3.r/
>> archive.p4.r -l=/dd/lib/cos9.l -o=archive
>
> First file linked in should be /dd/lib/cstart.r!  That shouldn't even
> work, you should get all sorts of linker errors of "_foo not found"
>
> Even if the other ROFs are assembly programs, cos9.l is C and is going
> to expect C's memory setup, which is mostly done in cstart before main()
> gets called.
>
> If rlink is what's overflowing its stack, try giving it more RAM.  If
> that doesn't work, you'll have to dig up someone who knows about rlink's
> internals.
>
> Willard




More information about the Coco mailing list