diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2d7f188fcb..5c4cdb4ada 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,34 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-04 01:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbdefs.h + ! Further tweaked HB_STRICT_ALIGNMENT detection by using + HB_CPU_* macros. + Please review and extend/tweak if needed. + + * include/hbdefs.h + * include/hbsetup.h + * include/hbinit.h + * source/vm/fm.c + * source/common/hbver.c + * config/sunos/sunpro.cf + + Patch for Sun support by Tamas Tevesz. + - SunPro compiler C++ mode support. + - HB_STRICT_ALIGNMENT config refinement for Sun platform. + - SunPro compiler version detection will detect raw version + number for newer releases. + - SunPro optimization flag tweaks for C/C++ mode. + Trying to be Blastwave.org compatible as much as possible. + - LD_OUT -o option tweak for SunPro. + ; NOTE: -o option should better be revised for all supported + [gcc] compilers to have space between it and the + filename. + + * source/vm/extrap.c + + Changed to use HB_CPU_* macros instead of using compiler + specific ones. + 2009-08-04 00:33 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL * Minor. diff --git a/harbour/config/sunos/sunpro.cf b/harbour/config/sunos/sunpro.cf index bab0bf00af..071a04b3ab 100644 --- a/harbour/config/sunos/sunpro.cf +++ b/harbour/config/sunos/sunpro.cf @@ -36,7 +36,12 @@ ifneq ($(HB_BUILD_OPTIM),no) # conform to the Blastwave build standards, see # http://wiki.blastwave.org/mediawiki/index.php/Build_Standards # Try to keep them this way. -CFLAGS += -O -fast -xstrconst -xnolibmopt +CFLAGS += -O -fast +ifneq ($(HB_BUILD_MODE),cpp) +CFLAGS += -xstrconst +endif +CFLAGS += -xnolibmopt +endif endif ifeq ($(findstring sparc,$(shell isalist)),sparc) @@ -50,7 +55,7 @@ CFLAGS += -g endif LD = $(HB_CCACHE) $(HB_CMP) -LD_OUT = -o +LD_OUT = -o$(subst x,x, ) # Add all libraries specified in LIBS. LINKPATHS += -L$(LIB_DIR) diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 19547e0ce0..9ae34b3082 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -73,7 +73,7 @@ defined( __MINGW32__ ) || defined( __DMC__ ) || \ ( defined( __BORLANDC__ ) && __BORLANDC__ >= 1410 ) || \ ( defined( __WATCOMC__ ) && __WATCOMC__ >= 1270 ) || \ - ( ( defined( __GNUC__ ) || defined( __SUNPRO_C ) ) && \ + ( ( defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) ) && \ ( defined( _ISOC99_SOURCE ) || \ ( defined( __STDC_VERSION__ ) && __STDC_VERSION__ >= 199901L ) || \ ( defined( __DJGPP__ ) && \ @@ -248,14 +248,14 @@ #if ! defined( HB_DONT_DEFINE_BASIC_TYPES ) && ! defined( _WINNT_H ) #if !defined( LONGLONG ) - #if defined( __GNUC__ ) || defined( __SUNPRO_C ) + #if defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) typedef signed long long LONGLONG; #else typedef __int64 LONGLONG; #endif #endif #if !defined( ULONGLONG ) - #if defined( __GNUC__ ) || defined( __SUNPRO_C ) + #if defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) typedef unsigned long long ULONGLONG; #else typedef unsigned __int64 ULONGLONG; @@ -798,7 +798,12 @@ typedef long hbVMIntMax; /* TOFIX */ * different architectures - SPARC + LINUX, ALPHA + LINUX */ #if !defined( HB_STRICT_ALIGNMENT ) -# if defined( HB_OS_SUNOS ) || defined( HB_OS_HPUX ) || defined( _M_ARM ) +# if defined( HB_CPU_SPARC ) || defined( HB_CPU_SPARC_64 ) || \ + defined( HB_CPU_ALPHA ) || \ + defined( HB_CPU_PARISC ) || \ + defined( HB_CPU_MIPS ) || \ + defined( HB_CPU_PPC ) || defined( HB_CPU_PPC_64 ) || \ + defined( HB_CPU_ARM ) # define HB_STRICT_ALIGNMENT # endif #endif diff --git a/harbour/include/hbinit.h b/harbour/include/hbinit.h index 0c2856ee90..2744459da6 100644 --- a/harbour/include/hbinit.h +++ b/harbour/include/hbinit.h @@ -112,7 +112,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbols( PHB_SYMB pSymbols, USHORT uiSymbo #define HB_CALL_ON_STARTUP_END( func ) \ } -#elif defined( __GNUC__ ) || defined( __SUNPRO_C ) +#elif defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) #if defined( HB_PRAGMA_STARTUP ) || defined( HB_MSC_STARTUP ) #error Wrong macros set for startup code - clean your make/env settings. diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index cff5faedfa..3733bd45f0 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -177,7 +177,7 @@ /* *********************************************************************** * Operating system specific definitions */ -#if ( ( defined( __GNUC__ ) || defined( __SUNPRO_C ) ) && \ +#if ( ( defined( __GNUC__ ) || defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) ) && \ ! ( defined( __DJGPP__ ) || defined( __EMX__ ) || defined( __RSXNT__ ) || \ defined( _Windows ) || defined( _WIN32 ) || defined( _WINCE ) ) ) || \ ( defined( __WATCOMC__ ) && defined( __LINUX__ ) ) diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index c4e75328d7..30c6d5246a 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -629,6 +629,7 @@ char * hb_verCompiler( void ) /* Until someone at Sun somes up with a reliable way of identifying Sun Studio releases >= about 11. */ iVerMajor = iVerMinor = iVerPatch = 0; + hb_snprintf( szSub, sizeof( szSub ) - 1, "(ident 0x%X)", __SUNPRO_C ); #endif #elif defined( __SUNPRO_CC ) @@ -643,6 +644,7 @@ char * hb_verCompiler( void ) /* Until someone at Sun somes up with a reliable way of identifying Sun Studio releases >= about 11. */ iVerMajor = iVerMinor = iVerPatch = 0; + hb_snprintf( szSub, sizeof( szSub ) - 1, "(ident 0x%X)", __SUNPRO_CC ); #endif #else diff --git a/harbour/source/vm/extrap.c b/harbour/source/vm/extrap.c index bc3018e84a..c16903534f 100644 --- a/harbour/source/vm/extrap.c +++ b/harbour/source/vm/extrap.c @@ -105,7 +105,7 @@ LONG WINAPI hb_winExceptionHandler( struct _EXCEPTION_POINTERS * pExceptionInfo errmsg[ 0 ] = '\0'; -#if defined( HB_OS_WIN_64 ) && ( defined( _M_X64 ) || defined( __MINGW64__ ) ) +#if defined( HB_OS_WIN_64 ) && defined( HB_CPU_X86_64 ) { PCONTEXT pCtx = pExceptionInfo->ContextRecord; @@ -134,7 +134,7 @@ LONG WINAPI hb_winExceptionHandler( struct _EXCEPTION_POINTERS * pExceptionInfo See: - StackWalk64() - http://www.codeproject.com/KB/threads/StackWalker.aspx?fid=202364 */ } -#elif defined( HB_OS_WIN_64 ) && defined( _M_IA64 ) +#elif defined( HB_OS_WIN_64 ) && defined( HB_CPU_IA_64 ) { /* TODO: Itanium See: winnt.h for PCONTEXT structure. */ diff --git a/harbour/source/vm/fm.c b/harbour/source/vm/fm.c index 958de5560e..4b92d60001 100644 --- a/harbour/source/vm/fm.c +++ b/harbour/source/vm/fm.c @@ -78,7 +78,7 @@ #endif /* For Sun C, a more generic solution would be nice */ -#if defined( __SUNPRO_C ) +#if defined( __SUNPRO_C ) || defined( __SUNPRO_CC ) # define __inline __inline__ #endif