[Mesa-dev] [PATCH 1/2] clover: make llvm >= 3.5.0 and c++11 mandatory
EdB
edb+mesa at sigluy.net
Sun Apr 19 01:50:18 PDT 2015
Clover not longer compile with llvm <= 3.5.0 since e1d363b3
e1d363b3 implies c++11 and llvm 3.5.0 CXXFLAGS provided it
No one seems to have noticed it. It's now official.
---
configure.ac | 32 ++++++++++++---------------
src/gallium/state_trackers/clover/Makefile.am | 6 ++---
2 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/configure.ac b/configure.ac
index 325b936..ff4eef3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1865,6 +1865,13 @@ strip_unwanted_llvm_flags() {
-e 's/-fstack-protector-strong\>//g'
}
+llvm_check_for() {
+ if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}${LLVM_REQUIRED_VERSION_PATCH}"; then
+ AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR.$LLVM_REQUIRED_VERSION_PATCH or newer is required for $1])
+ fi
+}
+
+
if test -z "$with_gallium_drivers"; then
enable_gallium_llvm=no
@@ -1919,22 +1926,13 @@ if test "x$enable_gallium_llvm" = xyes; then
fi
if test "x$enable_opencl" = xyes; then
+ LLVM_REQUIRED_VERSION_MAJOR="3"
+ LLVM_REQUIRED_VERSION_MINOR="5"
+ LLVM_REQUIRED_VERSION_PATCH="0"
+ llvm_check_for "opencl"
+
LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
- # LLVM 3.3 >= 177971 requires IRReader
- if $LLVM_CONFIG --components | grep -qw 'irreader'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader"
- fi
- # LLVM 3.4 requires Option
- if $LLVM_CONFIG --components | grep -qw 'option'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
- fi
- # Current OpenCL/Clover and LLVM 3.5 require ObjCARCOpts and ProfileData
- if $LLVM_CONFIG --components | grep -qw 'objcarcopts'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} objcarcopts"
- fi
- if $LLVM_CONFIG --components | grep -qw 'profiledata'; then
- LLVM_COMPONENTS="${LLVM_COMPONENTS} profiledata"
- fi
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
fi
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
MESA_LLVM=1
@@ -2061,9 +2059,7 @@ radeon_llvm_check() {
LLVM_REQUIRED_VERSION_MAJOR="3"
LLVM_REQUIRED_VERSION_MINOR="4"
LLVM_REQUIRED_VERSION_PATCH="2"
- if test "${LLVM_VERSION_INT}${LLVM_VERSION_PATCH}" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}${LLVM_REQUIRED_VERSION_PATCH}"; then
- AC_MSG_ERROR([LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR.$LLVM_REQUIRED_VERSION_PATCH or newer is required for $1])
- fi
+ llvm_check_for $1
if test true && $LLVM_CONFIG --targets-built | grep -qvw 'R600' ; then
AC_MSG_ERROR([LLVM R600 Target not enabled. You can enable it when building the LLVM
sources with the --enable-experimental-targets=R600
diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
index 62c13fa..3a45b9c 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -3,6 +3,7 @@ AUTOMAKE_OPTIONS = subdir-objects
include Makefile.sources
AM_CPPFLAGS = \
+ -std=c++11 \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-DPIPE_SEARCH_DIR=\"$(libdir)/gallium-pipe\" \
-I$(top_srcdir)/include \
@@ -35,7 +36,6 @@ endif
noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
libcltgsi_la_CXXFLAGS = \
- -std=c++0x \
$(VISIBILITY_CXXFLAGS)
libcltgsi_la_SOURCES = $(TGSI_SOURCES)
@@ -48,10 +48,10 @@ libclllvm_la_CXXFLAGS = \
-DLIBCLC_LIBEXECDIR=\"$(LIBCLC_LIBEXECDIR)/\" \
-DCLANG_RESOURCE_DIR=\"$(CLANG_RESOURCE_DIR)\"
-libclllvm_la_SOURCES = $(LLVM_SOURCES)
+libclllvm_la_SOURCES = \
+ $(LLVM_SOURCES)
libclover_la_CXXFLAGS = \
- -std=c++11 \
$(VISIBILITY_CXXFLAGS)
libclover_la_LIBADD = \
--
2.3.5
More information about the mesa-dev
mailing list