Quoting Freenode #libreoffice-dev:
Feb 24 09:37:55 <sberg> tml_, you're using our Clang plugins against some
distro-provided Clang, right? do you need to specify different values for CLANGBUILD
and CLANGDIR? (because with my self-built Clang I always need to specify the same
value for both anyway, so I wonder we can get rid of one of them)
Feb 24 09:38:44 <tml_> sberg: yep, against the openSUSE 12.3 -provided clang.
no, I don't set any such env vars
Feb 24 09:39:32 <ahunt> sberg: On Suse I've never had to specify anything
except CC and CXX, on debian I had to set CLANGBUIL and CLANGDIR (but they were the
same), and also had to add a symlink so that the clang binary itself was also within
the CLANGBUILD/CLANGDIR specified directory.
Feb 24 09:39:48 <sberg> tml_, i.e., both are set to the /usr default in
config_host.mk for you?
Feb 24 09:40:01 <tml_> yep
Feb 24 09:41:05 <sberg> ahunt, tml_, ok, so looks like we can live with just
one var; I'll put it up on the ML and if nobody objects will remove one of the two
That is, anybody any objections against committing the below patch to
master?
Stephan
diff --git a/compilerplugins/Makefile-clang.mk
b/compilerplugins/Makefile-clang.mk
index 5d09346..2c57f40 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -21,7 +21,7 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -g
# Clang headers require these.
CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS -fno-rtti
# All include locations needed.
-CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem
$(CLANGDIR)/tools/clang/include -isystem $(CLANGBUILD)/include -isystem
$(CLANGBUILD)/tools/clang/include
+CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem
$(CLANGDIR)/tools/clang/include
# Clang/LLVM libraries are intentionally not linked in, they are usually built
as static libraries, which means the resulting
# plugin would be big (even though the clang binary already includes it all)
and it'd be necessary to explicitly specify
@@ -93,7 +93,7 @@ $(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
-Wl$(CLANG_COMMA)-undefined -Wl$(CLANG_COMMA)suppress)
# Clang most probably doesn't maintain binary compatibility, so rebuild when
clang changes.
-$(CLANGOUTDIR)/clang-timestamp: $(CLANGBUILD)/bin/clang
+$(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang
$(QUIET)touch $@
# vim: set noet sw=4 ts=4:
diff --git a/config_host.mk.in b/config_host.mk.in
index 697d788..a9caf50 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -51,7 +51,6 @@ export CC=@CC@
export CDR_CFLAGS=$(gb_SPACE)@CDR_CFLAGS@
export CDR_LIBS=$(gb_SPACE)@CDR_LIBS@
@x_CFLAGS@ export CFLAGS=@CFLAGS@
-export CLANGBUILD=@CLANGBUILD@
export CLANGDIR=@CLANGDIR@
export CLUCENE_CFLAGS=$(gb_SPACE)@CLUCENE_CFLAGS@
export CLUCENE_LIBS=$(gb_SPACE)@CLUCENE_LIBS@
diff --git a/configure.ac b/configure.ac
index 092d4e1..fcfe9f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5656,18 +5656,13 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
if test -z "$CLANGDIR"; then
CLANGDIR=/usr
fi
- dnl The build directory (different from CLANGDIR if using a Clang out-
- dnl of-source build):
- if test -z "$CLANGBUILD"; then
- CLANGBUILD=/usr
- fi
AC_LANG_PUSH([C++])
save_CPPFLAGS=$CPPFLAGS
save_CXX=$CXX
# compiler plugins must be built with "native" bitness of clang
# because they link against clang libraries
CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
- CPPFLAGS="$CPPFLAGS -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include
-I$CLANGBUILD/include -I$CLANGBUILD/tools/clang/include -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+ CPPFLAGS="$CPPFLAGS -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
[COMPILER_PLUGINS=TRUE],
[
@@ -5689,7 +5684,6 @@ else
fi
AC_SUBST(COMPILER_PLUGINS)
AC_SUBST(CLANGDIR)
-AC_SUBST(CLANGBUILD)
# Plugin to help linker.
# Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice