[Mesa-dev] [PATCH 21/21] clover: Force gcc and g++ to fix clang builds.

Johannes Obermayr johannesobermayr at gmx.de
Wed Sep 11 15:32:59 PDT 2013


---
 configure.ac                                  | 6 ++++++
 src/gallium/state_trackers/clover/Makefile.am | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index 2381cf0..491b8c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1989,6 +1989,12 @@ cxxflags="$CXXFLAGS"
 CFLAGS="$CFLAGS $USER_CFLAGS"
 CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS"
 
+dnl Filter-out clang specific switches for clover
+CLOVER_CFLAGS=$(echo $CFLAGS | sed -e "s:-mllvm -\w*\>::g" -e "s:-Qunused-arguments\>::g")
+CLOVER_CXXFLAGS=$(echo $CXXFLAGS | sed -e "s:-mllvm -\w*\>::g" -e "s:-Qunused-arguments\>::g")
+AC_SUBST([CLOVER_CFLAGS])
+AC_SUBST([CLOVER_CXXFLAGS])
+
 dnl Substitute the config
 AC_CONFIG_FILES([Makefile
 		src/Makefile
diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
index fd38766..7d4de00 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -1,5 +1,13 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXCPP = g++ -E
+
+CFLAGS = $(CLOVER_CFLAGS)
+CXXFLAGS = $(CLOVER_CXXFLAGS)
+
 AM_CPPFLAGS = \
 	$(GALLIUM_PIPE_LOADER_DEFINES) \
 	-DPIPE_SEARCH_DIR=\"$(mesalibdir)\" \
-- 
1.8.1.4



More information about the mesa-dev mailing list