diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-11-17 22:21:55 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-11-17 22:21:55 +0100 |
commit | bcd99d9443ce8b3159909ebb8420ec21384dab12 (patch) | |
tree | d056145c7c37eb14d16f64c3a0e91cfe8df67528 /mk/llvm | |
parent | 7d5b042d422aede92c827eed4b2486deb88a6406 (diff) | |
download | embtoolkit-bcd99d9443ce8b3159909ebb8420ec21384dab12.tar.gz embtoolkit-bcd99d9443ce8b3159909ebb8420ec21384dab12.tar.bz2 embtoolkit-bcd99d9443ce8b3159909ebb8420ec21384dab12.tar.xz |
Toolchain: add initial infrastructure to support llvm/clang
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk/llvm')
-rw-r--r-- | mk/llvm/clang.mk | 39 | ||||
-rw-r--r-- | mk/llvm/compiler-rt.mk | 39 | ||||
-rw-r--r-- | mk/llvm/llvm.mk | 56 |
3 files changed, 134 insertions, 0 deletions
diff --git a/mk/llvm/clang.mk b/mk/llvm/clang.mk new file mode 100644 index 0000000..0a5484b --- /dev/null +++ b/mk/llvm/clang.mk @@ -0,0 +1,39 @@ +################################################################################ +# 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 clang.mk +# \brief clang.mk of Embtoolkit +# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org> +# \date October 2012 +################################################################################ + +CLANG_NAME := clang +CLANG_VERSION := $(call embtk_get_pkgversion,clang) +CLANG_SITE := http://llvm.org/releases/$(CLANG_VERSION) +#CLANG_GIT_SITE := http://llvm.org/git/clang.git +CLANG_GIT_SITE := git://www.embtoolkit.org/clang.git +CLANG_PACKAGE := clang-$(CLANG_VERSION).src.tar.gz +CLANG_SRC_DIR := $(embtk_toolsb)/clang-$(CLANG_VERSION).src +CLANG_BUILD_DIR := $(embtk_toolsb)/clang-build + +define embtk_install_clang + $(call embtk_pinfo,"Compile/Install of clang will be done within llvm...") + $(call embtk_download_pkg,clang) + $(call embtk_decompress_pkg,clang) +endef diff --git a/mk/llvm/compiler-rt.mk b/mk/llvm/compiler-rt.mk new file mode 100644 index 0000000..878965f --- /dev/null +++ b/mk/llvm/compiler-rt.mk @@ -0,0 +1,39 @@ +################################################################################ +# 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 compiler-rt.mk +# \brief compiler-rt.mk of Embtoolkit +# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org> +# \date October 2012 +################################################################################ + +COMPILER-RT_NAME := compiler-rt +COMPILER-RT_VERSION := $(call embtk_get_pkgversion,compiler-rt) +COMPILER-RT_SITE := http://llvm.org/releases/$(COMPILER-RT_VERSION) +COMPILER-RT_GIT_SITE := http://llvm.org/git/compiler-rt.git +COMPILER-RT_PACKAGE := compiler-rt-$(COMPILER-RT_VERSION).src.tar.gz +COMPILER-RT_SRC_DIR := $(embtk_toolsb)/compiler-rt-$(COMPILER-RT_VERSION).src +COMPILER-RT_BUILD_DIR := $(embtk_toolsb)/compiler-rt-build + +COMPILER-RT_CONFIGURE_OPTS := +COMPILER-RT_PREFIX := $(embtk_tools) + +define embtk_install_compiler-rt + $(call __embtk_install_pkg,compiler-rt) +endef diff --git a/mk/llvm/llvm.mk b/mk/llvm/llvm.mk new file mode 100644 index 0000000..4926115 --- /dev/null +++ b/mk/llvm/llvm.mk @@ -0,0 +1,56 @@ +################################################################################ +# 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 := clang_install + +__embtk_binutils_inc := $(call __embtk_pkg_srcdir,binutils)/include +LLVM_CONFIGURE_OPTS := --target=$(STRICT_GNU_TARGET) +LLVM_CONFIGURE_OPTS += --enable-targets=$(LINUX_ARCH) +LLVM_CONFIGURE_OPTS += --with-default-sysroot=$(embtk_sysroot) +LLVM_CONFIGURE_OPTS += --enable-optimized +LLVM_CONFIGURE_OPTS += --with-bug-report-url=$(EMBTK_BUGURL) +LLVM_CONFIGURE_OPTS += --with-binutils-include=$(__embtk_binutils_inc) + +LLVM_PREFIX := $(embtk_tools) + +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 +endef + |