2009-11-21 11:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)

* include/hbsetup.h
  * utils/hbmk2/hbmk2.prg
  * config/darwin/clang.mk
    + Using __clang__ for Clang detection instead of locally rolled 
      solution.

  * src/common/hbver.c
    + Added Clang compiler detection.
This commit is contained in:
Viktor Szakats
2009-11-21 10:11:32 +00:00
parent b92b73cf6f
commit 39a66166e0
5 changed files with 18 additions and 3 deletions

View File

@@ -17,6 +17,16 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-11-21 11:10 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbsetup.h
* utils/hbmk2/hbmk2.prg
* config/darwin/clang.mk
+ Using __clang__ for Clang detection instead of locally rolled
solution.
* src/common/hbver.c
+ Added Clang compiler detection.
2009-11-20 17:43 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbplistbox.prg
* contrib/hbide/hbide.prg

View File

@@ -23,7 +23,7 @@ endif
# Now solved with '$(subst x,x, )' expression.
CC_OUT := -o$(subst x,x, )
CPPFLAGS := -I. -I$(HB_INC_COMPILE) -DHB_CC_CLANG
CPPFLAGS := -I. -I$(HB_INC_COMPILE)
# -fno-common enables building .dylib files
CPPFLAGS += -fno-common

View File

@@ -503,7 +503,7 @@
#define HB_NORETURN_ATTR
# endif
# if ( ( __GNUC__ > 4 ) || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 1 ) ) && \
!defined( __ICC ) && !defined( HB_NO_FLATTEN ) && !defined( HB_CC_CLANG )
!defined( __ICC ) && !defined( HB_NO_FLATTEN ) && !defined( __clang__ )
#define HB_FLATTEN_ATTR \
__attribute__ (( flatten ))
# else

View File

@@ -623,6 +623,12 @@ char * hb_verCompiler( void )
pszName = "EMX/RSXNT/Win32 GNU C";
#elif defined( __EMX__ )
pszName = "EMX GNU C";
#elif defined( __clang__ )
#if defined( __llvm__ )
pszName = "Clang/LLVM C";
#else
pszName = "Clang/GNU C";
#endif
#else
pszName = "GNU C";
#endif

View File

@@ -2207,7 +2207,6 @@ FUNCTION hbmk( aArgs, /* @ */ lPause )
AAdd( hbmk[ _HBMK_aOPTC ], "-D_GNU_SOURCE" )
CASE hbmk[ _HBMK_cCOMP ] == "clang"
cBin_CompC := hbmk[ _HBMK_cCCPREFIX ] + "clang" + hbmk[ _HBMK_cCCPOSTFIX ]
AAdd( hbmk[ _HBMK_aOPTC ], "-DHB_CC_CLANG" )
OTHERWISE
cBin_CompC := hbmk[ _HBMK_cCCPREFIX ] + iif( hbmk[ _HBMK_lCPP ] != NIL .AND. hbmk[ _HBMK_lCPP ], "g++", "gcc" ) + hbmk[ _HBMK_cCCPOSTFIX ]
ENDCASE