From 84bce194674cc57e556ec52826a6014518eb4dd1 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 12 May 2016 21:55:06 +0200 Subject: add support to play with LLVM/clang --- toolchain/llvm/Makefile | 50 +++++++++++++++++++++++++++++++++++++++++++++ toolchain/llvm/Makefile.inc | 10 +++++++++ 2 files changed, 60 insertions(+) create mode 100644 toolchain/llvm/Makefile create mode 100644 toolchain/llvm/Makefile.inc (limited to 'toolchain/llvm') diff --git a/toolchain/llvm/Makefile b/toolchain/llvm/Makefile new file mode 100644 index 000000000..52228f221 --- /dev/null +++ b/toolchain/llvm/Makefile @@ -0,0 +1,50 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk +include ../rules.mk +include Makefile.inc + +include ${ADK_TOPDIR}/mk/buildhlp.mk + +BUILD_DIR_INITIAL:= $(WRKBUILD)-initial +BUILD_DIR_FINAL:= $(WRKBUILD)-final + +LLVM_TARGETS:=ARM + +$(BUILD_DIR_INITIAL)/.configured: + (cd $(DL_DIR) && wget http://llvm.org/releases/3.8.0/cfe-3.8.0.src.tar.xz) + (cd $(DL_DIR) && wget http://llvm.org/releases/3.8.0/compiler-rt-3.8.0.src.tar.xz) + (cd $(WRKBUILD)/tools && tar xvf $(DL_DIR)/cfe-3.8.0.src.tar.xz && mv cfe-3.8.0.src clang) + (cd $(WRKBUILD)/projects && tar xvf $(DL_DIR)/compiler-rt-3.8.0.src.tar.xz && mv compiler-rt-3.8.0.src compiler-rt) + mkdir -p $(BUILD_DIR_INITIAL) + cd $(BUILD_DIR_INITIAL); \ + PATH='$(HOST_PATH)' \ + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$(TOOLCHAIN_DIR)/usr \ + -DLLVM_DEFAULT_TARGET_TRIPLE="arm-none-eabi" \ + -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DLLVM_TARGETS_TO_BUILD=$(LLVM_TARGETS) \ + $(WRKBUILD) + touch $@ + +$(BUILD_DIR_INITIAL)/.compiled: $(BUILD_DIR_INITIAL)/.configured + PATH='$(TARGET_PATH)' \ + $(MAKE) -C $(BUILD_DIR_INITIAL) all + touch $@ + +$(WRKBUILD)/.configured: $(BUILD_DIR_INITIAL)/.compiled + PATH='$(TARGET_PATH)' \ + $(MAKE) -C $(BUILD_DIR_INITIAL) install + touch $@ + +$(WRKBUILD)/.compiled: + touch $@ + +$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled + touch $@ + +$(WRKBUILD)/.final: + touch $@ + +include ${ADK_TOPDIR}/mk/toolchain.mk diff --git a/toolchain/llvm/Makefile.inc b/toolchain/llvm/Makefile.inc new file mode 100644 index 000000000..1c66bedc5 --- /dev/null +++ b/toolchain/llvm/Makefile.inc @@ -0,0 +1,10 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +PKG_NAME:= llvm +PKG_VERSION:= 3.8.0 +PKG_HASH:= 555b028e9ee0f6445ff8f949ea10e9cd8be0d084840e21fbbe1d31d51fc06e46 +PKG_SITES:= http://llvm.org/releases/3.8.0/ +PKG_RELEASE:= 1 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.src.tar.xz +WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}.src -- cgit v1.2.3