From 3c6be6883fbea93939bdb6e6604cbc4c50825e2f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sat, 5 Dec 2009 12:21:39 +0000 Subject: [PATCH] 2009-12-05 13:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/rtl/gtos2/Makefile * harbour/config/os2/watcom.mk * disable -s in GTOS2 OpenWatcom builds using HB_CSTACK_CHECK variable. This is workaround for wrong code generated by OpenWatcom <= 1.8 when -s switch is used for functions calling APIENTRY16 functions. Such code executed from non main thread causes GPF. --- harbour/ChangeLog | 8 ++++++++ harbour/config/os2/watcom.mk | 5 ++++- harbour/src/rtl/gtos2/Makefile | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a44140cb42..b610cbf88f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,14 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-05 13:21 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/rtl/gtos2/Makefile + * harbour/config/os2/watcom.mk + * disable -s in GTOS2 OpenWatcom builds using HB_CSTACK_CHECK variable. + This is workaround for wrong code generated by OpenWatcom <= 1.8 + when -s switch is used for functions calling APIENTRY16 functions. + Such code executed from non main thread causes GPF. + 2009-12-05 13:11 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * win-make.exe * INSTALL diff --git a/harbour/config/os2/watcom.mk b/harbour/config/os2/watcom.mk index 9a2a5d5e08..b961c671dd 100644 --- a/harbour/config/os2/watcom.mk +++ b/harbour/config/os2/watcom.mk @@ -36,10 +36,13 @@ ifneq ($(HB_BUILD_OPTIM),no) # architecture flags CFLAGS += -5r -fp5 + ifneq ($(HB_CSTACK_CHECK),yes) + CFLAGS += -s + endif # optimization flags # don't enable -ol optimization in OpenWatcom 1.1 - gives buggy code # -oxaht - CFLAGS += -onaehtr -s -ei -zp4 -zt0 + CFLAGS += -onaehtr -ei -zp4 -zt0 #CFLAGS += -obl+m ifeq ($(CC),wpp386) CFLAGS += -oi+ diff --git a/harbour/src/rtl/gtos2/Makefile b/harbour/src/rtl/gtos2/Makefile index 6b0d702c3c..a9b671be71 100644 --- a/harbour/src/rtl/gtos2/Makefile +++ b/harbour/src/rtl/gtos2/Makefile @@ -16,7 +16,7 @@ ifeq ($(HB_PLATFORM),os2) # This is workaround for wrong code generated by OpenWatcom 1.8 # when -s switch is used for functions calling APIENTRY16 functions. # Such code executed from non main thread causes GPF. - HB_CFLAGS += -sg + HB_CSTACK_CHECK := yes endif include $(TOP)$(ROOT)config/lib.mk else