2009-12-12 23:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbsetup.h
* harbour/include/hbdefs.h
* harbour/include/hbthread.h
* harbour/src/common/hbver.c
* harbour/bin/hb-func.sh
* harbour/bin/postinst.sh
* harbour/config/linux/gcc.mk
+ harbour/config/linux/open64.mk
+ added support for Open64 C/C++ compiler in Linux builds
* harbour/src/common/hbver.c
* removed unnecessary casting compiler version number parameters
to 'short'
* extended the size of szBuf buffer as requested by Tamas
This commit is contained in:
@@ -17,6 +17,22 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-12-12 23:29 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/include/hbsetup.h
|
||||
* harbour/include/hbdefs.h
|
||||
* harbour/include/hbthread.h
|
||||
* harbour/src/common/hbver.c
|
||||
* harbour/bin/hb-func.sh
|
||||
* harbour/bin/postinst.sh
|
||||
* harbour/config/linux/gcc.mk
|
||||
+ harbour/config/linux/open64.mk
|
||||
+ added support for Open64 C/C++ compiler in Linux builds
|
||||
|
||||
* harbour/src/common/hbver.c
|
||||
* removed unnecessary casting compiler version number parameters
|
||||
to 'short'
|
||||
* extended the size of szBuf buffer as requested by Tamas
|
||||
|
||||
2009-12-12 21:24 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbwin/tests/testmapi.prg
|
||||
* contrib/hbwin/mapi.c
|
||||
|
||||
@@ -299,6 +299,7 @@ mk_hbtools()
|
||||
# set environment variables
|
||||
export HB_PLATFORM="${HB_PLATFORM}"
|
||||
export HB_COMPILER="${HB_COMPILER}"
|
||||
export HB_BUILD_MODE="${HB_BUILD_MODE}"
|
||||
[ -z "\${HB_BIN_INSTALL}" ] && export HB_BIN_INSTALL="${HB_BIN_INSTALL}"
|
||||
[ -z "\${HB_INC_INSTALL}" ] && export HB_INC_INSTALL="${HB_INC_INSTALL}"
|
||||
[ -z "\${HB_LIB_INSTALL}" ] && export HB_LIB_INSTALL="${HB_LIB_INSTALL}"
|
||||
@@ -306,12 +307,32 @@ export HB_COMPILER="${HB_COMPILER}"
|
||||
# be sure that ${name} binaries are in your path
|
||||
export PATH="\${HB_BIN_INSTALL}${hb_path_separator}${hb_ccpath}\${PATH}"
|
||||
|
||||
if [ "\${HB_COMPILER}" == "gpp" ]; then
|
||||
if [ "\${HB_COMPILER}" = "icc" ]; then
|
||||
if [ "\${HB_BUILD_MODE}" = "cpp" ]; then
|
||||
HB_CC="icpc"
|
||||
else
|
||||
HB_CC="icc"
|
||||
fi
|
||||
elif [ "\${HB_COMPILER}" = "open64" ]; then
|
||||
if [ "\${HB_BUILD_MODE}" = "cpp" ]; then
|
||||
HB_CC="openCC"
|
||||
else
|
||||
HB_CC="opencc"
|
||||
fi
|
||||
elif [ "\${HB_COMPILER}" = "sunpro" ]; then
|
||||
if [ "\${HB_BUILD_MODE}" = "cpp" ]; then
|
||||
HB_CC="sunCC"
|
||||
else
|
||||
HB_CC="suncc"
|
||||
fi
|
||||
elif [ "\${HB_COMPILER}" = "gpp" ]; then
|
||||
HB_CC="g++"
|
||||
elif [ "\${HB_COMPILER}" == "icc" ]; then
|
||||
HB_CC="icc"
|
||||
else
|
||||
HB_CC="gcc"
|
||||
if [ "\${HB_BUILD_MODE}" = "cpp" ]; then
|
||||
HB_CC="g++"
|
||||
else
|
||||
HB_CC="gcc"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ \$# = 0 ]; then
|
||||
|
||||
@@ -49,7 +49,8 @@ if [ "$HB_COMPILER" = "gcc" ] || \
|
||||
[ "$HB_COMPILER" = "cygwin" ] || \
|
||||
[ "$HB_COMPILER" = "djgpp" ] || \
|
||||
[ "$HB_COMPILER" = "icc" ] || \
|
||||
[ "$HB_COMPILER" = "sunpro" ]
|
||||
[ "$HB_COMPILER" = "sunpro" ] || \
|
||||
[ "$HB_COMPILER" = "open64" ]
|
||||
then
|
||||
if [ -n "${HB_TOOLS_PREF}" ]; then
|
||||
hb_mkdyn="${HB_INST_PKGPREF}${HB_BIN_INSTALL}/${HB_TOOLS_PREF}-mkdyn"
|
||||
@@ -72,6 +73,11 @@ then
|
||||
sed -e "s/gcc -shared/suncc -G ${lnopt} ${HB_ISAOPT}/g" \
|
||||
"${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
|
||||
chmod 755 "${hb_mkdyn}"
|
||||
elif [ "$HB_COMPILER" = "open64" ]; then
|
||||
hb_mkdyn="${HB_INST_PKGPREF}${HB_BIN_INSTALL}/hb-mkdyn"
|
||||
rm -f "${hb_mkdyn}"
|
||||
sed -e "s/gcc/opencc/g" "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
|
||||
chmod 755 "${hb_mkdyn}"
|
||||
elif [ "${HB_PLATFORM}" = "sunos" ] || \
|
||||
[ "${HB_PLATFORM}" = "hpux" ] || \
|
||||
! which install &>/dev/null; then
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := g++
|
||||
else
|
||||
HB_CMP := gcc
|
||||
ifeq ($(HB_CMP),)
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := g++
|
||||
else
|
||||
HB_CMP := gcc
|
||||
endif
|
||||
endif
|
||||
|
||||
OBJ_EXT := .o
|
||||
|
||||
14
harbour/config/linux/open64.mk
Normal file
14
harbour/config/linux/open64.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_BUILD_MODE),cpp)
|
||||
HB_CMP := openCC
|
||||
else
|
||||
HB_CMP := opencc
|
||||
endif
|
||||
|
||||
# it supports most of GCC switches (at least as dummy parameters) so we do
|
||||
# not have to create separate configurations for Open64 compiler
|
||||
|
||||
include $(TOP)$(ROOT)config/$(HB_PLATFORM)/gcc.mk
|
||||
@@ -855,7 +855,7 @@ typedef unsigned char HB_U8;
|
||||
#if defined( __GNUC__ )
|
||||
|
||||
# if ( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 3 ) ) && \
|
||||
! defined( __ICC )
|
||||
! defined( __ICC ) && !defined( __OPENCC__ )
|
||||
# define HB_BUILTIN_BSWAP 1
|
||||
# else
|
||||
# define HB_BUILTIN_BSWAP 0
|
||||
|
||||
@@ -507,14 +507,15 @@
|
||||
#define HB_NORETURN_ATTR
|
||||
# endif
|
||||
# if ( ( __GNUC__ > 4 ) || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 1 ) ) && \
|
||||
!defined( __ICC ) && !defined( HB_NO_FLATTEN ) && !defined( __clang__ )
|
||||
!defined( __ICC ) && !defined( __clang__ ) && \
|
||||
!defined( HB_NO_FLATTEN )
|
||||
#define HB_FLATTEN_ATTR \
|
||||
__attribute__ (( flatten ))
|
||||
# else
|
||||
#define HB_FLATTEN_ATTR
|
||||
# endif
|
||||
# if ( ( __GNUC__ > 4 ) || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 3 ) ) && \
|
||||
!defined( __ICC )
|
||||
!defined( __ICC ) && !defined( __OPENCC__ )
|
||||
#define HB_ALLOC_SIZE_ATTR( _nParam ) \
|
||||
__attribute__ (( alloc_size (_nParam)))
|
||||
# else
|
||||
|
||||
@@ -439,7 +439,8 @@ extern BOOL hb_threadMutexSyncWait( PHB_ITEM pItemMtx, ULONG ulMilliSec, PHB_ITE
|
||||
defined( __GLIBC__ ) && defined( __GLIBC_MINOR__ ) && \
|
||||
( __GLIBC__ > 2 || ( __GLIBC__ == 2 && __GLIBC_MINOR__ >= 6 ) ) && \
|
||||
defined( HB_OS_LINUX ) && \
|
||||
( defined( __i386__ ) || defined( __x86_64__ ) )
|
||||
( defined( __i386__ ) || defined( __x86_64__ ) ) && \
|
||||
( !defined( __OPENCC__ ) || !defined( HB_DYNLIB ) )
|
||||
# define HB_USE_TLS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -430,7 +430,7 @@ char * hb_verCompiler( void )
|
||||
{
|
||||
char * pszCompiler;
|
||||
const char * pszName;
|
||||
char szSub[ 32 ];
|
||||
char szSub[ 64 ];
|
||||
int iVerMajor;
|
||||
int iVerMinor;
|
||||
int iVerPatch;
|
||||
@@ -509,6 +509,18 @@ char * hb_verCompiler( void )
|
||||
iVerMinor = __ICC % 100;
|
||||
iVerPatch = 0;
|
||||
|
||||
#elif defined( __OPENCC__ )
|
||||
|
||||
pszName = "Open64 C";
|
||||
|
||||
#if defined( __cplusplus )
|
||||
hb_strncpy( szSub, "++", sizeof( szSub ) - 1 );
|
||||
#endif
|
||||
|
||||
iVerMajor = __OPENCC__;
|
||||
iVerMinor = __OPENCC_MINOR__;
|
||||
iVerPatch = __OPENCC_PATCHLEVEL__;
|
||||
|
||||
#elif defined( _MSC_VER )
|
||||
|
||||
#if ( _MSC_VER >= 800 )
|
||||
@@ -681,9 +693,9 @@ char * hb_verCompiler( void )
|
||||
if( pszName )
|
||||
{
|
||||
if( iVerPatch != 0 )
|
||||
hb_snprintf( pszCompiler, COMPILER_BUF_SIZE, "%s%s %hd.%hd.%hd", pszName, szSub, iVerMajor, iVerMinor, iVerPatch );
|
||||
hb_snprintf( pszCompiler, COMPILER_BUF_SIZE, "%s%s %d.%d.%d", pszName, szSub, iVerMajor, iVerMinor, iVerPatch );
|
||||
else if( iVerMajor != 0 || iVerMinor != 0 )
|
||||
hb_snprintf( pszCompiler, COMPILER_BUF_SIZE, "%s%s %hd.%hd", pszName, szSub, iVerMajor, iVerMinor );
|
||||
hb_snprintf( pszCompiler, COMPILER_BUF_SIZE, "%s%s %d.%d", pszName, szSub, iVerMajor, iVerMinor );
|
||||
else
|
||||
hb_snprintf( pszCompiler, COMPILER_BUF_SIZE, "%s%s", pszName, szSub );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user