2024-09-14 18:36 UTC+0200 Aleksander Czajczynski (hb fki.pl)
+ config/win/msvcarm.mk
+ config/win/msvcarm64.mk
* config/global.mk
* include/hbsetup.h
* utils/hbmk2/hbmk2.prg
+ introduced support for Windows (10,11) ARM 64-bit platform
native compilers using Visual Studio 2022 Build Tools
before calling win-make, setup environment with:
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64.bat
toolchain should be autodetected as following:
! HB_HOST_PLAT: win (arm64) HB_SHELL: nt
! HB_PLATFORM: win (arm64) (auto-detected)
! HB_COMPILER: msvcarm64 (auto-detected: C:/Program[...]/ARM64/)
to build final application with hbmk2 adding a valid Windows
Platform SDK / CRT paths to INCLUDE= and/or LIB= variable
is needed
; cross compilation from AMD64 hosts is possible:
vcvars64.bat
win-make (build Harbour for your host first)
set HB_HOST_BIN=<HarbourPath>\bin\win\msvc64
vcvarsamd64_arm64.bat
win-make
+ also added support for Windows for ARM 32-bit
before calling win-make, setup environment using:
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm.bat
or when cross compiling from ARM64 host:
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64_arm.bat
; please test Windows CE builds if you're using compiler newer
than VC2003 for ARM for possible regressions
* contrib/hbmlzo/3rd/minilzo/lzodefs.h
! recognize ARM64 architecture on Windows to fix build error
; consider updating to upstream minilzo 2.10, issue is fixed there
* src/common/hbver.c
* changed to add processor architecture for MSVC compiler string
on non-Intel systems, as exposed by hb_compiler(), harbour /build,
finalapp.exe //build
* tests/speedtst.prg
* workaround that processor architecture can now appear
in hb_compiler(), so it's not printed by speed test twice
This commit is contained in:
@@ -7,6 +7,58 @@
|
||||
Entries may not always be in chronological/commit order.
|
||||
See license at the end of file. */
|
||||
|
||||
2024-09-14 18:36 UTC+0200 Aleksander Czajczynski (hb fki.pl)
|
||||
+ config/win/msvcarm.mk
|
||||
+ config/win/msvcarm64.mk
|
||||
* config/global.mk
|
||||
* include/hbsetup.h
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ introduced support for Windows (10,11) ARM 64-bit platform
|
||||
native compilers using Visual Studio 2022 Build Tools
|
||||
|
||||
before calling win-make, setup environment with:
|
||||
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64.bat
|
||||
|
||||
toolchain should be autodetected as following:
|
||||
! HB_HOST_PLAT: win (arm64) HB_SHELL: nt
|
||||
! HB_PLATFORM: win (arm64) (auto-detected)
|
||||
! HB_COMPILER: msvcarm64 (auto-detected: C:/Program[...]/ARM64/)
|
||||
|
||||
to build final application with hbmk2 adding a valid Windows
|
||||
Platform SDK / CRT paths to INCLUDE= and/or LIB= variable
|
||||
is needed
|
||||
|
||||
; cross compilation from AMD64 hosts is possible:
|
||||
vcvars64.bat
|
||||
win-make (build Harbour for your host first)
|
||||
set HB_HOST_BIN=<HarbourPath>\bin\win\msvc64
|
||||
vcvarsamd64_arm64.bat
|
||||
win-make
|
||||
|
||||
+ also added support for Windows for ARM 32-bit
|
||||
|
||||
before calling win-make, setup environment using:
|
||||
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm.bat
|
||||
or when cross compiling from ARM64 host:
|
||||
<InstallPath>\BuildTools\VC\Auxiliary\Build\vcvarsarm64_arm.bat
|
||||
|
||||
; please test Windows CE builds if you're using compiler newer
|
||||
than VC2003 for ARM for possible regressions
|
||||
|
||||
* contrib/hbmlzo/3rd/minilzo/lzodefs.h
|
||||
! recognize ARM64 architecture on Windows to fix build error
|
||||
|
||||
; consider updating to upstream minilzo 2.10, issue is fixed there
|
||||
|
||||
* src/common/hbver.c
|
||||
* changed to add processor architecture for MSVC compiler string
|
||||
on non-Intel systems, as exposed by hb_compiler(), harbour /build,
|
||||
finalapp.exe //build
|
||||
|
||||
* tests/speedtst.prg
|
||||
* workaround that processor architecture can now appear
|
||||
in hb_compiler(), so it's not printed by speed test twice
|
||||
|
||||
2024-08-17 17:37 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
|
||||
* contrib/xhb/xhberror.c
|
||||
% cleaned code] to overload ERRORNEW() with XHB_ERRORNEW()
|
||||
|
||||
240
config/global.mk
240
config/global.mk
@@ -419,6 +419,12 @@ ifeq ($(HB_HOST_PLAT),win)
|
||||
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
|
||||
HB_HOST_CPU := x86_64
|
||||
else
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),ARM64)
|
||||
HB_HOST_CPU := arm64
|
||||
else
|
||||
ifeq ($(PROCESSOR_ARCHITEW6432),ARM64)
|
||||
HB_HOST_CPU := arm64
|
||||
else
|
||||
ifeq ($(PROCESSOR_ARCHITECTURE),IA64)
|
||||
HB_HOST_CPU := ia64
|
||||
else
|
||||
@@ -426,6 +432,8 @@ ifeq ($(HB_HOST_PLAT),win)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifneq ($(filter $(HB_HOST_PLAT),dos os2),)
|
||||
HB_HOST_CPU := x86
|
||||
@@ -511,7 +519,7 @@ ifeq ($(HB_PLATFORM),)
|
||||
ifneq ($(filter $(HB_COMPILER),msvcarm msvcmips msvcsh mingwarm poccarm),)
|
||||
HB_PLATFORM := wce
|
||||
else
|
||||
ifneq ($(filter $(HB_COMPILER),mingw mingw64 msvc msvc64 msvcia64 bcc bcc64 xcc pocc pocc64),)
|
||||
ifneq ($(filter $(HB_COMPILER),mingw mingw64 msvc msvc64 msvcia64 msvcarm64 bcc bcc64 xcc pocc pocc64),)
|
||||
HB_PLATFORM := win
|
||||
endif
|
||||
endif
|
||||
@@ -694,42 +702,31 @@ ifeq ($(HB_COMPILER),)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,armasm.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := msvcarm
|
||||
HB_PLATFORM := wce
|
||||
HB_CPU := arm
|
||||
HB_PLATFORM := wce
|
||||
ifneq ($(call find_in_path_raw,vctip.exe),)
|
||||
HB_PLATFORM := win
|
||||
endif
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,idis.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,armasm64.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := iccia64
|
||||
HB_CPU := ia64
|
||||
HB_COMPILER := msvcarm64
|
||||
HB_PLATFORM := win
|
||||
HB_CPU := arm64
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,icl.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,idis.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := icc
|
||||
HB_COMPILER := iccia64
|
||||
HB_CPU := ia64
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,ml64.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,icl.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := msvc64
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(findstring 8/,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1400
|
||||
else
|
||||
ifneq ($(findstring 9.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1500
|
||||
else
|
||||
ifneq ($(findstring 10.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1600
|
||||
else
|
||||
ifneq ($(findstring 11.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1700
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
HB_COMPILER := icc
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,ias.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,ml64.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := msvcia64
|
||||
HB_CPU := ia64
|
||||
HB_COMPILER := msvc64
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(findstring 8/,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1400
|
||||
else
|
||||
@@ -746,15 +743,10 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,cl.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,ias.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := msvc
|
||||
ifneq ($(findstring VC98,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1200
|
||||
else
|
||||
ifneq ($(findstring 2003,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1300
|
||||
else
|
||||
HB_COMPILER := msvcia64
|
||||
HB_CPU := ia64
|
||||
ifneq ($(findstring 8/,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1400
|
||||
else
|
||||
@@ -770,80 +762,106 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# TODO: Add bcc64 autodetection
|
||||
HB_COMP_PATH := $(call find_in_path_raw,bcc32.exe)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,cl.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := bcc
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,pocc.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
ifneq ($(call find_in_path_prw,coredll.lib,$(LIB)),)
|
||||
HB_PLATFORM := wce
|
||||
HB_COMPILER := poccarm
|
||||
HB_CPU := arm
|
||||
else
|
||||
ifneq ($(call find_in_path_prw,dbgeng.lib,$(LIB)),)
|
||||
HB_COMPILER := pocc64
|
||||
HB_CPU := x86_64
|
||||
else
|
||||
HB_COMPILER := pocc
|
||||
endif
|
||||
endif
|
||||
HB_COMPILER := msvc
|
||||
ifneq ($(findstring VC98,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1200
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,xCC.exe)
|
||||
ifneq ($(findstring 2003,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1300
|
||||
else
|
||||
ifneq ($(findstring 8/,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1400
|
||||
else
|
||||
ifneq ($(findstring 9.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1500
|
||||
else
|
||||
ifneq ($(findstring 10.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1600
|
||||
else
|
||||
ifneq ($(findstring 11.0,$(HB_COMP_PATH)),)
|
||||
HB_COMPILER_VER := 1700
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
# TODO: Add bcc64 autodetection
|
||||
HB_COMP_PATH := $(call find_in_path_raw,bcc32.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := bcc
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,pocc.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := xcc
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,dmc.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := dmc
|
||||
ifneq ($(call find_in_path_prw,coredll.lib,$(LIB)),)
|
||||
HB_PLATFORM := wce
|
||||
HB_COMPILER := poccarm
|
||||
HB_CPU := arm
|
||||
else
|
||||
# mingw-w64 build
|
||||
HB_COMP_PATH := $(call find_in_path,i686-w64-mingw32-gcc)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := mingw64
|
||||
HB_CCPREFIX := i686-w64-mingw32-
|
||||
ifneq ($(call find_in_path_prw,dbgeng.lib,$(LIB)),)
|
||||
HB_COMPILER := pocc64
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.8*),)
|
||||
HB_COMPILER_VER := 48
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.7*),)
|
||||
HB_COMPILER_VER := 47
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.6*),)
|
||||
HB_COMPILER_VER := 46
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.5*),)
|
||||
HB_COMPILER_VER := 45
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_HOST_CPU),x86_64)
|
||||
# mingw-w64 build
|
||||
HB_COMP_PATH := $(call find_in_path,x86_64-w64-mingw32-gcc)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := mingw64
|
||||
HB_CCPREFIX := x86_64-w64-mingw32-
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.8*),)
|
||||
HB_COMPILER_VER := 48
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.7*),)
|
||||
HB_COMPILER_VER := 47
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.6*),)
|
||||
HB_COMPILER_VER := 46
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.5*),)
|
||||
HB_COMPILER_VER := 45
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
HB_COMPILER := pocc
|
||||
endif
|
||||
endif
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,xCC.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := xcc
|
||||
else
|
||||
HB_COMP_PATH := $(call find_in_path_raw,dmc.exe)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := dmc
|
||||
else
|
||||
# mingw-w64 build
|
||||
HB_COMP_PATH := $(call find_in_path,i686-w64-mingw32-gcc)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := mingw64
|
||||
HB_CCPREFIX := i686-w64-mingw32-
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.8*),)
|
||||
HB_COMPILER_VER := 48
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.7*),)
|
||||
HB_COMPILER_VER := 47
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.6*),)
|
||||
HB_COMPILER_VER := 46
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.5*),)
|
||||
HB_COMPILER_VER := 45
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_HOST_CPU),x86_64)
|
||||
# mingw-w64 build
|
||||
HB_COMP_PATH := $(call find_in_path,x86_64-w64-mingw32-gcc)
|
||||
ifneq ($(HB_COMP_PATH),)
|
||||
HB_COMPILER := mingw64
|
||||
HB_CCPREFIX := x86_64-w64-mingw32-
|
||||
HB_CPU := x86_64
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.8*),)
|
||||
HB_COMPILER_VER := 48
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.7*),)
|
||||
HB_COMPILER_VER := 47
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.6*),)
|
||||
HB_COMPILER_VER := 46
|
||||
else
|
||||
ifneq ($(wildcard $(dir $(HB_COMP_PATH))$(HB_CCPREFIX)gcc-4.5*),)
|
||||
HB_COMPILER_VER := 45
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -1378,10 +1396,18 @@ ifeq ($(HB_CPU),)
|
||||
else
|
||||
ifneq ($(filter $(HB_COMPILER),msvcia64 iccia64),)
|
||||
HB_CPU := ia64
|
||||
else
|
||||
ifneq ($(filter $(HB_COMPILER),msvcarm64),)
|
||||
HB_CPU := arm64
|
||||
else
|
||||
ifneq ($(filter $(HB_COMPILER),msvcarm),)
|
||||
HB_CPU := arm
|
||||
else
|
||||
HB_CPU := x86
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_PLATFORM),wce)
|
||||
ifneq ($(filter $(HB_COMPILER),msvcarm mingwarm poccarm),)
|
||||
@@ -1973,11 +1999,19 @@ ifeq ($(HB_INIT_DONE),)
|
||||
ifeq ($(HB_CPU),x86_64)
|
||||
HB_DYNLIB_PLOC := $(HB_DYNLIB_PLOC)-x64
|
||||
else
|
||||
ifeq ($(HB_CPU),arm64)
|
||||
HB_DYNLIB_PLOC := $(HB_DYNLIB_PLOC)-arm64
|
||||
else
|
||||
ifeq ($(HB_CPU),arm)
|
||||
HB_DYNLIB_PLOC := $(HB_DYNLIB_PLOC)-arm
|
||||
else
|
||||
ifeq ($(HB_CPU),ia64)
|
||||
HB_DYNLIB_PLOC := $(HB_DYNLIB_PLOC)-ia64
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
ifeq ($(HB_PLATFORM),wce)
|
||||
HB_DYNLIB_PLOC := $(HB_DYNLIB_PLOC)-wce
|
||||
|
||||
1
config/win/msvcarm.mk
Normal file
1
config/win/msvcarm.mk
Normal file
@@ -0,0 +1 @@
|
||||
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/msvc.mk
|
||||
1
config/win/msvcarm64.mk
Normal file
1
config/win/msvcarm64.mk
Normal file
@@ -0,0 +1 @@
|
||||
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/msvc.mk
|
||||
@@ -670,6 +670,9 @@
|
||||
# define LZO_ARCH_I086 1
|
||||
# define LZO_ARCH_IA16 1
|
||||
# define LZO_INFO_ARCH "i086"
|
||||
#elif defined(__aarch64__) || defined(_M_ARM64)
|
||||
# define LZO_ARCH_ARM64 1
|
||||
# define LZO_INFO_ARCH "arm64"
|
||||
#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
|
||||
# define LZO_ARCH_ALPHA 1
|
||||
# define LZO_INFO_ARCH "alpha"
|
||||
|
||||
@@ -152,7 +152,8 @@
|
||||
#define HB_CPU_X86_64
|
||||
|
||||
#elif defined( __arm64__ ) || \
|
||||
defined( __aarch64__ )
|
||||
defined( __aarch64__ ) || \
|
||||
defined( _M_ARM64 )
|
||||
#define HB_CPU_ARM_64
|
||||
|
||||
#elif defined( __arm__ ) || \
|
||||
|
||||
@@ -1104,6 +1104,10 @@ char * hb_verCompiler( void )
|
||||
hb_strncpy( szSub, "++", sizeof( szSub ) - 1 );
|
||||
#endif
|
||||
|
||||
#if ! defined( HB_CPU_X86 ) && ! defined( HB_CPU_X86_64 )
|
||||
#define __HB_ARCH_VERSION /* add string supplement for "non-classic" architectures */
|
||||
#endif
|
||||
|
||||
iVerMajor = _MSC_VER / 100;
|
||||
iVerMinor = _MSC_VER % 100;
|
||||
|
||||
@@ -1313,7 +1317,10 @@ char * hb_verCompiler( void )
|
||||
hb_strncat( pszCompiler, szSub, COMPILER_BUF_SIZE - 1 );
|
||||
#endif
|
||||
|
||||
#if defined( HB_ARCH_16BIT )
|
||||
#if defined( __HB_ARCH_VERSION )
|
||||
hb_strncat( pszCompiler, " ", COMPILER_BUF_SIZE - 1 );
|
||||
hb_strncat( pszCompiler, hb_verCPU(), COMPILER_BUF_SIZE - 1 );
|
||||
#elif defined( HB_ARCH_16BIT )
|
||||
hb_strncat( pszCompiler, " (16-bit)", COMPILER_BUF_SIZE - 1 );
|
||||
#elif defined( HB_ARCH_32BIT )
|
||||
hb_strncat( pszCompiler, " (32-bit)", COMPILER_BUF_SIZE - 1 );
|
||||
|
||||
@@ -745,6 +745,9 @@ return
|
||||
#ifdef __HARBOUR__
|
||||
#ifndef __XHARBOUR__
|
||||
static function spd_cpu()
|
||||
if right( hb_compiler(), len( spd_cpu() ) ) == spd_cpu()
|
||||
return ""
|
||||
endif
|
||||
return hb_version( HB_VERSION_CPU )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1801,6 +1801,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
CASE "mingw64"
|
||||
CASE "msvc"
|
||||
CASE "msvc64"
|
||||
CASE "msvcarm64"
|
||||
CASE "msvcia64"
|
||||
CASE "bcc"
|
||||
CASE "bcc64"
|
||||
@@ -1810,7 +1811,6 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
hbmk[ _HBMK_cPLAT ] := "win"
|
||||
EXIT
|
||||
CASE "mingwarm"
|
||||
CASE "msvcarm"
|
||||
CASE "poccarm"
|
||||
hbmk[ _HBMK_cPLAT ] := "wce"
|
||||
EXIT
|
||||
@@ -1943,12 +1943,16 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
NIL, ;
|
||||
FindInPath( "wcc386" ) ) }, "watcom" }, ;
|
||||
{ {|| FindInPath( "clarm.exe" ) }, "msvcarm" }, ;
|
||||
{ {|| FindInPath( "armasm.exe" ) }, "msvcarm" }, ;
|
||||
{ {|| iif( FindInPath( "vctip.exe" ) == NIL, ;
|
||||
FindInPath( "armasm.exe" ), ;
|
||||
NIL ) }, "msvcarm",,, "wce" }, ;
|
||||
{ {|| FindInPath( "armasm.exe" ) }, "msvcarm",,, "win" }, ;
|
||||
{ {|| FindInPath( "armasm64.exe" ) }, "msvcarm64" }, ;
|
||||
{ {|| FindInPath( "ml64.exe" ) }, "msvc64" }, ;
|
||||
{ {|| FindInPath( "ias.exe" ) }, "msvcia64" }, ;
|
||||
{ {|| iif( FindInPath( "wcc386" ) == NIL, ;
|
||||
FindInPath( "cl.exe" ), ;
|
||||
NIL ) }, "msvc" }, ;
|
||||
NIL ) }, "msvc" }, ;
|
||||
{ {|| _BCC_BIN_DETECT() }, "bcc" }, ; /* TODO: Add bcc64 auto-detection */
|
||||
{ {|| iif( FindInPath( "dbgeng.lib", GetEnv( "LIB" ) ) != NIL .AND. ( tmp1 := FindInPath( "pocc.exe" ) ) != NIL, tmp1, NIL ) }, "pocc64" }, ;
|
||||
{ {|| FindInPath( "pocc.exe" ) }, "pocc" }, ;
|
||||
@@ -1960,7 +1964,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
#endif
|
||||
aCOMPSUP := { ;
|
||||
"mingw", "msvc", "clang", "bcc", "watcom", "icc", "pocc", "xcc", "tcc", ;
|
||||
"mingw64", "msvc64", "msvcia64", "bcc64", "iccia64", "pocc64" }
|
||||
"mingw64", "msvc64", "msvcarm", "msvcarm64", "msvcia64", "bcc64", "iccia64", "pocc64" }
|
||||
l_aLIBHBGT := { "gtwin", "gtwvt", "gtgui" }
|
||||
hbmk[ _HBMK_cGTDEFAULT ] := "gtwin"
|
||||
hbmk[ _HBMK_cDynLibPrefix ] := ""
|
||||
@@ -2323,7 +2327,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
hbmk[ _HBMK_nCOMPVer ] := 34
|
||||
ENDCASE
|
||||
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "win" .AND. HBMK_ISCOMP( "msvc|msvc64|msvcia64|icc|iccia64" ) ) .OR. ;
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "win" .AND. HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64|msvcia64|icc|iccia64" ) ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "wce" .AND. hbmk[ _HBMK_cCOMP ] == "msvcarm" ) /* NOTE: Cross-platform: wce/ARM on win/x86 */
|
||||
|
||||
/* Compatibility with Harbour GNU Make system */
|
||||
@@ -5120,7 +5124,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
l_aLIBSHAREDPOST := { "hbmainstd", "hbmainwin" }
|
||||
l_aLIBSYS := ArrayAJoin( { l_aLIBSYS, l_aLIBSYSCORE, l_aLIBSYSMISC } )
|
||||
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "win" .AND. HBMK_ISCOMP( "msvc|msvc64|msvcia64|icc|iccia64" ) ) .OR. ;
|
||||
CASE ( hbmk[ _HBMK_cPLAT ] == "win" .AND. HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64|msvcia64|icc|iccia64" ) ) .OR. ;
|
||||
( hbmk[ _HBMK_cPLAT ] == "wce" .AND. hbmk[ _HBMK_cCOMP ] == "msvcarm" ) /* NOTE: Cross-platform: wce/ARM on win/x86 */
|
||||
|
||||
hbmk[ _HBMK_nCmd_FNF ] := _FNF_BCKSLASH
|
||||
@@ -5250,10 +5254,11 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
SWITCH hbmk[ _HBMK_cCOMP ]
|
||||
CASE "msvc" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:x86" ) ; EXIT
|
||||
CASE "msvc64" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:x64" ) ; EXIT
|
||||
CASE "msvcarm" ; AAdd( hbmk[ _HBMK_aOPTI ], IIF( hbmk[ _HBMK_cPLAT ] == "wce", "-machine:xarm", "-machine:arm" ) ) ; EXIT
|
||||
CASE "msvcarm64"; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:arm64" ) ; EXIT
|
||||
CASE "msvcia64" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:ia64" ) ; EXIT
|
||||
CASE "icc" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:x86" ) ; EXIT
|
||||
CASE "iccia64" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:ia64" ) ; EXIT
|
||||
CASE "msvcarm" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:xarm" ) ; EXIT
|
||||
CASE "msvcmips" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:mips" ) ; EXIT
|
||||
CASE "msvcsh" ; AAdd( hbmk[ _HBMK_aOPTI ], "-machine:sh5" ) ; EXIT
|
||||
ENDSWITCH
|
||||
@@ -6173,7 +6178,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
|
||||
DO CASE
|
||||
CASE ! hbmk[ _HBMK_lSHARED ] .OR. ;
|
||||
! HBMK_ISPLAT( "win|wce" ) .OR. ;
|
||||
HBMK_ISCOMP( "msvc|msvc64|msvcia64|icc|iccia64" )
|
||||
HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64|msvcia64|icc|iccia64" )
|
||||
|
||||
/* NOTE: MSVC gives the warning:
|
||||
"LNK4217: locally defined symbol ... imported in function ..."
|
||||
@@ -9396,7 +9401,7 @@ STATIC FUNCTION FindLib( hbmk, cLib, aLIBPATH, cLibPrefix, cLibExt )
|
||||
LOCAL tmp
|
||||
|
||||
/* Check libs in their full paths */
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm|bcc|bcc64|pocc|pocc64|poccarm|watcom" )
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64|bcc|bcc64|pocc|pocc64|poccarm|watcom" )
|
||||
IF ! Empty( hb_FNameDir( cLib ) )
|
||||
IF hb_FileExists( cLib := hb_FNameExtSet( cLib, cLibExt ) )
|
||||
RETURN cLib
|
||||
@@ -9411,7 +9416,7 @@ STATIC FUNCTION FindLib( hbmk, cLib, aLIBPATH, cLibPrefix, cLibExt )
|
||||
ENDIF
|
||||
|
||||
/* Check in current dir */
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm|bcc|bcc64|pocc|pocc64|poccarm|watcom" )
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64|bcc|bcc64|pocc|pocc64|poccarm|watcom" )
|
||||
IF ! Empty( tmp := LibExists( hbmk, "", cLib, cLibPrefix, cLibExt ) )
|
||||
RETURN tmp
|
||||
ENDIF
|
||||
@@ -9428,7 +9433,7 @@ STATIC FUNCTION FindLib( hbmk, cLib, aLIBPATH, cLibPrefix, cLibExt )
|
||||
|
||||
#if 0
|
||||
/* Check in certain other compiler specific locations. */
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm" )
|
||||
IF HBMK_ISCOMP( "msvc|msvc64|msvcarm|msvcarm64" )
|
||||
FOR EACH cDir IN hb_ATokens( GetEnv( "LIB" ), hb_osPathListSeparator(), .T., .T. )
|
||||
IF ! Empty( cDir )
|
||||
IF ! Empty( tmp := LibExists( hbmk, cDir, cLib, cLibPrefix, cLibExt ) )
|
||||
@@ -12029,6 +12034,7 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
|
||||
AAdd( aDf, "__LITTLE_ENDIAN__" ) /* Windows is currently little-endian on all supported CPUs. */
|
||||
IF hbmk[ _HBMK_cCOMP ] == "mingw64" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "msvc64" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "msvcarm64" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "pocc64" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "msvcia64" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "iccia64"
|
||||
@@ -13034,6 +13040,8 @@ STATIC FUNCTION hbmk_CPU( hbmk )
|
||||
hbmk[ _HBMK_cCOMP ] == "msvcarm" .OR. ;
|
||||
hbmk[ _HBMK_cCOMP ] == "poccarm"
|
||||
RETURN "arm"
|
||||
CASE hbmk[ _HBMK_cCOMP ] == "msvcarm64"
|
||||
RETURN "arm64"
|
||||
CASE hbmk[ _HBMK_cCOMP ] == "msvcmips"
|
||||
RETURN "mips"
|
||||
CASE hbmk[ _HBMK_cCOMP ] == "msvcsh"
|
||||
@@ -13089,7 +13097,7 @@ FUNCTION hbmk_KEYW( hbmk, cFileName, cKeyword, cValue, cOperator )
|
||||
CASE "allwin" ; RETURN HBMK_ISPLAT( "win|wce" )
|
||||
CASE "allgcc" ; RETURN HBMK_ISCOMP( "gcc|mingw|mingw64|mingwarm|djgpp|gccomf|clang|open64|pcc" )
|
||||
CASE "allmingw" ; RETURN HBMK_ISCOMP( "mingw|mingw64|mingwarm" )
|
||||
CASE "allmsvc" ; RETURN HBMK_ISCOMP( "msvc|msvc64|msvcia64|msvcarm" )
|
||||
CASE "allmsvc" ; RETURN HBMK_ISCOMP( "msvc|msvc64|msvcia64|msvcarm|msvcarm64" )
|
||||
CASE "allbcc" ; RETURN HBMK_ISCOMP( "bcc|bcc64" )
|
||||
CASE "allpocc" ; RETURN HBMK_ISCOMP( "pocc|pocc64|poccarm" )
|
||||
CASE "allicc" ; RETURN HBMK_ISCOMP( "icc|iccia64" )
|
||||
@@ -13110,13 +13118,13 @@ FUNCTION hbmk_KEYW( hbmk, cFileName, cKeyword, cValue, cOperator )
|
||||
IF ! HBMK_IS_IN( cKeyword, ;
|
||||
"|win|wce|dos|os2" + ;
|
||||
"|bsd|hpux|sunos|beos|qnx|android|vxworks|symbian|linux|darwin|cygwin|minix|aix" + ;
|
||||
"|msvc|msvc64|msvcia64|msvcarm" + ;
|
||||
"|msvc|msvc64|msvcia64|msvcarm|msvcarm64" + ;
|
||||
"|pocc|pocc64|poccarm|xcc|tcc" + ;
|
||||
"|mingw|mingw64|mingwarm|bcc|bcc64|watcom" + ;
|
||||
"|gcc|gccomf|djgpp" + ;
|
||||
"|hblib|hbdyn|hbdynvm|hbimplib|hbexe" + ;
|
||||
"|icc|iccia64|clang|open64|sunpro|diab|pcc" + ;
|
||||
"|x86|x86_64|ia64|arm|mips|sh" )
|
||||
"|x86|x86_64|ia64|arm|arm64|mips|sh" )
|
||||
|
||||
/* handle pseudo-functions */
|
||||
IF cOperator == "=" .AND. cValue != NIL
|
||||
@@ -15810,7 +15818,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lMore, lLong )
|
||||
, ;
|
||||
{ "linux" , "gcc, clang, icc, watcom, sunpro, open64" }, ;
|
||||
{ "darwin" , "gcc, clang, icc" }, ;
|
||||
{ "win" , "mingw, msvc, clang, bcc, bcc64, watcom, icc, pocc, xcc, mingw64, msvc64, msvcia64, iccia64, pocc64" }, ;
|
||||
{ "win" , "mingw, msvc, clang, bcc, bcc64, watcom, icc, pocc, xcc, mingw64, msvc64, msvcarm, msvcarm64, msvcia64, iccia64, pocc64" }, ;
|
||||
{ "wce" , "mingwarm, mingw, msvcarm, poccarm" }, ;
|
||||
{ "os2" , "gcc, gccomf, watcom" }, ;
|
||||
{ "dos" , "djgpp, watcom" }, ;
|
||||
@@ -16202,7 +16210,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lMore, lLong )
|
||||
{ "{allwin}" , I_( "target platform is Windows compatible (win, wce)" ) }, ;
|
||||
{ "{allgcc}" , I_( "target C compiler belongs to gcc family (gcc, mingw, mingw64, mingwarm, djgpp, gccomf, clang, open64, pcc)" ) }, ;
|
||||
{ "{allmingw}" , I_( "target C compiler is mingw* (mingw, mingw64, mingwarm)" ) }, ;
|
||||
{ "{allmsvc}" , I_( "target C compiler is msvc* (msvc, msvc64, msvcia64, msvcarm)" ) }, ;
|
||||
{ "{allmsvc}" , I_( "target C compiler is msvc* (msvc, msvc64, msvcia64, msvcarm, msvcarm64)" ) }, ;
|
||||
{ "{allbcc}" , I_( "target C compiler is bcc* (bcc, bcc64)" ) }, ;
|
||||
{ "{allpocc}" , I_( "target C compiler is pocc* (pocc, pocc64, poccarm)" ) }, ;
|
||||
{ "{allicc}" , I_( "target C compiler is icc* (icc, iccia64)" ) }, ;
|
||||
|
||||
Reference in New Issue
Block a user