2017-12-19 21:42 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* config/darwin/clang.mk
  * config/darwin/gcc.mk
  * config/darwin/global.mk
  * config/darwin/icc.mk
  * config/darwin/libs.mk
  * utils/hbmk2/hbmk2.prg
    * synced with Viktor's modifications in 3.4 branch:
    ; 2017-11-11 13:14 UTC Viktor Szakats:
    * switch to call the C compiler to link dynamic libs on darwin,
      which is the recommended way to do this, as suggested by Apple.
      This also aligns the platform better with other *nix platforms.
      'libtool' was used before, but that started having intermittent
      issues around Sierra (mitigated by disabling parallel build),
      which returned and got worse in High Sierra (with no remedy).
      The symptom was 'ld: file not found: ' errors with the filename
      not shown or appearing as garbage, then a 'libtool: internal link
      edit command failed'. This was reported and will be fixed in a
      future Xcode release.
      Ref: Apple Radar 34944562

  * config/global.mk
  * config/rules.mk
    + added new user build envvar HB_USER_DCFLAGS
      It allows to set C compiler parameters to compile .c code for
      dynamic libraries.

  * src/rtl/hbsocket.c
    ! fixed fcntl(F_SETFL) 3-rd parameter in hb_socketSetBlockingIO(),
      By mistake I used long instead of int. it created problem on big
      endian 64 bit machines.

  * include/hbgtcore.h
  * src/rtl/hbgtcore.c
    + added new C functions for GT programmers:
         void hb_gt_BaseUnlock( PHB_GT pGT );
         void hb_gt_BaseLock( PHB_GT pGT );
         void hb_gtSleep( PHB_GT pGT, double dSeconds );

  * src/rtl/hbgtcore.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtdos/gtdos.c
  * src/rtl/gtgui/gtgui.c
  * src/rtl/gtos2/gtos2.c
  * src/rtl/gtpca/gtpca.c
  * src/rtl/gtsln/gtsln.c
  * src/rtl/gtstd/gtstd.c
  * src/rtl/gttrm/gttrm.c
  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
  * src/rtl/gtxwc/gtxwc.c
    * use new functions to unblock GT when low level TONE() code is
      executed. It allows other threads to access shared GT driver
      when one of them executes TONE()

  * contrib/hbexpat/hbexpat.hbx
    * regenerated automatically
This commit is contained in:
Przemysław Czerpak
2017-12-19 21:42:15 +01:00
parent 517b7654dd
commit b872d7b62c
24 changed files with 156 additions and 66 deletions

View File

@@ -4111,11 +4111,10 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
ENDIF
AAddNotEmpty( hbmk[ _HBMK_aOPTCX ], gcc_opt_lngc_fill( hbmk ) )
AAddNotEmpty( hbmk[ _HBMK_aOPTCPPX ], gcc_opt_lngcpp_fill( hbmk ) )
cBin_Dyn := cBin_CompC
IF hbmk[ _HBMK_cPLAT ] == "darwin"
cBin_Dyn := cBin_Lib
cOpt_Dyn := "-dynamic -o {OD} -flat_namespace -undefined suppress -single_module {FD} {DL} {LO} {LS}" /* NOTE: -single_module is now the default in ld/libtool. */
cOpt_Dyn := "-dynamiclib -o {OD} -flat_namespace -undefined dynamic_lookup {FD} {DL} {LO} {LS}" /* NOTE: -single_module is now the default in ld/libtool. */
ELSE
cBin_Dyn := cBin_CompC
cOpt_Dyn := "-shared -o {OD} {LO} {FD} {DL} {LS}"
ENDIF
cBin_Link := cBin_CompC
@@ -4140,10 +4139,15 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
AAdd( hbmk[ _HBMK_aOPTD ], "{LL} {LB} {LF}" )
l_aLIBHBBASE_2 := iif( hbmk[ _HBMK_lMT ], aLIB_BASE_2_MT, aLIB_BASE_2 )
ENDIF
IF hbmk[ _HBMK_cPLAT ] == "darwin"
/* Leave space for later modifying .dylib paths using `install_name_tool`.
'400' is a hexadecimal value. */
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl,-headerpad,400" )
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl,-headerpad,400" )
ENDIF
IF hbmk[ _HBMK_lMAP ]
IF hbmk[ _HBMK_cPLAT ] == "darwin"
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl,-map,{OM}" )
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl,-map,{OM}" )
ELSE
AAdd( hbmk[ _HBMK_aOPTL ], "-Wl,-Map,{OM}" )
AAdd( hbmk[ _HBMK_aOPTD ], "-Wl,-Map,{OM}" )