2009-08-01 16:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* INSTALL
  * bin/postinst.sh
  * source/vm/fm.c
  * source/common/hbver.c
  + config/sunos/sunpro64.cf
  * config/sunos/sunpro.cf
  * ChangeLog
    + Applied second SunPro patch sent by Tamas Tevesz.
      Addressed these former TODOs:
      + Added sunpro64 target.
      + Finalized C compiler options (including warning level settings).
      + Added compiler identification code to hbver.c.
      + dynamic lib creation.

  * utils/hbmk2/hbmk2.prg
    ! Fixed RTE when run on sunos. Needs further work to discover how
      it could run onto that codepath, normally it shouldn't.

  * bin/postinst.sh
    % Cleaned a few remaining 'gpp' HB_COMPILER value checks.
This commit is contained in:
Viktor Szakats
2009-08-01 14:58:20 +00:00
parent b531d010db
commit f533da4d92
8 changed files with 97 additions and 27 deletions

View File

@@ -17,6 +17,28 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-08-01 16:56 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* INSTALL
* bin/postinst.sh
* source/vm/fm.c
* source/common/hbver.c
+ config/sunos/sunpro64.cf
* config/sunos/sunpro.cf
* ChangeLog
+ Applied second SunPro patch sent by Tamas Tevesz.
Addressed these former TODOs:
+ Added sunpro64 target.
+ Finalized C compiler options (including warning level settings).
+ Added compiler identification code to hbver.c.
+ dynamic lib creation.
* utils/hbmk2/hbmk2.prg
! Fixed RTE when run on sunos. Needs further work to discover how
it could run onto that codepath, normally it shouldn't.
* bin/postinst.sh
% Cleaned a few remaining 'gpp' HB_COMPILER value checks.
2009-08-01 15:35 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/global.cf
* config/lib.cf
@@ -173,13 +195,13 @@
+ Added first round of Sun Pro (Sun Studio) compiler support.
Contribution of Tamas Tevesz.
; TODO:
+ Add other Sun Pro CPU targets.
+ Add other Sun Pro CPU targets. [DONE]
* Finalize __inline keyword usage. (currently in fm.c)
Przemek, could you take a look at it?
! Fix warning option.
+ Add compiler identification code to hbver.c.
Przemek, could you take a look at it? [OKAY]
! Fix warning option. [DONE]
+ Add compiler identification code to hbver.c. [DONE]
+ hbmk2 support.
+ dynamic lib creation.
+ dynamic lib creation. [DONE]
* utils/hbmk2/hbmk2.prg
* Minor rename.

View File

@@ -27,7 +27,7 @@ HOW TO BUILD AND INSTALL HARBOUR FROM SOURCE
Linux/Darwin/BSD/HP-UX/Solaris
------------------------------
$ export HB_COMPILER=<[gcc]|watcom|icc>
$ export HB_COMPILER=<[gcc]|watcom|icc|sunpro|sunpro64>
$ export HB_INSTALL_PREFIX=<DIR>
$ ./make_gnu.sh
$ sudo ./make_gnu.sh install
@@ -37,6 +37,13 @@ HOW TO BUILD AND INSTALL HARBOUR FROM SOURCE
$ ./hello
You should see 'Hello world!' on screen.
NOTE for sunpro/sunpro64 on Solaris:
------------------------------------
If you have any GNU binutils stuff installed, do make sure
/usr/ccs/bin (the location of the native Sun C compilation
system tools) come *before* the GNU binutils components in
your $PATH.
Windows/Windows CE
------------------
Platform specific prerequisites:
@@ -181,10 +188,16 @@ SUPPORTED C COMPILERS UNDER DIFFERENT PLATFORMS
watcom - Open Watcom C++
icc - Intel(R) C/C++
Darwin/BSD/HP-UX/Solaris
------------------------
Darwin/BSD/HP-UX
----------------
gcc - GNU C
Solaris
-------
gcc - GNU C
sunpro - Sun Studio C/C++ (32-bit target)
sunpro64 - Sun Studio C/C++ (64-bit target)
Windows (recommended)
-------
mingw - MinGW GNU C 3.4.2 and above

View File

@@ -41,13 +41,14 @@ fi
. ${hb_root}/bin/hb-func.sh
if [ "$HB_COMPILER" = "gcc" ] || \
[ "$HB_COMPILER" = "gpp" ] || \
[ "$HB_COMPILER" = "mingw" ] || \
[ "$HB_COMPILER" = "mingw64" ] || \
[ "$HB_COMPILER" = "mingwarm" ] || \
[ "$HB_COMPILER" = "cygwin" ] || \
[ "$HB_COMPILER" = "djgpp" ] || \
[ "$HB_COMPILER" = "icc" ]
[ "$HB_COMPILER" = "icc" ] || \
[ "$HB_COMPILER" = "sunpro" ] || \
[ "$HB_COMPILER" = "sunpro64" ]
then
RANLIB=""
MAKE=make
@@ -55,6 +56,7 @@ then
AR_OPT=""
if [ "${HB_ARCHITECTURE}" = "bsd" ] || \
[ "${HB_ARCHITECTURE}" = "hpux" ] || \
[ "${HB_ARCHITECTURE}" = "sunos" ] || \
[ `uname` = "FreeBSD" ]; then
MAKE=gmake
elif [ "${HB_ARCHITECTURE}" = "darwin" ]; then
@@ -76,6 +78,17 @@ then
rm -f "${hb_mkdyn}"
sed -e "s/gcc/icc/g" "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
chmod 755 "${hb_mkdyn}"
elif [ "$HB_COMPILER" = "sunpro" ] || \
[ "$HB_COMPILER" = "sunpro64" ]; then
hb_mkdyn="${HB_BIN_INSTALL}/hb-mkdyn"
rm -f "${hb_mkdyn}"
if [ "$HB_COMPILER" = "sunos" ]; then
sed -e "s/gcc -shared -fPIC/cc -G -xcode=pic32/g" "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
chmod 755 "${hb_mkdyn}"
else
sed -e "s/gcc -shared -fPIC/cc -G -Kpic/g" "${hb_root}/bin/hb-mkdyn.sh" > "${hb_mkdyn}" && \
chmod 755 "${hb_mkdyn}"
fi
elif [ "${HB_ARCHITECTURE}" = "sunos" ] || \
[ "${HB_ARCHITECTURE}" = "hpux" ] || \
! which install &>/dev/null; then
@@ -98,10 +111,11 @@ then
mk_hbtools "${HB_BIN_INSTALL}" "$@"
if [ "$HB_COMPILER" = "gcc" ] || \
[ "$HB_COMPILER" = "gpp" ] || \
[ "$HB_COMPILER" = "mingw" ] || \
[ "$HB_COMPILER" = "mingw64" ] || \
[ "$HB_COMPILER" = "mingwarm" ] || \
[ "$HB_COMPILER" = "sunpro" ] || \
[ "$HB_COMPILER" = "sunpro64" ] || \
[ "$HB_COMPILER" = "icc" ]; then
mk_hblibso "${hb_root}"
fi

View File

@@ -21,30 +21,28 @@ CC_OUT = -o$(subst x,x, )
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS =
# may inherit -m64 from sunpro64.cf, which supersedes -xarch=v8
CFLAGS ?= -xarch=v8
LDFLAGS =
ifneq ($(HB_BUILD_WARN),no)
# XXX:
# gmake[2]: Entering directory `/home/ice/harbour-build/source/rtl'
# gmake[3]: Entering directory `/home/ice/harbour-build/source/rtl/obj/sunos/sunpro'
# cc -I. -I../../../../../include -errwarn=%all -O -xcode=pic32 -c browdbx.c -o browdbx.o
# "browdbx.c", line 8: warning: empty translation unit
# cc: acomp failed for browdbx.c
# gmake[3]: *** [browdbx.o] Error 2
# gmake[3]: Leaving directory `/home/ice/harbour-build/source/rtl/obj/sunos/sunpro'
# CFLAGS += -errwarn=%all
CFLAGS +=
ifeq ($(HB_BUILD_WARN),no)
CFLAGS += -erroff=%all
else
CFLAGS += -erroff=%none
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O
# Together with -xarch=v8 above, these are supposed to (somewhat)
# 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
endif
ifeq ($(findstring sparc,$(shell isalist)),sparc)
CFLAGS += -xcode=pic32
else
CFLAGS += -KPIC
CFLAGS += -Kpic
endif
ifeq ($(HB_BUILD_DEBUG),yes)

View File

@@ -0,0 +1,7 @@
#
# $Id$
#
CFLAGS = -m64
include $(TOP)$(ROOT)config/sunos/sunpro.cf

View File

@@ -617,6 +617,21 @@ char * hb_verCompiler( void )
#else
iVerPatch = 0;
#endif
#elif defined( __SUNPRO_C )
pszName = "Sun C";
iVerMajor = __SUNPRO_C / 0x100;
iVerMinor = ( __SUNPRO_C & 0xff ) / 0x10;
iVerPatch = __SUNPRO_C & 0xf;
#elif defined( __SUNPRO_CC )
pszName = "Sun C++";
iVerMajor = __SUNPRO_CC / 0x100;
iVerMinor = ( __SUNPRO_CC & 0xff ) / 0x10;
iVerPatch = __SUNPRO_CC & 0xf;
#else
pszName = ( char * ) NULL;

View File

@@ -77,8 +77,9 @@
# define _GNU_SOURCE
#endif
/* For Sun C, a more generic solution would be nice */
#if defined( __SUNPRO_C )
#define __inline __inline__
# define __inline __inline__
#endif
/* NOTE: For OS/2. Must be ahead of any and all #include statements */

View File

@@ -1944,7 +1944,7 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
IF ! lStopAfterInit .AND. ! lStopAfterHarbour
IF hbmk[ _HBMK_cGT ] == hbmk[ _HBMK_cGTDEFAULT ]
IF hbmk[ _HBMK_cGT ] != NIL .AND. hbmk[ _HBMK_cGT ] == hbmk[ _HBMK_cGTDEFAULT ]
hbmk[ _HBMK_cGT ] := NIL
ENDIF