summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--makefiles/Makefile.clang32
-rw-r--r--makefiles/Makefile.tools4
2 files changed, 36 insertions, 0 deletions
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),)