diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 085d406a87..e4244bdede 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,34 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-19 21:26 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * INSTALL + + Added msvcarm examples (using MSVC 2008. 2005 should be similar). + + * config/wce/msvcarm.mk + % Somewhat reduced number of macro options. + ! Deleted debug switch from default c option list. + % Deleted a few more default c options. + ! Added corelibc to syslib list. + ! Cleaned linker flags to make it link. Some others + just removed, they seem not required. + + * utils/hbmk2/hbmk2.prg + * Synced msvcarm settings with .mk. + + * config/global.mk + * utils/hbmk2/hbmk2.prg + + Added msvcarm autodetection to both GNU Make and hbmk2. + + * config/wce/global.mk + * config/wce/poccarm.mk + * utils/hbmk2/hbmk2.prg + * bin/hb-mkdyn.bat + + Added coredll to wce syslib list. + (required for msvc and pocc, optional for mingw) + + ; Now msvcarm builds, with a lot of warnings. + 2009-08-19 20:06 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * debian/rules * Using spaces instead of tabs for indentation. diff --git a/harbour/INSTALL b/harbour/INSTALL index 6fb0a41680..f0a321ddfe 100644 --- a/harbour/INSTALL +++ b/harbour/INSTALL @@ -387,6 +387,14 @@ EXAMPLES mingw32-make %1 %2 > log.txt 2>&1 --- + --- MSVC 2008 WinCE/ARM (requires preceding build for native target) + set INCLUDE=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\include;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Include\Armv4i + set LIB=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\lib\armv4i;%ProgramFiles%\Windows Mobile 5.0 SDK R2\PocketPC\Lib\ARMV4I + set PATH=%ProgramFiles%\Microsoft Visual Studio 9.0\VC\ce\bin\x86_arm;%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE;%PATH% + rem + mingw32-make %1 %2 > log.txt 2>&1 + --- + --- MSVC 2005 call "%ProgramFiles%\Microsoft Visual Studio 8\VC\vcvarsall.bat" rem @@ -413,13 +421,13 @@ EXAMPLES sh -c make %1 %2 > log.txt 2>&1 --- - --- MinGW GCC for x86-64 (requires preceding build for native target) + --- MinGW GCC x86-64 (requires preceding build for native target) set PATH=C:\mingw64\bin;%PATH% rem mingw32-make %1 %2 > log.txt 2>&1 --- - --- MinGW GCC for WinCE/ARM (requires Cygwin + preceding build for native target) + --- MinGW GCC WinCE/ARM (requires Cygwin + preceding build for native target) set PATH=C:\mingwce\opt\mingw32ce\bin;C:\cygwin\bin;%PATH% rem mingw32-make %1 %2 > log.txt 2>&1 @@ -446,7 +454,7 @@ EXAMPLES mingw32-make %1 %2 > log.txt 2>&1 --- - --- Intel(R) C++ for IA-64 (requires preceding build for native target) + --- Intel(R) C++ IA-64 (requires preceding build for native target) call "%ProgramFiles%\Intel\Compiler\C++\10.1.025\Itanium\Bin\iclvars.bat" rem set HB_COMPILER=iccia64 diff --git a/harbour/bin/hb-mkdyn.bat b/harbour/bin/hb-mkdyn.bat index c044b34b3d..52ecea1639 100644 --- a/harbour/bin/hb-mkdyn.bat +++ b/harbour/bin/hb-mkdyn.bat @@ -87,7 +87,7 @@ if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_icc" set _BIN_LINK=xilink if "%HB_ARCHITECTURE%_%HB_COMPILER%" == "win_iccia64" set _BIN_LINK=xilink if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=user32.lib ws2_32.lib advapi32.lib gdi32.lib -if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=ws2.lib +if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=coredll.lib ws2.lib echo ! Making %_DST_NAME_ST%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @"%_LIST_ST%" %_SYSLIBS% %HB_DLLLIBS% echo ! Making %_DST_NAME_MT%.dll... && %_BIN_LINK% /nologo /dll /subsystem:console /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @"%_LIST_MT%" %_SYSLIBS% %HB_DLLLIBS% @@ -120,7 +120,7 @@ del "%_LIST_ST%" del "%_LIST_MT%" if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=-luser32 -lws2_32 -ladvapi32 -lgdi32 -if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=-lws2 +if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=-lcoredll -lws2 echo ! Making %_DST_NAME_ST%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" "%_LIST_ST%_" %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_ST%.def" echo ! Making %_DST_NAME_MT%.dll... && %HB_CCPREFIX%gcc -shared -o "%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" "%_LIST_MT%_" %HB_USER_LDFLAGS% %_SYSLIBS% %HB_DLLLIBS% -Wl,--output-def,"%HB_BIN_INSTALL%\%_DST_NAME_MT%.def" @@ -184,7 +184,7 @@ echo.> "%_LIST_MT%" call :MAKE_LISTS if "%HB_ARCHITECTURE%" == "win" set _SYSLIBS=user32.lib ws2_32.lib advapi32.lib gdi32.lib -if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=ws2.lib +if "%HB_ARCHITECTURE%" == "wce" set _SYSLIBS=coredll.lib ws2.lib echo ! Making %_DST_NAME_ST%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_ST%.dll" @%_LIST_ST% %_SYSLIBS% %HB_DLLLIBS% echo ! Making %_DST_NAME_MT%.dll... && polink /nologo /dll /out:"%HB_BIN_INSTALL%\%_DST_NAME_MT%.dll" @%_LIST_MT% %_SYSLIBS% %HB_DLLLIBS% diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 9449f8c23e..7157545a7a 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -593,27 +593,32 @@ ifeq ($(HB_COMPILER),) ifneq ($(call find_in_path,wpp386),) HB_COMPILER := watcom else - ifneq ($(call find_in_path,ml64),) - HB_COMPILER := msvc64 + ifneq ($(call find_in_path,armasm),) + HB_COMPILER := msvcarm + HB_ARCHITECTURE := wce else - ifneq ($(call find_in_path,icl),) - HB_COMPILER := icc + ifneq ($(call find_in_path,ml64),) + HB_COMPILER := msvc64 else - ifneq ($(call find_in_path,cl),) - HB_COMPILER := msvc + ifneq ($(call find_in_path,icl),) + HB_COMPILER := icc else - ifneq ($(call find_in_path,bcc32),) - HB_COMPILER := bcc + ifneq ($(call find_in_path,cl),) + HB_COMPILER := msvc else - ifneq ($(call find_in_path,pocc),) - HB_COMPILER := pocc + ifneq ($(call find_in_path,bcc32),) + HB_COMPILER := bcc else - ifneq ($(call find_in_path,xcc),) - HB_COMPILER := xcc + ifneq ($(call find_in_path,pocc),) + HB_COMPILER := pocc else - ifneq ($(call find_in_path,x86_64-w64-mingw32-gcc),) - HB_COMPILER := mingw64 - HB_CCPREFIX := x86_64-w64-mingw32- + ifneq ($(call find_in_path,xcc),) + HB_COMPILER := xcc + else + ifneq ($(call find_in_path,x86_64-w64-mingw32-gcc),) + HB_COMPILER := mingw64 + HB_CCPREFIX := x86_64-w64-mingw32- + endif endif endif endif diff --git a/harbour/config/wce/global.mk b/harbour/config/wce/global.mk index 919e88da2b..da08a6919c 100644 --- a/harbour/config/wce/global.mk +++ b/harbour/config/wce/global.mk @@ -8,6 +8,6 @@ BIN_EXT := .exe HB_GT_LIBS += gtwvt gtgui -SYSLIBS := ws2 +SYSLIBS := coredll ws2 HB_BUILD_UNICODE := yes diff --git a/harbour/config/wce/msvcarm.mk b/harbour/config/wce/msvcarm.mk index 3499c3bf5c..c34219c885 100644 --- a/harbour/config/wce/msvcarm.mk +++ b/harbour/config/wce/msvcarm.mk @@ -19,7 +19,7 @@ CC_IN := -c CC_OUT := -Fo CPPFLAGS := -I. -I$(HB_INC_COMPILE) -CFLAGS := -nologo -D_WIN32_WCE=0x420 -DUNDER_CE=0x420 -DWIN32_PLATFORM_PSPC -DWINCE -D_WINCE -D_WINDOWS -DARM -D_ARM_ -DARMV4 -DPOCKETPC2003_UI_MODEL -D_M_ARM -D_UNICODE -D_UWIN +CFLAGS := -nologo -DWINCE -D_WINCE -D_WINDOWS -DARM -D_ARM_ -DARMV4 -D_M_ARM -D_UNICODE -D_UWIN LDFLAGS := ifeq ($(HB_BUILD_MODE),c) @@ -35,7 +35,7 @@ endif ifneq ($(HB_BUILD_OPTIM),no) ifeq ($(HB_VISUALC_VER_PRE80),) - CFLAGS += -Od -Os -Gy -GS- -EHsc- -Gm -Zi -GR- + CFLAGS += -Od -Os -Gy -GS- -EHsc- else CFLAGS += -Oxsb1 -EHsc -YX -GF endif @@ -52,12 +52,12 @@ else endif LD_OUT := -Fe +SYSLIBS += corelibc + LIBPATHS := /libpath:$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT)) -LDFLAGS += /nologo /link -LDFLAGS += /subsystem:windowsce,4.20 /machine:arm /armpadcode /align:4096 -LDFLAGS += /nodefaultlib:oldnames.lib /nodefaultlib:kernel32.lib /opt:ref /opt:icf +LDFLAGS += /nologo /link /subsystem:windowsce /nodefaultlib:oldnames.lib /nodefaultlib:kernel32.lib ifeq ($(HB_VISUALC_VER_PRE80),) LDFLAGS += /manifest:no endif diff --git a/harbour/config/wce/poccarm.mk b/harbour/config/wce/poccarm.mk index 267bd0b677..63389e142d 100644 --- a/harbour/config/wce/poccarm.mk +++ b/harbour/config/wce/poccarm.mk @@ -42,7 +42,7 @@ endif LD := polink.exe LD_OUT := /out: -SYSLIBS += coredll corelibc +SYSLIBS += corelibc LIBPATHS := /libpath:$(LIB_DIR) LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),$(lib)$(LIB_EXT)) diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index b27d21ccf4..925285d538 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -899,6 +899,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) { {|| iif( ! Empty( GetEnv( "WATCOM" ) ),; FindInPath( "wpp386" ),; NIL ) }, "watcom" },; + { {|| FindInPath( "armasm" ) }, "msvcarm" },; { {|| FindInPath( "ml64" ) }, "msvc64" },; { {|| iif( FindInPath( "wpp386" ) == NIL,; FindInPath( "cl" ),; @@ -909,7 +910,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) { {|| iif( ( tmp1 := FindInPath( "icl" ) ) != NIL .AND. "itanium" $ Lower( tmp1 ), tmp1, NIL ) }, "iccia64" },; { {|| FindInPath( "icl" ) }, "icc" },; { {|| FindInPath( "xcc" ) }, "xcc" },; - { {|| FindInPath( "x86_64-w64-mingw32-gcc" ) }, "mingw64", "x86_64-w64-mingw32-" } } + { {|| FindInPath( "x86_64-w64-mingw32-gcc" ) }, "mingw64", "x86_64-w64-mingw32-" }} aCOMPSUP := { "mingw", "msvc", "bcc", "watcom", "icc", "pocc", "xcc", "cygwin",; "mingw64", "msvc64", "msvcia64", "iccia64", "pocc64" } l_aLIBHBGT := { "gtwin", "gtwvt", "gtgui" } @@ -934,7 +935,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) cDynLibExt := ".dll" cBinExt := ".exe" cOptPrefix := "-/" - l_aLIBSYSCORE := { "ws2" } + l_aLIBSYSCORE := { "coredll", "ws2" } l_aLIBSYSMISC := { "uuid", "ole32", "wininet", "commdlg", "commctrl" } OTHERWISE hbmk_OutErr( hbmk, hb_StrFormat( I_( "Error: Architecture value unknown: %1$s" ), hbmk[ _HBMK_cARCH ] ) ) @@ -2631,28 +2632,19 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) ENDIF IF hbmk[ _HBMK_cCOMP ] == "msvcarm" /* NOTE: Copied from .mk. Probably needs cleaning. */ - AAdd( hbmk[ _HBMK_aOPTC ], "-D_WIN32_WCE=0x420" ) - AAdd( hbmk[ _HBMK_aOPTC ], "-DUNDER_CE=0x420" ) - AAdd( hbmk[ _HBMK_aOPTC ], "-DWIN32_PLATFORM_PSPC" ) AAdd( hbmk[ _HBMK_aOPTC ], "-DWINCE" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_WINCE" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_WINDOWS" ) AAdd( hbmk[ _HBMK_aOPTC ], "-DARM" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_ARM_" ) AAdd( hbmk[ _HBMK_aOPTC ], "-DARMV4" ) - AAdd( hbmk[ _HBMK_aOPTC ], "-DPOCKETPC2003_UI_MODEL" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_M_ARM" ) AAdd( hbmk[ _HBMK_aOPTC ], "-DUNICODE" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_UNICODE" ) AAdd( hbmk[ _HBMK_aOPTC ], "-D_UWIN" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/subsystem:windowsce,4.20" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/machine:arm" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/armpadcode" ) + AAdd( hbmk[ _HBMK_aOPTL ], "/subsystem:windowsce" ) AAdd( hbmk[ _HBMK_aOPTL ], "/nodefaultlib:oldnames.lib" ) AAdd( hbmk[ _HBMK_aOPTL ], "/nodefaultlib:kernel32.lib" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/align:4096" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/opt:ref" ) - AAdd( hbmk[ _HBMK_aOPTL ], "/opt:icf" ) AAdd( hbmk[ _HBMK_aOPTL ], "/manifest:no" ) ENDIF IF hbmk[ _HBMK_lINC ]