From f84064a58bf2c153daf4bc958ee1189f88d5f9b6 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 3 Feb 2009 11:54:36 +0000 Subject: [PATCH] 2009-02-03 12:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/make_gcc.sh + added some Solaris libraries necessary to link Harbour applications using sockets * harbour/make_gnu.sh * look also for pure curses header files for GTCRS compilation. GTCRS can be compiled with CURSES not only NCURSES. * enable -fPIC in SunOS and HPUX builds * harbour/mpkg_tgz.sh * enable -fPIC in SunOS builds * harbour/make_gcc.mak * do not use -Wl,--start-group/-Wl,--end-group in SunOS, HPUX and Darwin builds * harbour/config/hpux/gcc.cf * small cleanup in comment --- harbour/ChangeLog | 20 ++++++++++++++++++++ harbour/config/hpux/gcc.cf | 2 +- harbour/make_gcc.mak | 26 +++++++++++++++++--------- harbour/make_gcc.sh | 4 ++-- harbour/make_gnu.sh | 6 +++++- harbour/mpkg_tgz.sh | 2 +- 6 files changed, 46 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index faa060248f..c441b42a8e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,26 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2009-02-03 12:58 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/make_gcc.sh + + added some Solaris libraries necessary to link Harbour applications + using sockets + + * harbour/make_gnu.sh + * look also for pure curses header files for GTCRS compilation. + GTCRS can be compiled with CURSES not only NCURSES. + * enable -fPIC in SunOS and HPUX builds + + * harbour/mpkg_tgz.sh + * enable -fPIC in SunOS builds + + * harbour/make_gcc.mak + * do not use -Wl,--start-group/-Wl,--end-group in SunOS, HPUX and Darwin + builds + + * harbour/config/hpux/gcc.cf + * small cleanup in comment + 2009-02-03 11:45 UTC+0100 Lorenzo Fiorini (lorenzo.fiorini/at/gmail.com) * contib/xhb/hblognet.prg * fixed thread function names diff --git a/harbour/config/hpux/gcc.cf b/harbour/config/hpux/gcc.cf index 17bb224c26..9b81a6cc44 100644 --- a/harbour/config/hpux/gcc.cf +++ b/harbour/config/hpux/gcc.cf @@ -17,7 +17,7 @@ CPPFLAGS = -I. -I$(HB_INC_COMPILE) CFLAGS = -Wall -W -O3 LDFLAGS = -# uncomment this if you want to force relocatable code for .so libs +# uncomment this if you want to force relocatable code for .sl libs # it's necessary on some platforms but can reduce performance #CFLAGS += -fPIC diff --git a/harbour/make_gcc.mak b/harbour/make_gcc.mak index dd8c4cd01d..059c5ec102 100644 --- a/harbour/make_gcc.mak +++ b/harbour/make_gcc.mak @@ -184,34 +184,42 @@ endif # OS/2 hacks for missing gcc features ifneq ($(HB_ARCHITECTURE),os2) +ifneq ($(HB_ARCHITECTURE),sunos) +ifneq ($(HB_ARCHITECTURE),hpux) +ifneq ($(HB_ARCHITECTURE),darwin) __GROUP_LIBS_BEG__=-Wl,--start-group __GROUP_LIBS_END__=-Wl,--end-group endif +endif +endif +endif LDFLAGS := $(L_USR) $(__GROUP_LIBS_BEG__) $(STANDARD_STATIC_HBLIBS) +LDFLAGS += $(__GROUP_LIBS_END__) + +ifeq ($(__GROUP_LIBS_BEG__),) +LDFLAGS += $(RTL_LIB) $(VM_LIB) +LDFLAGS += $(STANDARD_STATIC_HBLIBS) +endif + # HB_GPM_MOUSE: use gpm mouse driver ifeq ($(HB_GPM_MOUSE),yes) -LDFLAGS += -lgpm +HB_OS_LIBS += -lgpm CFLAGS += -DHAVE_GPM_H endif # PCRE Regex library ifneq ($(findstring -DHB_PCRE_REGEX, $(CFLAGS)),) -LDFLAGS += -lpcre +HB_OS_LIBS += -lpcre endif # ZLIB library ifneq ($(findstring -DHB_EXT_ZLIB, $(CFLAGS)),) -LDFLAGS += -lz +HB_OS_LIBS += -lz endif -LDFLAGS += $(__GROUP_LIBS_END__) $(HB_OS_LIBS) - -ifeq ($(HB_ARCHITECTURE),os2) -LDFLAGS += $(STANDARD_STATIC_HBLIBS) $(HB_OS_LIBS) -#LDFLAGS += $(RTL_LIB) $(VM_LIB) -endif +LDFLAGS += $(HB_OS_LIBS) LDFLAGSDLL := -shared $(L_USR) -L$(LIB_DIR) diff --git a/harbour/make_gcc.sh b/harbour/make_gcc.sh index 0c934a9584..f7840d6cc6 100755 --- a/harbour/make_gcc.sh +++ b/harbour/make_gcc.sh @@ -52,7 +52,6 @@ then HB_CPU=`uname -m` case "$HB_CPU" in *[_@]64) - export C_USR="$C_USR -fPIC" HB_ARCH64="yes" ;; *) @@ -84,7 +83,8 @@ case "$HB_ARCHITECTURE" in ;; bsd) MAKE="gmake" ;; - sunos) OS_LIBS="$OS_LIBS -lrt" + sunos) MAKE="gmake" + OS_LIBS="$OS_LIBS -lrt -lsocket -lnsl -lresolv" CRSLIB="curses" ;; hpux) MAKE="gmake" diff --git a/harbour/make_gnu.sh b/harbour/make_gnu.sh index aebb382406..10b91d35b5 100755 --- a/harbour/make_gnu.sh +++ b/harbour/make_gnu.sh @@ -71,7 +71,8 @@ if [ -z "${HB_WITHOUT_GTCRS}" ]; then linux|bsd|darwin|hpux|sunos) for dir in /usr /usr/local /sw /opt/local do - if [ -f ${dir}/include/ncurses.h ] || \ + if [ -f ${dir}/include/curses.h ] || \ + [ -f ${dir}/include/ncurses.h ] || \ [ -f ${dir}/include/ncurses/ncurses.h ]; then HB_WITHOUT_GTCRS=no fi @@ -107,6 +108,9 @@ then ;; esac fi +elif [ "$HB_ARCHITECTURE" = "hpux" ] || [ "$HB_ARCHITECTURE" = "sunos" ] +then + export C_USR="$C_USR -fPIC" fi [ -z "$HB_INSTALL_PREFIX" ] && [ -n "$PREFIX" ] && export HB_INSTALL_PREFIX="$PREFIX" diff --git a/harbour/mpkg_tgz.sh b/harbour/mpkg_tgz.sh index f23fcf7813..d567c5c561 100755 --- a/harbour/mpkg_tgz.sh +++ b/harbour/mpkg_tgz.sh @@ -79,7 +79,7 @@ then *) ;; esac -elif [ "$HB_ARCHITECTURE" = "hpux" ] +elif [ "$HB_ARCHITECTURE" = "hpux" ] || [ "$HB_ARCHITECTURE" = "sunos" ] then export C_USR="$C_USR -fPIC" fi