On 01/28/2010 12:16 PM, Renato Botelho wrote:
> Hello again,
>
> I've tested this snapshot on my personal tinderboxes and got no problems,
> but after commit the changes i recieved an email from QAT, freebsd automated
> tests with an error on unit tests. Buildlog can be found here:
>
> http://qat.tecnik93.com/logs/8-STABLE-NPD/clamav-devel-20100127.log
>
Reproduced on Debian too with g++-4.2.
> Any idea?
>
I added -fno-rtti to CXXFLAGS, and everything worked fine here (gcc 4.4).
Apparently with gcc 4.2 googletest needs RTTI due to some system header.
Does the attached patch help (it disables -fno-rtti for now)?
Best regards,
--Edwin
diff --git a/libclamav/c++/Makefile.am b/libclamav/c++/Makefile.am
index 12d6034..ac7b4ca 100644
--- a/libclamav/c++/Makefile.am
+++ b/libclamav/c++/Makefile.am
@@ -19,7 +19,7 @@ LLVM_INCLUDES=-I$(top_srcdir)/llvm/include -I$(top_builddir)/llvm/include
# TODO: HP-UX should have -D_REENTRANT -D_HPUX_SOURCE
LLVM_DEFS=-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE
AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/.. -I$(top_builddir)/../../ $(LLVM_INCLUDES) $(LLVM_DEFS)
-AM_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-exceptions -fno-rtti
+AM_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-exceptions
ACLOCAL_AMFLAGS=-I m4
if DEBUG_BUILD
LLVM_CONFIG=llvm/Debug/bin/llvm-config
@@ -43,7 +43,7 @@ lli_LDADD=libllvmbitreader.la libllvmfullcodegen.la libllvmjit.la
libclamavcxx_la_LIBADD=libllvmjit.la
libclamavcxx_la_DEPENDENCIES=libllvmjit.la libllvmcodegen.la libllvmsystem.la
libclamavcxx_la_LDFLAGS=-no-undefined
-libclamavcxx_la_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-rtti
+libclamavcxx_la_CXXFLAGS = $(LLVM_CXXFLAGS)
libclamavcxx_la_SOURCES = bytecode2llvm.cpp
if BUILD_X86
libclamavcxx_la_LIBADD+=libllvmx86codegen.la
@@ -818,7 +818,7 @@ lli_SOURCES=\
llvm/tools/lli/lli.cpp
llc_CPPFLAGS=$(LLVM_INCLUDES) $(LLVM_DEFS)
-llc_CXXFLAGS=$(LLVM_CXXFLAGS) -fno-rtti
+llc_CXXFLAGS=$(LLVM_CXXFLAGS)
llc_LDADD=libllvmbitreader.la libllvmasmprinter.la libllvmasmparser.la $(lli_LDADD)
llc_SOURCES=\
llvm/lib/MC/MCInstPrinter.cpp\
diff --git a/libclamav/c++/Makefile.in b/libclamav/c++/Makefile.in
index 165b619..135a797 100644
--- a/libclamav/c++/Makefile.in
+++ b/libclamav/c++/Makefile.in
@@ -901,7 +901,7 @@ LLVM_INCLUDES = -I$(top_srcdir)/llvm/include -I$(top_builddir)/llvm/include
# TODO: HP-UX should have -D_REENTRANT -D_HPUX_SOURCE
LLVM_DEFS = -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D_DEBUG -D_GNU_SOURCE
AM_CPPFLAGS = -I$(top_srcdir)/../.. -I$(top_srcdir)/.. -I$(top_builddir)/../../ $(LLVM_INCLUDES) $(LLVM_DEFS)
-AM_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-exceptions -fno-rtti
+AM_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-exceptions
ACLOCAL_AMFLAGS = -I m4
@debug_build_fa...@llvm_config = llvm/Release/bin/llvm-config
@debug_build_t...@llvm_config = llvm/Debug/bin/llvm-config
@@ -928,7 +928,7 @@ libclamavcxx_la_DEPENDENCIES = libllvmjit.la libllvmcodegen.la \
libllvmsystem.la $(am__append_2) $(am__append_6) \
$(am__append_10)
libclamavcxx_la_LDFLAGS = -no-undefined
-libclamavcxx_la_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-rtti
+libclamavcxx_la_CXXFLAGS = $(LLVM_CXXFLAGS)
libclamavcxx_la_SOURCES = bytecode2llvm.cpp
LLVM_CXXFLAGS = -Woverloaded-virtual -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers -Wno-variadic-macros
TBLGENFILES = llvm/include/llvm/Intrinsics.gen X86GenRegisterInfo.h.inc X86GenRegisterNames.inc X86GenRegisterInfo.inc X86GenInstrNames.inc X86GenInstrInfo.inc\
@@ -1539,7 +1539,7 @@ lli_SOURCES = \
llvm/tools/lli/lli.cpp
llc_CPPFLAGS = $(LLVM_INCLUDES) $(LLVM_DEFS)
-llc_CXXFLAGS = $(LLVM_CXXFLAGS) -fno-rtti
+llc_CXXFLAGS = $(LLVM_CXXFLAGS)
llc_LDADD = libllvmbitreader.la libllvmasmprinter.la libllvmasmparser.la $(lli_LDADD)
llc_SOURCES = \
llvm/lib/MC/MCInstPrinter.cpp\
___
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net