2013/3/19 Maarten Lankhorst <maarten.lankho...@canonical.com>: > Op 18-03-13 16:28, Andreas Boll schreef: >> 2013/3/18 Maarten Lankhorst <maarten.lankho...@canonical.com>: >>> This is one of the 2 patches used in ubuntu for decreasing size of mesa >>> build. >>> >>> The other one is more hacky, and links libmesagallium into libgallium, >>> and then links libgallium against libdricore too for minimal duplication. >>> >>> This might mess up with static llvm, iirc static llvm is built wrong and >>> linking libgallium against it will cause it to export all llvm symbols too. >>> I believe that this is a bug in llvm though, not in mesa. The static >>> libraries >>> should not export all llvm symbols. >>> >>> I should probably change the default to not building shared gallium for the >>> same reason. :-) >>> >>> Meant mostly for discussion purposes, although if there is no objection I'll >>> change the default to disabling shared gallium, and just let every distro >>> enable >>> shared llvm and libgallium for themselves. >>> >>>> 8--- >>> Signed-off-by: Maarten Lankhorst <maarten.lankho...@canonical.com> >>> >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -733,6 +733,19 @@ >>> fi >>> AM_CONDITIONAL(HAVE_SHARED_GLAPI, test "x$enable_shared_glapi" = xyes) >>> >>> +AC_ARG_ENABLE([shared-gallium], >>> + [AS_HELP_STRING([--enable-shared-gallium], >>> + [Enable shared gallium core @<:@default=yes@:>@])], >>> + [enable_shared_gallium="$enableval"], >>> + [enable_shared_gallium=yes]) >>> + >> The following code could be simplified... >> >>> +SHARED_GALLIUM="0" >>> +if test "x$enable_shared_gallium" = xyes; then >>> + SHARED_GALLIUM="1" >>> +fi >>> +AC_SUBST([SHARED_GALLIUM]) >>> +AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test $SHARED_GALLIUM = 1) >>> + >> ... to: >> >> AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test "x$enable_shared_gallium" = xyes) >> > Woops you're right, this was a leftover from when the patch was a lot more > invasive, > and had to touch configs/autoconf.in too. > The AM_CONDITIONAL was added later during the transition to 9.0 :-) > > Any thoughts on making shared gallium default or not? I'm thinking not because > of the llvm symbol bug I mentioned above, unless we change the default > of llvm shared libs to enabled too. > > ~Maarten
I think you should disable it by default since I want to cherry-pick this patch to mesa 9.1. We could always enable it by default later. Additionally you should check if someone wants to build enabled-shared-gallium with static llvm. Then configure should print an error like this "Please use shared-llvm if you want to enable shared-gallium, since the combination static-llvm and shared-gallium is not supported" Andreas. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev