[Mesa-dev] [PATCH] build: remove forced -fno-rtti

Alexander von Gluck IV kallisti5 at unixzen.com
Tue Oct 15 17:26:19 CEST 2013


On Tue, 15 Oct 2013 17:04:26 +0200
Johannes Obermayr <johannesobermayr at gmx.de> wrote:
> Am Montag, 14. Oktober 2013, 16:57:20 schrieb Francisco Jerez:
> > Alexander von Gluck IV <kallisti5 at unixzen.com> writes:
> > 
> > > * As discussed on the mailing list,
> > >   forced no-rtti breaks C++ public
> > >   API's such as the Haiku C++ libGL.so
> > > * -fno-rtti *can* be still set however
> > >   instead of blindly forcing -fno-rtti,
> > >   we can rely on the llvm-config
> > >   --cppflags output.
> > >   If the system llvm is built without
> > >   rtti (default), the no-rtti flag will be
> > >   present in llvm-config --cppflags
> > >   (which we pick up on)
> > >   If llvm is built with rtti
> > >   (REQUIRES_RTTI=1), then -fno-rtti is
> > >   removed from llvm-config --cppflags.
> > > * We could selectively add / remove rtti
> > >   from various components, however mixing
> > >   rtti and non-rtti code is tricky and
> > >   could introduce bugs.
> > > * This needs impact tested.
> > 
> > This looks like the right thing to do to me,
> > 
> > Reviewed-by: Francisco Jerez <currojerez at riseup.net>
> > 
> > Thanks.
> 
> ATM NACK because llvm-config doesn't output required -fno-rtti:
> 
> cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DLLVM_LIBDIR_SUFFIX=64 '-DLLVM_TARGETS_TO_BUILD=CppBackend;NVPTX;R600;X86;XCore' -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_TIMESTAMPS=OFF -DLLVM_ENABLE_FFI=ON -DLLVM_USE_OPROFILE=ON -DLLVM_BUILD_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_BUILD_TOOLS=ON -DLLVM_INCLUDE_TOOLS=ON -DLLVM_WC_REVISION=192557

That's actually not the issue. See https://bugs.freedesktop.org/show_bug.cgi?id=70471 for more info.

Pretty much from what i've seen, this change made a bug in the scons build system show up on some platforms.
The automake tools get the llvm cxxflags and llvm cppflags, while scons only uses the cppflags.

Eitherway, i'm working on some patches and testing today.  If I can't find a solution will revert to rework
the change.

 -- Alex


More information about the mesa-dev mailing list