From 926e3318a64a05a750b4fc50809561b4c2f48bef Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 14 Jul 2009 14:17:43 +0000 Subject: [PATCH] 2009-07-14 16:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * make_gnu.sh - Deleted CRS, SLN, GPM detection. ; Now only some CPU dependent Linux settings remain. How to move these to central Makefiles? * make_gnu.sh * config/hpux/gcc.cf * config/sunos/gcc.cf * -fPIC setting moved to Makefiles. * Minor syncing between these two makefiles. ; NOTE: hbmk script creation may need to be updated. * utils/hbmk2/hbmk2.prg + -fPIC now added as standard for hpux and sunos. --- harbour/ChangeLog | 16 ++++++++++ harbour/config/hpux/gcc.cf | 4 +-- harbour/config/sunos/gcc.cf | 8 ++--- harbour/make_gnu.sh | 58 ----------------------------------- harbour/utils/hbmk2/hbmk2.prg | 2 ++ 5 files changed, 22 insertions(+), 66 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7483fd3151..6b3245a71f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,22 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-14 16:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * make_gnu.sh + - Deleted CRS, SLN, GPM detection. + ; Now only some CPU dependent Linux settings remain. + How to move these to central Makefiles? + + * make_gnu.sh + * config/hpux/gcc.cf + * config/sunos/gcc.cf + * -fPIC setting moved to Makefiles. + * Minor syncing between these two makefiles. + ; NOTE: hbmk script creation may need to be updated. + + * utils/hbmk2/hbmk2.prg + + -fPIC now added as standard for hpux and sunos. + 2009-07-14 15:53 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/gtalleg/gtalleg.c * changed the order of #include files to pacify DJGPP 2.04 warnings diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 1c5c2f2076..6d4240ec03 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -29,9 +29,7 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -O3 endif -# uncomment this if you want to force relocatable code for .sl libs -# it's necessary on some platforms but can reduce performance -#CFLAGS += -fPIC +CFLAGS += -fPIC # uncomment this if you want to force creating 64bit binaries on IA64 #CFLAGS += -mlp64 diff --git a/harbour/config/sunos/gcc.cf b/harbour/config/sunos/gcc.cf index 39f4531ba5..6370ee17c5 100644 --- a/harbour/config/sunos/gcc.cf +++ b/harbour/config/sunos/gcc.cf @@ -19,6 +19,7 @@ CC_OUT = -o CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = +LDFLAGS = ifneq ($(HB_BUILD_WARN),no) CFLAGS += -Wall -W @@ -28,15 +29,12 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -O3 endif -# uncomment this if you want to force relocatable code for .so libs -# it's necessary on some platforms but can reduce performance -#CFLAGS += -fPIC +CFLAGS += -fPIC ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif - LD = $(HB_CCACHE) $(HB_CMP) LD_OUT = -o @@ -93,7 +91,7 @@ endif LINKLIBS += -lm -lrt LINKLIBS += -lsocket -lnsl -lresolv -LDFLAGS = $(LINKPATHS) +LDFLAGS += $(LINKPATHS) AR = ar ARFLAGS = $(HB_USER_AFLAGS) diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index 3c0a1dd7bc..0b68068b4f 100755 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -62,61 +62,6 @@ then export HB_ARCHITECTURE=win fi -if [ -z "$HB_GPM_MOUSE" ]; then - if [ "$HB_ARCHITECTURE" = "linux" ] && \ - ( [ -f /usr/include/gpm.h ] || [ -f /usr/local/include/gpm.h ]); then - HB_GPM_MOUSE=yes - else - HB_GPM_MOUSE=no - fi - export HB_GPM_MOUSE -fi - -if [ -z "${HB_WITHOUT_GTSLN}" ]; then - HB_WITHOUT_GTSLN=yes - case "$HB_ARCHITECTURE" in - linux|bsd|darwin|hpux|sunos) - for dir in /usr /usr/local /sw /opt/local - do - if [ -f ${dir}/include/slang.h ] || \ - [ -f ${dir}/include/slang/slang.h ]; then - HB_WITHOUT_GTSLN=no - fi - done - ;; - esac - export HB_WITHOUT_GTSLN -fi - -if [ -z "${HB_WITHOUT_GTCRS}" ]; then - HB_WITHOUT_GTCRS=yes - case "$HB_ARCHITECTURE" in - linux|bsd|darwin|hpux|sunos) - for dir in /usr /usr/local /sw /opt/local - do - if [ -f ${dir}/include/curses.h ] || \ - [ -f ${dir}/include/ncurses.h ] || \ - [ -f ${dir}/include/ncurses/ncurses.h ]; then - HB_WITHOUT_GTCRS=no - fi - done - ;; - esac - export HB_WITHOUT_GTCRS -fi - -if [ -z "$HB_COMMERCE" ]; then export HB_COMMERCE=no; fi - -if [ "$HB_COMMERCE" = yes ] -then - export HB_GPM_MOUSE=no - export HB_WITHOUT_GTSLN=yes -fi - -# export HB_USER_PRGFLAGS= -# export HB_USER_CFLAGS= -# export HB_USER_LDFLAGS= - if [ "$HB_ARCHITECTURE" = "linux" ] then if [ "${HB_USER_CFLAGS}" == "${HB_USER_CFLAGS//-fPIC/}" ] @@ -136,9 +81,6 @@ then ;; esac fi -elif [ "$HB_ARCHITECTURE" = "hpux" ] || [ "$HB_ARCHITECTURE" = "sunos" ] -then - export HB_USER_CFLAGS="$HB_USER_CFLAGS -fPIC" fi if [ "$HB_ARCHITECTURE" = "win" ] || \ diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index 01d65e297a..73a6fdb976 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2169,6 +2169,8 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 ) IF "-fPIC" $ cSelfFlagC ; AAddNew( hbmk[ _HBMK_aOPTC ], "-fPIC" ) ELSEIF "-fpic" $ cSelfFlagC ; AAddNew( hbmk[ _HBMK_aOPTC ], "-fpic" ) + ELSEIF hbmk[ _HBMK_cARCH ] == "sunos|hpux" + AAddNew( hbmk[ _HBMK_aOPTC ], "-fPIC" ) ENDIF DO CASE