diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 1bfd622ac3..d89f545525 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,24 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-20 01:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/config/bsd/gcc.mk + * harbour/config/bin.mk + * harbour/config/hpux/gcc.mk + * harbour/config/darwin/gcc.mk + * harbour/config/linux/gcc.mk + * harbour/config/linux/icc.mk + * harbour/config/linux/global.mk + * harbour/config/linux/sunpro.mk + * harbour/config/rules.mk + * harbour/config/os2/gcc.mk + * harbour/config/sunos/gcc.mk + * harbour/config/sunos/sunpro.mk + ! replaced wrongly used 'findstring' functions with 'filter' functions + + * harbour/config/linux/global.mk + * enable -fPIC for all non x86@32 GCC and ICC Linux builds + 2009-08-20 00:52 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/config/global.mk ! fixed typo in platform detection 'ifeq' instead of 'ifneq' and 'win' diff --git a/harbour/config/bin.mk b/harbour/config/bin.mk index 1720736c8c..939ac47ccb 100644 --- a/harbour/config/bin.mk +++ b/harbour/config/bin.mk @@ -26,12 +26,12 @@ HB_LIBS_TPL = \ hbpp \ hbcommon -ifeq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) - ifeq ($(findstring -DHB_POSIX_REGEX, $(HB_USER_CFLAGS)),) +ifeq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifeq ($(filter -DHB_POSIX_REGEX, $(HB_USER_CFLAGS)),) HB_LIBS_TPL += hbpcre endif endif -ifeq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) +ifeq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) HB_LIBS_TPL += hbzlib endif diff --git a/harbour/config/bsd/gcc.mk b/harbour/config/bsd/gcc.mk index 4b0c64949a..202b45f716 100644 --- a/harbour/config/bsd/gcc.mk +++ b/harbour/config/bsd/gcc.mk @@ -61,11 +61,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LIBPATHS += -L/usr/local/lib - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif endif diff --git a/harbour/config/darwin/gcc.mk b/harbour/config/darwin/gcc.mk index e47ef8caa6..c276bf9222 100644 --- a/harbour/config/darwin/gcc.mk +++ b/harbour/config/darwin/gcc.mk @@ -72,11 +72,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LIBPATHS += -L/usr/X11R6/lib endif - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif endif diff --git a/harbour/config/hpux/gcc.mk b/harbour/config/hpux/gcc.mk index 302e2c4b5b..0abec748e5 100644 --- a/harbour/config/hpux/gcc.mk +++ b/harbour/config/hpux/gcc.mk @@ -61,11 +61,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LIBPATHS += -L/usr/X11R6/lib endif - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif diff --git a/harbour/config/linux/gcc.mk b/harbour/config/linux/gcc.mk index c592af857f..21831fc760 100644 --- a/harbour/config/linux/gcc.mk +++ b/harbour/config/linux/gcc.mk @@ -64,11 +64,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LDLIBS += -lgpm endif - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif diff --git a/harbour/config/linux/global.mk b/harbour/config/linux/global.mk index cf71d0ca29..b6c12216be 100644 --- a/harbour/config/linux/global.mk +++ b/harbour/config/linux/global.mk @@ -9,14 +9,18 @@ BIN_EXT := HB_GT_LIBS += gttrm ifeq ($(HB_SHELL),sh) - ifneq ($(HB_COMPILER),sunpro) - ifeq ($(findstring -fPIC,$(HB_USER_CFLAGS)),) - _UNAME_M := $(shell uname -m) - # TODO: Make this complete: - # || ( $( "*[ix]*86" ) && $( "*[ix]*86[^0-9]*" ) ) - ifneq ($(findstring $(_UNAME_M),@64 _64 x86_64),) - HB_CFLAGS += -fPIC - endif + ifneq ($(filter $(HB_COMPILER),gcc icc),) + ifeq ($(filter -fPIC,$(HB_USER_CFLAGS)),) + ifeq ($(filter -fpic,$(HB_USER_CFLAGS)),) + _UNAME_M := $(shell uname -m) + ifeq ($(findstring 86,$(_UNAME_M)),) + HB_CFLAGS += -fPIC + else + ifneq ($(findstring 64,$(_UNAME_M)),) + HB_CFLAGS += -fPIC + endif + endif + endif endif endif endif diff --git a/harbour/config/linux/icc.mk b/harbour/config/linux/icc.mk index c03e21f786..f15ebcd59f 100644 --- a/harbour/config/linux/icc.mk +++ b/harbour/config/linux/icc.mk @@ -69,11 +69,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LDLIBS += -lgpm endif - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif diff --git a/harbour/config/linux/sunpro.mk b/harbour/config/linux/sunpro.mk index 5ca50b9380..199ecba330 100644 --- a/harbour/config/linux/sunpro.mk +++ b/harbour/config/linux/sunpro.mk @@ -86,11 +86,11 @@ ifneq ($(findstring hbrtl, $(LIBS)),) LDLIBS += -lgpm endif - ifneq ($(findstring -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_PCRE_REGEX, $(HB_USER_CFLAGS)),) LDLIBS += -lpcre endif - ifneq ($(findstring -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) + ifneq ($(filter -DHB_EXT_ZLIB, $(HB_USER_CFLAGS)),) LDLIBS += -lz endif diff --git a/harbour/config/os2/gcc.mk b/harbour/config/os2/gcc.mk index f9699b704c..a1a0df2397 100644 --- a/harbour/config/os2/gcc.mk +++ b/harbour/config/os2/gcc.mk @@ -48,7 +48,7 @@ LDLIBS := $(foreach lib,$(LIBS),-l$(lib)) # Add the specified GT driver library ifneq ($(findstring hbrtl, $(LIBS)),) ifeq ($(C_MAIN),) - ifeq ($(findstring os2pm,$(HB_GT_LIB)),os2pm) + ifeq ($(filter os2pm,$(HB_GT_LIB)),os2pm) # Special handling for PM mode LDLIBS += -l$(HB_GT_LIB) LDLIBS += -lgtos2 diff --git a/harbour/config/rules.mk b/harbour/config/rules.mk index f81104e519..293b3d8aed 100644 --- a/harbour/config/rules.mk +++ b/harbour/config/rules.mk @@ -33,7 +33,7 @@ ifeq ($(CC_RULE),) ifneq ($(HB_BUILD_DLL),no) ifneq ($(HB_DYN_COPT),) ifneq ($(LIBNAME),) - ifneq ($(findstring $(LIBNAME),$(HB_DYN_LIBS)),) + ifneq ($(filter $(LIBNAME),$(HB_DYN_LIBS)),) define cc_comp_all $(CC) $(HB_INC_DEPEND) $(CPPFLAGS) $(CFLAGS) $(HB_CFLAGS) $(HB_USER_CFLAGS) $(CC_OUT)$(