PREFIX ?= $(HOME)/opt/hercules-compiler
TMP_DESTDIR = $(CURDIR)/install
+# With gcc > 5, we get strange CUDA-related errors in clang.
+export CC = gcc-5
+export CXX = g++-5
+
all: libpremnotify-cpu
all: passes
LLVM_TBLGEN=$(CURDIR)/build_native/bin/llvm-tblgen
CLANG_TBLGEN=$(CURDIR)/build_native/bin/clang-tblgen
-LLVM_CROSS_FLAGS += -DCMAKE_C_COMPILER=$(DEB_HOST_GNU_TYPE)-gcc
-LLVM_CROSS_FLAGS += -DCMAKE_CXX_COMPILER=$(DEB_HOST_GNU_TYPE)-g++
+LLVM_CROSS_FLAGS += -DCMAKE_C_COMPILER=$(DEB_HOST_GNU_TYPE)-gcc-5
+LLVM_CROSS_FLAGS += -DCMAKE_CXX_COMPILER=$(DEB_HOST_GNU_TYPE)-g++-5
LLVM_CROSS_FLAGS += -DCMAKE_SYSTEM_PROCESSOR=$(DEB_HOST_GNU_CPU)
LLVM_CROSS_FLAGS += -DCMAKE_CROSSCOMPILING=True
A simple method to create a native Debian package is the following:
- apt install build-essential cmake ninja-build python3
+ apt install build-essential cmake ninja-build python3 gcc-5 g++-5
make create-orig-tgz
dpkg-buildpackage -uc -us
+Note that gcc-5 may not be available in newer distributions such as
+Debian Stretch. It is possible to compile it from source. For example
+download its
+[Debian source package](http://ftp.debian.org/debian/pool/main/g/gcc-5/)
+and build it with `DEB_BUILD_OPTIONS="nolang=ada,fortran,java,objc"
+dpkg-buildpackage -b -uc -us`.
+
Sbuild method - native
----------------------
Section: devel
Priority: optional
Maintainer: Michal Sojka <michal.sojka@cvut.cz>
-Build-Depends: debhelper (>= 9), cmake (>= 3.7.2), ninja-build, python3:any, libffi-dev, libelf-dev
+Build-Depends: debhelper (>= 9), cmake (>= 3.7.2), ninja-build, python3:any, libffi-dev, libelf-dev, gcc-5:native, g++-5:native
Standards-Version: 3.9.8
Homepage: https://iis-git.ee.ethz.ch/H2020-Compiler/HerculesCompiler
#Vcs-Git: https://anonscm.debian.org/collab-maint/hercules-compiler.git