diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 037161126c..5737b7d6e9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-09-21 11:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.mk + ! Fixed to recent changes to sysloc detection. + + * config/linux/gcc.mk + + Added HB_BUILD_STRIP for linux/gcc. + + * config/bin.mk + ! Fixed to not try to build a shared binary for binaries not + dependent on HVM. It's done in a little tricky way, maybe + we should introduce a new variable to signal Harbour + executables vs plain C ones. + This should fix link errors in harbour reported by users. 2009-09-21 11:28 UTC+0200 Maurilio Longo (maurilio.longo@libero.it) ! ChangeLog diff --git a/harbour/config/bin.mk b/harbour/config/bin.mk index c42b01a12a..34e39a44ee 100644 --- a/harbour/config/bin.mk +++ b/harbour/config/bin.mk @@ -9,7 +9,14 @@ ifneq ($(HB_COMPILER),) # Assemble template lib list to help create a few common variations -ifeq ($(HB_BUILD_SHARED),yes) +BUILD_SHARED := +ifeq ($(flavor LIBS),recursive) + ifeq ($(HB_BUILD_SHARED),yes) + BUILD_SHARED := yes + endif +endif + +ifeq ($(BUILD_SHARED),yes) HB_LIBS_TPL := \ hbcplr \ hbdebug \ @@ -79,9 +86,9 @@ endif HB_LINKING_RTL := HB_LINKING_VMMT := -ifneq ($(filter hbrtl, $(LIBS)),) +ifneq ($(filter hbrtl,$(LIBS)),) HB_LINKING_RTL := yes - ifneq ($(filter hbvmmt, $(LIBS)),) + ifneq ($(filter hbvmmt,$(LIBS)),) HB_LINKING_VMMT := yes endif endif @@ -89,7 +96,7 @@ endif -include $(TOP)$(ROOT)config/$(HB_PLATFORM)/libs.mk ifneq ($(HB_PLATFORM_UNIX),) - ifeq ($(HB_BUILD_SHARED),yes) + ifeq ($(BUILD_SHARED),yes) SYSLIBS := SYSLIBPATHS := endif diff --git a/harbour/config/global.mk b/harbour/config/global.mk index b4cb6a7690..ec89afe7d1 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -1220,11 +1220,11 @@ endif HB_SYSLOC := ifeq ($(HB_PLATFORM),beos) - ifneq ($(foreach dir,/boot/common /boot/system /boot/home/config $(subst :, ,$(LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX))),) + ifneq ($(strip $(foreach dir,/boot/common /boot/system /boot/home/config $(subst :, ,$(LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),) HB_SYSLOC := yes endif else ifneq ($(HB_PLATFORM_UNIX),) - ifneq ($(foreach dir,/usr/local/bin /usr/bin /opt/harbour /opt/bin $(subst :, ,$(LD_LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX))),) + ifneq ($(strip $(foreach dir,/usr/local/bin /usr/bin /opt/harbour /opt/bin $(subst :, ,$(LD_LIBRARY_PATH)),$(findstring |$(dir),|$(HB_INSTALL_PREFIX)))),) HB_SYSLOC := yes endif endif diff --git a/harbour/config/linux/gcc.mk b/harbour/config/linux/gcc.mk index 8acfacf3a9..e8bb0cedc1 100644 --- a/harbour/config/linux/gcc.mk +++ b/harbour/config/linux/gcc.mk @@ -34,6 +34,14 @@ ifeq ($(HB_BUILD_DEBUG),yes) CFLAGS += -g endif +ifneq ($(filter $(HB_BUILD_STRIP),all lib),) + ARSTRIP = && strip -S $(LIB_DIR)/$@ +endif +ifneq ($(filter $(HB_BUILD_STRIP),all bin),) + LDSTRIP := -s + DYSTRIP := -s +endif + LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) LD_OUT := -o @@ -44,13 +52,13 @@ LDFLAGS += $(LIBPATHS) AR := $(HB_CCPREFIX)ar ARFLAGS := -AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false ) +AR_RULE = ( $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) rcs $(LIB_DIR)/$@ $(^F) $(ARSTRIP) ) || ( $(RM) $(LIB_DIR)/$@ && false ) DY := $(CC) DFLAGS := -shared $(LIBPATHS) DY_OUT := -o$(subst x,x, ) DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib)) -DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) +DY_RULE = $(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS) $(DYSTRIP) && $(LN) $(DYN_DIR)/$@ $(DYN_FILE2) include $(TOP)$(ROOT)config/rules.mk