From c7d56abd3310cc1b1a2af4c250045ee72990c98f Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 17 Mar 2009 23:31:50 +0000 Subject: [PATCH] 2009-03-18 00:31 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * config/rules.cf + Added -ko optimization switch for Harbour. ; TODO: Disable it for specific places of hbtest. * bin/hb-mkdyn.bat + Added missing pocc implib generation. * utils/hbmk2/hbmk2.prg + mingwce support synced with mingw some more. F.e. now resources are supported for mingwce executables. --- harbour/ChangeLog | 12 ++++++++++++ harbour/bin/hb-mkdyn.bat | 3 +++ harbour/config/rules.cf | 2 +- harbour/utils/hbmk2/hbmk2.prg | 16 ++++++++-------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 68ced7424a..c9ab91cb58 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,18 @@ 2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-03-18 00:31 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * config/rules.cf + + Added -ko optimization switch for Harbour. + ; TODO: Disable it for specific places of hbtest. + + * bin/hb-mkdyn.bat + + Added missing pocc implib generation. + + * utils/hbmk2/hbmk2.prg + + mingwce support synced with mingw some more. + F.e. now resources are supported for mingwce executables. + 2009-03-17 20:15 UTC+0100 Viktor Szakats (harbour.01 syenar hu) * bin/hb-mkdyn.sh * bin/hb-func.sh diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index 2c0363c2a8..9e55c093a6 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -349,6 +349,9 @@ set _DST_NAME_MT=harbourmt-%HB_DLL_VERSION% echo Making %_DST_NAME_ST%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @_hboneut.txt @_hbost.txt user32.lib wsock32.lib advapi32.lib gdi32.lib echo Making %_DST_NAME_MT%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @_hboneut.txt @_hbomt.txt user32.lib wsock32.lib advapi32.lib gdi32.lib +polib "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_ST%.lib" +polib "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" /out:"%HB_LIB_INSTALL%\%_DST_NAME_MT%.lib" + rem ; Cleanup for /F %%o in (_hbost.txt) do ( del %%o ) if exist _st\maindll.obj del _st\maindll.obj diff --git a/harbour/config/rules.cf b/harbour/config/rules.cf index 4e2ce5b0d9..23402952a7 100644 --- a/harbour/config/rules.cf +++ b/harbour/config/rules.cf @@ -29,7 +29,7 @@ HB := $(HB)harbour$(EXE_EXT) ifeq ($(HB_GCMODE),) HB_GCMODE=3 endif -HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -km $(HB_PDBG) +HB_FLAGS := -i$(HB_INC_COMPILE) -q0 -w3 -es2 -kmo $(HB_PDBG) HB_RULE = $(HB) $? -n1 $(HB_FLAGS) -gc$(HB_GCMODE) $(HB_USER_PRGFLAGS) # The rule to link an executable. diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 17ecb6b8c4..650510fa5f 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -1316,13 +1316,13 @@ FUNCTION Main( ... ) AAdd( s_aLIBFM, iif( s_lMT, "hbfmmt", "hbfm" ) ) ENDIF - IF t_cCOMP == "mingw" .AND. Len( s_aRESSRC ) > 0 + IF t_cCOMP $ "mingw|mingwce" .AND. Len( s_aRESSRC ) > 0 IF Len( s_aRESSRC ) == 1 - cBin_Res := "windres" + cBin_Res := t_cCCPREFIX + "windres" cOpt_Res := "{LR} -o {LS}" cResExt := ".o" ELSE - OutErr( "hbmk: Warning: Resource files ignored. Multiple ones not supported with mingw." + hb_osNewLine() ) + OutErr( "hbmk: Warning: Resource files ignored. Multiple ones not supported with mingw/mingwce." + hb_osNewLine() ) ENDIF ENDIF @@ -1772,9 +1772,9 @@ FUNCTION Main( ... ) "LNK4217: locally defined symbol ... imported in function ..." if using 'dllimport'. [vszakats] */ tmp := "" - CASE t_cCOMP $ "gcc|mingw|cygwin" ; tmp := "__attribute__ (( dllimport ))" - CASE t_cCOMP $ "bcc|owatcom" ; tmp := "__declspec( dllimport )" - OTHERWISE ; tmp := "_declspec( dllimport )" + CASE t_cCOMP $ "gcc|mingw|mingwce|cygwin" ; tmp := "__attribute__ (( dllimport ))" + CASE t_cCOMP $ "bcc|owatcom" ; tmp := "__declspec( dllimport )" + OTHERWISE ; tmp := "_declspec( dllimport )" ENDCASE /* Create list of requested symbols */ @@ -2294,7 +2294,7 @@ STATIC FUNCTION ListCookLib( arraySrc, cPrefix, cExtNew ) LOCAL cDir LOCAL cLibName - IF t_cCOMP $ "gcc|gpp|mingw|djgpp|cygwin" + IF t_cCOMP $ "gcc|gpp|mingw|mingwce|djgpp|cygwin" FOR EACH cLibName IN array hb_FNameSplit( cLibName, @cDir ) IF Empty( cDir ) @@ -2972,7 +2972,7 @@ STATIC FUNCTION getFirstFunc( cFile ) LOCAL cFuncList, cExecNM, cFuncName, cExt, cLine, n, c cFuncName := "" - IF t_cCOMP $ "gcc|gpp|mingw|cygwin" + IF t_cCOMP $ "gcc|gpp|mingw|mingwce|cygwin" hb_FNameSplit( cFile,,, @cExt ) IF cExt == ".c" FOR EACH cLine IN hb_ATokens( StrTran( hb_MemoRead( cFile ), Chr( 13 ), Chr( 10 ) ), Chr( 10 ) )