From 74f566afae6d7c5b780ac56a3fe2b69992307cd4 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Mon, 20 Dec 2010 11:26:07 +0000 Subject: Simplistic clang support, based on Makefile.gcc. Bare minimum of changes. svn path=/trunk/tools/buildsystem/; revision=11110 --- makefiles/Makefile.clang | 32 ++++++++++++++++++++++++++++++++ makefiles/Makefile.tools | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 makefiles/Makefile.clang (limited to 'makefiles') diff --git a/makefiles/Makefile.clang b/makefiles/Makefile.clang new file mode 100644 index 0000000..1105043 --- /dev/null +++ b/makefiles/Makefile.clang @@ -0,0 +1,32 @@ +# Clang-specific toolchain setup +# We assume that we're using a standard GCC/binutils environment, as well +# as clang being mostly GCC-compatible on the command line + +CCDEF := -D +CCOPT := -O2 +CCNOOPT := -O0 +CCDBG := -g +CCINC := -I +CCLIB := -L +CCAS := -xassembler-with-cpp +CCSHR := -fPIC + +CXXDEF := -D +CXXOPT := -O2 +CXXNOOPT := -O0 +CXXDBG := -g +CXXINC := -I +CXXLIB := -L +CXXSHR := -fPIC + +LDDBG := -g +# Reevaluation is required here +LDSHR = -shared -Wl,-soname,$(SONAME) + +ARFLG := cru + +############################################################################### +# Other settings +############################################################################### + +CC_CAN_BUILD_AND_DEP ?= yes \ No newline at end of file diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools index 3a8cd47..655d254 100644 --- a/makefiles/Makefile.tools +++ b/makefiles/Makefile.tools @@ -316,6 +316,10 @@ else ifeq ($(word 1,$(ccvsn)),GCC) toolchain := gcc endif + # "clang ..." + ifeq ($(word 1,$(ccvsn)),clang) + toolchain := clang + endif endif ifeq ($(toolchain),) -- cgit v1.2.3