3 ifneq ($(CROSS_COMPILE),)
5 # Build using the cross-tools
6 override_cross_compile ?= 0
7 ifeq ($(override_cross_compile),0)
8 CC = ${CROSS_COMPILE}clang${CROSS_COMPILE_SUFFIX}
9 CXX = ${CROSS_COMPILE}clang++${CROSS_COMPILE_SUFFIX}
10 AR = ${CROSS_COMPILE}ar${CROSS_COMPILE_SUFFIX}
12 # Cross-linker requires this for linked in shared libs that depend
13 # themselves on other shared libs (not directly linked in)
14 LDFLAGS += -Wl,-rpath-link,$(ACE_ROOT)/lib
16 TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/ace_gperf
17 TAO_IDL = $(HOST_ROOT)/bin/tao_idl
18 TAO_IDL_DEP = $(TAO_IDL)
19 # make sure to use the host compiler, not the cross-compiler
20 # as preprocessor for the cross-compiled idl tools
21 TAO_IDL_PREPROCESSOR = clang
26 # insure does not pass through the -dumpversion option.
27 CXX_FOR_VERSION_TEST ?= g++
29 CXX_FOR_VERSION_TEST ?= $(CXX)
32 CXX_VERSION := $(shell $(CXX_FOR_VERSION_TEST) -dumpversion)
34 CXX_FULL_VERSION := $(shell $(CXX_FOR_VERSION_TEST) --version)
36 # Only modify LDFLAGS if DLD has been set.
38 ifeq ($(DLD),$(CXX_FOR_VERSION_TEST)) # only try this is we are using ld through gcc
39 LD_FOR_VERSION_TEST = $(subst \,/,$(shell $(CXX_FOR_VERSION_TEST) -print-prog-name=ld))
41 LD_FOR_VERSION_TEST = $(DLD)
42 endif # DLD = CXX_FOR_VERSION_TEST
43 # The -E option is GNU ld specific
44 GNU_LD := $(if $(findstring GNU ld,$(shell $(LD_FOR_VERSION_TEST) -v 2>&1)), 1, 0)
48 STATIC_LINK_FLAG ?= -static
51 ifeq ($(no_strict_aliasing), 1)
52 CCFLAGS += -fno-strict-aliasing
55 # Things Clang has in common with GCC
56 include $(ACE_ROOT)/include/makeinclude/platform_gcc_clang_common.GNU