[Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.
Tom Stellard
tom at stellard.net
Fri Nov 9 05:56:44 PST 2012
On Sun, Oct 28, 2012 at 03:58:14AM -0700, Jose Fonseca wrote:
> We use LLVM in a few other directories. Shouldn't we be putting this a bit higher up? For example in LLVM_CXXFLAGS?
>
> I just noticed that src/gallium/state_trackers/clover uses exceptions. So this won't fly everywhere...
>
I don't think -fno-exceptions is required to fix the build, just
-fno-rtti, which I think is only necessary when you are sub-classing
LLVM classes. gallivm looks to be the only place that sub-classes LLVM
classes (drivers/radeon does this too, but its build has been temporarily
disabled).
However, I think the real issue may be that LLVM_CXXFLAGS are missing
from CXXFLAGS. LLVM_CXXFLAGS should have -fno-rtti.
Does the attached patch fix the problem?
-Tom
>
> ----- Original Message -----
> > rtti was removed from more llvm libraries.
> > Thanks to d0k for the hint via IRC #llvm on irc.oftc.net
> > ---
> > src/gallium/auxiliary/Makefile | 4 ++++
> > 1 Datei geändert, 4 Zeilen hinzugefügt(+)
> >
> > diff --git a/src/gallium/auxiliary/Makefile
> > b/src/gallium/auxiliary/Makefile
> > index 3ba3f9c..690b7f5 100644
> > --- a/src/gallium/auxiliary/Makefile
> > +++ b/src/gallium/auxiliary/Makefile
> > @@ -3,6 +3,10 @@ include $(TOP)/configs/current
> >
> > LIBNAME = gallium
> >
> > +ifeq ($(LLVM_VERSION),3.2)
> > + CXXFLAGS += -fno-exceptions -fno-rtti
> > +endif
> > +
> > # get source lists
> > include Makefile.sources
> >
> > --
> > 1.7.10.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
>From 9639dea17e96aa8c59046117015b861fd0c0584e Mon Sep 17 00:00:00 2001
From: Tom Stellard <thomas.stellard at amd.com>
Date: Fri, 9 Nov 2012 07:59:33 -0500
Subject: [PATCH] auxillary: Append LLVM_CXXFLAGS to CXXFLAGS
---
src/gallium/auxiliary/Makefile | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index 3ba3f9c..dc28003 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -13,6 +13,7 @@ C_SOURCES += \
$(GALLIVM_SOURCES)
CPP_SOURCES += \
$(GALLIVM_CPP_SOURCES)
+CXXFLAGS += $(LLVM_CXXFLAGS)
endif
--
1.7.3.4
More information about the mesa-dev
mailing list