diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 09e5af639e..9f4c4e5f57 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,17 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-12 15:27 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/bsd/gcc.mk + * config/hpux/gcc.mk + * config/sunos/gcc.mk + - Deleted -fPIC from DFLAGS. Pls tell if this was put there for a reason. + + * config/hpux/gcc.mk + * config/sunos/gcc.mk + * config/sunos/sunpro.mk + + Added separate compilation pass for Harbour dynlibs using PIC option. + 2009-09-12 11:48 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.mk + Added ppc detection on PPC macs. diff --git a/harbour/config/bsd/gcc.mk b/harbour/config/bsd/gcc.mk index 693d26af8d..0bdb5d71e6 100644 --- a/harbour/config/bsd/gcc.mk +++ b/harbour/config/bsd/gcc.mk @@ -45,7 +45,7 @@ ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) r $(LIB_DIR)/$@ $(^F) || $(RM) $(LIB_DIR)/$@ DY := $(CC) -DFLAGS := -shared -fPIC $(LIBPATHS) +DFLAGS := -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) diff --git a/harbour/config/hpux/gcc.mk b/harbour/config/hpux/gcc.mk index 3f6d042439..c944240527 100644 --- a/harbour/config/hpux/gcc.mk +++ b/harbour/config/hpux/gcc.mk @@ -12,6 +12,8 @@ OBJ_EXT := .o LIB_PREF := lib LIB_EXT := .a +HB_DYN_COPT := -DHB_DYNLIB -fPIC + CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) CC_IN := -c CC_OUT := -o @@ -28,8 +30,6 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -O3 endif -CFLAGS += -fPIC - # uncomment this if you want to force creating 64bit binaries on IA64 #CFLAGS += -mlp64 #LDFLAGS += -mlp64 @@ -51,7 +51,7 @@ ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rc $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(CC) -DFLAGS := -shared -fPIC $(LIBPATHS) +DFLAGS := -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) diff --git a/harbour/config/sunos/gcc.mk b/harbour/config/sunos/gcc.mk index 1141f84e63..6892fa0455 100644 --- a/harbour/config/sunos/gcc.mk +++ b/harbour/config/sunos/gcc.mk @@ -12,6 +12,8 @@ OBJ_EXT := .o LIB_PREF := lib LIB_EXT := .a +HB_DYN_COPT := -DHB_DYNLIB -fPIC + CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) CC_IN := -c # NOTE: The ending space after -o is important, please preserve it. @@ -30,8 +32,6 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -O3 endif -CFLAGS += -fPIC - ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif @@ -49,7 +49,7 @@ ARFLAGS := AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rc $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(CC) -DFLAGS := -shared -fPIC $(LIBPATHS) +DFLAGS := -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) diff --git a/harbour/config/sunos/sunpro.mk b/harbour/config/sunos/sunpro.mk index 1fef308832..d9396c104c 100644 --- a/harbour/config/sunos/sunpro.mk +++ b/harbour/config/sunos/sunpro.mk @@ -12,6 +12,13 @@ OBJ_EXT := .o LIB_PREF := lib LIB_EXT := .a +HB_DYN_COPT := -DHB_DYNLIB +ifeq ($(findstring sparc,$(shell isalist)),sparc) + HB_DYN_COPT += -xcode=pic32 +else + HB_DYN_COPT += -KPIC +endif + CC := $(HB_CCACHE) $(HB_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) CC_IN := -c # NOTE: The ending space after -o is important, please preserve it. @@ -37,15 +44,6 @@ ifneq ($(HB_BUILD_OPTIM),no) CFLAGS += -xnolibmopt endif -# force position independent code for harbour shared library -# it's not optimal but without support for compilation in two passes -# we have to use this option also for static libraries and binaries -ifeq ($(findstring sparc,$(shell isalist)),sparc) - CFLAGS += -xcode=pic32 -else - CFLAGS += -KPIC -endif - export HB_ISAOPT CFLAGS += $(HB_ISAOPT)