2012-04-01 16:30 UTC+0200 Viktor Szakats (harbour syenar.net)

* config/win/mingw.mk
    + solved mingw harbour dll and unicows problem, so now 
      -shared Harbour executables built using mingw will be able 
      to run on Win9x, "out of the box".
      (has a downside that now separate compile pass is needed 
      to build objects with -DHB_DYNLIB (like with all the other 
      C compilers), but I left it enabled anyways to give uniform 
      support for unicows by default, including the nightly and 
      official builds. Look into the diff for an undocumented 
      way to disable this)

  * config/win/watcom.mk
  * config/win/xcc.mk
  * config/win/icc.mk
  * config/win/pocc.mk
  * config/win/bcc.mk
  * config/win/msvc.mk
    * restored to link 3rd libs (currently unicows, if available) 
      to harbour-*.dll with above compilers. These are currently 
      noops (except for bcc, where it just doesn't work), 
      they are fundemantally correct, but may require further 
      C compiler specific mods.

  ; TODO: problem with bcc harbour-*.dll remains. unicows is present, 
          specified, but ignored when linking, even though it's not ignored 
          when contrib dlls are built using similar method. I leave 
          resolving this problem to bcc users.
This commit is contained in:
Viktor Szakats
2012-04-01 14:31:16 +00:00
parent 8003855963
commit 7f657c2bb4
8 changed files with 53 additions and 6 deletions

View File

@@ -16,6 +16,35 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-04-01 16:30 UTC+0200 Viktor Szakats (harbour syenar.net)
* config/win/mingw.mk
+ solved mingw harbour dll and unicows problem, so now
-shared Harbour executables built using mingw will be able
to run on Win9x, "out of the box".
(has a downside that now separate compile pass is needed
to build objects with -DHB_DYNLIB (like with all the other
C compilers), but I left it enabled anyways to give uniform
support for unicows by default, including the nightly and
official builds. Look into the diff for an undocumented
way to disable this)
* config/win/watcom.mk
* config/win/xcc.mk
* config/win/icc.mk
* config/win/pocc.mk
* config/win/bcc.mk
* config/win/msvc.mk
* restored to link 3rd libs (currently unicows, if available)
to harbour-*.dll with above compilers. These are currently
noops (except for bcc, where it just doesn't work),
they are fundemantally correct, but may require further
C compiler specific mods.
; TODO: problem with bcc harbour-*.dll remains. unicows is present,
specified, but ignored when linking, even though it's not ignored
when contrib dlls are built using similar method. I leave
resolving this problem to bcc users.
2012-04-01 11:55 UTC+0200 Viktor Szakats (harbour syenar.net)
* config/win/watcom.mk
* config/win/xcc.mk

View File

@@ -107,7 +107,7 @@ DY := ilink32.exe
DFLAGS += -q -Gn -C -aa -Tpd -Gi -x $(LIBPATHS)
DY_OUT :=
# NOTE: .lib extension not added to keep line short enough to work on Win9x/ME
DLIBS := $(HB_USER_LIBS) $(LIBS) $(SYSLIBS) cw32mt import32
DLIBS := $(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS) cw32mt import32
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object

View File

@@ -55,7 +55,7 @@ AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR
DY := $(LD)
DFLAGS += -nologo -dll -subsystem:console $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object

View File

@@ -12,6 +12,23 @@ OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
3RDLIBS_DYN := $(3RDLIBS)
ifneq ($(HB_COMPILER),mingw64)
# Since unicows support in harbour-*.dll effectively
# doubles build time for core, allow it to be disabled.
ifeq ($(__HB_HARBOUR_DLL_UNICOWS),no)
3RDLIBS_DYN := $(filter-out $(3RDLIBS_DYN),unicows)
endif
ifneq ($(findstring unicows,$(3RDLIBS_DYN)),)
# Required to be able to link harbour-*.dll against unicows lib
# without it 'Cannot export <*>: symbol not found' errors occur.
HB_DYN_COPT := -DHB_DYNLIB
endif
endif
CC := $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
CC_IN := -c
CC_OUT := -o
@@ -119,7 +136,7 @@ AR_RULE = $(create_library)
DY := $(CC)
DFLAGS += -shared $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),-l$(lib))
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS_DYN) $(SYSLIBS),-l$(lib))
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object

View File

@@ -88,7 +88,7 @@ AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -nologo -out:$(LIB_DIR
DY := $(LD)
DFLAGS += -nologo -dll -subsystem:console $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object

View File

@@ -53,7 +53,7 @@ AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -out:$(LIB_DIR)/$@ $(^
DY := $(LD)
DFLAGS += -nologo -dll $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
# NOTE: The empty line directly before 'endef' HAVE TO exist!
define dynlib_object

View File

@@ -74,6 +74,7 @@ DFLAGS += OP quiet SYS nt_dll
DY_OUT :=
DLIBS := $(foreach lib,$(HB_USER_LIBS),$(lib))
DLIBS += $(foreach lib,$(LIBS),$(LIB_DIR)/$(lib))
DLIBS += $(foreach lib,$(3RDLIBS),$(3RDLIB_DIR)/$(lib))
DLIBS += $(foreach lib,$(SYSLIBS),$(lib))
DLIBS := $(strip $(DLIBS))

View File

@@ -56,7 +56,7 @@ AR_RULE = $(AR) $(ARFLAGS) $(HB_AFLAGS) $(HB_USER_AFLAGS) -out:$(LIB_DIR)/$@ $(^
DY := $(LD)
DFLAGS += -nologo -dll -noexpobj $(LIBPATHS)
DY_OUT := $(LD_OUT)
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
DLIBS := $(foreach lib,$(HB_USER_LIBS) $(LIBS) $(3RDLIBS) $(SYSLIBS),$(lib)$(LIB_EXT))
ifeq ($(HB_SHELL),sh)
DYNFIX = && mv $(DYN_DIR)/$(@:.dll=.LIB) $(LIB_DIR)/$(@:.dll=.lib)