From 2053cdaf47dbc8f6c41694f020f2ec666b8d32d5 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 23 Nov 2009 21:50:47 +0000 Subject: [PATCH] 2009-11-23 22:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg ! Fixed to use '-ofilename' to spec C compiler object output, instead '-o filename'. Following linux/clang.mk. (There is utter chaos with this -o option) * config/darwin/clang.mk + Documented fact that '-ofilename' also works (just like in linux/clang). * config/linux/gcc.mk * config/linux/icc.mk * config/linux/clang.mk * config/linux/sunpro.mk * config/linux/global.mk % Moved strip configuration to global.mk. --- harbour/ChangeLog | 17 +++++++++++++++++ harbour/config/darwin/clang.mk | 3 +-- harbour/config/linux/clang.mk | 8 -------- harbour/config/linux/gcc.mk | 8 -------- harbour/config/linux/global.mk | 8 ++++++++ harbour/config/linux/icc.mk | 8 -------- harbour/config/linux/sunpro.mk | 8 -------- harbour/utils/hbmk2/hbmk2.prg | 7 ++++++- 8 files changed, 32 insertions(+), 35 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a5eb6c047f..9dc4718045 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,23 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-23 22:49 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + ! Fixed to use '-ofilename' to spec C compiler object + output, instead '-o filename'. Following linux/clang.mk. + (There is utter chaos with this -o option) + + * config/darwin/clang.mk + + Documented fact that '-ofilename' also works (just + like in linux/clang). + + * config/linux/gcc.mk + * config/linux/icc.mk + * config/linux/clang.mk + * config/linux/sunpro.mk + * config/linux/global.mk + % Moved strip configuration to global.mk. + 2009-11-23 22:02 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Turn on detailed maps for bcc targets when -map option is used. diff --git a/harbour/config/darwin/clang.mk b/harbour/config/darwin/clang.mk index 24250fad58..9a9d3481a4 100644 --- a/harbour/config/darwin/clang.mk +++ b/harbour/config/darwin/clang.mk @@ -19,8 +19,7 @@ ifneq ($(filter --analyze, $(HB_USER_CFLAGS)),) else CC_IN := -c endif -# NOTE: The ending space after -o is important, please preserve it. -# Now solved with '$(subst x,x, )' expression. +# NOTE: Works also without the ending space after -o. CC_OUT := -o$(subst x,x, ) CFLAGS := -I. -I$(HB_INC_COMPILE) diff --git a/harbour/config/linux/clang.mk b/harbour/config/linux/clang.mk index 4f1e9599af..11a3a727ca 100644 --- a/harbour/config/linux/clang.mk +++ b/harbour/config/linux/clang.mk @@ -38,14 +38,6 @@ 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 diff --git a/harbour/config/linux/gcc.mk b/harbour/config/linux/gcc.mk index b9a0aa0c30..c8735c21d5 100644 --- a/harbour/config/linux/gcc.mk +++ b/harbour/config/linux/gcc.mk @@ -33,14 +33,6 @@ 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 diff --git a/harbour/config/linux/global.mk b/harbour/config/linux/global.mk index 7ddbb3215e..87c4385d34 100644 --- a/harbour/config/linux/global.mk +++ b/harbour/config/linux/global.mk @@ -9,3 +9,11 @@ DYN_EXT := .so DYN_PREF := lib HB_GT_LIBS += gttrm + +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 diff --git a/harbour/config/linux/icc.mk b/harbour/config/linux/icc.mk index 359001d9ac..2f8025d5cc 100644 --- a/harbour/config/linux/icc.mk +++ b/harbour/config/linux/icc.mk @@ -38,14 +38,6 @@ 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_CMP) LD_OUT := -o diff --git a/harbour/config/linux/sunpro.mk b/harbour/config/linux/sunpro.mk index 4891bfbf0f..e083392cd8 100644 --- a/harbour/config/linux/sunpro.mk +++ b/harbour/config/linux/sunpro.mk @@ -53,14 +53,6 @@ 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_CCPATH)$(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX) LD_OUT := -o$(subst x,x, ) diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index d45079a983..8829fe8868 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -2226,7 +2226,12 @@ FUNCTION hbmk( aArgs, /* @ */ lPause ) ENDIF cOpt_CompC += " {FC}" IF hbmk[ _HBMK_lINC ] .AND. ! Empty( cWorkDir ) - cOpt_CompC += " {IC} -o {OO}" + IF hbmk[ _HBMK_cPLAT ] == "linux" .AND. hbmk[ _HBMK_cCOMP ] == "clang" + /* NOTE: It's also accepted by darwin/clang */ + cOpt_CompC += " {IC} -o{OO}" + ELSE + cOpt_CompC += " {IC} -o {OO}" + ENDIF ELSE cOpt_CompC += " {LC}" ENDIF