2009-09-08 13:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

+ config/darwin/clang.mk
    + Added experimental support for clang compiler frontend on
      Snow Leopard + new XCode systems. (it's unclear which of them
      exactly is required for this feature)
    ; TOFIX: '__attribute (( flatten ))' is complained about by clang.
This commit is contained in:
Viktor Szakats
2009-09-08 11:26:25 +00:00
parent eae13528cb
commit d34f2373be
2 changed files with 69 additions and 0 deletions

View File

@@ -17,6 +17,13 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-09-08 13:25 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ config/darwin/clang.mk
+ Added experimental support for clang compiler frontend on
Snow Leopard + new XCode systems. (it's unclear which of them
exactly is required for this feature)
; TOFIX: '__attribute (( flatten ))' is complained about by clang.
2009-09-08 12:09 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/thread.c
* removed HB_MT() function body

View File

@@ -0,0 +1,62 @@
#
# $Id$
#
ifeq ($(HB_BUILD_MODE),cpp)
HB_CMP := clang
else
HB_CMP := clang
endif
OBJ_EXT := .o
LIB_PREF := lib
LIB_EXT := .a
CC := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
CC_IN := -c
# NOTE: The ending space after -o is important, please preserve it.
# Now solved with '$(subst x,x, )' expression.
CC_OUT := -o$(subst x,x, )
CPPFLAGS := -I. -I$(HB_INC_COMPILE)
# -fno-common enables building .dylib files
CFLAGS := -fno-common
LDFLAGS :=
ifneq ($(HB_BUILD_WARN),no)
CFLAGS += -Wall -W
endif
ifneq ($(HB_BUILD_OPTIM),no)
CFLAGS += -O3
endif
ifeq ($(HB_BUILD_DEBUG),yes)
CFLAGS += -g
endif
# It's to avoid warning message generated when 'long double' is used
# remove it if you have newer compiler version
#CFLAGS += -Wno-long-double
LD := $(HB_CCACHE) $(HB_CCPREFIX)$(HB_CMP)$(HB_CCPOSTFIX)
LD_OUT := -o$(subst x,x, )
LIBPATHS := $(LIB_DIR)
LDLIBS := $(foreach lib,$(LIBS) $(SYSLIBS),-l$(lib))
LDFLAGS += $(foreach dir,$(LIBPATHS) $(SYSLIBPATHS),-L$(dir))
AR := libtool
ARFLAGS :=
AR_RULE = $(AR) -static $(ARFLAGS) $(HB_USER_AFLAGS) -o $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
DY := $(AR)
DFLAGS := -dynamic -flat_namespace -undefined warning -multiply_defined suppress -single_module $(foreach dir,$(SYSLIBPATHS),-L$(dir))
DY_OUT := -o$(subst x,x, )
DLIBS := $(foreach lib,$(SYSLIBS),-l$(lib))
DY_RULE = $(DY) $(DFLAGS) -install_name "harbour$(DYN_EXT)" -compatibility_version $(HB_VER_MAJOR).$(HB_VER_MINOR) -current_version $(HB_VER_MAJOR).$(HB_VER_MINOR).$(HB_VER_RELEASE) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ $^ $(DLIBS)
include $(TOP)$(ROOT)config/rules.mk