summaryrefslogtreecommitdiff
path: root/toolchain/llvm/llvm
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-15 16:47:19 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-03-15 16:47:19 +0100
commit7090a2418c31fda63541796a71a0634e0f8788aa (patch)
treeaef8d2f98490c3dac68b1fe39dc47f7f6fa84344 /toolchain/llvm/llvm
parent1ce20d9cb6d21dc150c5621cb9abc223e693cf5f (diff)
downloadembtoolkit-7090a2418c31fda63541796a71a0634e0f8788aa.tar.gz
embtoolkit-7090a2418c31fda63541796a71a0634e0f8788aa.tar.bz2
embtoolkit-7090a2418c31fda63541796a71a0634e0f8788aa.tar.xz
Toolchain: llvm/libcxxrt: move under toolchain/
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'toolchain/llvm/llvm')
-rw-r--r--toolchain/llvm/llvm/llvm.kconfig79
-rw-r--r--toolchain/llvm/llvm/llvm.mk88
2 files changed, 167 insertions, 0 deletions
diff --git a/toolchain/llvm/llvm/llvm.kconfig b/toolchain/llvm/llvm/llvm.kconfig
new file mode 100644
index 0000000..b443a32
--- /dev/null
+++ b/toolchain/llvm/llvm/llvm.kconfig
@@ -0,0 +1,79 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2012-2013 Abdoulaye Walsimou GAYE <awg@embtoolkit.org>.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file llvm.kconfig
+# \brief llvm.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2012
+################################################################################
+
+config EMBTK_HAVE_LLVM
+ bool
+ default y
+
+#
+# llvm version
+#
+config EMBTK_LLVM_VERSION_3_3
+ bool
+ select EMBTK_LLVM_NEED_PATCH
+config EMBTK_LLVM_VERSION_3_2
+ bool
+ select EMBTK_LLVM_NEED_PATCH
+
+config EMBTK_LLVM_VERSION_GIT
+ bool
+ help
+ Answer Y here if you want to build your toolchain based on
+ llvm sources from its GIT repository.
+
+#
+# GIT repository options
+#
+config EMBTK_LLVM_GIT_BRANCH
+ string "llvm branch to use"
+ default "master"
+ depends on EMBTK_LLVM_VERSION_GIT
+ help
+ The branch of the git repository to use, the default is master.
+
+config EMBTK_LLVM_GIT_REVISION
+ string "llvm specific revision to use instead of the latest"
+ depends on EMBTK_LLVM_VERSION_GIT
+ help
+ Chechout a specific revision instead of the latest.
+
+config EMBTK_LLVM_REFSPEC
+ string
+ default "toolchain"
+
+#
+# Versions strings for tarball packages.
+#
+config EMBTK_LLVM_VERSION_STRING
+ string
+ default "3.3" if EMBTK_LLVM_VERSION_3_3
+ default "3.2" if EMBTK_LLVM_VERSION_3_2
+ default "git" if EMBTK_LLVM_VERSION_GIT
+
+
+config EMBTK_LLVM_NEED_PATCH
+ bool
+config EMBTK_LLVM_NEED_AUTORECONF
+ bool
diff --git a/toolchain/llvm/llvm/llvm.mk b/toolchain/llvm/llvm/llvm.mk
new file mode 100644
index 0000000..12f0fbc
--- /dev/null
+++ b/toolchain/llvm/llvm/llvm.mk
@@ -0,0 +1,88 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2012 Abdoulaye Walsimou GAYE <awg@embtoolkit.org>.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file llvm.mk
+# \brief llvm.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2012
+################################################################################
+
+LLVM_NAME := llvm
+LLVM_VERSION := $(call embtk_get_pkgversion,llvm)
+LLVM_SITE := http://llvm.org/releases/$(LLVM_VERSION)
+#LLVM_GIT_SITE := http://llvm.org/git/llvm.git
+LLVM_GIT_SITE := git://www.embtoolkit.org/llvm.git
+LLVM_PACKAGE := llvm-$(LLVM_VERSION).src.tar.gz
+LLVM_SRC_DIR := $(embtk_toolsb)/llvm-$(LLVM_VERSION).src
+LLVM_BUILD_DIR := $(embtk_toolsb)/llvm-build
+
+LLVM_DEPS := binutils_install clang_install
+
+LLVM_WITH_HASHSTYLE := $(if $(CONFIG_EMBTK_CLIB_UCLIBC),--with-default-hash-style=sysv)
+
+__embtk_binutils_inc := $(call __embtk_pkg_srcdir,binutils)/include
+
+LLVM_CONFIGURE_OPTS := --target=$(STRICT_GNU_TARGET)
+LLVM_CONFIGURE_OPTS += --enable-targets=$(LINUX_ARCH),x86
+LLVM_CONFIGURE_OPTS += $(LLVM_WITH_CPU) $(LLVM_WITH_ABI)
+LLVM_CONFIGURE_OPTS += $(LLVM_WITH_FLOAT) $(LLVM_WITH_FPU)
+LLVM_CONFIGURE_OPTS += $(LLVM_WITH_HASHSTYLE)
+LLVM_CONFIGURE_OPTS += --with-default-sysroot=$(embtk_sysroot)
+LLVM_CONFIGURE_OPTS += --enable-optimized --disable-jit --disable-zlib
+LLVM_CONFIGURE_OPTS += --with-bug-report-url=$(EMBTK_BUGURL)
+LLVM_CONFIGURE_OPTS += --with-binutils-include=$(__embtk_binutils_inc)
+
+LLVM_MAKE_OPTS := NO_UNITTESTS=1
+LLVM_MAKE_OPTS += CLANG_VENDOR="EmbToolkit(v$(EMBTK_VERSION))"
+
+LLVM_PREFIX := $(embtk_tools)
+
+__embtk_clang_arch := $(firstword $(subst -, ,$(STRICT_GNU_TARGET)))
+__embtk_clang_rversion = `ls $(embtk_tools)/lib/clang/`
+__embtk_clang_libdir = $(embtk_tools)/lib/clang/$(__embtk_clang_rversion)/lib/linux
+__embtk_clang_incdir = $(embtk_tools)/lib/clang/$(__embtk_clang_rversion)/include
+
+define embtk_install_llvm
+ $(call __embtk_install_hostpkg,llvm)
+endef
+
+define embtk_beforeinstall_llvm
+ [ -e $(call __embtk_pkg_srcdir,llvm)/tools/clang ] || \
+ ln -sf $(call __embtk_pkg_srcdir,clang) \
+ $(call __embtk_pkg_srcdir,llvm)/tools/clang
+ mkdir -p $(embtk_tools)/bin/clang-scan-build
+ cp -R $(call __embtk_pkg_srcdir,llvm)/tools/clang/tools/scan-build/* \
+ $(embtk_tools)/bin/clang-scan-build
+ mkdir -p $(embtk_tools)/bin/clang-scan-view
+ cp -R $(call __embtk_pkg_srcdir,llvm)/tools/clang/tools/scan-view/* \
+ $(embtk_tools)/bin/clang-scan-view
+endef
+
+define embtk_postinstallonce_llvm
+ mkdir -p $(embtk_tools)/lib/bfd-plugins
+ cd $(embtk_tools)/lib/bfd-plugins; \
+ ln -sf ../libLTO.so libLTO.so; \
+ ln -sf ../LLVMgold.so LLVMgold.so
+ mkdir -p $(embtk_tools)/lib/clang/$(__embtk_clang_rversion)/lib
+ mkdir -p $(embtk_tools)/lib/clang/$(__embtk_clang_rversion)/lib/linux
+endef
+
+define embtk_cleanup_llvm
+ $(Q)rm -rf $(LLVM_BUILD_DIR)
+endef