2025-10-16 21:40 UTC+0200 Aleksander Czajczynski (hb fki.pl)

* config/global.mk
    * follow up to previous, define __ARCH64BIT__ for .prg files
      if applicable during first stage done by GNU Make

    * consider Alpha a 64-bit CPU too when it's a cross-build target
      (untested)

  * utils/hbmk2/hbmk2.prg
    * updated stored list of Visual Studio (2013-2022) versions to C comp
      revisions, which could be used in .hbp files HB_COMP_VER macro

    ; https://learn.microsoft.com/en-us/cpp/overview/compiler-versions
      more detailed versioning available if someone is interested in that
      please submit a patch that would translate C compiler path to
      version according to the linked rules - MSVC now has rolling
      releases
This commit is contained in:
Aleksander Czajczynski
2025-10-16 21:41:15 +02:00
parent 3aef259d87
commit 2818e4a4fb
3 changed files with 41 additions and 2 deletions

View File

@@ -2376,6 +2376,16 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
hbmk[ _HBMK_nCOMPVer ] := 1600
CASE "11.0" $ cPath_CompC /* Visual Studio 2012 */
hbmk[ _HBMK_nCOMPVer ] := 1700
CASE "12.0" $ cPath_CompC /* Visual Studio 2013 */
hbmk[ _HBMK_nCOMPVer ] := 1800
CASE "14.0" $ cPath_CompC /* Visual Studio 2015 */
hbmk[ _HBMK_nCOMPVer ] := 1900
CASE "14.1" $ cPath_CompC /* Visual Studio 2017 */
hbmk[ _HBMK_nCOMPVer ] := 1910
CASE "14.2" $ cPath_CompC /* Visual Studio 2019 */
hbmk[ _HBMK_nCOMPVer ] := 1920
CASE "14.3" $ cPath_CompC /* Visual Studio 2022 */
hbmk[ _HBMK_nCOMPVer ] := 1930
OTHERWISE
hbmk[ _HBMK_nCOMPVer ] := 1400
ENDCASE
@@ -12147,7 +12157,8 @@ STATIC PROCEDURE PlatformPRGFlags( hbmk, aOPTPRG )
given platform + compiler settings. We could only guess.
Let us assume the most probable CPU platform (as of 2009). */
AAdd( aDf, "__LITTLE_ENDIAN__" )
IF hb_RightEq( hbmk[ _HBMK_cCPU ], "64" )
IF hb_RightEq( hbmk[ _HBMK_cCPU ], "64" ) .OR. ;
hbmk[ _HBMK_cCPU ] == "alpha"
AAdd( aDf, "__ARCH64BIT__" )
ELSE
AAdd( aDf, "__ARCH32BIT__" )