On Thu, 13 Nov 2008, Maurilio Longo wrote:

Hi Maurilio,

> I'think I've found something:
> first of all, I started from config/win32/owatcom flags, then I had to remove
> -bt=OS2 which is wrong, should be -bt=OS2V2 but this gives an undefined
> function referenced error when building, so I removed every thing, then I

Just like David. He also removed -bt

> changed -5 to -5r because -5 is for 16bit code.

I think it does not cause any difference when wpp386 is used but of
course it's cleaner and we should update these switches.

> It still did non build though, so I started looking at optimization flags
> where I found that -s disables stack overlow checking; and it was it!
> So I changed it to -sg which means grow stack upon need, so now I have
> CPPFLAGS = -w2 -zq
> #architecture flags
> CPPFLAGS += -6r -fp6
> # optimization flags
> # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code
> CPPFLAGS += -onaehtzr -oi+ -ei -zp8 -sg -zt0

Thank you very much. It's possible that -sg helps indirectly because
it has to interact with the stack structure and generated code which
may also change the code generate to call KBD16CHARIN(). As we can see
in GCC code you sent it needs special calling convention.

> I've used -6r since, given we're building for a peculiar cpu, at least we use
> a modern one as target and -sg as explained earlier.

If possible I'd like to ask you and David to check if -sg is enough.
Both switches interacts with calling convention and function encapsulation
so it will be good to know which one helps to resolve the problem.

> For LDFLAGS I have this
> LDFLAGS = OP stack=65536 OP CASEEXACT
> given that now stack can be grown, it does not give problems.

The size of stack is less important in this tests though for such
small stack (<=64KB) it's possible that OW makes some internal
optimizations and they are source of the problem.
It will be good to check what will happen when bigger stack is allocated.

> All mttest?? do work (apart from nr. 10) and speedtst works as well.

Very nice. Thank you.
David if possible I would like to ask you to rebuild OW OS2 Harbour
with above switches to confirm that it also works in your environment.

best regards,
Przemek
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to