[Mesa-dev] [PATCH] Suppress any libGL:... warnings when LIBGL_DEBUG == quiet

2014-08-26 Thread Johannes Obermayr
From: Stefan Dirsch sndir...@suse.de

Let's handle LIBGL_DEBUG env. variable in Mesa in a consistent way.

Fixes: https://bugzilla.novell.com/show_bug.cgi?id=892896
---
To: mesa-dev@lists.freedesktop.org
Cc: 10.3 mesa-sta...@lists.freedesktop.org
openSUSE maintainers: Why can't you forward your applied u_* patches to upstream
  to get them included in final/next release?
---
 src/mesa/drivers/dri/common/xmlconfig.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/common/xmlconfig.c 
b/src/mesa/drivers/dri/common/xmlconfig.c
index ce37647..8e48522 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -429,8 +429,10 @@ static void
 __driUtilMessage(const char *f, ...)
 {
 va_list args;
+const char *libgl_debug;
 
-if (getenv(LIBGL_DEBUG)) {
+libgl_debug=getenv(LIBGL_DEBUG);
+if (libgl_debug  !strstr(libgl_debug, quiet)) {
 fprintf(stderr, libGL: );
 va_start(args, f);
 vfprintf(stderr, f, args);
-- 
2.0.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Fix zero-division in llvmpipe_texture_layout()

2014-06-07 Thread Johannes Obermayr
From: Takashi Iwai ti...@suse.de

Fix the crash of gnome-control-center info invocation on QEMU where
zero height is passed at init.

Fixes: https://bugzilla.novell.com/show_bug.cgi?id=879462

Signed-off-by: Takashi Iwai ti...@suse.de
---
To: mesa-dev@lists.freedesktop.org
Cc: 10.2 mesa-sta...@lists.freedesktop.org
Takashi: Please send also a proper patch to mesa-dev and mesa-stable next time 
...
---
 src/gallium/drivers/llvmpipe/lp_texture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c 
b/src/gallium/drivers/llvmpipe/lp_texture.c
index f601181..5ab2559 100644
--- a/src/gallium/drivers/llvmpipe/lp_texture.c
+++ b/src/gallium/drivers/llvmpipe/lp_texture.c
@@ -115,7 +115,7 @@ llvmpipe_texture_layout(struct llvmpipe_screen *screen,
 lpr-row_stride[level] = align(nblocksx * block_size, 
util_cpu_caps.cacheline);
 
  /* if row_stride * height  LP_MAX_TEXTURE_SIZE */
- if (lpr-row_stride[level]  LP_MAX_TEXTURE_SIZE / nblocksy) {
+ if (nblocksy  lpr-row_stride[level]  LP_MAX_TEXTURE_SIZE / 
nblocksy) {
 /* image too large */
 goto fail;
  }
-- 
1.8.4.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] pipe-loader: add pipe loader for freedreno/msm

2014-02-10 Thread Johannes Obermayr
There should be one called pipe_freedreno and the pipe driver loader should 
support sth. like:

   if ((strcmp(dev-driver_name, kgsl) == 0) || (strcmp(dev-driver_name, 
msm) == 0))
  dev-driver_name = freedreno;

in pipe_loader_find_module ...
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


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

2013-10-17 Thread Johannes Obermayr
Am Mittwoch, 16. Oktober 2013, 16:58:53 schrieb Alexander von Gluck:
 On Wed, 2013-10-16 at 22:09 +0200, Johannes Obermayr wrote:
  Am Dienstag, 15. Oktober 2013, 17:22:54 schrieb Alexander von Gluck:
   On Tue, 2013-10-15 at 15:05 -0700, Francisco Jerez wrote:
Johannes Obermayr johannesoberm...@gmx.de writes:

 Am Dienstag, 15. Oktober 2013, 12:19:40 schrieben Sie:
 On Tue, 15 Oct 2013 17:04:26 +0200
 Johannes Obermayr johannesoberm...@gmx.de wrote:
  Am Montag, 14. Oktober 2013, 16:57:20 schrieb Francisco Jerez:
   Alexander von Gluck IV kallis...@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 curroje...@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
  
  $ llvm-config --cppflags
  -I/usr/include-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
  -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  $ llvm-config --cxxflags
  -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  
  -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter 
  -Wwrite-strings -Wno-missing-field-initializers -pedantic 
  -Wno-long-long -Wno-maybe-uninitialized -Wnon-virtual-dtor -O2 -g 
  -DNDEBUG  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
  -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  $ llvm-config --cflags
  -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  
  -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings 
  -Wno-missing-field-initializers -pedantic -Wno-long-long -O2 -g 
  -DNDEBUG  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
  -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  
  [  576s]   CXXLDlibgallium.la
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI17raw_debug_ostream[_ZTI17raw_debug_ostream]+0x10):
   undefined reference to `typeinfo for llvm::raw_ostream'
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTIN4llvm14format_object1ImEE[_ZTIN4llvm14format_object1ImEE]+0x10):
   undefined reference to `typeinfo for llvm::format_object_base'
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI18BufferMemoryObject[_ZTI18BufferMemoryObject]+0x10):
   undefined reference to `typeinfo for llvm::MemoryObject'
  
  Please revert commit ce8eadb!
 
 Please let me know if the patch I sent to the mailing list fixes it 
 for you. If not, i'll revert the change to be reworked.
 As a side node, what version of LLVM are you running on what distro?
 It is *really* strange that you're seeing those rtti bugs while 
 llvm-config --cxxflags doesn't include -fno-rtti.
 

 No. It doesn't help.

 It is not strange because LLVM's CMake build system is buggy:

 Sth. like 

   # Set common compiler options:
   if( NOT LLVM_REQUIRES_EH )
 if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   add_definitions( -fno-exceptions )
 elseif( MSVC )
   llvm_replace_compiler_option(CMAKE_CXX_FLAGS /EHsc /EHs-c-)
   add_definitions( /D_HAS_EXCEPTIONS=0 )
 endif()
   endif()
   if( NOT LLVM_REQUIRES_RTTI )
 if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   llvm_replace_compiler_option(CMAKE_CXX_FLAGS -frtti 
 -fno-rtti)
 elseif( MSVC )
   llvm_replace_compiler_option(CMAKE_CXX_FLAGS /GR /GR-)
 endif()
   endif()

 from function

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

2013-10-16 Thread Johannes Obermayr
Am Dienstag, 15. Oktober 2013, 17:22:54 schrieb Alexander von Gluck:
 On Tue, 2013-10-15 at 15:05 -0700, Francisco Jerez wrote:
  Johannes Obermayr johannesoberm...@gmx.de writes:
  
   Am Dienstag, 15. Oktober 2013, 12:19:40 schrieben Sie:
   On Tue, 15 Oct 2013 17:04:26 +0200
   Johannes Obermayr johannesoberm...@gmx.de wrote:
Am Montag, 14. Oktober 2013, 16:57:20 schrieb Francisco Jerez:
 Alexander von Gluck IV kallis...@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 curroje...@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

$ llvm-config --cppflags
-I/usr/include-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
$ llvm-config --cxxflags
-I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  
-fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter 
-Wwrite-strings -Wno-missing-field-initializers -pedantic 
-Wno-long-long -Wno-maybe-uninitialized -Wnon-virtual-dtor -O2 -g 
-DNDEBUG  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
$ llvm-config --cflags
-I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  
-fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings 
-Wno-missing-field-initializers -pedantic -Wno-long-long -O2 -g 
-DNDEBUG  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

[  576s]   CXXLDlibgallium.la
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI17raw_debug_ostream[_ZTI17raw_debug_ostream]+0x10):
 undefined reference to `typeinfo for llvm::raw_ostream'
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTIN4llvm14format_object1ImEE[_ZTIN4llvm14format_object1ImEE]+0x10):
 undefined reference to `typeinfo for llvm::format_object_base'
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI18BufferMemoryObject[_ZTI18BufferMemoryObject]+0x10):
 undefined reference to `typeinfo for llvm::MemoryObject'

Please revert commit ce8eadb!
   
   Please let me know if the patch I sent to the mailing list fixes it for 
   you. If not, i'll revert the change to be reworked.
   As a side node, what version of LLVM are you running on what distro?
   It is *really* strange that you're seeing those rtti bugs while 
   llvm-config --cxxflags doesn't include -fno-rtti.
   
  
   No. It doesn't help.
  
   It is not strange because LLVM's CMake build system is buggy:
  
   Sth. like 
  
 # Set common compiler options:
 if( NOT LLVM_REQUIRES_EH )
   if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
 add_definitions( -fno-exceptions )
   elseif( MSVC )
 llvm_replace_compiler_option(CMAKE_CXX_FLAGS /EHsc /EHs-c-)
 add_definitions( /D_HAS_EXCEPTIONS=0 )
   endif()
 endif()
 if( NOT LLVM_REQUIRES_RTTI )
   if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
 llvm_replace_compiler_option(CMAKE_CXX_FLAGS -frtti -fno-rtti)
   elseif( MSVC )
 llvm_replace_compiler_option(CMAKE_CXX_FLAGS /GR /GR-)
   endif()
 endif()
  
   from function(llvm_process_sources OUT_VAR) from 
   cmake/modules/LLVMProcessSources.cmake must be in 
   tools/llvm-config/CMakeLists.txt
  
   I won't send a patch to LLVM because it is like on Mesa and I must run 
   after people for months to get bug/build fixes not pushed.[1] Complaining 
   and let others work is much much ...
  
   [1] 
   http://lists.cs.uiuc.edu

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

2013-10-15 Thread Johannes Obermayr
Am Montag, 14. Oktober 2013, 16:57:20 schrieb Francisco Jerez:
 Alexander von Gluck IV kallis...@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 curroje...@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

$ llvm-config --cppflags
-I/usr/include-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS
$ llvm-config --cxxflags
-I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -fPIC 
-fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings 
-Wno-missing-field-initializers -pedantic -Wno-long-long 
-Wno-maybe-uninitialized -Wnon-virtual-dtor -O2 -g -DNDEBUG  -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
$ llvm-config --cflags
-I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -fPIC -Wall 
-W -Wno-unused-parameter -Wwrite-strings -Wno-missing-field-initializers 
-pedantic -Wno-long-long -O2 -g -DNDEBUG  -D_GNU_SOURCE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

[  576s]   CXXLDlibgallium.la
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI17raw_debug_ostream[_ZTI17raw_debug_ostream]+0x10):
 undefined reference to `typeinfo for llvm::raw_ostream'
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTIN4llvm14format_object1ImEE[_ZTIN4llvm14format_object1ImEE]+0x10):
 undefined reference to `typeinfo for llvm::format_object_base'
[  579s] 
gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI18BufferMemoryObject[_ZTI18BufferMemoryObject]+0x10):
 undefined reference to `typeinfo for llvm::MemoryObject'

Please revert commit ce8eadb!

 
  ---
   configure.ac  | 1 -
   scons/llvm.py | 3 ---
   src/gallium/auxiliary/Makefile.am | 6 --
   3 files changed, 10 deletions(-)
 
  diff --git a/configure.ac b/configure.ac
  index 0d082d2..3335575 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -1943,7 +1943,6 @@ AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test 
  x$enable_gallium_loader = xyes)
   AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = 
  xyes)
   AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
   AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
  -AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
   
   AC_SUBST([ELF_LIB])
   
  diff --git a/scons/llvm.py b/scons/llvm.py
  index 7cd609c..c1c3736 100644
  --- a/scons/llvm.py
  +++ b/scons/llvm.py
  @@ -195,9 +195,6 @@ def generate(env):
   if llvm_version = distutils.version.LooseVersion('3.1'):
   components.append('mcjit')
   
  -if llvm_version = distutils.version.LooseVersion('3.2'):
  -env.Append(CXXFLAGS = ('-fno-rtti',))
  -
   env.ParseConfig('llvm-config --libs ' + ' '.join(components))
   env.ParseConfig('llvm-config --ldflags')
   except OSError:
  diff --git a/src/gallium/auxiliary/Makefile.am 
  b/src/gallium/auxiliary/Makefile.am
  index 670e124..2d2d8d4 100644
  --- a/src/gallium/auxiliary/Makefile.am
  +++ b/src/gallium/auxiliary/Makefile.am
  @@ -25,12 +25,6 @@ AM_CXXFLAGS += \
  $(GALLIUM_CFLAGS) \
  $(LLVM_CXXFLAGS)
   
  -if LLVM_NEEDS_FNORTTI
  -
  -AM_CXXFLAGS += -fno-rtti
  -
  -endif
  -
   libgallium_la_SOURCES += \
  $(GALLIVM_SOURCES) \
  $(GALLIVM_CPP_SOURCES)
 
  ___
  mesa-dev mailing list
  mesa-dev@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org

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

2013-10-15 Thread Johannes Obermayr
Am Dienstag, 15. Oktober 2013, 12:19:40 schrieben Sie:
 On Tue, 15 Oct 2013 17:04:26 +0200
 Johannes Obermayr johannesoberm...@gmx.de wrote:
  Am Montag, 14. Oktober 2013, 16:57:20 schrieb Francisco Jerez:
   Alexander von Gluck IV kallis...@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 curroje...@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
  
  $ llvm-config --cppflags
  -I/usr/include-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS 
  -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  $ llvm-config --cxxflags
  -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -fPIC 
  -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings 
  -Wno-missing-field-initializers -pedantic -Wno-long-long 
  -Wno-maybe-uninitialized -Wnon-virtual-dtor -O2 -g -DNDEBUG  -D_GNU_SOURCE 
  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  $ llvm-config --cflags
  -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -fPIC 
  -Wall -W -Wno-unused-parameter -Wwrite-strings 
  -Wno-missing-field-initializers -pedantic -Wno-long-long -O2 -g -DNDEBUG  
  -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
  -D__STDC_LIMIT_MACROS
  
  [  576s]   CXXLDlibgallium.la
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI17raw_debug_ostream[_ZTI17raw_debug_ostream]+0x10):
   undefined reference to `typeinfo for llvm::raw_ostream'
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTIN4llvm14format_object1ImEE[_ZTIN4llvm14format_object1ImEE]+0x10):
   undefined reference to `typeinfo for llvm::format_object_base'
  [  579s] 
  gallivm/.libs/lp_bld_debug.o:(.data.rel.ro._ZTI18BufferMemoryObject[_ZTI18BufferMemoryObject]+0x10):
   undefined reference to `typeinfo for llvm::MemoryObject'
  
  Please revert commit ce8eadb!
 
 Please let me know if the patch I sent to the mailing list fixes it for you. 
 If not, i'll revert the change to be reworked.
 As a side node, what version of LLVM are you running on what distro?
 It is *really* strange that you're seeing those rtti bugs while llvm-config 
 --cxxflags doesn't include -fno-rtti.
 

No. It doesn't help.

It is not strange because LLVM's CMake build system is buggy:

Sth. like 

  # Set common compiler options:
  if( NOT LLVM_REQUIRES_EH )
if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
  add_definitions( -fno-exceptions )
elseif( MSVC )
  llvm_replace_compiler_option(CMAKE_CXX_FLAGS /EHsc /EHs-c-)
  add_definitions( /D_HAS_EXCEPTIONS=0 )
endif()
  endif()
  if( NOT LLVM_REQUIRES_RTTI )
if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
  llvm_replace_compiler_option(CMAKE_CXX_FLAGS -frtti -fno-rtti)
elseif( MSVC )
  llvm_replace_compiler_option(CMAKE_CXX_FLAGS /GR /GR-)
endif()
  endif()

from function(llvm_process_sources OUT_VAR) from 
cmake/modules/LLVMProcessSources.cmake must be in 
tools/llvm-config/CMakeLists.txt

I won't send a patch to LLVM because it is like on Mesa and I must run after 
people for months to get bug/build fixes not pushed.[1] Complaining and let 
others work is much much ...

[1] 
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130909/187516.html
 (almost 4 months ...)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] The long way to a faster build with shared libs and some fixes ...

2013-09-12 Thread Johannes Obermayr
I see current situation is better:

Symbol table '.dynsym' contains ...

master:

libdricore: 3675
i965_dri:398


after [PATCH 10/21]:

classic drivers:
libmesacore: 839
libmesadri:  348
total:  1187
i965_dri:397

gallium drivers:
libgallium:  833
libmesacore: 839
libmesagallium:  360
total:  2032

Complaining about the weather instead of opening the shutter to see the sun.

Am Donnerstag, 12. September 2013, 00:44:58 schrieb Kenneth Graunke:
 On 09/11/2013 11:41 PM, Christian König wrote:
  I completely agree.
  
  Building everything shared might speed up the build process a little bit
  and save some space, but for the cost of having to handle allot of
  rather small shared libraries where which each clashing the symbol space
  of any application using these drivers with a bunch of unnecessary symbols.
  
  Building everything as one big blob sounds like the better idea.
  
  Christian.
 
 Not to mention...installing a ton of shared libraries is just asking for
 version mismatch problems.  I've had a /ton/ of problems due to
 mismatching libdricore and i965_dri.so...usually due to rpath shenanigans.
 
 If anything, I'd like to get rid of libdricore and build core Mesa and
 the drivers together again.  No more version clashes.  Far fewer symbols
 exported.  LTO for extra performance with no extra effort...
 
 Faster build times are nice, but...not if it means shipping a ton of
 shared libraries...
 
 --Ken
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] The long way to a faster build with shared libs and some fixes ...

2013-09-12 Thread Johannes Obermayr
Am Donnerstag, 12. September 2013, 14:52:15 schrieb Marek Olšák:
 I think current Gallium drivers only need one exported symbol to work:
 __driDriverExtensions. See:
 http://lists.freedesktop.org/archives/mesa-dev/2013-August/043038.html
 
 Marek

readelf -s usr/lib64/dri/radeonsi_dri.so 

master:
Symbol table '.dynsym' contains 556 entries:

after patch series:
Symbol table '.dynsym' contains 153 entries:

 
 On Thu, Sep 12, 2013 at 2:41 PM, Johannes Obermayr
 johannesoberm...@gmx.de wrote:
  I see current situation is better:
 
  Symbol table '.dynsym' contains ...
 
  master:
 
  libdricore: 3675
  i965_dri:398
 
 
  after [PATCH 10/21]:
 
  classic drivers:
  libmesacore: 839
  libmesadri:  348
  total:  1187
  i965_dri:397
 
  gallium drivers:
  libgallium:  833
  libmesacore: 839
  libmesagallium:  360
  total:  2032
 
  Complaining about the weather instead of opening the shutter to see the sun.
 
  Am Donnerstag, 12. September 2013, 00:44:58 schrieb Kenneth Graunke:
  On 09/11/2013 11:41 PM, Christian König wrote:
   I completely agree.
  
   Building everything shared might speed up the build process a little bit
   and save some space, but for the cost of having to handle allot of
   rather small shared libraries where which each clashing the symbol space
   of any application using these drivers with a bunch of unnecessary 
   symbols.
  
   Building everything as one big blob sounds like the better idea.
  
   Christian.
 
  Not to mention...installing a ton of shared libraries is just asking for
  version mismatch problems.  I've had a /ton/ of problems due to
  mismatching libdricore and i965_dri.so...usually due to rpath shenanigans.
 
  If anything, I'd like to get rid of libdricore and build core Mesa and
  the drivers together again.  No more version clashes.  Far fewer symbols
  exported.  LTO for extra performance with no extra effort...
 
  Faster build times are nice, but...not if it means shipping a ton of
  shared libraries...
 
  --Ken
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 02/21] Suppress clang's warnings about unused CFLAGS and CXXFLAGS.

2013-09-11 Thread Johannes Obermayr
Reviewed-by: Kenneth Graunke kenn...@whitecape.org
---
 configure.ac | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index ca9228c..d280e38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1969,6 +1969,12 @@ dnl Restore LDFLAGS and CPPFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 CPPFLAGS=$_SAVE_CPPFLAGS
 
+dnl Suppress clang's warnings about unused CFLAGS and CXXFLAGS
+if test x$acv_mesa_CLANG = xyes; then
+CFLAGS=$CFLAGS -Qunused-arguments
+CXXFLAGS=$CXXFLAGS -Qunused-arguments
+fi
+
 dnl Add user CFLAGS and CXXFLAGS
 CFLAGS=$CFLAGS $USER_CFLAGS
 CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 03/21] configure.ac: Save user {C, CXX}FLAGS and append them at end.

2013-09-11 Thread Johannes Obermayr
This way the user has the privilege of last decision and so the option to build 
an optimized debug build again.
---
 configure.ac | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d280e38..e3d323d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,12 @@ cygwin*)
 ;;
 esac
 
+dnl Save user {C,CXX}FLAGS
+USER_CFLAGS=$CFLAGS
+USER_CXXFLAGS=$CXXFLAGS
+CFLAGS=
+CXXFLAGS=
+
 dnl Add flags for gcc and g++
 if test x$GCC = xyes; then
 case $host_os in
@@ -1976,6 +1982,8 @@ if test x$acv_mesa_CLANG = xyes; then
 fi
 
 dnl Add user CFLAGS and CXXFLAGS
+cflags=$CFLAGS
+cxxflags=$CXXFLAGS
 CFLAGS=$CFLAGS $USER_CFLAGS
 CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
 
@@ -,14 +2230,16 @@ echo Shared-glapi:$enable_shared_glapi
 
 dnl Compiler options
 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS | \
+cflags=`echo $cflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS | \
+cxxflags=`echo $cxxflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
 defines=`echo $DEFINES | $SED 's/^ *//;s/  */ /;s/ *$//'`
 echo 
 echo CFLAGS:  $cflags
+echo USER_CFLAGS: $USER_CFLAGS
 echo CXXFLAGS:$cxxflags
+echo USER_CXXFLAGS:   $USER_CXXFLAGS
 echo Macros:  $defines
 echo 
 if test x$MESA_LLVM = x1; then
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 01/21] ilo: Fix out-of-tree build.

2013-09-11 Thread Johannes Obermayr
---
 src/gallium/drivers/ilo/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/ilo/Makefile.am 
b/src/gallium/drivers/ilo/Makefile.am
index 10b3da3..33f2045 100644
--- a/src/gallium/drivers/ilo/Makefile.am
+++ b/src/gallium/drivers/ilo/Makefile.am
@@ -27,7 +27,7 @@ include $(top_srcdir)/src/gallium/Automake.inc
 noinst_LTLIBRARIES = libilo.la
 
 AM_CPPFLAGS = \
-   -Iinclude \
+   -I$(top_srcdir)/src/gallium/drivers/ilo/include \
-I$(top_srcdir)/src/gallium/winsys/intel \
$(GALLIUM_CFLAGS)
 
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 04/21] radeon: Build and use libradeon the right way.

2013-09-11 Thread Johannes Obermayr
Better build system integration for:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=91a160b
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b2855b

The EGL runtime issue should be fixed now.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64810
---
 configure.ac   |  2 --
 src/gallium/drivers/r600/Makefile.am   |  8 +--
 src/gallium/drivers/radeon/Makefile.am | 31 ++
 src/gallium/drivers/radeonsi/Makefile.am   |  3 ---
 src/gallium/targets/dri-r600/Makefile.am   |  1 +
 src/gallium/targets/dri-radeonsi/Makefile.am   |  1 +
 src/gallium/targets/egl-static/Makefile.am | 20 +
 src/gallium/targets/pipe-loader/Makefile.am|  2 ++
 src/gallium/targets/vdpau-r600/Makefile.am |  1 +
 src/gallium/targets/vdpau-radeonsi/Makefile.am |  1 +
 src/gallium/targets/xorg-r600/Makefile.am  |  1 +
 src/gallium/targets/xorg-radeonsi/Makefile.am  |  1 +
 src/gallium/targets/xvmc-r600/Makefile.am  |  1 +
 13 files changed, 28 insertions(+), 45 deletions(-)

diff --git a/configure.ac b/configure.ac
index e3d323d..6224386 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1779,7 +1779,6 @@ if test x$with_gallium_drivers != x; then
 GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS r600
 if test x$enable_r600_llvm = xyes -o x$enable_opencl = xyes; 
then
 radeon_llvm_check
-R600_NEED_RADEON_GALLIUM=yes;
 LLVM_COMPONENTS=${LLVM_COMPONENTS} bitreader asmparser
 fi
 if test x$enable_r600_llvm = xyes; then
@@ -1936,7 +1935,6 @@ AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test 
x$HAVE_GALLIUM_I915 = xyes -o \
  x$HAVE_GALLIUM_SVGA = xyes)
 AM_CONDITIONAL(NEED_WINSYS_XLIB, test x$NEED_WINSYS_XLIB = xyes)
 AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
-AM_CONDITIONAL(R600_NEED_RADEON_GALLIUM, test x$R600_NEED_RADEON_GALLIUM = 
xyes)
 AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
 AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
 AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = 
xyes)
diff --git a/src/gallium/drivers/r600/Makefile.am 
b/src/gallium/drivers/r600/Makefile.am
index 9203d03..d8dc816 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -22,19 +22,13 @@ libr600_la_SOURCES = \
$(C_SOURCES) \
$(CXX_SOURCES)
 
-libr600_la_LIBADD = ../radeon/libradeon.la
-
-if R600_NEED_RADEON_GALLIUM
-
+if NEED_RADEON_LLVM
 libr600_la_SOURCES += \
$(LLVM_C_SOURCES)
 
-libr600_la_LIBADD += ../radeon/libllvmradeon.la
-
 AM_CFLAGS += \
$(LLVM_CFLAGS) \
-I$(top_srcdir)/src/gallium/drivers/radeon/
-
 endif
 
 if USE_R600_LLVM_COMPILER
diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index ac8cbd3..1a65a6a 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -1,38 +1,21 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-LIBGALLIUM_LIBS=
+libradeon_la_CFLAGS = \
+   $(GALLIUM_CFLAGS) \
+   $(RADEON_CFLAGS) \
+   $(VISIBILTY_CFLAGS) \
+   $(DEFINES)
 
 noinst_LTLIBRARIES = libradeon.la
 
-AM_CFLAGS = $(GALLIUM_CFLAGS) $(RADEON_CFLAGS)
-
 libradeon_la_SOURCES = \
$(C_SOURCES)
 
 if NEED_RADEON_LLVM
-
-libllvmradeon_la_LDFLAGS = \
-   $(LLVM_LDFLAGS)
-
-noinst_LTLIBRARIES += libllvmradeon.la
-
-libllvmradeon_la_CXXFLAGS = \
-   $(GALLIUM_CFLAGS) \
-   $(DEFINES)
-
-libllvmradeon_la_CFLAGS = \
-   $(GALLIUM_CFLAGS) \
+libradeon_la_CFLAGS += \
$(LLVM_CFLAGS)
 
-libllvmradeon_la_SOURCES = \
-   $(LLVM_CPP_FILES) \
+libradeon_la_SOURCES += \
$(LLVM_C_FILES)
-
-libllvmradeon_la_LIBADD = \
-   $(LIBGALLIUM_LIBS) \
-   $(CLOCK_LIB) \
-   $(LLVM_LIBS) \
-   $(ELF_LIB)
-
 endif
diff --git a/src/gallium/drivers/radeonsi/Makefile.am 
b/src/gallium/drivers/radeonsi/Makefile.am
index 0c27973..ac75231 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -34,6 +34,3 @@ AM_CPPFLAGS = \
 AM_CFLAGS = $(LLVM_CFLAGS)
 
 libradeonsi_la_SOURCES = $(C_SOURCES)
-libradeonsi_la_LIBADD = \
-   ../radeon/libradeon.la \
-   ../radeon/libllvmradeon.la
diff --git a/src/gallium/targets/dri-r600/Makefile.am 
b/src/gallium/targets/dri-r600/Makefile.am
index 2b3524b..d217f0d 100644
--- a/src/gallium/targets/dri-r600/Makefile.am
+++ b/src/gallium/targets/dri-r600/Makefile.am
@@ -51,6 +51,7 @@ r600_dri_la_LIBADD = \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/drivers/r600/libr600.la \
+   $(top_builddir)/src/gallium/drivers/radeon/libradeon.la \

[Mesa-dev] [PATCH 05/21] gallium/targets: Make use of prebuilt libdricommon.la.

2013-09-11 Thread Johannes Obermayr
---
 src/gallium/targets/dri-freedreno/Makefile.am | 10 +++---
 src/gallium/targets/dri-i915/Makefile.am  |  7 ++-
 src/gallium/targets/dri-ilo/Makefile.am   |  7 ++-
 src/gallium/targets/dri-nouveau/Makefile.am   |  7 ++-
 src/gallium/targets/dri-r300/Makefile.am  |  7 ++-
 src/gallium/targets/dri-r600/Makefile.am  |  7 ++-
 src/gallium/targets/dri-radeonsi/Makefile.am  |  7 ++-
 src/gallium/targets/dri-vmwgfx/Makefile.am|  6 ++
 8 files changed, 17 insertions(+), 41 deletions(-)

diff --git a/src/gallium/targets/dri-freedreno/Makefile.am 
b/src/gallium/targets/dri-freedreno/Makefile.am
index 615ae6f..ac7460a 100644
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ b/src/gallium/targets/dri-freedreno/Makefile.am
@@ -39,14 +39,10 @@ AM_CPPFLAGS = \
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = kgsl_dri.la msm_dri.la
 
-COMMON_SOURCES = \
-   $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
-
 COMMON_LDFLAGS = -module -avoid-version -shared -no-undefined
 
 COMMON_LIBADD = \
+   $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
@@ -65,12 +61,12 @@ COMMON_LIBADD += $(LLVM_LIBS)
 endif
 
 nodist_EXTRA_kgsl_dri_la_SOURCES = dummy.cpp
-kgsl_dri_la_SOURCES = target-kgsl.c $(COMMON_SOURCES)
+kgsl_dri_la_SOURCES = target-kgsl.c
 kgsl_dri_la_LDFLAGS = $(COMMON_LDFLAGS)
 kgsl_dri_la_LIBADD  = $(COMMON_LIBADD)
 
 nodist_EXTRA_msm_dri_la_SOURCES = dummy.cpp
-msm_dri_la_SOURCES  = target-msm.c $(COMMON_SOURCES)
+msm_dri_la_SOURCES  = target-msm.c
 msm_dri_la_LDFLAGS  = $(COMMON_LDFLAGS)
 msm_dri_la_LIBADD   = $(COMMON_LIBADD)
 
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index ce6be78..e1c6eca 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -40,15 +40,12 @@ AM_CPPFLAGS = \
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = i915_dri.la
 
-i915_dri_la_SOURCES = \
-   target.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
+i915_dri_la_SOURCES = target.c
 
 i915_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
 
 i915_dri_la_LIBADD = \
+   $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-ilo/Makefile.am 
b/src/gallium/targets/dri-ilo/Makefile.am
index 7761f33..88233f6 100644
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ b/src/gallium/targets/dri-ilo/Makefile.am
@@ -39,17 +39,14 @@ AM_CPPFLAGS = \
 
 noinst_LTLIBRARIES = ilo_dri.la
 
-ilo_dri_la_SOURCES = \
-   target.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
+ilo_dri_la_SOURCES = target.c
 
 # need -rpath to create a noinst shared library
 ilo_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined \
 -rpath $(abs_builddir)
 
 ilo_dri_la_LIBADD = \
+   $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am 
b/src/gallium/targets/dri-nouveau/Makefile.am
index 9cc5455..a02394e 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -39,15 +39,12 @@ dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = nouveau_dri.la
 
 nodist_EXTRA_nouveau_dri_la_SOURCES = dummy.cpp
-nouveau_dri_la_SOURCES = \
-   target.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/utils.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/dri_util.c \
-   $(top_srcdir)/src/mesa/drivers/dri/common/xmlconfig.c
+nouveau_dri_la_SOURCES = target.c
 
 nouveau_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
 
 nouveau_dri_la_LIBADD = \
+   $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
$(top_builddir)/src/mesa/libmesagallium.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-r300/Makefile.am 
b/src/gallium/targets/dri-r300/Makefile.am
index 

[Mesa-dev] The long way to a faster build with shared libs and some fixes ...

2013-09-11 Thread Johannes Obermayr
[PATCH 01/21] ilo: Fix out-of-tree build.

[PATCH 02/21] Suppress clang's warnings about unused CFLAGS and CXXFLAGS.

[PATCH 03/21] configure.ac: Save user {C,CXX}FLAGS and append them at end.

[PATCH 04/21] radeon: Build and use libradeon the right way.
  Link libradeon only once in egl-static

[PATCH 05/21] gallium/targets: Make use of prebuilt libdricommon.la.
  Avoid duplicate build.

[PATCH 06/21] Drop support for --enable-static / --disable-shared.

[PATCH 07/21] gallium/auxiliary: Build libgallium shared.
  Hundreds of symbols to be PUBLIC. But saves on a full build
  19 x ~ 1.8 MB.

[PATCH 08/21] Drop last parts of compatibility for the old Mesa build
  I want it to avoid these stupid symlinks while distro build but
  with more work on follow-up patches it should be possible to keep

[PATCH 09/21] mapi: Build libglapi always shared.
  I assume it could be improved later

[PATCH 10/21] mesa: Build libmesa shared.
  Hundreds of PUBLICs but we can get rid of libdricore and get an
  libmesadri which depends as well as libmesagallium on a 
libmesacore.
  This really speeds up build since duplicate build in libdricore
  with all PUBLIC can be avoided.
  Also dlopen classic drivers should be faster.

[PATCH 11/21] Install all internal shared libs to $(libdir)/mesa-$VERSION.

[PATCH 12/21] Also do it for egl_gallium.so, pipe_*.so and gbm_gallium_drm.

[PATCH 13/21] Makefile.am: s:-no-undefined:-Wl,--no-undefined to make it work.
  libtool will set it back to allow_undefined=yes in func_mode_link 
()
  otherwise.

[PATCH 14/21] gallium/drivers: Build libs -shared.

[PATCH 15/21] vdpau,xvmc: Add install-data-hooks to remove unneccessary 
symlinks.
  libvdpau_*.so.1 and libXvMC*.so libs are dlopened by wrappers.
  Nothing should link them directly.

[PATCH 16/21] glx: Get rid of libglx.la.

[PATCH 17/21] gbm: Get rid of libgbm_dri.la.

[PATCH 18/21] i915: Conditionally build an i915g driver instead of

[PATCH 19/21] freedreno: Make print_sequence a macro to fix clang.

[PATCH 20/21] freedreno: One Makefile.am with a Makefile.sources is

[PATCH 21/21] clover: Force gcc and g++ to fix clang builds.


openSUSE x86_64 binary RPMs will look like this:
$ du -a etc/ usr/
4   etc/drirc
8   etc/
88  usr/lib64/libXvMCr600.so
140 usr/lib64/libEGL.so.1.0.0
0   usr/lib64/libGL.so.1.2
380 usr/lib64/libGL.so.1.2.0
0   usr/lib64/libGLESv1_CM.so.1
88  usr/lib64/libXvMCr300.so
36  usr/lib64/libXvMCsoftpipe.so
212 usr/lib64/mesa-9.2.0/libllvmpipe.so
608 usr/lib64/mesa-9.2.0/libmesadri.so
324 usr/lib64/mesa-9.2.0/libmesagallium.so
1140usr/lib64/mesa-9.2.0/libnouveau.so
60  usr/lib64/mesa-9.2.0/libtrace.so
60  usr/lib64/mesa-9.2.0/pipe_r600.so
308 usr/lib64/mesa-9.2.0/libr300.so
20  usr/lib64/mesa-9.2.0/libgalahad.so
16  usr/lib64/mesa-9.2.0/libnoop.so
32  usr/lib64/mesa-9.2.0/librbug.so
60  usr/lib64/mesa-9.2.0/pipe_r300.so
60  usr/lib64/mesa-9.2.0/pipe_radeonsi.so
164 usr/lib64/mesa-9.2.0/egl_gallium.so
152 usr/lib64/mesa-9.2.0/libglapi.so
136 usr/lib64/mesa-9.2.0/libradeonsi.so
16  usr/lib64/mesa-9.2.0/libr300-helper.so
16  usr/lib64/mesa-9.2.0/libidentity.so
8   usr/lib64/mesa-9.2.0/pipe_nouveau.so
184 usr/lib64/mesa-9.2.0/libsvga.so
1888usr/lib64/mesa-9.2.0/libgallium.so
20  usr/lib64/mesa-9.2.0/gbm_gallium_drm.so
1016usr/lib64/mesa-9.2.0/libr600.so
20  usr/lib64/mesa-9.2.0/pipe_vmwgfx.so
3228usr/lib64/mesa-9.2.0/libmesacore.so
152 usr/lib64/mesa-9.2.0/libsoftpipe.so
8   usr/lib64/mesa-9.2.0/pipe_swrast.so
9912usr/lib64/mesa-9.2.0
0   usr/lib64/libOSMesa.so.8
0   usr/lib64/libxatracker.so.1
64  usr/lib64/dri/swrast_dri.so
184 usr/lib64/dri/nouveau_vieux_dri.so
116 usr/lib64/dri/r600_dri.so
288 usr/lib64/dri/radeon_dri.so
876 usr/lib64/dri/i965_dri.so
320 usr/lib64/dri/r200_dri.so
116 usr/lib64/dri/r300_dri.so
120 usr/lib64/dri/radeonsi_dri.so
72  usr/lib64/dri/nouveau_dri.so
4   usr/lib64/dri/updates/README.updates
8   usr/lib64/dri/updates
324 usr/lib64/dri/i915_dri.so
84  usr/lib64/dri/vmwgfx_dri.so
2576usr/lib64/dri
28  usr/lib64/libgbm.so.1.0.0
0   usr/lib64/libGL.so.1
8   usr/lib64/libwayland-egl.so.1.0.0
116 usr/lib64/libxatracker.so.1.0.0
32  usr/lib64/libOSMesa.so.8.0.0
28  usr/lib64/libGLESv1_CM.so.1.1.0
0   usr/lib64/libGLESv2.so.2
112 usr/lib64/vdpau/libvdpau_radeonsi.so.1
112 usr/lib64/vdpau/libvdpau_r300.so.1
68  usr/lib64/vdpau/libvdpau_softpipe.so.1
68  usr/lib64/vdpau/libvdpau_nouveau.so.1
112 usr/lib64/vdpau/libvdpau_r600.so.1
476 usr/lib64/vdpau
32  usr/lib64/libGLESv2.so.2.0.0
0   usr/lib64/libEGL.so.1
36  usr/lib64/libXvMCnouveau.so
0   

[Mesa-dev] [PATCH 06/21] Drop support for --enable-static / --disable-shared.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac | 100 ++-
 src/egl/main/Makefile.am |   3 +-
 src/gallium/targets/egl-static/Makefile.am   |   2 +-
 src/gallium/targets/gbm/Makefile.am  |   2 +-
 src/gallium/targets/opencl/Makefile.am   |   2 +
 src/gallium/targets/osmesa/Makefile.am   |   2 +-
 src/gallium/targets/pipe-loader/Makefile.am  |  16 ++---
 src/gallium/targets/xvmc-nouveau/Makefile.am |   3 +-
 src/gbm/Makefile.am  |   6 +-
 src/glx/Makefile.am  |   3 +-
 src/mapi/es1api/Makefile.am  |   2 +-
 src/mapi/es2api/Makefile.am  |   2 +-
 src/mapi/vgapi/Makefile.am   |   2 +-
 src/mesa/drivers/osmesa/Makefile.am  |   2 +-
 14 files changed, 62 insertions(+), 85 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6224386..3407c3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,16 @@ AC_PROG_MKDIR_P
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
+if test x$enable_static = xyes; then
+AC_MSG_WARN([--enable-static is not supported. Disable building static 
...])
+enable_static=no
+fi
+
+if test x$enable_shared != xyes; then
+AC_MSG_WARN([--disable-shared is not supported. Force building shared ...])
+enable_shared=yes
+fi
+
 AX_PROG_BISON([],
   AS_IF([test ! -f $srcdir/src/glsl/glcpp/glcpp-parse.c],
 [AC_MSG_ERROR([bison not found - unable to compile 
glcpp-parse.y])]))
@@ -272,22 +282,6 @@ if test x$enable_64bit = xyes; then
 fi
 fi
 
-dnl Can't have static and shared libraries, default to static if user
-dnl explicitly requested. If both disabled, set to static since shared
-dnl was explicitly requested.
-case x$enable_static$enable_shared in
-xyesyes )
-AC_MSG_WARN([Cannot build static and shared libraries, disabling shared])
-enable_shared=no
-;;
-xnono )
-AC_MSG_WARN([Cannot disable both static and shared libraries, enabling 
static])
-enable_static=yes
-;;
-esac
-
-AM_CONDITIONAL(BUILD_SHARED, test x$enable_shared = xyes)
-
 dnl
 dnl other compiler options
 dnl
@@ -312,23 +306,20 @@ dnl library names
 dnl
 LIB_PREFIX_GLOB='lib'
 LIB_VERSION_SEPARATOR='.'
-if test $enable_static = yes; then
-LIB_EXTENSION='a'
-else
-case $host_os in
-darwin* )
-LIB_EXTENSION='dylib' ;;
-cygwin* )
-dnl prefix can be 'cyg' or 'lib'
-LIB_PREFIX_GLOB='???'
-LIB_VERSION_SEPARATOR='-'
-LIB_EXTENSION='dll' ;;
-aix* )
-LIB_EXTENSION='a' ;;
-* )
-LIB_EXTENSION='so' ;;
-esac
-fi
+case $host_os in
+  darwin* )
+  LIB_EXTENSION='dylib' ;;
+  cygwin* )
+  dnl prefix can be 'cyg' or 'lib'
+  LIB_PREFIX_GLOB='???'
+  LIB_VERSION_SEPARATOR='-'
+  LIB_EXTENSION='dll' ;;
+  aix* )
+  LIB_EXTENSION='a' ;;
+  * )
+  LIB_EXTENSION='so' ;;
+esac
+
 AC_ARG_WITH([gl-lib-name],
   [AS_HELP_STRING([--with-gl-lib-name@:@=NAME@:@],
 [specify GL library name @:@default=GL@:@])],
@@ -767,16 +758,9 @@ AC_SUBST([MESA_LLVM])
 PKG_CHECK_MODULES([LIBDRM], [libdrm = $LIBDRM_REQUIRED],
   [have_libdrm=yes], [have_libdrm=no])
 
-if test x$enable_dri = xyes; then
-# DRI must be shared, I think
-if test $enable_static = yes; then
-AC_MSG_ERROR([Cannot use static libraries for DRI drivers])
-fi
-
-# not a hard requirement as swrast does not depend on it
-if test x$have_libdrm = xyes; then
-DRI_PC_REQ_PRIV=libdrm = $LIBDRM_REQUIRED
-fi
+# not a hard requirement as swrast does not depend on it
+if test x$enable_dri = xyes -a x$have_libdrm = xyes; then
+DRI_PC_REQ_PRIV=libdrm = $LIBDRM_REQUIRED
 fi
 
 dnl Direct rendering or just indirect rendering
@@ -1123,12 +1107,7 @@ x16|x32)
 esac
 
 if test x$enable_osmesa = xyes -o x$enable_gallium_osmesa = xyes; then
-# only link libraries with osmesa if shared
-if test $enable_static = no; then
-OSMESA_LIB_DEPS=-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS
-else
-OSMESA_LIB_DEPS=
-fi
+OSMESA_LIB_DEPS=-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS
 OSMESA_MESA_DEPS=
 OSMESA_PC_LIB_PRIV=-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS
 fi
@@ -1176,18 +1155,14 @@ if test x$enable_egl = xyes; then
 
 AC_CHECK_FUNC(mincore, [DEFINES=$DEFINES -DHAVE_MINCORE])
 
-if test $enable_static != yes; then
-# build egl_glx when libGL is built
-PKG_CHECK_MODULES([LIBUDEV], [libudev  150],
-  [have_libudev=yes],[have_libudev=no])
-if test $have_libudev = yes; then
-DEFINES=$DEFINES -DHAVE_LIBUDEV
-fi
-
-if test x$enable_dri = xyes; then
-   HAVE_EGL_DRIVER_DRI2=1
-   fi
-
+# build egl_glx when libGL is built
+PKG_CHECK_MODULES([LIBUDEV], [libudev  150],
+  [have_libudev=yes],[have_libudev=no])
+if test $have_libudev = yes; then
+

[Mesa-dev] [PATCH 08/21] Drop last parts of compatibility for the old Mesa build system.

2013-09-11 Thread Johannes Obermayr
---
 src/egl/main/Makefile.am   |  7 ---
 src/gallium/targets/dri-freedreno/Makefile.am  |  7 ---
 src/gallium/targets/dri-i915/Makefile.am   |  6 --
 src/gallium/targets/dri-ilo/Makefile.am|  7 ---
 src/gallium/targets/dri-nouveau/Makefile.am|  6 --
 src/gallium/targets/dri-r300/Makefile.am   |  6 --
 src/gallium/targets/dri-r600/Makefile.am   |  6 --
 src/gallium/targets/dri-radeonsi/Makefile.am   |  6 --
 src/gallium/targets/dri-swrast/Makefile.am |  6 --
 src/gallium/targets/dri-vmwgfx/Makefile.am |  6 --
 src/gallium/targets/egl-static/Makefile.am | 20 
 src/gallium/targets/libgl-xlib/Makefile.am |  6 --
 src/gallium/targets/opencl/Makefile.am |  6 --
 src/gallium/targets/vdpau-nouveau/Makefile.am  |  6 --
 src/gallium/targets/vdpau-r300/Makefile.am |  6 --
 src/gallium/targets/vdpau-r600/Makefile.am |  6 --
 src/gallium/targets/vdpau-radeonsi/Makefile.am |  6 --
 src/gallium/targets/vdpau-softpipe/Makefile.am |  6 --
 src/gallium/targets/xa-vmwgfx/Makefile.am  |  6 --
 src/gallium/targets/xorg-i915/Makefile.am  |  6 --
 src/gallium/targets/xorg-nouveau/Makefile.am   |  6 --
 src/gallium/targets/xorg-r600/Makefile.am  |  6 --
 src/gallium/targets/xorg-radeonsi/Makefile.am  |  6 --
 src/gallium/targets/xvmc-nouveau/Makefile.am   |  6 --
 src/gallium/targets/xvmc-r300/Makefile.am  |  6 --
 src/gallium/targets/xvmc-r600/Makefile.am  |  6 --
 src/gallium/targets/xvmc-softpipe/Makefile.am  |  6 --
 src/gbm/Makefile.am|  4 
 src/glx/Makefile.am|  7 ---
 src/mapi/es1api/Makefile.am|  8 
 src/mapi/es2api/Makefile.am|  8 
 src/mapi/shared-glapi/Makefile.am  |  6 --
 src/mapi/vgapi/Makefile.am |  8 
 src/mesa/drivers/dri/i915/Makefile.am  |  6 --
 src/mesa/drivers/dri/i965/Makefile.am  |  6 --
 src/mesa/drivers/dri/nouveau/Makefile.am   |  6 --
 src/mesa/drivers/dri/r200/Makefile.am  |  6 --
 src/mesa/drivers/dri/radeon/Makefile.am|  6 --
 src/mesa/drivers/dri/swrast/Makefile.am|  6 --
 src/mesa/drivers/osmesa/Makefile.am| 10 --
 src/mesa/drivers/x11/Makefile.am   |  9 -
 src/mesa/libdricore/Makefile.am| 13 -
 42 files changed, 288 deletions(-)

diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index 87bf999..b81aeb5 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -116,13 +116,6 @@ libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
 libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
 endif
 
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: libEGL.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
-   ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
-   ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
-
 pkgconfigdir = $(libdir)/pkgconfig
 
 pkgconfig_DATA = egl.pc
diff --git a/src/gallium/targets/dri-freedreno/Makefile.am 
b/src/gallium/targets/dri-freedreno/Makefile.am
index b46e9b0..ac27969 100644
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ b/src/gallium/targets/dri-freedreno/Makefile.am
@@ -67,10 +67,3 @@ kgsl_dri_la_LIBADD  = $(COMMON_LIBADD)
 msm_dri_la_SOURCES  = target-msm.c
 msm_dri_la_LDFLAGS  = $(COMMON_LDFLAGS)
 msm_dri_la_LIBADD   = $(COMMON_LIBADD)
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: kgsl_dri.la msm_dri.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
-   ln -f .libs/kgsl_dri.so $(top_builddir)/$(LIB_DIR)/gallium/kgsl_dri.so
-   ln -f .libs/msm_dri.so $(top_builddir)/$(LIB_DIR)/gallium/msm_dri.so
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index d9ac274..4ef587b 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -67,9 +67,3 @@ if HAVE_MESA_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
 i915_dri_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
 endif
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: i915_dri.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
-   ln -f .libs/i915_dri.so $(top_builddir)/$(LIB_DIR)/gallium/i915_dri.so
diff --git a/src/gallium/targets/dri-ilo/Makefile.am 
b/src/gallium/targets/dri-ilo/Makefile.am
index 8273c3b..45cd928 100644
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ 

[Mesa-dev] [PATCH 12/21] Also do it for egl_gallium.so, pipe_*.so and gbm_gallium_drm.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac  |  7 ---
 src/egl/main/Makefile.am  |  2 +-
 src/gallium/state_trackers/clover/Makefile.am |  2 +-
 src/gallium/targets/egl-static/Makefile.am|  3 +--
 src/gallium/targets/gbm/Makefile.am   |  6 ++
 src/gallium/targets/pipe-loader/Makefile.am   | 19 +--
 src/gbm/Makefile.am   |  2 +-
 7 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/configure.ac b/configure.ac
index a4e11d5..1a98626 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1459,13 +1459,6 @@ if ! echo $egl_platforms | grep -q 'x11'; then
 GL_PC_CFLAGS=$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS
 fi
 
-AC_ARG_WITH([egl-driver-dir],
-[AS_HELP_STRING([--with-egl-driver-dir=DIR],
-[directory for EGL drivers [[default=${libdir}/egl]]])],
-[EGL_DRIVER_INSTALL_DIR=$withval],
-[EGL_DRIVER_INSTALL_DIR='${libdir}/egl'])
-AC_SUBST([EGL_DRIVER_INSTALL_DIR])
-
 AC_ARG_WITH([xorg-driver-dir],
 [AS_HELP_STRING([--with-xorg-driver-dir=DIR],
 [Default xorg driver 
directory[[default=${libdir}/xorg/modules/drivers]]])],
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index b81aeb5..8dc688e 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -30,7 +30,7 @@ AM_CFLAGS = \
$(VISIBILITY_CFLAGS) \
$(EGL_CFLAGS) \
-D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \
-   -D_EGL_DRIVER_SEARCH_DIR=\$(EGL_DRIVER_INSTALL_DIR)\ \
+   -D_EGL_DRIVER_SEARCH_DIR=\$(mesalibdir)\ \
-D_EGL_OS_UNIX=1
 
 lib_LTLIBRARIES = libEGL.la
diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index b4c197a..fd38766 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 
 AM_CPPFLAGS = \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-   -DPIPE_SEARCH_DIR=\$(libdir)/gallium-pipe\ \
+   -DPIPE_SEARCH_DIR=\$(mesalibdir)\ \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/drivers \
diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index 84e9463..5b000f2 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -42,8 +42,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/egl/main \
-D_EGL_MAIN=_eglMain
 
-egldir = $(EGL_DRIVER_INSTALL_DIR)
-egl_LTLIBRARIES = egl_gallium.la
+mesalib_LTLIBRARIES = egl_gallium.la
 
 nodist_EXTRA_egl_gallium_la_SOURCES = dummy.cpp
 egl_gallium_la_SOURCES = \
diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index 02ba233..0be49eb 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -22,22 +22,20 @@
 
 include $(top_srcdir)/src/gallium/Automake.inc
 
-gbmdir = $(libdir)/gbm
-
 AM_CPPFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/state_trackers/gbm \
-I$(top_srcdir)/src/gbm/main \
-I$(top_srcdir)/src/gallium/winsys \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-   -DPIPE_SEARCH_DIR=\$(libdir)/gallium-pipe\
+   -DPIPE_SEARCH_DIR=\$(mesalibdir)\
 
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(LIBUDEV_CFLAGS) \
$(LIBDRM_CFLAGS)
 
-gbm_LTLIBRARIES = gbm_gallium_drm.la
+mesalib_LTLIBRARIES = gbm_gallium_drm.la
 
 gbm_gallium_drm_la_SOURCES = gbm.c
 
diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 5461fc1..af668de 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -32,8 +32,7 @@ AM_CPPFLAGS = \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
 
-pipedir = $(libdir)/gallium-pipe
-pipe_LTLIBRARIES =
+mesalib_LTLIBRARIES =
 
 PIPE_LIBS = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
@@ -46,7 +45,7 @@ PIPE_LIBS = \
-lm
 
 if HAVE_GALLIUM_I915
-pipe_LTLIBRARIES += pipe_i915.la
+mesalib_LTLIBRARIES += pipe_i915.la
 pipe_i915_la_SOURCES = pipe_i915.c
 pipe_i915_la_LIBADD = \
$(PIPE_LIBS) \
@@ -58,7 +57,7 @@ pipe_i915_la_LDFLAGS = -Wl,--no-undefined -shared -module 
-avoid-version
 endif
 
 if HAVE_GALLIUM_NOUVEAU
-pipe_LTLIBRARIES += pipe_nouveau.la
+mesalib_LTLIBRARIES += pipe_nouveau.la
 pipe_nouveau_la_SOURCES = pipe_nouveau.c
 pipe_nouveau_la_LIBADD = \
$(PIPE_LIBS) \
@@ -69,7 +68,7 @@ pipe_nouveau_la_LDFLAGS = -Wl,--no-undefined -shared -module 
-avoid-version
 endif
 
 if HAVE_GALLIUM_R300
-pipe_LTLIBRARIES += pipe_r300.la
+mesalib_LTLIBRARIES += pipe_r300.la
 pipe_r300_la_SOURCES = pipe_r300.c
 pipe_r300_la_LIBADD = \
$(PIPE_LIBS) \
@@ -82,7 +81,7 @@ pipe_r300_la_LDFLAGS = -Wl,--no-undefined -shared -module 
-avoid-version
 endif
 
 if HAVE_GALLIUM_R600

[Mesa-dev] [PATCH 11/21] Install all internal shared libs to $(libdir)/mesa-$VERSION.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac   | 12 +---
 src/egl/drivers/dri2/egl_dri2.c|  4 ---
 src/gallium/auxiliary/Makefile.am  | 14 +-
 src/gallium/drivers/llvmpipe/Makefile.am   |  2 +-
 src/gallium/targets/egl-static/Makefile.am |  6 ++--
 src/gallium/targets/gbm/Makefile.am|  2 +-
 src/gallium/targets/opencl/Makefile.am |  2 +-
 src/gallium/targets/pipe-loader/Makefile.am|  2 +-
 src/gallium/targets/vdpau-nouveau/Makefile.am  |  2 +-
 src/gallium/targets/vdpau-r300/Makefile.am |  2 +-
 src/gallium/targets/vdpau-r600/Makefile.am |  2 +-
 src/gallium/targets/vdpau-radeonsi/Makefile.am |  2 +-
 src/gallium/targets/vdpau-softpipe/Makefile.am |  2 +-
 src/gallium/targets/xa-vmwgfx/Makefile.am  |  2 +-
 src/gallium/targets/xorg-i915/Makefile.am  |  2 +-
 src/gallium/targets/xorg-nouveau/Makefile.am   |  2 +-
 src/gallium/targets/xorg-r600/Makefile.am  |  2 +-
 src/gallium/targets/xorg-radeonsi/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-nouveau/Makefile.am   |  2 +-
 src/gallium/targets/xvmc-r300/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-r600/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-softpipe/Makefile.am  |  2 +-
 src/gallium/tests/trivial/Makefile.am  |  2 +-
 src/gallium/tests/unit/Makefile.am |  2 +-
 src/mapi/shared-glapi/Makefile.am  |  2 +-
 src/mesa/Makefile.am   | 38 +-
 src/mesa/main/tests/Makefile.am|  2 +-
 src/mesa/main/tests/hash_table/Makefile.am |  2 +-
 28 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/configure.ac b/configure.ac
index 94815e6..a4e11d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,6 +146,10 @@ dnl LIB_DIR - library basename
 LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
 AC_SUBST([LIB_DIR])
 
+dnl Where to install internal libraries
+mesalibdir=\$(libdir)/mesa-${VERSION}
+AC_SUBST([mesalibdir])
+
 dnl Cache LDFLAGS and CPPFLAGS so we can add to them and restore later
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_CPPFLAGS=$CPPFLAGS
@@ -838,10 +842,10 @@ AC_SUBST([GLESv2_PC_LIB_PRIV])
 
 AC_SUBST([DRICOMMON_LIB], 
\$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la)
 
-LIBGALLIUM_LIB=\$(top_builddir)/src/gallium/auxiliary/libgallium${VERSION}.la
-MESACORE_LIB=\$(top_builddir)/src/mesa/libmesacore${VERSION}.la
-MESADRI_LIB=\$(top_builddir)/src/mesa/libmesadri${VERSION}.la
-MESAGALLIUM_LIB=\$(top_builddir)/src/mesa/libmesagallium${VERSION}.la
+LIBGALLIUM_LIB=\$(top_builddir)/src/gallium/auxiliary/libgallium.la
+MESACORE_LIB=\$(top_builddir)/src/mesa/libmesacore.la
+MESADRI_LIB=\$(top_builddir)/src/mesa/libmesadri.la
+MESAGALLIUM_LIB=\$(top_builddir)/src/mesa/libmesagallium.la
 DRI_LIB_DEPS=${MESACORE_LIB} ${MESADRI_LIB}
 AC_SUBST([LIBMESAGALLIUM_LIBS], ${MESACORE_LIB} ${MESAGALLIUM_LIB} 
${LIBGALLIUM_LIB})
 
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 04ab564..bc7bdc7 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -1916,12 +1916,8 @@ dri2_load(_EGLDriver *drv)
 {
struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
 #ifdef HAVE_SHARED_GLAPI
-#ifdef HAVE_ANDROID_PLATFORM
const char *libname = libglapi.so;
 #else
-   const char *libname = libglapi.so.0;
-#endif
-#else
/*
 * Both libGL.so and libglapi.so are glapi providers.  There is no way to
 * tell which one to load.
diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index acf1440..2826af9 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,11 +3,11 @@ AUTOMAKE_OPTIONS = subdir-objects
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-lib_LTLIBRARIES = libgallium@VERSION@.la
+mesalib_LTLIBRARIES = libgallium.la
 
-libgallium@VERSION@_la_LDFLAGS = -Wl,--no-undefined -shared -avoid-version
+libgallium_la_LDFLAGS = -Wl,--no-undefined -shared -avoid-version
 
-libgallium@VERSION@_la_LIBADD = $(DLOPEN_LIBS) $(CLOCK_LIB)
+libgallium_la_LIBADD = $(DLOPEN_LIBS) $(CLOCK_LIB)
 
 AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
@@ -16,7 +16,7 @@ AM_CFLAGS = \
 
 AM_CXXFLAGS = $(VISIBILITY_CXXFLAGS)
 
-libgallium@VERSION@_la_SOURCES = \
+libgallium_la_SOURCES = \
$(C_SOURCES) \
$(GENERATED_SOURCES)
 
@@ -32,14 +32,14 @@ if LLVM_NEEDS_FNORTTI
 AM_CXXFLAGS += -fno-rtti
 endif
 
-libgallium@VERSION@_la_SOURCES += \
+libgallium_la_SOURCES += \
$(GALLIVM_SOURCES) \
$(GALLIVM_CPP_SOURCES)
 
-libgallium@VERSION@_la_LDFLAGS += \
+libgallium_la_LDFLAGS += \
$(LLVM_LDFLAGS)
 
-libgallium@VERSION@_la_LIBADD += \
+libgallium_la_LIBADD += \
$(LLVM_GALLIUM_LIBS)
 endif
 
diff --git a/src/gallium/drivers/llvmpipe/Makefile.am 
b/src/gallium/drivers/llvmpipe/Makefile.am
index 1897483..e99a2b8 100644
--- a/src/gallium/drivers/llvmpipe/Makefile.am
+++ 

[Mesa-dev] [PATCH 13/21] Makefile.am: s:-no-undefined:-Wl, --no-undefined to make it work.

2013-09-11 Thread Johannes Obermayr
---
 src/gallium/targets/dri-freedreno/Makefile.am  |  2 +-
 src/gallium/targets/dri-i915/Makefile.am   |  2 +-
 src/gallium/targets/dri-ilo/Makefile.am|  2 +-
 src/gallium/targets/dri-nouveau/Makefile.am|  2 +-
 src/gallium/targets/dri-r300/Makefile.am   |  2 +-
 src/gallium/targets/dri-r600/Makefile.am   |  2 +-
 src/gallium/targets/dri-radeonsi/Makefile.am   |  2 +-
 src/gallium/targets/dri-swrast/Makefile.am |  2 +-
 src/gallium/targets/dri-vmwgfx/Makefile.am |  2 +-
 src/gallium/targets/gbm/Makefile.am|  4 +--
 src/gallium/targets/libgl-xlib/Makefile.am |  2 +-
 src/gallium/targets/opencl/Makefile.am |  2 ++
 src/gallium/targets/vdpau-nouveau/Makefile.am  |  2 +-
 src/gallium/targets/vdpau-r300/Makefile.am |  2 +-
 src/gallium/targets/vdpau-r600/Makefile.am |  2 +-
 src/gallium/targets/vdpau-radeonsi/Makefile.am |  2 +-
 src/gallium/targets/vdpau-softpipe/Makefile.am | 10 +---
 src/gallium/targets/vdpau-softpipe/target.c| 35 ++
 src/gallium/targets/xorg-i915/Makefile.am  |  2 +-
 src/gallium/targets/xorg-nouveau/Makefile.am   |  2 +-
 src/gallium/targets/xorg-r600/Makefile.am  |  2 +-
 src/gallium/targets/xorg-radeonsi/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-nouveau/Makefile.am   |  2 +-
 src/gallium/targets/xvmc-r300/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-r600/Makefile.am  |  2 +-
 src/gallium/targets/xvmc-softpipe/Makefile.am  |  2 +-
 src/glx/Makefile.am|  5 +---
 src/mesa/drivers/x11/Makefile.am   |  5 ++--
 28 files changed, 72 insertions(+), 33 deletions(-)
 create mode 100644 src/gallium/targets/vdpau-softpipe/target.c

diff --git a/src/gallium/targets/dri-freedreno/Makefile.am 
b/src/gallium/targets/dri-freedreno/Makefile.am
index ac27969..b549ec1 100644
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ b/src/gallium/targets/dri-freedreno/Makefile.am
@@ -39,7 +39,7 @@ AM_CPPFLAGS = \
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 dri_LTLIBRARIES = kgsl_dri.la msm_dri.la
 
-COMMON_LDFLAGS = -module -avoid-version -shared -no-undefined
+COMMON_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared
 
 COMMON_LIBADD = \
$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index 113cbbd..7ad3ff5 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -44,7 +44,7 @@ dri_LTLIBRARIES = i915_dri.la
 
 i915_dri_la_SOURCES = target.c
 
-i915_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
+i915_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared
 
 i915_dri_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-ilo/Makefile.am 
b/src/gallium/targets/dri-ilo/Makefile.am
index c7ab9bf..89f3a77 100644
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ b/src/gallium/targets/dri-ilo/Makefile.am
@@ -42,7 +42,7 @@ noinst_LTLIBRARIES = ilo_dri.la
 ilo_dri_la_SOURCES = target.c
 
 # need -rpath to create a noinst shared library
-ilo_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined \
+ilo_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared \
 -rpath $(abs_builddir)
 
 ilo_dri_la_LIBADD = \
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am 
b/src/gallium/targets/dri-nouveau/Makefile.am
index 1e1487f..8402320 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -42,7 +42,7 @@ nodist_EXTRA_nouveau_dri_la_SOURCES = dummy.cpp
 
 nouveau_dri_la_SOURCES = target.c
 
-nouveau_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
+nouveau_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared
 
 nouveau_dri_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-r300/Makefile.am 
b/src/gallium/targets/dri-r300/Makefile.am
index 88b6846..691dfb3 100644
--- a/src/gallium/targets/dri-r300/Makefile.am
+++ b/src/gallium/targets/dri-r300/Makefile.am
@@ -42,7 +42,7 @@ dri_LTLIBRARIES = r300_dri.la
 nodist_EXTRA_r300_dri_la_SOURCES = dummy.cpp
 r300_dri_la_SOURCES = target.c
 
-r300_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
+r300_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared
 
 r300_dri_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
diff --git a/src/gallium/targets/dri-r600/Makefile.am 
b/src/gallium/targets/dri-r600/Makefile.am
index 1e3e4d2..2ad460f 100644
--- a/src/gallium/targets/dri-r600/Makefile.am
+++ b/src/gallium/targets/dri-r600/Makefile.am
@@ -42,7 +42,7 @@ dri_LTLIBRARIES = r600_dri.la
 
 r600_dri_la_SOURCES = target.c
 
-r600_dri_la_LDFLAGS = -module -avoid-version -shared -no-undefined
+r600_dri_la_LDFLAGS = 

[Mesa-dev] [PATCH 16/21] glx: Get rid of libglx.la.

2013-09-11 Thread Johannes Obermayr
---
 src/glx/Makefile.am   | 15 ---
 src/glx/tests/Makefile.am |  2 +-
 2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index b855be9..1914467 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -19,7 +19,7 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-SUBDIRS=. tests
+SUBDIRS= . tests
 
 AM_CFLAGS = \
-I$(top_srcdir)/include \
@@ -46,9 +46,7 @@ endif
 
 lib_LTLIBRARIES = lib@GL_LIB@.la
 
-noinst_LTLIBRARIES = libglx.la
-
-libglx_la_SOURCES = \
+lib@GL_LIB@_la_SOURCES = \
  clientattrib.c \
  clientinfo.c \
  compsize.c \
@@ -88,14 +86,9 @@ libglx_la_SOURCES = \
  dri2.c \
  applegl_glx.c
 
-GL_LIBS = \
-   libglx.la \
+lib@GL_LIB@_la_LIBADD = \
$(top_builddir)/src/mapi/glapi/libglapi.la \
$(GLAPI_LIB) \
$(GL_LIB_DEPS)
 
-GL_LDFLAGS = -Wl,--no-undefined -Wl,-Bsymbolic -shared -version-number 1:2
-
-lib@GL_LIB@_la_SOURCES =
-lib@GL_LIB@_la_LIBADD = $(GL_LIBS)
-lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS)
+lib@GL_LIB@_la_LDFLAGS = -Wl,--no-undefined -Wl,-Bsymbolic -shared 
-version-number 1:2
diff --git a/src/glx/tests/Makefile.am b/src/glx/tests/Makefile.am
index 494b50a..11f6b25 100644
--- a/src/glx/tests/Makefile.am
+++ b/src/glx/tests/Makefile.am
@@ -18,7 +18,7 @@ glx_test_SOURCES =\
indirect_api.cpp
 
 glx_test_LDADD = \
-   $(top_builddir)/src/glx/libglx.la \
+   $(top_builddir)/src/glx/lib@GL_LIB@.la \
$(top_builddir)/src/gtest/libgtest.la \
$(GLAPI_LIB) \
$(PTHREAD_LIBS)
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 15/21] vdpau, xvmc: Add install-data-hooks to remove unneccessary symlinks.

2013-09-11 Thread Johannes Obermayr
libvdpau_*.so.1 and libXvMC*.so libs are dlopened by wrappers.
So only those libs should be installed.
---
 src/gallium/targets/vdpau-nouveau/Makefile.am  | 5 +
 src/gallium/targets/vdpau-r300/Makefile.am | 5 +
 src/gallium/targets/vdpau-r600/Makefile.am | 5 +
 src/gallium/targets/vdpau-radeonsi/Makefile.am | 5 +
 src/gallium/targets/vdpau-softpipe/Makefile.am | 5 +
 src/gallium/targets/xvmc-nouveau/Makefile.am   | 5 +
 src/gallium/targets/xvmc-r300/Makefile.am  | 5 +
 src/gallium/targets/xvmc-r600/Makefile.am  | 5 +
 src/gallium/targets/xvmc-softpipe/Makefile.am  | 5 +
 9 files changed, 45 insertions(+)

diff --git a/src/gallium/targets/vdpau-nouveau/Makefile.am 
b/src/gallium/targets/vdpau-nouveau/Makefile.am
index e9c4d33..e6ac32d 100644
--- a/src/gallium/targets/vdpau-nouveau/Makefile.am
+++ b/src/gallium/targets/vdpau-nouveau/Makefile.am
@@ -54,3 +54,8 @@ libvdpau_nouveau_la_LIBADD = \
$(VDPAU_LIBS) \
$(LIBDRM_LIBS) \
$(NOUVEAU_LIBS)
+
+install-data-hook:
+   mv 
$(DESTDIR)$(vdpaudir)/libvdpau_nouveau.so.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \
+   $(DESTDIR)$(vdpaudir)/libvdpau_nouveau.so.$(VDPAU_MAJOR)  \
+   rm -f $(DESTDIR)$(vdpaudir)/libvdpau_nouveau.so
diff --git a/src/gallium/targets/vdpau-r300/Makefile.am 
b/src/gallium/targets/vdpau-r300/Makefile.am
index 5e124b0..c220da0 100644
--- a/src/gallium/targets/vdpau-r300/Makefile.am
+++ b/src/gallium/targets/vdpau-r300/Makefile.am
@@ -54,3 +54,8 @@ libvdpau_r300_la_LIBADD = \
$(VDPAU_LIBS) \
$(LIBDRM_LIBS) \
$(RADEON_LIBS)
+
+install-data-hook:
+   mv 
$(DESTDIR)$(vdpaudir)/libvdpau_r300.so.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \
+   $(DESTDIR)$(vdpaudir)/libvdpau_r300.so.$(VDPAU_MAJOR)  \
+   rm -f $(DESTDIR)$(vdpaudir)/libvdpau_r300.so
diff --git a/src/gallium/targets/vdpau-r600/Makefile.am 
b/src/gallium/targets/vdpau-r600/Makefile.am
index 527edd6..949c686 100644
--- a/src/gallium/targets/vdpau-r600/Makefile.am
+++ b/src/gallium/targets/vdpau-r600/Makefile.am
@@ -52,3 +52,8 @@ libvdpau_r600_la_LIBADD = \
$(VDPAU_LIBS) \
$(LIBDRM_LIBS) \
$(RADEON_LIBS)
+
+install-data-hook:
+   mv 
$(DESTDIR)$(vdpaudir)/libvdpau_r600.so.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \
+   $(DESTDIR)$(vdpaudir)/libvdpau_r600.so.$(VDPAU_MAJOR)  \
+   rm -f $(DESTDIR)$(vdpaudir)/libvdpau_r600.so
diff --git a/src/gallium/targets/vdpau-radeonsi/Makefile.am 
b/src/gallium/targets/vdpau-radeonsi/Makefile.am
index 073c885..fb135f3 100644
--- a/src/gallium/targets/vdpau-radeonsi/Makefile.am
+++ b/src/gallium/targets/vdpau-radeonsi/Makefile.am
@@ -53,3 +53,8 @@ libvdpau_radeonsi_la_LIBADD = \
$(VDPAU_LIBS) \
$(LIBDRM_LIBS) \
$(RADEON_LIBS)
+
+install-data-hook:
+   mv 
$(DESTDIR)$(vdpaudir)/libvdpau_radeonsi.so.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \
+   $(DESTDIR)$(vdpaudir)/libvdpau_radeonsi.so.$(VDPAU_MAJOR)  \
+   rm -f $(DESTDIR)$(vdpaudir)/libvdpau_radeonsi.so
diff --git a/src/gallium/targets/vdpau-softpipe/Makefile.am 
b/src/gallium/targets/vdpau-softpipe/Makefile.am
index 20ffb6e..2d772d3 100644
--- a/src/gallium/targets/vdpau-softpipe/Makefile.am
+++ b/src/gallium/targets/vdpau-softpipe/Makefile.am
@@ -62,3 +62,8 @@ if HAVE_MESA_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
 libvdpau_softpipe_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
 endif
+
+install-data-hook:
+   mv 
$(DESTDIR)$(vdpaudir)/libvdpau_softpipe.so.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \
+   $(DESTDIR)$(vdpaudir)/libvdpau_softpipe.so.$(VDPAU_MAJOR)  \
+   rm -f $(DESTDIR)$(vdpaudir)/libvdpau_softpipe.so
diff --git a/src/gallium/targets/xvmc-nouveau/Makefile.am 
b/src/gallium/targets/xvmc-nouveau/Makefile.am
index 0d5ebe3..0a97d8a 100644
--- a/src/gallium/targets/xvmc-nouveau/Makefile.am
+++ b/src/gallium/targets/xvmc-nouveau/Makefile.am
@@ -52,3 +52,8 @@ libXvMCnouveau_la_LIBADD = \
$(XVMC_LIBS) \
$(LIBDRM_LIBS) \
$(NOUVEAU_LIBS)
+
+install-data-hook:
+   mv $(DESTDIR)$(xvmcdir)/libXvMCnouveau.so.$(XVMC_MAJOR).$(XVMC_MINOR).0 
\
+   $(DESTDIR)$(xvmcdir)/libXvMCnouveau.so  \
+   rm -f $(DESTDIR)$(xvmcdir)/libXvMCnouveau.so.$(XVMC_MAJOR)
diff --git a/src/gallium/targets/xvmc-r300/Makefile.am 
b/src/gallium/targets/xvmc-r300/Makefile.am
index b7dc95a..b662d10 100644
--- a/src/gallium/targets/xvmc-r300/Makefile.am
+++ b/src/gallium/targets/xvmc-r300/Makefile.am
@@ -60,3 +60,8 @@ libXvMCr300_la_LIBADD = \
 if HAVE_MESA_LLVM
 libXvMCr300_la_LDFLAGS += $(LLVM_LDFLAGS)
 endif
+
+install-data-hook:
+   mv $(DESTDIR)$(xvmcdir)/libXvMCr300.so.$(XVMC_MAJOR).$(XVMC_MINOR).0 \
+   $(DESTDIR)$(xvmcdir)/libXvMCr300.so  \
+   rm -f $(DESTDIR)$(xvmcdir)/libXvMCr300.so.$(XVMC_MAJOR)
diff --git a/src/gallium/targets/xvmc-r600/Makefile.am 
b/src/gallium/targets/xvmc-r600/Makefile.am
index 15526d8..86eb72a 100644
--- a/src/gallium/targets/xvmc-r600/Makefile.am
+++ 

[Mesa-dev] [PATCH 18/21] i915: Conditionally build an i915g driver instead of two i915 drivers.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac |  5 +
 src/gallium/targets/dri-i915/Makefile.am | 15 +++
 src/gallium/targets/dri-i915/target.c|  2 +-
 src/gallium/targets/egl-static/Makefile.am   |  4 +++-
 src/gallium/targets/egl-static/egl.c |  2 +-
 src/gallium/targets/egl-static/egl_pipe.c|  2 +-
 src/gallium/targets/pipe-loader/Makefile.am  | 11 ++-
 src/gallium/targets/pipe-loader/pipe_i915.c  |  2 +-
 src/gallium/targets/xorg-i915/Makefile.am| 16 +---
 src/gallium/targets/xorg-i915/intel_target.c |  2 +-
 src/gallium/targets/xorg-i915/intel_xorg.c   |  4 ++--
 11 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/configure.ac b/configure.ac
index 383150a..c600051 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1702,6 +1702,7 @@ fi
 AM_CONDITIONAL(NEED_NONNULL_WINSYS, test x$NEED_NONNULL_WINSYS = xyes)
 
 dnl Duplicates in GALLIUM_DRIVERS_DIRS are removed by sorting it after this 
block
+GALLIUM_I915_NAME=i915
 if test x$with_gallium_drivers != x; then
 gallium_drivers=`IFS=', '; echo $with_gallium_drivers`
 for driver in $gallium_drivers; do
@@ -1712,6 +1713,9 @@ if test x$with_gallium_drivers != x; then
 gallium_check_st svga/drm dri-vmwgfx  xa-vmwgfx
 ;;
 xi915)
+if test x$HAVE_I915_DRI = xyes; then
+GALLIUM_I915_NAME=i915g
+fi
 HAVE_GALLIUM_I915=yes
 PKG_CHECK_MODULES([INTEL], [libdrm_intel = 
$LIBDRM_INTEL_REQUIRED])
 GALLIUM_DRIVERS_DIRS=$GALLIUM_DRIVERS_DIRS i915 softpipe
@@ -1804,6 +1808,7 @@ if test x$with_gallium_drivers != x; then
 esac
 done
 fi
+AC_SUBST([GALLIUM_I915_NAME])
 
 function strip_llvm_libs() {
 _libs=`$2`
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index 7ad3ff5..5f54bf3 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -25,7 +25,8 @@ include $(top_srcdir)/src/gallium/Automake.inc
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(PTHREAD_CFLAGS) \
-   $(LIBDRM_CFLAGS)
+   $(LIBDRM_CFLAGS) \
+   -DI915_NAME=\@GALLIUM_I915_NAME@\
 
 AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/drivers \
@@ -40,13 +41,13 @@ AM_CPPFLAGS = \
 
 dridir = $(DRI_DRIVER_INSTALL_DIR)
 
-dri_LTLIBRARIES = i915_dri.la
+dri_LTLIBRARIES = @GALLIUM_I915_NAME@_dri.la
 
-i915_dri_la_SOURCES = target.c
+@GALLIUM_I915_NAME@_dri_la_SOURCES = target.c
 
-i915_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version -shared
+@GALLIUM_I915_NAME@_dri_la_LDFLAGS = -Wl,--no-undefined -module -avoid-version 
-shared
 
-i915_dri_la_LIBADD = \
+@GALLIUM_I915_NAME@_dri_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/dri/drm/libdridrm.la \
$(top_builddir)/src/gallium/winsys/i915/drm/libi915drm.la \
$(top_builddir)/src/gallium/winsys/sw/wrapper/libwsw.la \
@@ -60,9 +61,7 @@ i915_dri_la_LIBADD = \
$(GALLIUM_DRI_LIB_DEPS) \
$(INTEL_LIBS)
 
-nodist_EXTRA_i915_dri_la_SOURCES = dummy.cpp
-
 if HAVE_MESA_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
-i915_dri_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
+@GALLIUM_I915_NAME@_dri_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
 endif
diff --git a/src/gallium/targets/dri-i915/target.c 
b/src/gallium/targets/dri-i915/target.c
index 935eb0e..05dc254 100644
--- a/src/gallium/targets/dri-i915/target.c
+++ b/src/gallium/targets/dri-i915/target.c
@@ -26,4 +26,4 @@ create_screen(int fd)
return screen;
 }
 
-DRM_DRIVER_DESCRIPTOR(i915, i915, create_screen, NULL)
+DRM_DRIVER_DESCRIPTOR(I915_NAME, i915, create_screen, NULL)
diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index 015133c..daec14c 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -30,7 +30,9 @@
 #
 include $(top_srcdir)/src/gallium/Automake.inc
 
-AM_CFLAGS = $(PTHREAD_CFLAGS)
+AM_CFLAGS = $(PTHREAD_CFLAGS) \
+   -DI915_NAME=\@GALLIUM_I915_NAME@\
+
 AM_CPPFLAGS = \
$(GALLIUM_CFLAGS) \
-I$(top_srcdir)/include \
diff --git a/src/gallium/targets/egl-static/egl.c 
b/src/gallium/targets/egl-static/egl.c
index 0b59bdb..1af7c43 100644
--- a/src/gallium/targets/egl-static/egl.c
+++ b/src/gallium/targets/egl-static/egl.c
@@ -136,7 +136,7 @@ drm_fd_get_pci_id(int fd, int *vendor_id, int *chip_id)
   return FALSE;
}
 
-   if (util_strcmp(version-name, i915) == 0) {
+   if (util_strcmp(version-name, I915_NAME) == 0) {
   struct drm_i915_getparam gp;
   int ret;
 
diff --git a/src/gallium/targets/egl-static/egl_pipe.c 
b/src/gallium/targets/egl-static/egl_pipe.c
index e5100c1..f6bc188 100644
--- a/src/gallium/targets/egl-static/egl_pipe.c
+++ b/src/gallium/targets/egl-static/egl_pipe.c
@@ -227,7 +227,7 @@ pipe_freedreno_create_screen(int fd)
 struct 

[Mesa-dev] [PATCH 14/21] gallium/drivers: Build libs -shared.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac | 20 +
 src/gallium/drivers/Makefile.am  | 28 +++-
 src/gallium/drivers/freedreno/Makefile.am| 10 ++---
 src/gallium/drivers/freedreno/freedreno_screen.c |  2 ++
 src/gallium/drivers/galahad/glhd_screen.c|  2 ++
 src/gallium/drivers/i915/Makefile.am |  8 ++-
 src/gallium/drivers/i915/i915_debug.c|  3 ++-
 src/gallium/drivers/i915/i915_screen.c   |  3 +++
 src/gallium/drivers/identity/id_screen.c |  2 ++
 src/gallium/drivers/ilo/Makefile.am  | 22 +++
 src/gallium/drivers/ilo/ilo_screen.c |  3 +++
 src/gallium/drivers/llvmpipe/Makefile.am | 10 +++--
 src/gallium/drivers/noop/noop_pipe.c |  2 ++
 src/gallium/drivers/nouveau/Makefile.am  |  8 ++-
 src/gallium/drivers/nouveau/nv30/nv30_screen.c   |  3 +++
 src/gallium/drivers/nouveau/nv50/nv50_screen.c   |  2 ++
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c   |  2 ++
 src/gallium/drivers/r300/Makefile.am | 13 ++-
 src/gallium/drivers/r300/r300_screen.c   |  4 
 src/gallium/drivers/r600/Makefile.am | 17 --
 src/gallium/drivers/r600/r600_pipe.c |  2 ++
 src/gallium/drivers/radeonsi/Makefile.am | 16 --
 src/gallium/drivers/radeonsi/radeonsi_pipe.c |  2 ++
 src/gallium/drivers/rbug/Makefile.am | 13 ---
 src/gallium/drivers/rbug/rbug_screen.c   |  2 ++
 src/gallium/drivers/softpipe/Makefile.am |  8 ++-
 src/gallium/drivers/svga/Makefile.am |  9 +---
 src/gallium/drivers/svga/svga_screen.c   |  4 
 src/gallium/drivers/trace/Makefile.am| 11 +++---
 src/gallium/drivers/trace/tr_screen.c|  3 +++
 src/gallium/targets/dri-freedreno/Makefile.am|  7 ++
 src/gallium/targets/dri-r600/Makefile.am |  2 --
 src/gallium/targets/dri-radeonsi/Makefile.am |  2 --
 src/gallium/targets/dri-swrast/Makefile.am   |  4 +++-
 src/gallium/targets/egl-static/Makefile.am   |  9 +---
 src/gallium/targets/pipe-loader/Makefile.am  |  4 
 src/gallium/targets/vdpau-r300/Makefile.am   |  3 ---
 src/gallium/targets/vdpau-r600/Makefile.am   |  3 ---
 src/gallium/targets/vdpau-radeonsi/Makefile.am   |  5 -
 src/gallium/targets/vdpau-softpipe/Makefile.am   |  6 ++---
 src/gallium/targets/xorg-r600/Makefile.am|  2 --
 src/gallium/targets/xorg-radeonsi/Makefile.am|  2 --
 src/gallium/targets/xvmc-r600/Makefile.am|  2 --
 src/gallium/targets/xvmc-softpipe/Makefile.am|  3 ++-
 44 files changed, 216 insertions(+), 72 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1a98626..383150a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1838,6 +1838,16 @@ if test x$ac_cv_lib__llvm_one_shared_lib = xyes; then
 if test -n $LLVM_GALLIUM_COMPONENTS; then
 LLVM_GALLIUM_LIBS=-l$LLVM_SO_NAME
 fi
+if test -n $LLVM_OPENCL_COMPONENTS; then
+LLVM_OPENCL_LIBS=-l$LLVM_SO_NAME
+fi
+if test -n $LLVM_RADEON_COMPONENTS; then
+LLVM_RADEON_LIBS=-l$LLVM_SO_NAME
+fi
+if test -n $LLVM_R600_COMPONENTS; then
+LLVM_R600_LIBS=-l$LLVM_SO_NAME
+fi
+LLVM_LLVMPIPE_LIBS=-l$LLVM_SO_NAME
 else
 if test -n $LLVM_GALLIUM_COMPONENTS; then
 LLVM_GALLIUM_LIBS=`$LLVM_CONFIG --libs $LLVM_GALLIUM_COMPONENTS`
@@ -1855,6 +1865,7 @@ else
 LLVM_R600_LIBS=`strip_llvm_libs $LLVM_GALLIUM_LIBS $LLVM_CONFIG 
--libs $LLVM_R600_COMPONENTS`
 fi
 fi
+LLVM_LLVMPIPE_LIBS=`$LLVM_CONFIG --libs core`
 fi
 fi
 
@@ -1862,6 +1873,7 @@ AC_SUBST([LLVM_GALLIUM_LIBS])
 AC_SUBST([LLVM_OPENCL_LIBS])
 AC_SUBST([LLVM_RADEON_LIBS])
 AC_SUBST([LLVM_R600_LIBS])
+AC_SUBST([LLVM_LLVMPIPE_LIBS])
 
 AM_CONDITIONAL(HAVE_GALLIUM_SVGA, test x$HAVE_GALLIUM_SVGA = xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_I915, test x$HAVE_GALLIUM_I915 = xyes)
@@ -1914,6 +1926,14 @@ AM_CONDITIONAL(NEED_WINSYS_WRAPPER, test 
x$HAVE_GALLIUM_I915 = xyes -o \
  x$HAVE_GALLIUM_SVGA = xyes)
 AM_CONDITIONAL(NEED_WINSYS_XLIB, test x$NEED_WINSYS_XLIB = xyes)
 AM_CONDITIONAL(NEED_RADEON_LLVM, test x$NEED_RADEON_LLVM = xyes)
+dnl Whether libr300-helper must be built
+NEED_R300_HELPER=no
+if test true  (echo $GALLIUM_TARGET_DIRS | \
+   grep -e pipe-loader -e vdpau-r300 -e xorg-r300 -e xvmc-r300); 
then
+NEED_R300_HELPER=yes
+fi
+AM_CONDITIONAL(NEED_R300_HELPER, test x$NEED_R300_HELPER = xyes)
+
 AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
 AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
 AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = 
xyes)
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
index 171d102..7b0808b 100644
--- 

[Mesa-dev] [PATCH 19/21] freedreno: Make print_sequence a macro to fix clang.

2013-09-11 Thread Johannes Obermayr
---
 src/gallium/drivers/freedreno/a3xx/disasm-a3xx.c | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a3xx/disasm-a3xx.c 
b/src/gallium/drivers/freedreno/a3xx/disasm-a3xx.c
index 4db095f..ed76a78 100644
--- a/src/gallium/drivers/freedreno/a3xx/disasm-a3xx.c
+++ b/src/gallium/drivers/freedreno/a3xx/disasm-a3xx.c
@@ -154,28 +154,26 @@ static struct {
regmask_t cnst; /* used consts */
 } regs;
 
+#define fd_print_sequence \
+   if (first != MAX_REG) { \
+   if (first == last) { \
+   printf( %d, first); \
+   } else { \
+   printf( %d-%d, first, last); \
+   } \
+   }
+
 static void print_regs(regmask_t *regmask, bool full)
 {
int num, max = 0, cnt = 0;
int first, last;
 
-   void print_sequence(void)
-   {
-   if (first != MAX_REG) {
-   if (first == last) {
-   printf( %d, first);
-   } else {
-   printf( %d-%d, first, last);
-   }
-   }
-   }
-
first = last = MAX_REG;
 
for (num = 0; num  MAX_REG; num++) {
if (regmask_get(regmask, num, full)) {
if (num != (last + 1)) {
-   print_sequence();
+   fd_print_sequence;
first = num;
}
last = num;
@@ -184,7 +182,7 @@ static void print_regs(regmask_t *regmask, bool full)
}
}
 
-   print_sequence();
+   fd_print_sequence;
 
printf( (cnt=%d, max=%d), cnt, max);
 }
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 17/21] gbm: Get rid of libgbm_dri.la.

2013-09-11 Thread Johannes Obermayr
---
 src/gbm/Makefile.am | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index 440d4e0..4859e7c 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -28,18 +28,15 @@ libgbm_la_LIBADD += 
$(top_builddir)/src/egl/wayland/wayland-drm/libwayland-drm.l
 endif
 
 if HAVE_DRI
-noinst_LTLIBRARIES = libgbm_dri.la
-libgbm_dri_la_SOURCES = \
+libgbm_la_SOURCES += \
backends/dri/gbm_dri.c \
backends/dri/driver_name.c
 
-libgbm_dri_la_CFLAGS = \
-   $(AM_CFLAGS) \
+AM_CFLAGS += \
-DDEFAULT_DRIVER_DIR='$(DRI_DRIVER_SEARCH_DIR)' \
$(LIBDRM_CFLAGS)
 
 libgbm_la_LIBADD += \
-   libgbm_dri.la \
$(GLAPI_LIB) \
$(LIBDRM_LIBS)
 endif
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 20/21] freedreno: One Makefile.am with a Makefile.sources is enough.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac   |  2 --
 src/gallium/drivers/freedreno/Makefile.am  | 18 +++
 src/gallium/drivers/freedreno/Makefile.sources | 43 ++
 src/gallium/drivers/freedreno/a2xx/Makefile.am | 27 
 src/gallium/drivers/freedreno/a3xx/Makefile.am | 27 
 5 files changed, 47 insertions(+), 70 deletions(-)
 create mode 100644 src/gallium/drivers/freedreno/Makefile.sources
 delete mode 100644 src/gallium/drivers/freedreno/a2xx/Makefile.am
 delete mode 100644 src/gallium/drivers/freedreno/a3xx/Makefile.am

diff --git a/configure.ac b/configure.ac
index c600051..2381cf0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2006,8 +2006,6 @@ AC_CONFIG_FILES([Makefile
src/gallium/auxiliary/pipe-loader/Makefile
src/gallium/drivers/Makefile
src/gallium/drivers/freedreno/Makefile
-   src/gallium/drivers/freedreno/a2xx/Makefile
-   src/gallium/drivers/freedreno/a3xx/Makefile
src/gallium/drivers/i915/Makefile
src/gallium/drivers/ilo/Makefile
src/gallium/drivers/llvmpipe/Makefile
diff --git a/src/gallium/drivers/freedreno/Makefile.am 
b/src/gallium/drivers/freedreno/Makefile.am
index 414eed5..7ce3620 100644
--- a/src/gallium/drivers/freedreno/Makefile.am
+++ b/src/gallium/drivers/freedreno/Makefile.am
@@ -1,3 +1,4 @@
+include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
 mesalib_LTLIBRARIES = libfreedreno.la
@@ -11,25 +12,14 @@ AM_CFLAGS = \
$(FREEDRENO_CFLAGS) \
$(VISIBILITY_CFLAGS)
 
-SUBDIRS = a2xx a3xx
-
 libfreedreno_la_LDFLAGS = \
-Wl,--no-undefined -shared -avoid-version
 
 libfreedreno_la_SOURCES = \
-   freedreno_util.c \
-   freedreno_fence.c \
-   freedreno_resource.c \
-   freedreno_surface.c \
-   freedreno_draw.c \
-   freedreno_state.c \
-   freedreno_texture.c \
-   freedreno_context.c \
-   freedreno_screen.c \
-   freedreno_gmem.c
+   $(C_SOURCES) \
+   $(A2XX_SOURCES) \
+   $(A3XX_SOURCES)
 
 libfreedreno_la_LIBADD = \
-   a3xx/libfd3xx.la \
-   a2xx/libfd2xx.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(FREEDRENO_LIBS)
diff --git a/src/gallium/drivers/freedreno/Makefile.sources 
b/src/gallium/drivers/freedreno/Makefile.sources
new file mode 100644
index 000..b287740
--- /dev/null
+++ b/src/gallium/drivers/freedreno/Makefile.sources
@@ -0,0 +1,43 @@
+C_SOURCES = \
+   freedreno_util.c \
+   freedreno_fence.c \
+   freedreno_resource.c \
+   freedreno_surface.c \
+   freedreno_draw.c \
+   freedreno_state.c \
+   freedreno_texture.c \
+   freedreno_context.c \
+   freedreno_screen.c \
+   freedreno_gmem.c
+
+A2XX_SOURCES = \
+   a2xx/fd2_blend.c \
+   a2xx/fd2_compiler.c \
+   a2xx/fd2_context.c \
+   a2xx/fd2_draw.c \
+   a2xx/fd2_emit.c \
+   a2xx/fd2_gmem.c \
+   a2xx/fd2_program.c \
+   a2xx/fd2_rasterizer.c \
+   a2xx/fd2_screen.c \
+   a2xx/fd2_texture.c \
+   a2xx/fd2_util.c \
+   a2xx/fd2_zsa.c \
+   a2xx/disasm-a2xx.c \
+   a2xx/ir-a2xx.c
+
+A3XX_SOURCES = \
+   a3xx/fd3_blend.c \
+   a3xx/fd3_compiler.c \
+   a3xx/fd3_context.c \
+   a3xx/fd3_draw.c \
+   a3xx/fd3_emit.c \
+   a3xx/fd3_gmem.c \
+   a3xx/fd3_program.c \
+   a3xx/fd3_rasterizer.c \
+   a3xx/fd3_screen.c \
+   a3xx/fd3_texture.c \
+   a3xx/fd3_util.c \
+   a3xx/fd3_zsa.c \
+   a3xx/disasm-a3xx.c \
+   a3xx/ir-a3xx.c
diff --git a/src/gallium/drivers/freedreno/a2xx/Makefile.am 
b/src/gallium/drivers/freedreno/a2xx/Makefile.am
deleted file mode 100644
index 8ab0f76..000
--- a/src/gallium/drivers/freedreno/a2xx/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-include $(top_srcdir)/src/gallium/Automake.inc
-
-noinst_LTLIBRARIES = libfd2xx.la
-
-AM_CFLAGS = \
-   -Wno-packed-bitfield-compat \
-   -I$(top_srcdir)/src/gallium/drivers \
-   -I$(top_srcdir)/src/gallium/drivers/freedreno \
-   $(GALLIUM_CFLAGS) \
-   $(FREEDRENO_CFLAGS) \
-   $(VISIBILITY_CFLAGS)
-
-libfd2xx_la_SOURCES = \
-   fd2_blend.c \
-   fd2_compiler.c \
-   fd2_context.c \
-   fd2_draw.c \
-   fd2_emit.c \
-   fd2_gmem.c \
-   fd2_program.c \
-   fd2_rasterizer.c \
-   fd2_screen.c \
-   fd2_texture.c \
-   fd2_util.c \
-   fd2_zsa.c \
-   disasm-a2xx.c \
-   ir-a2xx.c
diff --git a/src/gallium/drivers/freedreno/a3xx/Makefile.am 
b/src/gallium/drivers/freedreno/a3xx/Makefile.am
deleted file mode 100644
index a7e415f..000
--- a/src/gallium/drivers/freedreno/a3xx/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-include $(top_srcdir)/src/gallium/Automake.inc
-
-noinst_LTLIBRARIES = libfd3xx.la
-
-AM_CFLAGS = \
-   -Wno-packed-bitfield-compat \
-   -I$(top_srcdir)/src/gallium/drivers \
-   

[Mesa-dev] [PATCH 21/21] clover: Force gcc and g++ to fix clang builds.

2013-09-11 Thread Johannes Obermayr
---
 configure.ac  | 6 ++
 src/gallium/state_trackers/clover/Makefile.am | 8 
 2 files changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index 2381cf0..491b8c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1989,6 +1989,12 @@ cxxflags=$CXXFLAGS
 CFLAGS=$CFLAGS $USER_CFLAGS
 CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
 
+dnl Filter-out clang specific switches for clover
+CLOVER_CFLAGS=$(echo $CFLAGS | sed -e s:-mllvm -\w*\::g -e 
s:-Qunused-arguments\::g)
+CLOVER_CXXFLAGS=$(echo $CXXFLAGS | sed -e s:-mllvm -\w*\::g -e 
s:-Qunused-arguments\::g)
+AC_SUBST([CLOVER_CFLAGS])
+AC_SUBST([CLOVER_CXXFLAGS])
+
 dnl Substitute the config
 AC_CONFIG_FILES([Makefile
src/Makefile
diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index fd38766..7d4de00 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -1,5 +1,13 @@
 AUTOMAKE_OPTIONS = subdir-objects
 
+CC = gcc
+CPP = gcc -E
+CXX = g++
+CXXCPP = g++ -E
+
+CFLAGS = $(CLOVER_CFLAGS)
+CXXFLAGS = $(CLOVER_CXXFLAGS)
+
 AM_CPPFLAGS = \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-DPIPE_SEARCH_DIR=\$(mesalibdir)\ \
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] The long way to a faster build with shared libs and some fixes ...

2013-09-11 Thread Johannes Obermayr
I am preferring a full build:
../configure --libdir=/usr/lib64 --includedir=/usr/include --bindir=/usr/bin 
--prefix=/usr --sysconfdir=/etc --enable-xvmc --enable-vdpau 
--enable-texture-float --enable-debug 
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast 
--with-gallium-drivers=freedreno,i915,ilo,nouveau,r300,r600,radeonsi,svga,swrast
 --enable-dri --enable-glx --enable-osmesa --enable-gles1 --enable-gles2 
--enable-openvg --enable-gbm --enable-xa --enable-gallium-egl 
--enable-gallium-llvm --enable-gallium-gbm --enable-r600-llvm-compiler 
--enable-opencl --enable-gallium-g3dvl --enable-glx-tls

Most of other build tests were done by aboll - kudo to Andreas for this.

Required libs and PUBLICs were detected in hundreds of builds - you don't 
believe but linkers want to play and don't report all missing symbols in one 
library at once ;)

My last was --enable-osmesa --with-dri-drivers= --with-gallium-drivers=...:
I decided not to build additionally the required libmesadri for this but use a 
fallback to the more reasonable --enable-osmesa-gallium which uses 
libmesagallium (see in [PATCH 10/21]).

I have used/tested them heavily on nouveau (Nvidia ION), r600 (AMD Fusion) and 
r200 (Mobility Radeon 9000) for a longer time. I bet also other 
hardware/drivers will not make problems.
IMHO it is not a change in functionality but a rightsizing of existing code.

Maybe it is an already-to-use alternative to megadrivers project. Sorry Eric 
but your LiveJournal message inspired me to hurry up! ;)

Johannes

Am Mittwoch, 11. September 2013, 16:01:55 schrieb Tom Stellard:
 Hi Johannes,
 
 Could explain how you tested these patches:  The configure flags you
 used to build as well as the applications/hardware you used for testing.
 
 Thanks,
 Tom
 
 On Thu, Sep 12, 2013 at 12:32:38AM +0200, Johannes Obermayr wrote:
  [PATCH 01/21] ilo: Fix out-of-tree build.
  
  [PATCH 02/21] Suppress clang's warnings about unused CFLAGS and CXXFLAGS.
  
  [PATCH 03/21] configure.ac: Save user {C,CXX}FLAGS and append them at end.
  
  [PATCH 04/21] radeon: Build and use libradeon the right way.
Link libradeon only once in egl-static
  
  [PATCH 05/21] gallium/targets: Make use of prebuilt libdricommon.la.
Avoid duplicate build.
  
  [PATCH 06/21] Drop support for --enable-static / --disable-shared.
  
  [PATCH 07/21] gallium/auxiliary: Build libgallium shared.
Hundreds of symbols to be PUBLIC. But saves on a full build
19 x ~ 1.8 MB.
  
  [PATCH 08/21] Drop last parts of compatibility for the old Mesa build
I want it to avoid these stupid symlinks while distro build 
  but
with more work on follow-up patches it should be possible to 
  keep
  
  [PATCH 09/21] mapi: Build libglapi always shared.
I assume it could be improved later
  
  [PATCH 10/21] mesa: Build libmesa shared.
Hundreds of PUBLICs but we can get rid of libdricore and get 
  an
libmesadri which depends as well as libmesagallium on a 
  libmesacore.
This really speeds up build since duplicate build in 
  libdricore
with all PUBLIC can be avoided.
Also dlopen classic drivers should be faster.
  
  [PATCH 11/21] Install all internal shared libs to $(libdir)/mesa-$VERSION.
  
  [PATCH 12/21] Also do it for egl_gallium.so, pipe_*.so and gbm_gallium_drm.
  
  [PATCH 13/21] Makefile.am: s:-no-undefined:-Wl,--no-undefined to make it 
  work.
libtool will set it back to allow_undefined=yes in 
  func_mode_link ()
otherwise.
  
  [PATCH 14/21] gallium/drivers: Build libs -shared.
  
  [PATCH 15/21] vdpau,xvmc: Add install-data-hooks to remove unneccessary 
  symlinks.
libvdpau_*.so.1 and libXvMC*.so libs are dlopened by wrappers.
Nothing should link them directly.
  
  [PATCH 16/21] glx: Get rid of libglx.la.
  
  [PATCH 17/21] gbm: Get rid of libgbm_dri.la.
  
  [PATCH 18/21] i915: Conditionally build an i915g driver instead of
  
  [PATCH 19/21] freedreno: Make print_sequence a macro to fix clang.
  
  [PATCH 20/21] freedreno: One Makefile.am with a Makefile.sources is
  
  [PATCH 21/21] clover: Force gcc and g++ to fix clang builds.
  
  
  openSUSE x86_64 binary RPMs will look like this:
  $ du -a etc/ usr/
  4   etc/drirc
  8   etc/
  88  usr/lib64/libXvMCr600.so
  140 usr/lib64/libEGL.so.1.0.0
  0   usr/lib64/libGL.so.1.2
  380 usr/lib64/libGL.so.1.2.0
  0   usr/lib64/libGLESv1_CM.so.1
  88  usr/lib64/libXvMCr300.so
  36  usr/lib64/libXvMCsoftpipe.so
  212 usr/lib64/mesa-9.2.0/libllvmpipe.so
  608 usr/lib64/mesa-9.2.0/libmesadri.so
  324 usr/lib64/mesa-9.2.0/libmesagallium.so
  1140usr/lib64/mesa-9.2.0/libnouveau.so
  60  usr/lib64/mesa-9.2.0/libtrace.so
  60  usr/lib64/mesa-9.2.0/pipe_r600.so
  308 usr/lib64/mesa-9.2.0/libr300.so
  20  usr/lib64

[Mesa-dev] [PATCH 1/2] st/gbm: Add $(WAYLAND_CFLAGS) for HAVE_EGL_PLATFORM_WAYLAND.

2013-09-10 Thread Johannes Obermayr
---
 src/gallium/state_trackers/gbm/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/state_trackers/gbm/Makefile.am 
b/src/gallium/state_trackers/gbm/Makefile.am
index 70c5f77..b113d0d 100644
--- a/src/gallium/state_trackers/gbm/Makefile.am
+++ b/src/gallium/state_trackers/gbm/Makefile.am
@@ -27,6 +27,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gbm/main \
-I$(top_srcdir)/include
 if HAVE_EGL_PLATFORM_WAYLAND
+AM_CFLAGS += $(WAYLAND_CFLAGS)
 AM_CPPFLAGS += -DHAVE_WAYLAND_PLATFORM
 endif
 
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] wayland-egl.pc requires wayland.pc.

2013-09-10 Thread Johannes Obermayr
From: Torsten Duwe d...@suse.de

Mesa provides the wayland-egl libs and the pkgconfig file, but the headers
originate from the wayland package. Ensure everything matches, by requiring
application builds to look at the wayland headers as well.

Signed-off-by: Torsten Duwe d...@suse.de
Signed-off-by: Johannes Obermayr johannesoberm...@gmx.de
---
 src/egl/wayland/wayland-egl/wayland-egl.pc.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/egl/wayland/wayland-egl/wayland-egl.pc.in 
b/src/egl/wayland/wayland-egl/wayland-egl.pc.in
index f8a8df2..a92fbf4 100644
--- a/src/egl/wayland/wayland-egl/wayland-egl.pc.in
+++ b/src/egl/wayland/wayland-egl/wayland-egl.pc.in
@@ -6,5 +6,6 @@ includedir=@includedir@
 Name: wayland-egl
 Description: Mesa wayland-egl library
 Version: @VERSION@
+Requires: wayland
 Libs: -L${libdir} -lwayland-egl
 Cflags: -I${includedir}
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Move nv30, nv50 and nvc0 to nouveau.

2013-09-05 Thread Johannes Obermayr
---

Sorry for annoying the mailing list but ...

irc_dri-devel
[Dienstag, 20. August 2013] [21:23:56] jobermayr  calim: Would you accept 
such a patch: https://github.com/jobermayr/mesa/commit/b859d1d
[Dienstag, 20. August 2013] [21:56:05] calim  jobermayr: what's that good for 
?
[Dienstag, 20. August 2013] [21:56:33] calim  ah, you moved everything into a 
nouveau subdir
[Dienstag, 20. August 2013] [21:59:42] calim  hm, I don't care, doesn't 
really have an effect other than requiring more key presses to reach the driver 
dir
key_statement
[Dienstag, 20. August 2013] [21:59:58] calim  so, I'd accept it
/key_statement
[Dienstag, 20. August 2013] [22:01:00] calim  but you remove the ability to 
not build nv30 support ...
[Dienstag, 20. August 2013] [22:02:45] calim  I mean, you could have kept the 
separate libnvXX.a
note_from_today
Depending targets (dri-nouveau, egl-static, pipe-loader, vdpau-nouveau, 
xorg-nouveau and xmvc-nouveau) require nv30_screen_create, nv50_screen_create 
and nvc0_screen_create in nouveau_drm_screen_create (libnouveaudrm.la). So it 
is not possible not to build nv30 and since all three former libnvXX.la are 
required it makes sense to build only one libnouveau.la ...
/note_from_today
[Dienstag, 20. August 2013] [22:38:05] jobermayr  calim: It only builds 
one libnouveau library, a bit faster compile times on -jX and all things which 
go into it are better structured
/irc_dri-devel

email_in_german
Am Dienstag, 20. August 2013, 23:27:59 schrieb Johannes Obermayr an Christoph 
Bumiller:
 Hallo Christoph,
 
 anbei der Patch zur Umstrukturierung (entpackt ~ 4 MB, deshalb nicht an die 
 Liste ...).
 
 Falls mal aboll's und mein Wunsch in Erfüllung gehen sollte und wir die 
 Shared-Libs-Patches einspielen dürfen, müssen dann in libnouveau.so nur die 
 drei *_screen_create Symbole freigegeben werden.
 
 Wie vorhin auf der Liste angekündigt gibt es einen kleinen 
 Geschwindigkeitsbonus beim Kompilieren obendrein 

 Gruß
 Johannes
/email_in_german

irc_dri-devel
[Sonntag, 1. September 2013] [23:23:37] jobermayr calim: This commit also 
contains whiteline and new blank line at EOF fixes: 
https://github.com/jobermayr/mesa/commit/5a677fc . Is it sth. you will push to 
master or must I maintain it in my branch?
[Donnerstag, 5. September 2013] [17:56:33] jobermayr_ calim: What about 
pushing https://github.com/jobermayr/mesa/commit/def1781 and for 9.2: 
https://github.com/jobermayr/mesa/commit/03073db ? Don't you accept it anymore?
/irc_dri-devel

general_question
Why is it so difficult to get an agreed patch in master?
/general_question

---
 configure.ac   |5 +-
 src/gallium/Android.mk |5 +-
 src/gallium/drivers/Makefile.am|2 +-
 src/gallium/drivers/nouveau/Android.mk |8 +-
 src/gallium/drivers/nouveau/Makefile.am|   14 +-
 src/gallium/drivers/nouveau/Makefile.sources   |   91 +
 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp| 1231 
 src/gallium/drivers/nouveau/codegen/nv50_ir.h  | 1197 
 src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp |  550 
 .../drivers/nouveau/codegen/nv50_ir_build_util.cpp |  614 
 .../drivers/nouveau/codegen/nv50_ir_build_util.h   |  324 +++
 .../drivers/nouveau/codegen/nv50_ir_driver.h   |  220 ++
 .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 1682 +++
 .../drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp  | 1962 +
 .../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp  | 2988 
 .../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp  | 2852 +++
 .../drivers/nouveau/codegen/nv50_ir_graph.cpp  |  436 +++
 .../drivers/nouveau/codegen/nv50_ir_graph.h|  228 ++
 .../drivers/nouveau/codegen/nv50_ir_inlines.h  |  420 +++
 .../nouveau/codegen/nv50_ir_lowering_nv50.cpp  | 1101 
 .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp  | 1597 +++
 .../drivers/nouveau/codegen/nv50_ir_peephole.cpp   | 2464 
 .../drivers/nouveau/codegen/nv50_ir_print.cpp  |  698 +
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 2050 ++
 .../drivers/nouveau/codegen/nv50_ir_ssa.cpp|  552 
 .../drivers/nouveau/codegen/nv50_ir_target.cpp |  469 +++
 .../drivers/nouveau/codegen/nv50_ir_target.h   |  235 ++
 .../nouveau/codegen/nv50_ir_target_nv50.cpp|  552 
 .../drivers/nouveau/codegen/nv50_ir_target_nv50.h  |   72 +
 .../nouveau/codegen/nv50_ir_target_nvc0.cpp|  604 
 .../drivers/nouveau/codegen/nv50_ir_target_nvc0.h  |   74 +
 .../drivers/nouveau/codegen/nv50_ir_util.cpp   |  390 +++
 src/gallium/drivers/nouveau/codegen/nv50_ir_util.h |  788 ++
 .../drivers/nouveau/codegen/target_lib_nvc0.asm|   96 +
 .../drivers/nouveau/codegen/target_lib_nvc0.asm.h  |  112 +
 .../drivers/nouveau/codegen/target_lib_nve4.asm|  698 +
 .../drivers/nouveau

[Mesa-dev] [PATCH] swrast: Fix crash in sPriv-swrast_loader-getImage().

2013-09-01 Thread Johannes Obermayr
From: Egbert Eich e...@freedesktop.org

When glXBindTexImageEXT is called and SWrast is used there will be a crash when
sPriv-swrast_loader-getImage() is called from swrastSetTexBuffer2(). Reason:
no memory has been allocated for the destination thus texImage-Data is NULL.
Call ctx-Driver.TexImage2D() to initialize this. If memory has been allocated
in a previous call free it first.

Fixes: https://bugzilla.novell.com/show_bug.cgi?id=641297

Signed-off-by: Egbert Eich e...@freedesktop.org
Adapted-by: Stefan Dirsch sndir...@suse.com
Adapted-by: Tobias Johannes Klausmann tobias.johannes.klausm...@mni.thm.de
---

I am not sure whether this patch from Q3/2010 is required these days. But
openSUSE still applies it ...
If yes it should also land in 9.2, 9.1, 9.0 and 8.0 branches.

---
 src/mesa/drivers/dri/swrast/swrast.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/swrast/swrast.c 
b/src/mesa/drivers/dri/swrast/swrast.c
index 332c7b7..b1c67a9 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -67,6 +67,7 @@
 static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target,
GLint texture_format, __DRIdrawable *dPriv)
 {
+GET_CURRENT_CONTEXT(ctx);
 struct dri_context *dri_ctx;
 int x, y, w, h;
 __DRIscreen *sPriv = dPriv-driScreenPriv;
@@ -98,6 +99,13 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint 
target,
 _mesa_init_teximage_fields(dri_ctx-Base, texImage,
   w, h, 1, 0, internalFormat, texFormat);
 
+if (texImage-Data)
+   ctx-Driver.FreeTexImageData(ctx, texImage);
+
+ctx-Driver.TexImage2D(ctx, target, 0, internalFormat,
+  w, h, 0, texture_format, GL_UNSIGNED_INT_8_8_8_8,
+  NULL, ctx-Unpack, texObj, texImage);
+
 sPriv-swrast_loader-getImage(dPriv, x, y, w, h, (char *)swImage-Buffer,
   dPriv-loaderPrivate);
 
-- 
1.8.1.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] build libgallium shared by default.

2013-03-20 Thread Johannes Obermayr
Am Dienstag, 19. März 2013, 21:36:47 schrieb Andreas Boll:
 2013/3/19 Johannes Obermayr johannesoberm...@gmx.de:
  Am Montag, 18. März 2013, 15:38:31 schrieb Maarten Lankhorst:
  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.
 
 
  I am against both patches:
 
  1. libgallium shared in this version causes duplicate symbols for depending 
  targets if using static LLVM libs and generally links to much LLVM 
  components/libs
 
  2. libmesagallium shared in a right implementation unconditionally depends 
  on shared libglapi and shared libgallium to avoid duplicate symbol for 
  depending targets
 
  3. It is not -no-undefined but -Wl,--no-undefined to show missing 
  symbols (and currently there are a lot of them in Mesa) ...
 
 This is because libtool is broken.
 
 
  4. I have worked to target issues of 1. to 3. in a bottom-up series since 
  December while splitting mesa into libmesacore, libmesadri and 
  libmesagallium to reduce binary sizes as much as possible for distributions
 
 Hi Johannes,
 
 any chance you could continue the work on shared libs?
 We all have the same goals, reduce binary sizes, fix undefined
 symbols, reduce the number of build configurations, support for make
 dist and make distcheck
 - long story short improve mesa's build system.
 This time we have more time until the next mesa release to work out all 
 issues.

I have not stopped this work mainly for my own ego and researches (currently it 
works for my test cases and should be almost finished for all cases).

But I am not really sure whether I will publish the patches because my general 
experience has been sad when my work shall become pushed to mainline 
repositories: core devs complained, sb. reinvented the wheel some months later 
and/or recognized my first approach wasn't so wrong ...
Also asking and begging core devs a few times to get patches pushed is not the 
thing I want to do anymore.

I know: If it works for my common test cases it isn't guaranteed that it will 
work for all cases.
But you can find most issues only if patches landed in git master and become 
tested by more people / configure switches.
Automake work is a good example: People don't test branches although they were 
asked to do so and complained firstly if configure switches in master were 
broken after the big push. But you should have seen during that time my 
interests were and are to quickly fix build failures caused by automake work ...

If you ensure core developers agree with unconditionally shared libs, the Drop 
last parts of compatibility for the old Mesa build system. patch and generally 
the patch series will become pushed within a week after publishing for testing 
it will be likelier that I publish the patch series.

Johannes

 
 Andreas.
 
 
  If 4. will be finished right this patch should become obsolete:
  http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf69a591e1ad16b590c9ae2eba0da6fa6c4fc741
 
  And also most of the C++ linker forces will become obsolete.
 
  But pushing things like
  http://cgit.freedesktop.org/mesa/mesa/commit/?id=2506b035031d6022fec0465bffac8eedd43de0f9
  without saying in which cases it is required (e. g. not for me) doesn't 
  make it easier to fulfill less memory consumption ...
 
 
  Johannes
  ___
  mesa-dev mailing list
  mesa-dev@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/2] build libgallium shared by default.

2013-03-19 Thread Johannes Obermayr
Am Montag, 18. März 2013, 15:38:31 schrieb Maarten Lankhorst:
 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.
 

I am against both patches:

1. libgallium shared in this version causes duplicate symbols for depending 
targets if using static LLVM libs and generally links to much LLVM 
components/libs

2. libmesagallium shared in a right implementation unconditionally depends on 
shared libglapi and shared libgallium to avoid duplicate symbol for depending 
targets

3. It is not -no-undefined but -Wl,--no-undefined to show missing symbols 
(and currently there are a lot of them in Mesa) ...

4. I have worked to target issues of 1. to 3. in a bottom-up series since 
December while splitting mesa into libmesacore, libmesadri and libmesagallium 
to reduce binary sizes as much as possible for distributions

If 4. will be finished right this patch should become obsolete:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf69a591e1ad16b590c9ae2eba0da6fa6c4fc741

And also most of the C++ linker forces will become obsolete.

But pushing things like
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2506b035031d6022fec0465bffac8eedd43de0f9
without saying in which cases it is required (e. g. not for me) doesn't make it 
easier to fulfill less memory consumption ...


Johannes
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/3] configure.ac: Force use of LLVM shared libs with --enable-opencl

2013-01-21 Thread Johannes Obermayr
Am Freitag, 18. Januar 2013, 17:58:27 schrieben Sie:
 From: Tom Stellard thomas.stell...@amd.com
 
 If we build clover with LLVM static libraries, then clover and also each
 pipe_*.so driver that is built will contain their own static copy of
 LLVM.  The recent automake changes have uncovered a problem where
 the pipe_*.so drivers try to use clover's LLVM symbols.  This causes
 LLVM's static registry objects to be initialized each time
 a pipe_*.so driver is loaded by clover.  Initializing these objects
 multiple times is not allowed and leads to assertion failures in the
 LLVM code.
 
 We can avoid all these problems by having clover and all the pipe_*.so
 drivers link against the same LLVM shared library.
 
 https://bugs.freedesktop.org/show_bug.cgi?id=59334
 https://bugs.freedesktop.org/show_bug.cgi?id=59534
 ---
  configure.ac | 23 ---
  1 file changed, 20 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
 index c85c836..4b93f22 100644
 --- a/configure.ac
 +++ b/configure.ac
 @@ -609,8 +609,10 @@ AC_ARG_ENABLE([vdpau],
 [enable_vdpau=auto])
  AC_ARG_ENABLE([opencl],
 [AS_HELP_STRING([--enable-opencl],
 - [enable OpenCL library @:@default=no@:@])],
 -   [enable_opencl=$enableval],
 + [enable OpenCL library NOTE: Enabling this option will also enable
 +  --with-llvm-shared-libs
 +  @:@default=no@:@])],
 +   [enable_opencl=$enableval with_llvm_shared_libs=$enableval],
 [enable_opencl=no])
  AC_ARG_ENABLE([xlib_glx],
  [AS_HELP_STRING([--enable-xlib-glx],
 @@ -1903,7 +1905,22 @@ dnl in LLVM_LIBS.
  
  if test x$with_llvm_shared_libs = xyes; then
  dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
 -LLVM_LIBS=-lLLVM-`$LLVM_CONFIG --version`
 +LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
 +AC_CHECK_FILE($LLVM_LIBDIR/lib$LLVM_SO_NAME.so,,
 +AC_MSG_ERROR([Could not find llvm shared library: 
 lib$LLVM_SO_NAME.so :
 + Please make sure you have built llvm with the --enable-shared option
 + and that your llvm libraries are installed in $LLVM_LIBDIR
 + If you have installed your llvm libraries to a different directory you
 + can use the --with-llvm-prefix= configure flag to specify this 
 directory.
 + NOTE: Mesa is attempting to use llvm shared libraries because you have
 + passed one of the following options to configure:
 + --with-llvm-shared-libs
 + --enable-opencl
 + If you do not want to build with llvm shared libraries and instead want 
 to
 + use llvm static libraries then remove these options from your configure
 + invocation and reconfigure.]))
 +
 +LLVM_LIBS=-l$LLVM_SO_NAME
  else
  LLVM_LIBS=`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`
  fi
 

I am against this patch because it breaks Mesa with my cmake build of LLVM 
which generates shared instead of static libraries:

$ ls /usr/lib64/*LLVM*
/usr/lib64/libLLVMAnalysis.so   /usr/lib64/libLLVMInstCombine.so
 /usr/lib64/libLLVMMipsInfo.so   /usr/lib64/libLLVMSparcCodeGen.so
/usr/lib64/libLLVMArchive.so/usr/lib64/libLLVMInstrumentation.so
 /usr/lib64/libLLVMMSP430AsmPrinter.so   /usr/lib64/libLLVMSparcDesc.so
/usr/lib64/libLLVMARMAsmParser.so   /usr/lib64/libLLVMInterpreter.so
 /usr/lib64/libLLVMMSP430CodeGen.so  /usr/lib64/libLLVMSparcInfo.so
/usr/lib64/libLLVMARMAsmPrinter.so  /usr/lib64/libLLVMipa.so
 /usr/lib64/libLLVMMSP430Desc.so /usr/lib64/libLLVMSupport.so
/usr/lib64/libLLVMARMCodeGen.so /usr/lib64/libLLVMipo.so
 /usr/lib64/libLLVMMSP430Info.so /usr/lib64/libLLVMTableGen.so
/usr/lib64/libLLVMARMDesc.so/usr/lib64/libLLVMJIT.so
 /usr/lib64/libLLVMNVPTXAsmPrinter.so/usr/lib64/libLLVMTarget.so
/usr/lib64/libLLVMARMDisassembler.so/usr/lib64/libLLVMLinker.so 
 /usr/lib64/libLLVMNVPTXCodeGen.so   /usr/lib64/libLLVMTransformUtils.so
/usr/lib64/libLLVMARMInfo.so/usr/lib64/libLLVMMBlazeAsmParser.so
 /usr/lib64/libLLVMNVPTXDesc.so  /usr/lib64/libLLVMVectorize.so
/usr/lib64/libLLVMAsmParser.so  /usr/lib64/libLLVMMBlazeAsmPrinter.so   
 /usr/lib64/libLLVMNVPTXInfo.so  /usr/lib64/libLLVMX86AsmParser.so
/usr/lib64/libLLVMAsmPrinter.so /usr/lib64/libLLVMMBlazeCodeGen.so  
 /usr/lib64/libLLVMObject.so /usr/lib64/libLLVMX86AsmPrinter.so
/usr/lib64/libLLVMBitReader.so  /usr/lib64/libLLVMMBlazeDesc.so 
 /usr/lib64/libLLVMOption.so /usr/lib64/libLLVMX86CodeGen.so
/usr/lib64/libLLVMBitWriter.so  /usr/lib64/libLLVMMBlazeDisassembler.so 
 /usr/lib64/libLLVMPowerPCAsmPrinter.so  /usr/lib64/libLLVMX86Desc.so
/usr/lib64/libLLVMCodeGen.so/usr/lib64/libLLVMMBlazeInfo.so 
 /usr/lib64/libLLVMPowerPCCodeGen.so /usr/lib64/libLLVMX86Disassembler.so
/usr/lib64/libLLVMCore.so   

Re: [Mesa-dev] [PATCH 05/11] gallium/auxiliary: Build libgallium shared.

2013-01-12 Thread Johannes Obermayr
Am Samstag, 12. Januar 2013, 13:34:34 schrieb Chia-I Wu:
 On Sat, Jan 12, 2013 at 10:23 AM, Johannes Obermayr
 johannesoberm...@gmx.de wrote:
  diff --git a/src/gallium/auxiliary/Makefile.am 
  b/src/gallium/auxiliary/Makefile.am
  index a4eee47..21b3c6b 100644
  --- a/src/gallium/auxiliary/Makefile.am
  +++ b/src/gallium/auxiliary/Makefile.am
  @@ -3,13 +3,17 @@ AUTOMAKE_OPTIONS = subdir-objects
   include Makefile.sources
   include $(top_srcdir)/src/gallium/Automake.inc
 
  -noinst_LTLIBRARIES = libgallium.la
  +lib_LTLIBRARIES = libgallium@VERSION@.la
 I probably missed the discussion.  I suppose libgallium is meant to be
 internal.  What motivates the change?
 

1. It is easiest fix for a runtime fix if you build r600 and radeonsi together.

2. All internal libraries will be shared in future and installed to 
$(libdir)/mesa-$(VERSION) to make packages on distributions much much much 
smaller .
You can follow the way to it here:
https://github.com/jobermayr/mesa/commits/master
(e. g. a full build will be ~ 15 - 20 MiB libraries + ~ 100 - 140 MiB 
debuginfo +? MiB documentation)

3. Maybe some more (main) developers should be also available and follow 
discussions on #dri-devel.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nv50/nvc0: Build codegen in nv50.

2013-01-12 Thread Johannes Obermayr
This is required to make libnv50 independent of libnvc0.
---
 src/gallium/drivers/nv50/Makefile.sources  |   12 +++-
 src/gallium/drivers/nv50/nv50_miptree.c|   32 ++--
 src/gallium/drivers/nv50/nv50_resource.h   |3 +-
 src/gallium/drivers/nvc0/Makefile.sources  |6 
 .../drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp |2 +-
 src/gallium/drivers/nvc0/nvc0_miptree.c|   26 ++--
 6 Dateien geändert, 45 Zeilen hinzugefügt(+), 36 Zeilen entfernt(-)

diff --git a/src/gallium/drivers/nv50/Makefile.sources 
b/src/gallium/drivers/nv50/Makefile.sources
index c112e82..1092570 100644
--- a/src/gallium/drivers/nv50/Makefile.sources
+++ b/src/gallium/drivers/nv50/Makefile.sources
@@ -15,7 +15,7 @@ C_SOURCES := \
nv50_push.c \
nv50_query.c
 
-CPP_SOURCES := \
+CODEGEN_NV50_SOURCES := \
codegen/nv50_ir.cpp \
codegen/nv50_ir_bb.cpp \
codegen/nv50_ir_build_util.cpp \
@@ -30,3 +30,13 @@ CPP_SOURCES := \
codegen/nv50_ir_target.cpp \
codegen/nv50_ir_target_nv50.cpp \
codegen/nv50_ir_util.cpp
+
+CODEGEN_NVC0_SOURCES := \
+   $(top_srcdir)/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_gk110.cpp \
+   $(top_srcdir)/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp \
+   
$(top_srcdir)/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp \
+   $(top_srcdir)/src/gallium/drivers/nvc0/codegen/nv50_ir_target_nvc0.cpp
+
+CPP_SOURCES := \
+   $(CODEGEN_NV50_SOURCES) \
+   $(CODEGEN_NVC0_SOURCES)
diff --git a/src/gallium/drivers/nv50/nv50_miptree.c 
b/src/gallium/drivers/nv50/nv50_miptree.c
index fc9d7f3..7883edb 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -28,10 +28,38 @@
 #include nv50_context.h
 #include nv50_resource.h
 
-static INLINE uint32_t
+uint32_t
+nv50_tex_choose_tile_dims_helper(unsigned nx, unsigned ny, unsigned nz)
+{
+   uint32_t tile_mode = 0x000;
+
+   if (ny  64) tile_mode = 0x040; /* height 128 tiles */
+   else
+   if (ny  32) tile_mode = 0x030; /* height 64 tiles */
+   else
+   if (ny  16) tile_mode = 0x020; /* height 32 tiles */
+   else
+   if (ny   8) tile_mode = 0x010; /* height 16 tiles */
+
+   if (nz == 1)
+  return tile_mode;
+   else
+  if (tile_mode  0x020)
+ tile_mode = 0x020;
+
+   if (nz  16  tile_mode  0x020)
+  return tile_mode | 0x500; /* depth 32 tiles */
+   if (nz  8) return tile_mode | 0x400; /* depth 16 tiles */
+   if (nz  4) return tile_mode | 0x300; /* depth 8 tiles */
+   if (nz  2) return tile_mode | 0x200; /* depth 4 tiles */
+
+   return tile_mode | 0x100;
+}
+
+static uint32_t
 nv50_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz)
 {
-   return nvc0_tex_choose_tile_dims(nx, ny * 2, nz);
+   return nv50_tex_choose_tile_dims_helper(nx, ny * 2, nz);
 }
 
 static uint32_t
diff --git a/src/gallium/drivers/nv50/nv50_resource.h 
b/src/gallium/drivers/nv50/nv50_resource.h
index 4808955..a2bc980 100644
--- a/src/gallium/drivers/nv50/nv50_resource.h
+++ b/src/gallium/drivers/nv50/nv50_resource.h
@@ -32,8 +32,7 @@ nv50_screen_init_resource_functions(struct pipe_screen 
*pscreen);
 #endif /* __NVC0_RESOURCE_H__ */
 
 uint32_t
-nvc0_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz);
-
+nv50_tex_choose_tile_dims_helper(unsigned nx, unsigned ny, unsigned nz);
 
 struct nv50_miptree_level {
uint32_t offset;
diff --git a/src/gallium/drivers/nvc0/Makefile.sources 
b/src/gallium/drivers/nvc0/Makefile.sources
index 82504bf..d0e213b 100644
--- a/src/gallium/drivers/nvc0/Makefile.sources
+++ b/src/gallium/drivers/nvc0/Makefile.sources
@@ -14,9 +14,3 @@ C_SOURCES := \
nvc0_program.c \
nvc0_shader_state.c \
nvc0_query.c
-
-CPP_SOURCES := \
-   codegen/nv50_ir_emit_gk110.cpp \
-   codegen/nv50_ir_emit_nvc0.cpp \
-   codegen/nv50_ir_lowering_nvc0.cpp \
-   codegen/nv50_ir_target_nvc0.cpp
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp 
b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
index 749ace5..c5a7772 100644
--- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
+++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp
@@ -1096,7 +1096,7 @@ NVC0LoweringPass::visit(Instruction *i)
   break;
default:
   break;
-   }   
+   }
return true;
 }
 
diff --git a/src/gallium/drivers/nvc0/nvc0_miptree.c 
b/src/gallium/drivers/nvc0/nvc0_miptree.c
index b63f196..fee89a7 100644
--- a/src/gallium/drivers/nvc0/nvc0_miptree.c
+++ b/src/gallium/drivers/nvc0/nvc0_miptree.c
@@ -28,32 +28,10 @@
 #include nvc0_context.h
 #include nvc0_resource.h
 
-uint32_t
+static uint32_t
 nvc0_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz)
 {
-   uint32_t tile_mode = 0x000;
-
-   if (ny  64) tile_mode = 0x040; /* height 128 tiles */
-   else
-   if (ny  32) tile_mode = 0x030; /* height 64 tiles */
-   else
-   if (ny  16) tile_mode 

[Mesa-dev] [PATCH] xmlpool: Fix out-of-tree builds.

2013-01-12 Thread Johannes Obermayr
---
 src/mesa/drivers/dri/common/xmlpool/Makefile.am |2 +-
 src/mesa/drivers/dri/i915/Makefile.am   |1 +
 src/mesa/drivers/dri/i965/Makefile.am   |1 +
 src/mesa/drivers/dri/r200/Makefile.am   |1 +
 src/mesa/drivers/dri/radeon/Makefile.am |1 +
 5 Dateien geändert, 5 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile.am 
b/src/mesa/drivers/dri/common/xmlpool/Makefile.am
index b2a423c..b99df40 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile.am
+++ b/src/mesa/drivers/dri/common/xmlpool/Makefile.am
@@ -62,7 +62,7 @@ clean:
 # Default target options.h
 options.h: LOCALEDIR := .
 options.h: t_options.h $(MOS)
-   $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py 
t_options.h $(LOCALEDIR) $(LANGS)  options.h
+   $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/gen_xmlpool.py 
$(srcdir)/t_options.h $(LOCALEDIR) $(LANGS)  options.h
 
 # Update .mo files from the corresponding .po files.
 %/LC_MESSAGES/options.mo: %.po
diff --git a/src/mesa/drivers/dri/i915/Makefile.am 
b/src/mesa/drivers/dri/i915/Makefile.am
index 4e0dccd..a067cd4 100644
--- a/src/mesa/drivers/dri/i915/Makefile.am
+++ b/src/mesa/drivers/dri/i915/Makefile.am
@@ -30,6 +30,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/intel \
-I$(top_srcdir)/src/mesa/drivers/dri/intel/server \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(API_DEFINES) \
$(VISIBILITY_CFLAGS) \
diff --git a/src/mesa/drivers/dri/i965/Makefile.am 
b/src/mesa/drivers/dri/i965/Makefile.am
index 127becd..71ec635 100644
--- a/src/mesa/drivers/dri/i965/Makefile.am
+++ b/src/mesa/drivers/dri/i965/Makefile.am
@@ -34,6 +34,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/drivers/dri/intel \
-I$(top_srcdir)/src/mesa/drivers/dri/intel/server \
-I$(top_srcdir)/src/gtest/include \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(API_DEFINES) \
$(VISIBILITY_CFLAGS) \
diff --git a/src/mesa/drivers/dri/r200/Makefile.am 
b/src/mesa/drivers/dri/r200/Makefile.am
index 477bd70..774c308 100644
--- a/src/mesa/drivers/dri/r200/Makefile.am
+++ b/src/mesa/drivers/dri/r200/Makefile.am
@@ -31,6 +31,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/r200/server \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(API_DEFINES) \
$(VISIBILITY_CFLAGS) \
diff --git a/src/mesa/drivers/dri/radeon/Makefile.am 
b/src/mesa/drivers/dri/radeon/Makefile.am
index 753c7af..64999fb 100644
--- a/src/mesa/drivers/dri/radeon/Makefile.am
+++ b/src/mesa/drivers/dri/radeon/Makefile.am
@@ -31,6 +31,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/src/mesa/ \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/radeon/server \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(DEFINES) \
$(API_DEFINES) \
$(VISIBILITY_CFLAGS) \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 04/11] Drop last parts of compatibility for the old Mesa build system.

2013-01-12 Thread Johannes Obermayr
Am Samstag, 12. Januar 2013, 17:42:17 schrieb Andreas Boll:
 2013/1/12 Kenneth Graunke kenn...@whitecape.org:
  On 01/11/2013 06:23 PM, Johannes Obermayr wrote:
 
  diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
  index ca5257a..61192d6 100644
  --- a/src/egl/main/Makefile.am
  +++ b/src/egl/main/Makefile.am
  @@ -116,13 +116,6 @@ libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
endif
 
  -# Provide compatibility with scripts for the old Mesa build system for
  -# a while by putting a link to the driver into /lib of the build tree.
  -all-local: libEGL.la
  -   $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
  -   ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
  -   ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
  -
pkgconfigdir = $(libdir)/pkgconfig
 
 
  Installing a copy of everything in lib/ was actually a convenience for
  developers wanting to test newly built stuff without having to 'make
  install'.  Not really old build system cruft.
 
  I use this all the time.  I'd be OK with removing it and adjusting to more
  standard practices, but I wanted to make sure everyone was aware it was
  happening.
 
 
 Maybe we should wait with this patch until we get more response,
 because the last time we brought up removing this we get some objections[0].
 As a consequence I've had to add all the compatibility links to the
 automake-gallium branch.
 
 [0] Thread started here:
 http://lists.freedesktop.org/archives/mesa-dev/2012-September/027889.html

After shared branch will be merged it shouldn't work anymore.

Then you must use 'make install DESTDIR=$DIR' instead and additionally add 
$DIR/mesa-$VERSION to PATH to find internal shared libs.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCHv2] xmlpool: Fix out-of-tree builds.

2013-01-12 Thread Johannes Obermayr
---
I found more on gallium ...
---
 src/gallium/state_trackers/dri/drm/Makefile.am  |1 +
 src/gallium/state_trackers/dri/sw/Makefile.am   |1 +
 src/gallium/targets/dri-i915/Makefile.am|1 +
 src/gallium/targets/dri-nouveau/Makefile.am |1 +
 src/gallium/targets/dri-r300/Makefile.am|1 +
 src/gallium/targets/dri-r600/Makefile.am|1 +
 src/gallium/targets/dri-radeonsi/Makefile.am|1 +
 src/gallium/targets/dri-vmwgfx/Makefile.am  |1 +
 src/mesa/drivers/dri/common/xmlpool/Makefile.am |2 +-
 src/mesa/drivers/dri/i915/Makefile.am   |1 +
 src/mesa/drivers/dri/i965/Makefile.am   |1 +
 src/mesa/drivers/dri/r200/Makefile.am   |1 +
 src/mesa/drivers/dri/radeon/Makefile.am |1 +
 13 Dateien geändert, 13 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/gallium/state_trackers/dri/drm/Makefile.am 
b/src/gallium/state_trackers/dri/drm/Makefile.am
index 235c3b6..f8916b1 100644
--- a/src/gallium/state_trackers/dri/drm/Makefile.am
+++ b/src/gallium/state_trackers/dri/drm/Makefile.am
@@ -28,6 +28,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/gallium/state_trackers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(GALLIUM_CFLAGS) \
$(LIBDRM_CFLAGS)
 
diff --git a/src/gallium/state_trackers/dri/sw/Makefile.am 
b/src/gallium/state_trackers/dri/sw/Makefile.am
index 9e4d976..b62161a 100644
--- a/src/gallium/state_trackers/dri/sw/Makefile.am
+++ b/src/gallium/state_trackers/dri/sw/Makefile.am
@@ -27,6 +27,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/gallium/state_trackers/dri/common \
-I$(top_srcdir)/src/mesa/drivers/dri/common \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
$(GALLIUM_CFLAGS) \
$(LIBDRM_CFLAGS) \
-D__NOT_HAVE_DRM_H
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index f9f36f3..d14228e 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD \
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am 
b/src/gallium/targets/dri-nouveau/Makefile.am
index 2307fdc..a780fc5 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE
 
diff --git a/src/gallium/targets/dri-r300/Makefile.am 
b/src/gallium/targets/dri-r300/Makefile.am
index c42bf88..b152180 100644
--- a/src/gallium/targets/dri-r300/Makefile.am
+++ b/src/gallium/targets/dri-r300/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
diff --git a/src/gallium/targets/dri-r600/Makefile.am 
b/src/gallium/targets/dri-r600/Makefile.am
index 06b9235..cc4e403 100644
--- a/src/gallium/targets/dri-r600/Makefile.am
+++ b/src/gallium/targets/dri-r600/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_NOOP
diff --git a/src/gallium/targets/dri-radeonsi/Makefile.am 
b/src/gallium/targets/dri-radeonsi/Makefile.am
index 342adad..e1cd803 100644
--- a/src/gallium/targets/dri-radeonsi/Makefile.am
+++ b/src/gallium/targets/dri-radeonsi/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE \
-DGALLIUM_NOOP
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am 
b/src/gallium/targets/dri-vmwgfx/Makefile.am
index 0da1c0c..a2c3211 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
+++ b/src/gallium/targets/dri-vmwgfx/Makefile.am
@@ -31,6 +31,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/winsys \
-I$(top_srcdir)/src/mesa \
-I$(top_srcdir)/src/mapi \
+   -I$(top_builddir)/src/mesa/drivers/dri/common \
-DGALLIUM_RBUG \
-DGALLIUM_TRACE
 
diff --git 

[Mesa-dev] [PATCH 01/11] Remove hacks for static Makefiles

2013-01-11 Thread Johannes Obermayr
From: Matt Turner matts...@gmail.com

v2: Andreas Boll andreas.boll@gmail.com
- don't remove compatibility with scripts for the old build system

v3: Andreas Boll andreas.boll@gmail.com
- remove more obsolete hacks

v4: Andreas Boll andreas.boll@gmail.com
- add a previously removed TOP variable to fix vgapi build
---
 src/gallium/auxiliary/Makefile.am  |4 
 src/gallium/auxiliary/pipe-loader/Makefile.am  |   11 ---
 src/gallium/drivers/Makefile.am|   14 --
 src/gallium/drivers/i915/Makefile.am   |3 ---
 src/gallium/drivers/llvmpipe/Makefile.am   |2 --
 src/gallium/drivers/nouveau/Makefile.am|3 ---
 src/gallium/drivers/nv30/Makefile.am   |3 ---
 src/gallium/drivers/nv50/Makefile.am   |3 ---
 src/gallium/drivers/nvc0/Makefile.am   |3 ---
 src/gallium/drivers/r300/Makefile.am   |5 -
 src/gallium/drivers/r600/Makefile.am   |4 
 src/gallium/drivers/radeonsi/Makefile.am   |4 
 src/gallium/drivers/rbug/Makefile.am   |3 ---
 src/gallium/drivers/softpipe/Makefile.am   |3 ---
 src/gallium/drivers/svga/Makefile.am   |3 ---
 src/gallium/drivers/trace/Makefile.am  |4 
 src/gallium/state_trackers/dri/drm/Makefile.am |3 ---
 src/gallium/state_trackers/dri/sw/Makefile.am  |3 ---
 src/gallium/state_trackers/egl/Makefile.am |6 --
 src/gallium/state_trackers/gbm/Makefile.am |6 --
 src/gallium/state_trackers/glx/Makefile.am |6 --
 src/gallium/state_trackers/vdpau/Makefile.am   |6 --
 src/gallium/state_trackers/vega/Makefile.am|6 --
 src/gallium/state_trackers/xorg/Makefile.am|6 --
 src/gallium/state_trackers/xvmc/Makefile.am|6 --
 src/gallium/targets/opencl/Makefile.am |4 
 src/gallium/winsys/i915/drm/Makefile.am|4 
 src/gallium/winsys/i915/sw/Makefile.am |4 
 src/gallium/winsys/nouveau/drm/Makefile.am |4 
 src/gallium/winsys/radeon/drm/Makefile.am  |4 
 src/gallium/winsys/svga/drm/Makefile.am|4 
 src/gallium/winsys/sw/dri/Makefile.am  |4 
 src/gallium/winsys/sw/fbdev/Makefile.am|4 
 src/gallium/winsys/sw/null/Makefile.am |4 
 src/gallium/winsys/sw/wayland/Makefile.am  |4 
 src/gallium/winsys/sw/wrapper/Makefile.am  |4 
 src/gallium/winsys/sw/xlib/Makefile.am |4 
 src/glsl/Makefile.am   |7 ---
 src/mapi/glapi/Makefile.am |9 -
 src/mapi/glapi/gen/Makefile.am |   11 ---
 src/mapi/vgapi/Makefile.am |3 +--
 src/mesa/Makefile.am   |   13 +
 src/mesa/drivers/dri/i915/Makefile.am  |3 ---
 src/mesa/drivers/dri/i965/Makefile.am  |3 ---
 src/mesa/drivers/dri/nouveau/Makefile.am   |3 ---
 src/mesa/drivers/dri/r200/Makefile.am  |3 ---
 src/mesa/drivers/dri/radeon/Makefile.am|3 ---
 src/mesa/drivers/dri/swrast/Makefile.am|3 ---
 src/mesa/libdricore/Makefile.am|1 -
 49 Dateien geändert, 6 Zeilen hinzugefügt(+), 224 Zeilen entfernt(-)

diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index b8ac7c9..a4eee47 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -45,7 +45,3 @@ util/u_format_srgb.c: $(srcdir)/util/u_format_srgb.py
 
 util/u_format_table.c: $(srcdir)/util/u_format_table.py 
$(srcdir)/util/u_format_pack.py $(srcdir)/util/u_format_parse.py 
$(srcdir)/util/u_format.csv
$(AM_V_GEN) $(PYTHON2) $(srcdir)/util/u_format_table.py 
$(srcdir)/util/u_format.csv  $@
-
-#XXX: Delete this when all targets are converted to automake.
-all-local: libgallium.la
-   ln -f $(builddir)/.libs/libgallium.a $(builddir)/libgallium.a
diff --git a/src/gallium/auxiliary/pipe-loader/Makefile.am 
b/src/gallium/auxiliary/pipe-loader/Makefile.am
index cc0be79..9a8094f 100644
--- a/src/gallium/auxiliary/pipe-loader/Makefile.am
+++ b/src/gallium/auxiliary/pipe-loader/Makefile.am
@@ -22,15 +22,4 @@ if HAVE_DRM_LOADER_GALLIUM
 libpipe_loader_la_SOURCES += pipe_loader_drm.c
 AM_CFLAGS = $(LIBDRM_CFLAGS)
 endif
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the library in the current directory.
-all-local: libpipe_loader.la
-   ln -f .libs/libpipe_loader.a .
-
-clean-local:
-   rm -f libpipe_loader.a
 endif
-
-# FIXME: Remove when the rest of Gallium is converted to automake.
-default: all
diff --git a/src/gallium/drivers/Makefile.am b/src/gallium/drivers/Makefile.am
index a70b8f7..25d9533 100644
--- a/src/gallium/drivers/Makefile.am
+++ b/src/gallium/drivers/Makefile.am
@@ -64,17 +64,3 @@ 

[Mesa-dev] [PATCH 02/11] glapi/gen: remove an obsolete comment from Makefile.am

2013-01-11 Thread Johannes Obermayr
From: Andreas Boll andreas.boll@gmail.com

---
 src/mapi/glapi/gen/Makefile.am |5 -
 1 Datei geändert, 5 Zeilen entfernt(-)

diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 46b2127..f869d28 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -1,8 +1,3 @@
-# This file isn't used during a normal compilation since we don't want to
-# require Python in order to compile Mesa.
-# Instead, when the Mesa developers update/change the API interface it's
-# up to him/her to re-run this makefile and check in the newly generated files.
-
 # These are the official xserver indent flags from utils/modular/x-indent.sh
 XORG_INDENT_FLAGS = -linux -bad -bap -blf -bli0 -cbi0 -cdw -nce -cs -i4 -lc80 
-psl -nbbo \
 -nbc -psl -nbfda -nut -nss -T pointer -T ScreenPtr -T ScrnInfoPtr -T 
pointer \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 03/11] mesa/dricore: Drop compatibility for the old Mesa build system and -avoid-version.

2013-01-11 Thread Johannes Obermayr
---
 configure.ac|1 +
 src/mesa/libdricore/Makefile.am |   23 ---
 2 Dateien geändert, 9 Zeilen hinzugefügt(+), 15 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index 72df83c..10b306e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -945,6 +945,7 @@ AC_ARG_ENABLE([glx-tls],
 [GLX_USE_TLS=$enableval],
 [GLX_USE_TLS=no])
 AC_SUBST(GLX_TLS, ${GLX_USE_TLS})
+AM_CONDITIONAL(HAVE_GLX_TLS, test x$GLX_USE_TLS = xyes)
 
 AS_IF([test x$GLX_USE_TLS = xyes -a x$ax_pthread_ok = xyes],
   [DEFINES=${DEFINES} -DGLX_USE_TLS -DHAVE_PTHREAD])
diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am
index 753548e..54c5060 100644
--- a/src/mesa/libdricore/Makefile.am
+++ b/src/mesa/libdricore/Makefile.am
@@ -39,10 +39,16 @@ libdricore@VERSION@_la_SOURCES = \
$(LIBGLSL_FILES) \
$(BUILTIN_COMPILER_GENERATED_CXX_FILES) \
$(top_builddir)/src/glsl/builtin_function.cpp
-libdricore@VERSION@_la_LDFLAGS = -version-number 1:0
+libdricore@VERSION@_la_LDFLAGS = -Wl,--no-undefined -shared -avoid-version
 libdricore@VERSION@_la_LIBADD = \
 ../program/libdricore_program.la \
-$()
+$(DLOPEN_LIBS)
+
+if HAVE_SHARED_GLAPI
+libdricore@VERSION@_la_LIBADD += ../../mapi/shared-glapi/libglapi.la
+else
+libdricore@VERSION@_la_LIBADD += ../../mapi/glapi/libglapi.la
+endif
 
 if HAVE_X86_ASM
 libdricore@VERSION@_la_SOURCES += $(X86_FILES)
@@ -67,17 +73,4 @@ endif
 
 if HAVE_DRI
 lib_LTLIBRARIES = libdricore@VERSION@.la
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: libdricore@VERSION@.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
-   ln -f .libs/libdricore@VERSION@.so.1.0.0 
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1;
-   ln -sf libdricore@VERSION@.so.1 
$(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
 endif
-
-CLEANFILES = \
-   $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1 \
-   $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
-
--include $(DEPENDS)
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 04/11] Drop last parts of compatibility for the old Mesa build system.

2013-01-11 Thread Johannes Obermayr
---
 src/Makefile.am|3 ---
 src/egl/main/Makefile.am   |7 ---
 src/gallium/targets/dri-i915/Makefile.am   |6 --
 src/gallium/targets/dri-nouveau/Makefile.am|6 --
 src/gallium/targets/dri-r300/Makefile.am   |6 --
 src/gallium/targets/dri-r600/Makefile.am   |6 --
 src/gallium/targets/dri-radeonsi/Makefile.am   |6 --
 src/gallium/targets/dri-swrast/Makefile.am |6 --
 src/gallium/targets/dri-vmwgfx/Makefile.am |6 --
 src/gallium/targets/egl-static/Makefile.am |   20 
 src/gallium/targets/libgl-xlib/Makefile.am |6 --
 src/gallium/targets/opencl/Makefile.am |9 -
 src/gallium/targets/vdpau-nouveau/Makefile.am  |6 --
 src/gallium/targets/vdpau-r300/Makefile.am |6 --
 src/gallium/targets/vdpau-r600/Makefile.am |6 --
 src/gallium/targets/vdpau-radeonsi/Makefile.am |6 --
 src/gallium/targets/vdpau-softpipe/Makefile.am |6 --
 src/gallium/targets/xa-vmwgfx/Makefile.am  |6 --
 src/gallium/targets/xorg-i915/Makefile.am  |6 --
 src/gallium/targets/xorg-nouveau/Makefile.am   |6 --
 src/gallium/targets/xorg-r300/Makefile.am  |6 --
 src/gallium/targets/xorg-r600/Makefile.am  |6 --
 src/gallium/targets/xorg-radeonsi/Makefile.am  |6 --
 src/gallium/targets/xvmc-nouveau/Makefile.am   |6 --
 src/gallium/targets/xvmc-r300/Makefile.am  |6 --
 src/gallium/targets/xvmc-r600/Makefile.am  |6 --
 src/gallium/targets/xvmc-softpipe/Makefile.am  |6 --
 src/gbm/Makefile.am|4 
 src/glx/Makefile.am|7 ---
 src/mapi/es1api/Makefile.am|8 
 src/mapi/es2api/Makefile.am|8 
 src/mapi/shared-glapi/Makefile.am  |6 --
 src/mapi/vgapi/Makefile.am |8 
 src/mesa/drivers/dri/i915/Makefile.am  |6 --
 src/mesa/drivers/dri/i965/Makefile.am  |6 --
 src/mesa/drivers/dri/nouveau/Makefile.am   |6 --
 src/mesa/drivers/dri/r200/Makefile.am  |6 --
 src/mesa/drivers/dri/radeon/Makefile.am|6 --
 src/mesa/drivers/dri/swrast/Makefile.am|6 --
 src/mesa/drivers/osmesa/Makefile.am|9 -
 src/mesa/drivers/x11/Makefile.am   |9 -
 41 Dateien geändert, 272 Zeilen entfernt(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index d6a7946..6547980 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1 @@
 SUBDIRS=$(SRC_DIRS)
-
-all-local:
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR)
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index ca5257a..61192d6 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -116,13 +116,6 @@ libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
 libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
 endif
 
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: libEGL.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
-   ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
-   ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
-
 pkgconfigdir = $(libdir)/pkgconfig
 
 pkgconfig_DATA = egl.pc
diff --git a/src/gallium/targets/dri-i915/Makefile.am 
b/src/gallium/targets/dri-i915/Makefile.am
index 842882c..1cf74cc 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -73,9 +73,3 @@ i915_dri_la_LINK = $(LINK) $(i915_dri_la_LDFLAGS)
 # Mention a dummy pure C file to trigger generation of the $(LINK) variable
 nodist_EXTRA_i915_dri_la_SOURCES = dummy-c.c
 endif
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: i915_dri.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
-   ln -f .libs/i915_dri.so $(top_builddir)/$(LIB_DIR)/gallium/i915_dri.so
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am 
b/src/gallium/targets/dri-nouveau/Makefile.am
index a232bb7..d397cf5 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -65,9 +65,3 @@ if HAVE_MESA_LLVM
 nouveau_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 nouveau_dri_la_LIBADD += $(LLVM_LIBS)
 endif
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: nouveau_dri.la
-   $(MKDIR_P) $(top_builddir)/$(LIB_DIR)/gallium
-   ln -f .libs/nouveau_dri.so 
$(top_builddir)/$(LIB_DIR)/gallium/nouveau_dri.so
diff --git 

[Mesa-dev] [PATCH 05/11] gallium/auxiliary: Build libgallium shared.

2013-01-11 Thread Johannes Obermayr
---
 src/gallium/auxiliary/Makefile.am  |   14 +++---
 src/gallium/drivers/llvmpipe/Makefile.am   |   10 +-
 src/gallium/drivers/radeon/Makefile.am |3 ++-
 src/gallium/targets/dri-i915/Makefile.am   |2 +-
 src/gallium/targets/dri-nouveau/Makefile.am|2 +-
 src/gallium/targets/dri-r300/Makefile.am   |2 +-
 src/gallium/targets/dri-r600/Makefile.am   |2 +-
 src/gallium/targets/dri-radeonsi/Makefile.am   |2 +-
 src/gallium/targets/dri-swrast/Makefile.am |2 +-
 src/gallium/targets/dri-vmwgfx/Makefile.am |2 +-
 src/gallium/targets/egl-static/Makefile.am |4 ++--
 src/gallium/targets/gbm/Makefile.am|2 +-
 src/gallium/targets/libgl-xlib/Makefile.am |2 +-
 src/gallium/targets/opencl/Makefile.am |2 +-
 src/gallium/targets/pipe-loader/Makefile.am|2 +-
 src/gallium/targets/vdpau-nouveau/Makefile.am  |2 +-
 src/gallium/targets/vdpau-r300/Makefile.am |2 +-
 src/gallium/targets/vdpau-r600/Makefile.am |2 +-
 src/gallium/targets/vdpau-radeonsi/Makefile.am |2 +-
 src/gallium/targets/vdpau-softpipe/Makefile.am |2 +-
 src/gallium/targets/xa-vmwgfx/Makefile.am  |2 +-
 src/gallium/targets/xorg-i915/Makefile.am  |2 +-
 src/gallium/targets/xorg-nouveau/Makefile.am   |2 +-
 src/gallium/targets/xorg-r300/Makefile.am  |2 +-
 src/gallium/targets/xorg-r600/Makefile.am  |2 +-
 src/gallium/targets/xorg-radeonsi/Makefile.am  |2 +-
 src/gallium/targets/xvmc-nouveau/Makefile.am   |2 +-
 src/gallium/targets/xvmc-r300/Makefile.am  |2 +-
 src/gallium/targets/xvmc-r600/Makefile.am  |2 +-
 src/gallium/targets/xvmc-softpipe/Makefile.am  |2 +-
 src/gallium/tests/trivial/Makefile.am  |2 +-
 src/gallium/tests/unit/Makefile.am |2 +-
 32 Dateien geändert, 48 Zeilen hinzugefügt(+), 39 Zeilen entfernt(-)

diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index a4eee47..21b3c6b 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,13 +3,17 @@ AUTOMAKE_OPTIONS = subdir-objects
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-noinst_LTLIBRARIES = libgallium.la
+lib_LTLIBRARIES = libgallium@VERSION@.la
+
+libgallium@VERSION@_la_LDFLAGS = -Wl,--no-undefined -shared -avoid-version
+
+libgallium@VERSION@_la_LIBADD = $(DLOPEN_LIBS) $(CLOCK_LIB)
 
 AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
$(GALLIUM_CFLAGS)
 
-libgallium_la_SOURCES = \
+libgallium@VERSION@_la_SOURCES = \
$(C_SOURCES) \
$(GENERATED_SOURCES)
 
@@ -28,10 +32,14 @@ AM_CXXFLAGS += -fno-rtti
 
 endif
 
-libgallium_la_SOURCES += \
+libgallium@VERSION@_la_SOURCES += \
$(GALLIVM_SOURCES) \
$(GALLIVM_CPP_SOURCES)
 
+libgallium@VERSION@_la_LIBADD += $(LLVM_LIBS)
+
+libgallium@VERSION@_la_LDFLAGS += $(LLVM_LDFLAGS)
+
 endif
 
 indices/u_indices_gen.c: $(srcdir)/indices/u_indices_gen.py
diff --git a/src/gallium/drivers/llvmpipe/Makefile.am 
b/src/gallium/drivers/llvmpipe/Makefile.am
index 78cb95d..3fd8d00 100644
--- a/src/gallium/drivers/llvmpipe/Makefile.am
+++ b/src/gallium/drivers/llvmpipe/Makefile.am
@@ -86,22 +86,22 @@ check_PROGRAMS = \
 TESTS = $(check_PROGRAMS)
 
 lp_test_format_SOURCES = lp_test_format.c lp_test_main.c
-lp_test_format_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la 
$(LLVM_LIBS)
+lp_test_format_LDADD = libllvmpipe.la ../../auxiliary/libgallium@VERSION@.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_format_SOURCES = dummy.cpp
 
 lp_test_arit_SOURCES = lp_test_arit.c lp_test_main.c
-lp_test_arit_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la $(LLVM_LIBS)
+lp_test_arit_LDADD = libllvmpipe.la ../../auxiliary/libgallium@VERSION@.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_arit_SOURCES = dummy.cpp
 
 lp_test_blend_SOURCES = lp_test_blend.c lp_test_main.c
-lp_test_blend_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la $(LLVM_LIBS)
+lp_test_blend_LDADD = libllvmpipe.la ../../auxiliary/libgallium@VERSION@.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_blend_SOURCES = dummy.cpp
 
 lp_test_conv_SOURCES = lp_test_conv.c lp_test_main.c
-lp_test_conv_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la $(LLVM_LIBS)
+lp_test_conv_LDADD = libllvmpipe.la ../../auxiliary/libgallium@VERSION@.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_conv_SOURCES = dummy.cpp
 
 lp_test_printf_SOURCES = lp_test_printf.c lp_test_main.c
-lp_test_printf_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la 
$(LLVM_LIBS)
+lp_test_printf_LDADD = libllvmpipe.la ../../auxiliary/libgallium@VERSION@.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_printf_SOURCES = dummy.cpp
 
diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index e6eb241..b6f1703 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -4,7 +4,7 @@ include 

[Mesa-dev] [PATCH 07/11] Clang should warn only about unused CFLAGS and CXXFLAGS on debug builds.

2013-01-11 Thread Johannes Obermayr
---
 configure.ac |6 ++
 1 Datei geändert, 6 Zeilen hinzugefügt(+)

diff --git a/configure.ac b/configure.ac
index 5bbcf05..3893570 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1994,6 +1994,12 @@ dnl Restore LDFLAGS and CPPFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 CPPFLAGS=$_SAVE_CPPFLAGS
 
+dnl Clang should warn only about unused CFLAGS and CXXFLAGS on debug builds
+if test x$acv_mesa_CLANG = xyes  test x$enable_debug = xno; then
+CFLAGS=$CFLAGS -Qunused-arguments
+CXXFLAGS=$CXXFLAGS -Qunused-arguments
+fi
+
 dnl Add user CFLAGS and CXXFLAGS
 cflags=$CFLAGS
 cxxflags=$CXXFLAGS
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 06/11] configure.ac: Save user {C,CXX}FLAGS and append them at end.

2013-01-11 Thread Johannes Obermayr
This way the user has the privilege of last decision and so the option to build 
an optimized debug build again.
---
 configure.ac |   14 --
 1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index 10b306e..5bbcf05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,12 @@ cygwin*)
 ;;
 esac
 
+dnl Save user {C,CXX}FLAGS
+USER_CFLAGS=$CFLAGS
+USER_CXXFLAGS=$CXXFLAGS
+CFLAGS=
+CXXFLAGS=
+
 dnl Add flags for gcc and g++
 if test x$GCC = xyes; then
 case $host_os in
@@ -1989,6 +1995,8 @@ LDFLAGS=$_SAVE_LDFLAGS
 CPPFLAGS=$_SAVE_CPPFLAGS
 
 dnl Add user CFLAGS and CXXFLAGS
+cflags=$CFLAGS
+cxxflags=$CXXFLAGS
 CFLAGS=$CFLAGS $USER_CFLAGS
 CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
 
@@ -2229,14 +2237,16 @@ echo Shared-glapi:$enable_shared_glapi
 
 dnl Compiler options
 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS | \
+cflags=`echo $cflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS | \
+cxxflags=`echo $cxxflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
 defines=`echo $DEFINES | $SED 's/^ *//;s/  */ /;s/ *$//'`
 echo 
 echo CFLAGS:  $cflags
+echo USER_CFLAGS: $USER_CFLAGS
 echo CXXFLAGS:$cxxflags
+echo USER_CXXFLAGS:   $USER_CXXFLAGS
 echo Macros:  $defines
 echo 
 if test x$MESA_LLVM = x1; then
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 08/11] tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).

2013-01-11 Thread Johannes Obermayr
---
 src/glsl/tests/Makefile.am |9 +
 src/glx/tests/Makefile.am  |   10 +-
 src/mapi/shared-glapi/tests/Makefile.am|6 +++---
 src/mesa/main/tests/hash_table/Makefile.am |2 +-
 4 Dateien geändert, 14 Zeilen hinzugefügt(+), 13 Zeilen entfernt(-)

diff --git a/src/glsl/tests/Makefile.am b/src/glsl/tests/Makefile.am
index 957bb55..eaf5a3c 100644
--- a/src/glsl/tests/Makefile.am
+++ b/src/glsl/tests/Makefile.am
@@ -1,8 +1,9 @@
 AM_CPPFLAGS = \
-   -I$(top_builddir)/src/gtest/include \
-   -I$(top_builddir)/src/mesa \
-   -I$(top_builddir)/src/mapi \
-   -I$(top_builddir)/src/glsl
+   -I$(top_srcdir)/src/gtest/include \
+   -I$(top_srcdir)/src/mesa \
+   -I$(top_srcdir)/src/mapi \
+   -I$(top_srcdir)/src/glsl \
+   -I$(top_srcdir)/include
 
 TESTS_ENVIRONMENT= \
export PYTHON2=$(PYTHON2); \
diff --git a/src/glx/tests/Makefile.am b/src/glx/tests/Makefile.am
index 83626fd..d940712 100644
--- a/src/glx/tests/Makefile.am
+++ b/src/glx/tests/Makefile.am
@@ -1,11 +1,11 @@
 if HAVE_SHARED_GLAPI
 AM_CFLAGS = $(PTHREAD_CFLAGS)
 AM_CPPFLAGS = \
-   -I$(top_builddir)/src/gtest/include \
-   -I$(top_builddir)/src/mapi \
-   -I$(top_builddir)/src/mesa \
-   -I$(top_builddir)/src/glx \
-   -I$(top_builddir)/include \
+   -I$(top_srcdir)/src/gtest/include \
+   -I$(top_srcdir)/src/mapi \
+   -I$(top_srcdir)/src/mesa \
+   -I$(top_srcdir)/src/glx \
+   -I$(top_srcdir)/include \
$(X11_CFLAGS)
 
 TESTS = glx-test
diff --git a/src/mapi/shared-glapi/tests/Makefile.am 
b/src/mapi/shared-glapi/tests/Makefile.am
index 23d0208..98065fc 100644
--- a/src/mapi/shared-glapi/tests/Makefile.am
+++ b/src/mapi/shared-glapi/tests/Makefile.am
@@ -1,9 +1,9 @@
 if HAVE_SHARED_GLAPI
 AM_CFLAGS = $(PTHREAD_CFLAGS)
 AM_CPPFLAGS = \
-   -I$(top_builddir)/src/gtest/include \
-   -I$(top_builddir)/src/mapi \
-   -I$(top_builddir)/include
+   -I$(top_srcdir)/src/gtest/include \
+   -I$(top_srcdir)/src/mapi \
+   -I$(top_srcdir)/include
 
 TESTS = shared-glapi-test
 check_PROGRAMS = shared-glapi-test
diff --git a/src/mesa/main/tests/hash_table/Makefile.am 
b/src/mesa/main/tests/hash_table/Makefile.am
index 5a4aac3..272c63a 100644
--- a/src/mesa/main/tests/hash_table/Makefile.am
+++ b/src/mesa/main/tests/hash_table/Makefile.am
@@ -19,7 +19,7 @@
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 AM_CPPFLAGS = \
--I../.. \
+   -I$(top_srcdir)/src/mesa/main \
$(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
 
 LDADD = \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 09/11] gtest: Build it only for 'make check'.

2013-01-11 Thread Johannes Obermayr
---
 src/gtest/Makefile.am |2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/gtest/Makefile.am b/src/gtest/Makefile.am
index 7defa34..4188c6b 100644
--- a/src/gtest/Makefile.am
+++ b/src/gtest/Makefile.am
@@ -22,7 +22,7 @@
 AM_CFLAGS = $(DEFINES) -I$(top_srcdir)/src/gtest/include
 AM_CXXFLAGS = $(DEFINES) -I$(top_srcdir)/src/gtest/include
 
-noinst_LTLIBRARIES = libgtest.la
+check_LTLIBRARIES = libgtest.la
 
 libgtest_la_SOURCES = \
src/gtest-all.cc \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 10/11] radeon, clover: Make it compile on LLVM = r171366.

2013-01-11 Thread Johannes Obermayr
---
 src/gallium/drivers/r600/Makefile.am  |3 ++-
 src/gallium/drivers/r600/llvm_wrapper.cpp |4 
 src/gallium/drivers/radeon/radeon_llvm_emit.cpp   |   10 --
 src/gallium/state_trackers/clover/llvm/invocation.cpp |   16 +---
 4 Dateien geändert, 23 Zeilen hinzugefügt(+), 10 Zeilen entfernt(-)

diff --git a/src/gallium/drivers/r600/Makefile.am 
b/src/gallium/drivers/r600/Makefile.am
index ac8e12b..2633c03 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -30,7 +30,8 @@ AM_CFLAGS += \
-I$(top_srcdir)/src/gallium/drivers/radeon/
 
 AM_CXXFLAGS= \
-   $(LLVM_CXXFLAGS)
+   $(LLVM_CXXFLAGS) \
+   $(DEFINES)
 endif
 
 if USE_R600_LLVM_COMPILER
diff --git a/src/gallium/drivers/r600/llvm_wrapper.cpp 
b/src/gallium/drivers/r600/llvm_wrapper.cpp
index 81f5397..cf9f741 100644
--- a/src/gallium/drivers/r600/llvm_wrapper.cpp
+++ b/src/gallium/drivers/r600/llvm_wrapper.cpp
@@ -1,6 +1,10 @@
 #include llvm/ADT/OwningPtr.h
 #include llvm/ADT/StringRef.h
+#if HAVE_LLVM  0x0302
+#include llvm/IR/LLVMContext.h
+#else
 #include llvm/LLVMContext.h
+#endif
 #include llvm/PassManager.h
 #include llvm/Support/IRReader.h
 #include llvm/Support/MemoryBuffer.h
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp 
b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
index 903e102..b554d9b 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
@@ -25,10 +25,17 @@
  */
 #include radeon_llvm_emit.h
 
+#include llvm/ADT/Triple.h
+#if HAVE_LLVM  0x0302
+#include llvm/IR/DataLayout.h
+#include llvm/IR/LLVMContext.h
+#include llvm/IR/Module.h
+#else
+#include llvm/DataLayout.h
 #include llvm/LLVMContext.h
 #include llvm/Module.h
+#endif
 #include llvm/PassManager.h
-#include llvm/ADT/Triple.h
 #include llvm/Support/FormattedStream.h
 #include llvm/Support/Host.h
 #include llvm/Support/IRReader.h
@@ -39,7 +46,6 @@
 #include llvm/Target/TargetMachine.h
 #include llvm/Transforms/Scalar.h
 #include llvm-c/Target.h
-#include llvm/DataLayout.h
 
 #include iostream
 #include stdlib.h
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp 
b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 0bd8e22..1d09acc 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -28,10 +28,18 @@
 #include clang/CodeGen/CodeGenAction.h
 #include llvm/Bitcode/BitstreamWriter.h
 #include llvm/Bitcode/ReaderWriter.h
+#if HAVE_LLVM  0x0302
+#include llvm/IR/DataLayout.h
+#include llvm/IR/DerivedTypes.h
+#include llvm/IR/LLVMContext.h
+#include llvm/IR/Module.h
+#else
+#include llvm/DataLayout.h
 #include llvm/DerivedTypes.h
-#include llvm/Linker.h
 #include llvm/LLVMContext.h
 #include llvm/Module.h
+#endif
+#include llvm/Linker.h
 #include llvm/PassManager.h
 #include llvm/Support/TargetSelect.h
 #include llvm/Support/MemoryBuffer.h
@@ -39,12 +47,6 @@
 #include llvm/Transforms/IPO.h
 #include llvm/Transforms/IPO/PassManagerBuilder.h
 
-#if HAVE_LLVM  0x0302
-#include llvm/Target/TargetData.h
-#else
-#include llvm/DataLayout.h
-#endif
-
 #include pipe/p_state.h
 #include util/u_memory.h
 
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 11/11] r200: Fix probable thinko in r200EmitArrays

2013-01-11 Thread Johannes Obermayr
From: Adam Jackson a...@redhat.com

Effectively this path would always assert.  Move the break statement to
the (probable) intended place.

Note: This is a candidate for the stable branches.

Signed-off-by: Adam Jackson a...@redhat.com
---
 src/mesa/drivers/dri/r200/r200_maos_arrays.c |3 ++-
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c 
b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 973dcaf..d7607bc 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -166,8 +166,9 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte 
*vimap_rev )
   /* fallthrough */
case 4:
   vfmt0 |= R200_VTX_W1;
-   break;
+  /* fallthrough */
}
+   break;
 default:
assert(0);
emitsize = 0;
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] targets/dri-swrast: Force c++ linker in all cases.

2013-01-10 Thread Johannes Obermayr
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59226
---
 src/gallium/targets/dri-swrast/Makefile.am |   10 ++
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)

diff --git a/src/gallium/targets/dri-swrast/Makefile.am 
b/src/gallium/targets/dri-swrast/Makefile.am
index 82fcfd2..62b5922 100644
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ b/src/gallium/targets/dri-swrast/Makefile.am
@@ -58,17 +58,11 @@ swrast_dri_la_LIBADD = \
$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
$(GALLIUM_DRI_LIB_DEPS)
 
-if HAVE_MESA_LLVM
-swrast_dri_la_LINK = $(CXXLINK) $(swrast_dri_la_LDFLAGS)
-# Mention a dummy pure C++ file to trigger generation of the $(LINK) variable
-nodist_EXTRA_swrast_dri_la_SOURCES = dummy-cpp.cpp
+nodist_EXTRA_swrast_dri_la_SOURCES = dummy.cpp
 
+if HAVE_MESA_LLVM
 AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
 swrast_dri_la_LIBADD += 
$(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
-else
-swrast_dri_la_LINK = $(LINK) $(swrast_dri_la_LDFLAGS)
-# Mention a dummy pure C file to trigger generation of the $(LINK) variable
-nodist_EXTRA_swrast_dri_la_SOURCES = dummy-c.c
 endif
 
 # Provide compatibility with scripts for the old Mesa build system for
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] nv50/codegen/nv50_ir.cpp: #include typeinfo on -DNDEBUG.

2012-12-30 Thread Johannes Obermayr
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58879
---
On debug builds it is included:
nv50_ir.cpp:23 - nv50_ir.h:33 - nv50_ir_util.h:33 - typeinfo
---
 src/gallium/drivers/nv50/codegen/nv50_ir.cpp |4 
 1 Datei geändert, 4 Zeilen hinzugefügt(+)

diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp 
b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
index 335e9e0..0bce2ce 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
@@ -24,6 +24,10 @@
 #include nv50_ir_target.h
 #include nv50_ir_driver.h
 
+#ifdef NDEBUG
+# include typeinfo
+#endif 
+
 extern C {
 #include nv50/nv50_program.h
 #include nv50/nv50_debug.h
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Save user {C, CXX}FLAGS and append them at end.

2012-12-23 Thread Johannes Obermayr
Am Samstag, 22. Dezember 2012, 16:34:48 schrieben Sie:
 On Sat, Dec 22, 2012 at 10:47 AM, Johannes Obermayr
 johannesoberm...@gmx.de wrote:
  Am Samstag, 22. Dezember 2012, 09:21:33 schrieb Matt Turner:
  On Sat, Dec 22, 2012 at 9:16 AM, Johannes Obermayr
  johannesoberm...@gmx.de wrote:
   This way the user has the privilege of last decision and so the option 
   to build an optimized debug build again.
   ---
 
  You can just do CFLAGS=-g -O2 ./configure can't you?
 
  Nope.
 
  CXXFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' 
  CFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
  -funwind-tables -fasynchronous-unwind-tables -g' ./autogen.sh 
  --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu 
  --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
  --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
  --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib 
  --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
  --infodir=/usr/share/info --disable-dependency-tracking --enable-xvmc 
  --enable-vdpau --enable-texture-float --enable-debug 
  --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast 
  --with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast --enable-dri 
  --enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg 
  --enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa -
 -ena
   ble-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl 
  --enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls
 
  Resulting Makefile:
  before:
  CFLAGS = -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
  -funwind-tables -fasynchronous-unwind-tables -g -Wall -std=c99 
  -Werror=implicit-function-declaration -Werror=missing-prototypes 
  -fno-strict-aliasing -fno-builtin-memcmp -g -O0
 
  after:
  CFLAGS =  -Wall -std=c99 -Werror=implicit-function-declaration 
  -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -g -O0 
  -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
  -funwind-tables -fasynchronous-unwind-tables -g
 
  You see configure CFLAGS and initial CFLAGS are vice versa.
 
 The real fix here is not to have configure.ac touch CFLAGS at all like
 any reasonable autotools project. That was an unfortunate shortcut
 during the initial work. That would be a lot more effort, though.

Initial work after ~ 5 years?
http://cgit.freedesktop.org/mesa/mesa/commit/?id=122345876479cf5cf553e38162ab105658614ab7

Btw:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff2efdf5997d20b41f7a82b77118366e6fbd23bc
http://cgit.freedesktop.org/mesa/mesa/commit/?id=33ae29c93b8f70a86dcedc495dd658a5d5679db3

This patch covers the motivation for commit 33ae29c.

 
 However, the typical convention is that the user's CFLAGS come first
 (see any automake COMPILE or LTCOMPILE definition), mostly so that any
 user specified -I paths take precedence. That's unfortunate when -O
 options to gcc are last one wins, but that's how things have typically
 been. I would make this change very cautiously.
 
 --
 Dan

And here is the real reason for my request:

/usr/lib64/mesa-demos/egl/opengl/xeglgears

AMD Fusion   (fps)  Nvidia ION (fps)
-O0 -O2 -O0 -O2
562,7   750,778 0,33641,851 921,464 0,44
701,756 662,877 -0,06   693,752 1000,1960,44
571,566 665,052 0,16692,196 936,147 0,35
542,715 664,658 0,22693,733 995,499 0,43
542,935 664,78  0,22692,702 992,634 0,43
542,574 665,398 0,23692,835 998,665 0,44
542,945 663,087 0,22691,353 998,319 0,44
541,732 664,253 0,23656,32  995,91  0,52
543,392 665,078 0,22691,084 994,037 0,44
542,901 663,406 0,22693,464 996,858 0,44
5635,2166729,3670,196839,29 9829,7290,44 
(sum)

- Performance + 19 % on AMD Fusion, + 44 % on Nvidia ION on debug build with 
-O2. :-)

Usual users should build Mesa with default FLAGS. Advanced users should be able 
to build it with their own FLAGS without modifying source.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] Merge automake branch

2012-12-22 Thread Johannes Obermayr
Am Samstag, 22. Dezember 2012, 02:12:55 schrieb Michel Dänzer:
 On Sam, 2012-12-22 at 01:06 +0100, Johannes Obermayr wrote: 
  Am Samstag, 22. Dezember 2012, 00:31:16 schrieb Michel Dänzer:
   On Fre, 2012-12-21 at 22:43 +0100, Johannes Obermayr wrote: 
Am Freitag, 21. Dezember 2012, 16:48:59 schrieb Michel Dänzer:
 On Fre, 2012-12-21 at 06:31 +0100, Johannes Obermayr wrote: 
  
  Please pull the code from:
  git://github.com/jobermayr/mesa.git  branch: master
  
  To view it online:
  https://github.com/jobermayr/mesa
  
  Following changes since automake-gallium6:
  - link shared libgallium against some LLVM libs
  - drivers/radeon must be build shared to fix egl_gallium.so on 
  r600/radeonsi builds
  - radeonsi and clover/opencl can be built against LLVM 3.3 trunk
  - merged some commits
  - based on current git master
 
 Sounds good. Sorry to be the bearer of bad news again, but it fails to
 build --with-llvm-shared-libs:
 
 make[4]: Entering directory 
 `/home/daenzer/src/mesa-git/mesa/src/gallium/auxiliary'
 make[4]: *** No rule to make target `-lLLVM-3.2svn', needed by 
 `libgallium9.1.0.la'.  Stop.
 

Rebased automake branch.

Following improvements:

- add $(LLVM_LDFLAGS) to libgallium@VERSION@_la_LDFLAGS to find
-lLLVM-3.2svn in a non-default dir (should solve Michel's issue)
   
   libgallium builds now, thanks.
   
   
I am looking forward to get another to solve setback from Michel :-)
   
   libllvmradeon fails to build with hundreds of unresolved LLVM symbols,
   see below.
   
   
 CXXLD  libllvmradeon9.1.0.la
  snip
  
  rebased again:
  Added $(LLVM_LDFLAGS) to libllvmradeon@VERSION@_la_LDFLAGS - maybe enough
  
  Additionally added $(LLVM_LIBS), $(DLOPEN_LIBS) and $(CLOCK_LIB) to 
  libllvmradeon@VERSION@_la_LIBADD
  - Please try whether these are really needed.
 
 $(LLVM_LIBS) and $(CLOCK_LIB) are needed for me, $(DLOPEN_LIBS) isn't.
 
 
 Thanks,
 

Rebased it again.

Removed $(DLOPEN_LIBS) - we should add it again if sb. really needs it.

Merged targets/pipe-loader v3 and v4 to benefit at the right place:
https://github.com/jobermayr/mesa/commit/67abcf095a111d35ecb21d5da100f7a7b1b6bc22

Matt, you should be able to merge it to master now. :-)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] configure.ac: Save user {C,CXX}FLAGS and append them at end.

2012-12-22 Thread Johannes Obermayr
This way the user has the privilege of last decision and so the option to build 
an optimized debug build again.
---
 configure.ac |   14 --
 1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index 759cbaa..d3d9d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,6 +164,12 @@ cygwin*)
 ;;
 esac
 
+dnl Save user {C,CXX}FLAGS
+USER_CFLAGS=$CFLAGS
+USER_CXXFLAGS=$CXXFLAGS
+CFLAGS=
+CXXFLAGS= 
+
 dnl Add flags for gcc and g++
 if test x$GCC = xyes; then
 case $host_os in
@@ -1985,6 +1991,8 @@ LDFLAGS=$_SAVE_LDFLAGS
 CPPFLAGS=$_SAVE_CPPFLAGS
 
 dnl Add user CFLAGS and CXXFLAGS
+cflags=$CFLAGS
+cxxflags=$CXXFLAGS
 CFLAGS=$CFLAGS $USER_CFLAGS
 CXXFLAGS=$CXXFLAGS $USER_CXXFLAGS
 
@@ -2224,14 +2232,16 @@ echo Shared-glapi:$enable_shared_glapi
 
 dnl Compiler options
 # cleanup the CFLAGS/CXXFLAGS/DEFINES vars
-cflags=`echo $CFLAGS | \
+cflags=`echo $cflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
-cxxflags=`echo $CXXFLAGS | \
+cxxflags=`echo $cxxflags | \
 $SED 's/^ *//;s/  */ /;s/ *$//'`
 defines=`echo $DEFINES | $SED 's/^ *//;s/  */ /;s/ *$//'`
 echo 
 echo CFLAGS:  $cflags
+echo USER_CFLAGS: $USER_CFLAGS
 echo CXXFLAGS:$cxxflags
+echo USER_CXXFLAGS:   $USER_CXXFLAGS
 echo Macros:  $defines
 echo 
 if test x$MESA_LLVM = x1; then
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] configure.ac: Save user {C, CXX}FLAGS and append them at end.

2012-12-22 Thread Johannes Obermayr
Am Samstag, 22. Dezember 2012, 09:21:33 schrieb Matt Turner:
 On Sat, Dec 22, 2012 at 9:16 AM, Johannes Obermayr
 johannesoberm...@gmx.de wrote:
  This way the user has the privilege of last decision and so the option to 
  build an optimized debug build again.
  ---
 
 You can just do CFLAGS=-g -O2 ./configure can't you?

Nope.

CXXFLAGS='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables -g' CFLAGS='-fmessage-length=0 -O2 
-Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g' ./autogen.sh --host=x86_64-suse-linux-gnu 
--build=x86_64-suse-linux-gnu --program-prefix= --prefix=/usr 
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc 
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 
--libexecdir=/usr/lib --localstatedir=/var --sharedstatedir=/usr/com 
--mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking 
--enable-xvmc --enable-vdpau --enable-texture-float --enable-debug 
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast 
--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast --enable-dri 
--enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg 
--enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa --ena
 ble-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl 
--enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls

Resulting Makefile:
before:
CFLAGS = -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables -g -Wall -std=c99 
-Werror=implicit-function-declaration -Werror=missing-prototypes 
-fno-strict-aliasing -fno-builtin-memcmp -g -O0

after:
CFLAGS =  -Wall -std=c99 -Werror=implicit-function-declaration 
-Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -g -O0 
-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables -g

You see configure CFLAGS and initial CFLAGS are vice versa.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH automake] Support LLVM = 3.2 on radeonsi and opencl.

2012-12-21 Thread Johannes Obermayr
Am Freitag, 21. Dezember 2012, 10:58:53 schrieb Mike Lothian:
 Should the warning be updated to say you can now use llvm svn master with
 --enable-experimental-targets=R600?

Nope. Tom's git repository contains the stable branch (3.2) of LLVM and what I 
can see most of the work is based on AMDGPU (because it is git) before it will 
be pushed to R600 on LLVM svn trunk.

IMHO changing the development model will cause a change of the warning message.

 On 20 Dec 2012 19:58, Johannes Obermayr johannesoberm...@gmx.de wrote:
 
  ---
  Because Tom's LLVM 3.2 git repository uses AMDGPU and LLVM 3.3 trunk uses
  R600 we must adapt Mesa a bit to support both.
 
  This patch works only for automake branch because it requires
  LLVM_VERSION_INT from:
 
  http://cgit.freedesktop.org/~mattst88/mesa/commit/?h=automake-gallium6id=b772e110a2d744e782114859d475d109862a672d
 
  Clover tested with LLVM trunk and opencl-example/run_tests.sh on AMD
  Fusion (ASUS E35M1-I Deluxe) by me.
  ---
   configure.ac|   11 ++-
   src/gallium/drivers/radeon/radeon_llvm_emit.cpp |7 +++
   2 Dateien geändert, 13 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)
 
  diff --git a/configure.ac b/configure.ac
  index 03e96c7..13f6127 100644
  --- a/configure.ac
  +++ b/configure.ac
  @@ -1779,22 +1779,23 @@ gallium_require_drm_loader() {
   radeon_llvm_check() {
   LLVM_REQUIRED_VERSION_MAJOR=3
   LLVM_REQUIRED_VERSION_MINOR=2
  -LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
  -LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
  -if test $LLVM_AVAILABLE_VERSION_MAJOR -lt
  $LLVM_REQUIRED_VERSION_MAJOR -o [ $LLVM_AVAILABLE_VERSION_MAJOR -eq
  $LLVM_REQUIRED_VERSION_MAJOR -a $LLVM_AVAILABLE_VERSION_MINOR -lt
  $LLVM_REQUIRED_VERSION_MINOR ] ; then
  +if test $LLVM_VERSION_INT -lt
  ${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}; then
   AC_MSG_ERROR([LLVM
  $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with
  AMDGPU target enabled is required.
To use the r600/radeonsi LLVM backend, you need to
  fetch the LLVM source from:
git://people.freedesktop.org/~tstellar/llvm master
and build with --enable-experimental-targets=AMDGPU])
   fi
  -if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\'
  ; then
  +if test true  llvm-config --targets-built | grep -v -e '\AMDGPU\'
  -e '\R600\' /dev/null; then
   AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
 To use the r600/radeonsi LLVM backend, you need to
  fetch the LLVM source from:
 git://people.freedesktop.org/~tstellar/llvm master
 and build with
  --enable-experimental-targets=AMDGPU])
   fi
   AC_MSG_WARN([Please ensure you use the latest llvm tree from git://
  people.freedesktop.org/~tstellar/llvm master before submitting a bug])
  -if test x$LLVM_VERSION = x3.2; then
  +if test $LLVM_VERSION_INT -ge 303; then
  +LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs r600`
  +fi
  +if test $LLVM_VERSION_INT -eq 302; then
   LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
   fi
   }
  diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
  b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
  index 21661a0..3ffd997 100644
  --- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
  +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
  @@ -89,10 +89,17 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char **
  bytes,
 
  Triple AMDGPUTriple(sys::getDefaultTargetTriple());
 
  +#if HAVE_LLVM == 0x0302
  LLVMInitializeAMDGPUTargetInfo();
  LLVMInitializeAMDGPUTarget();
  LLVMInitializeAMDGPUTargetMC();
  LLVMInitializeAMDGPUAsmPrinter();
  +#else
  +   LLVMInitializeR600TargetInfo();
  +   LLVMInitializeR600Target();
  +   LLVMInitializeR600TargetMC();
  +   LLVMInitializeR600AsmPrinter();
  +#endif
 
  std::string err;
  const Target * AMDGPUTarget = TargetRegistry::lookupTarget(r600,
  err);
  --
  1.7.10.4
 
  ___
  mesa-dev mailing list
  mesa-dev@lists.freedesktop.org
  http://lists.freedesktop.org/mailman/listinfo/mesa-dev
 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] Merge automake branch

2012-12-21 Thread Johannes Obermayr
Am Freitag, 21. Dezember 2012, 16:48:59 schrieb Michel Dänzer:
 On Fre, 2012-12-21 at 06:31 +0100, Johannes Obermayr wrote: 
  
  Please pull the code from:
  git://github.com/jobermayr/mesa.git  branch: master
  
  To view it online:
  https://github.com/jobermayr/mesa
  
  Following changes since automake-gallium6:
  - link shared libgallium against some LLVM libs
  - drivers/radeon must be build shared to fix egl_gallium.so on 
  r600/radeonsi builds
  - radeonsi and clover/opencl can be built against LLVM 3.3 trunk
  - merged some commits
  - based on current git master
 
 Sounds good. Sorry to be the bearer of bad news again, but it fails to
 build --with-llvm-shared-libs:
 
 make[4]: Entering directory 
 `/home/daenzer/src/mesa-git/mesa/src/gallium/auxiliary'
 make[4]: *** No rule to make target `-lLLVM-3.2svn', needed by 
 `libgallium9.1.0.la'.  Stop.
 

Rebased automake branch.

Following improvements:

- add $(LLVM_LDFLAGS) to libgallium@VERSION@_la_LDFLAGS to find -lLLVM-3.2svn 
in a non-default dir (should solve Michel's issue)

- build libdricore@VERSION@ '-shared -avoid-version' to fit 
libllvmradeon@VERSION@ and libgallium@VERSION@
- add '-Wl,--no-undefined' and libglapi for TLS builds to solve a undefined 
symbol

- targets/pipe-loader will be build just once if --enable-gallium-gbm and 
--enable-opencl (gbm completely missed it in automake branch)
- finally removed now unnecessary compatibilty for old build system


I am looking forward to get another to solve setback from Michel :-)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [RFC] Merge automake branch

2012-12-21 Thread Johannes Obermayr
Am Samstag, 22. Dezember 2012, 00:31:16 schrieb Michel Dänzer:
 On Fre, 2012-12-21 at 22:43 +0100, Johannes Obermayr wrote: 
  Am Freitag, 21. Dezember 2012, 16:48:59 schrieb Michel Dänzer:
   On Fre, 2012-12-21 at 06:31 +0100, Johannes Obermayr wrote: 

Please pull the code from:
git://github.com/jobermayr/mesa.git  branch: master

To view it online:
https://github.com/jobermayr/mesa

Following changes since automake-gallium6:
- link shared libgallium against some LLVM libs
- drivers/radeon must be build shared to fix egl_gallium.so on 
r600/radeonsi builds
- radeonsi and clover/opencl can be built against LLVM 3.3 trunk
- merged some commits
- based on current git master
   
   Sounds good. Sorry to be the bearer of bad news again, but it fails to
   build --with-llvm-shared-libs:
   
   make[4]: Entering directory 
   `/home/daenzer/src/mesa-git/mesa/src/gallium/auxiliary'
   make[4]: *** No rule to make target `-lLLVM-3.2svn', needed by 
   `libgallium9.1.0.la'.  Stop.
   
  
  Rebased automake branch.
  
  Following improvements:
  
  - add $(LLVM_LDFLAGS) to libgallium@VERSION@_la_LDFLAGS to find
  -lLLVM-3.2svn in a non-default dir (should solve Michel's issue)
 
 libgallium builds now, thanks.
 
 
  I am looking forward to get another to solve setback from Michel :-)
 
 libllvmradeon fails to build with hundreds of unresolved LLVM symbols,
 see below.
 
 
   CXXLD  libllvmradeon9.1.0.la
snip

rebased again:
Added $(LLVM_LDFLAGS) to libllvmradeon@VERSION@_la_LDFLAGS - maybe enough

Additionally added $(LLVM_LIBS), $(DLOPEN_LIBS) and $(CLOCK_LIB) to 
libllvmradeon@VERSION@_la_LIBADD
- Please try whether these are really needed. My OBS build host can resolve 
them itself.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] Support LLVM = 3.2 on radeonsi and opencl.

2012-12-20 Thread Johannes Obermayr
---
Because Tom's LLVM 3.2 git repository uses AMDGPU and LLVM 3.3 trunk uses R600 
we must adapt Mesa a bit to support both.

This patch works only for automake branch because it requires LLVM_VERSION_INT 
from:
http://cgit.freedesktop.org/~mattst88/mesa/commit/?h=automake-gallium6id=b772e110a2d744e782114859d475d109862a672d

Clover tested with LLVM trunk and opencl-example/run_tests.sh on AMD Fusion 
(ASUS E35M1-I Deluxe) by me.
---
 configure.ac|   11 ++-
 src/gallium/drivers/radeon/radeon_llvm_emit.cpp |7 +++
 2 Dateien geändert, 13 Zeilen hinzugefügt(+), 5 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index 03e96c7..13f6127 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1779,22 +1779,23 @@ gallium_require_drm_loader() {
 radeon_llvm_check() {
 LLVM_REQUIRED_VERSION_MAJOR=3
 LLVM_REQUIRED_VERSION_MINOR=2
-LLVM_AVAILABLE_VERSION_MAJOR=`echo $LLVM_VERSION | cut -d. -f1`
-LLVM_AVAILABLE_VERSION_MINOR=`echo $LLVM_VERSION | cut -d. -f2`
-if test $LLVM_AVAILABLE_VERSION_MAJOR -lt $LLVM_REQUIRED_VERSION_MAJOR 
-o [ $LLVM_AVAILABLE_VERSION_MAJOR -eq $LLVM_REQUIRED_VERSION_MAJOR -a 
$LLVM_AVAILABLE_VERSION_MINOR -lt $LLVM_REQUIRED_VERSION_MINOR ] ; then
+if test $LLVM_VERSION_INT -lt 
${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}; then
 AC_MSG_ERROR([LLVM 
$LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR or newer with AMDGPU 
target enabled is required.
  To use the r600/radeonsi LLVM backend, you need to fetch 
the LLVM source from:
  git://people.freedesktop.org/~tstellar/llvm master
  and build with --enable-experimental-targets=AMDGPU])
 fi
-if test true  $LLVM_CONFIG --targets-built | grep -qv '\AMDGPU\' ; then
+if test true  llvm-config --targets-built | grep -v -e '\AMDGPU\' -e 
'\R600\' /dev/null; then
 AC_MSG_ERROR([LLVM AMDGPU Target not enabled.
   To use the r600/radeonsi LLVM backend, you need to fetch 
the LLVM source from:
   git://people.freedesktop.org/~tstellar/llvm master
   and build with --enable-experimental-targets=AMDGPU])
 fi
 AC_MSG_WARN([Please ensure you use the latest llvm tree from 
git://people.freedesktop.org/~tstellar/llvm master before submitting a bug])
-if test x$LLVM_VERSION = x3.2; then
+if test $LLVM_VERSION_INT -ge 303; then
+LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs r600`
+fi
+if test $LLVM_VERSION_INT -eq 302; then
 LLVM_LIBS=$LLVM_LIBS `$LLVM_CONFIG --libs amdgpu`
 fi
 }
diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp 
b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
index 21661a0..3ffd997 100644
--- a/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
+++ b/src/gallium/drivers/radeon/radeon_llvm_emit.cpp
@@ -89,10 +89,17 @@ radeon_llvm_compile(LLVMModuleRef M, unsigned char ** bytes,
 
Triple AMDGPUTriple(sys::getDefaultTargetTriple());
 
+#if HAVE_LLVM == 0x0302
LLVMInitializeAMDGPUTargetInfo();
LLVMInitializeAMDGPUTarget();
LLVMInitializeAMDGPUTargetMC();
LLVMInitializeAMDGPUAsmPrinter();
+#else
+   LLVMInitializeR600TargetInfo();
+   LLVMInitializeR600Target();
+   LLVMInitializeR600TargetMC();
+   LLVMInitializeR600AsmPrinter();
+#endif
 
std::string err;
const Target * AMDGPUTarget = TargetRegistry::lookupTarget(r600, err);
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [RFC] Merge automake branch

2012-12-20 Thread Johannes Obermayr
Maya calendar will reach its end soon and Mesa should be prepared to start in a 
new epoch ;-)

Please pull the code from:
git://github.com/jobermayr/mesa.git  branch: master

To view it online:
https://github.com/jobermayr/mesa

Following changes since automake-gallium6:
- link shared libgallium against some LLVM libs
- drivers/radeon must be build shared to fix egl_gallium.so on r600/radeonsi 
builds
- radeonsi and clover/opencl can be built against LLVM 3.3 trunk
- merged some commits
- based on current git master


Johannes
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] gallium/drivers/radeon: Build it as module to fix egl_gallium.so.

2012-12-19 Thread Johannes Obermayr
Otherwise egl_gallium.so fails to load for all drivers if we build r600 and 
radeonsi together.
---
Now we should be able to merge automake branch :)
---
 src/gallium/drivers/radeon/Makefile.am |9 +
 1 Datei geändert, 9 Zeilen hinzugefügt(+)

diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index adb5ebe..37780c0 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -1,7 +1,16 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
+if HAVE_GALLIUM_R600
+if HAVE_GALLIUM_RADEONSI
+lib_LTLIBRARIES = libradeon.la
+libradeon_la_LDFLAGS = -avoid-version -module
+else
 noinst_LTLIBRARIES = libradeon.la
+endif
+else
+noinst_LTLIBRARIES = libradeon.la
+endif
 
 AM_CXXFLAGS = \
$(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] pipe-loader: Install pipe_* to $(libdir)/gallium-pipe.

2012-12-05 Thread Johannes Obermayr
---
This patch is necessary because gbm and clover use same pipe_*.

In current automake they are installed only in $(libdir)/gbm and clover 
searches in $(libdir)/opencl and of course this cannot work.

The build is triggered by src/gallium/targets/gbm/Makefile.am:23 or 
src/gallium/targets/opencl/Makefile.am:12.

Successfully tested with clover.
Should also work with gbm.
---
 src/gallium/state_trackers/clover/Makefile.am |6 --
 src/gallium/targets/gbm/Makefile.am   |2 +-
 src/gallium/targets/pipe-loader/Makefile.am   |   20 ++--
 3 Dateien geändert, 15 Zeilen hinzugefügt(+), 13 Zeilen entfernt(-)

diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index f068164..7cfccf6 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = subdir-objects
 AM_CPPFLAGS = \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-DMESA_VERSION=\$(MESA_VERSION)\ \
-   -DPIPE_SEARCH_DIR=\$(OPENCL_LIB_INSTALL_DIR)\ \
+   -DPIPE_SEARCH_DIR=\$(libdir)/gallium-pipe\ \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/drivers \
diff --git a/src/gallium/targets/gbm/Makefile.am 
b/src/gallium/targets/gbm/Makefile.am
index 28cf455..cd860d7 100644
--- a/src/gallium/targets/gbm/Makefile.am
+++ b/src/gallium/targets/gbm/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/gbm/main \
-I$(top_srcdir)/src/gallium/winsys \
$(GALLIUM_PIPE_LOADER_DEFINES) \
-   -DPIPE_SEARCH_DIR=\$(gbmdir)\
+   -DPIPE_SEARCH_DIR=\$(libdir)/gallium-pipe\
 
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index d02d1ae..bff92a0 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -10,8 +10,8 @@ AM_CPPFLAGS = \
-DGALLIUM_TRACE \
-DGALLIUM_GALAHAD
 
-gbmdir = $(libdir)/gbm
-gbm_LTLIBRARIES =
+pipedir = $(libdir)/gallium-pipe
+pipe_LTLIBRARIES =
 
 PIPE_LIBS = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
@@ -27,7 +27,7 @@ endif
 
 
 if HAVE_GALLIUM_I915
-gbm_LTLIBRARIES += pipe_i915.la
+pipe_LTLIBRARIES += pipe_i915.la
 pipe_i915_la_SOURCES = pipe_i915.c
 pipe_i915_la_LIBADD = \
$(PIPE_LIBS) \
@@ -44,7 +44,7 @@ endif
 endif
 
 if HAVE_GALLIUM_NOUVEAU
-gbm_LTLIBRARIES += pipe_nouveau.la
+pipe_LTLIBRARIES += pipe_nouveau.la
 pipe_nouveau_la_SOURCES = pipe_nouveau.c
 nodist_EXTRA_pipe_nouveau_la_SOURCES = dummy.cpp
 pipe_nouveau_la_LIBADD = \
@@ -63,7 +63,7 @@ endif
 endif
 
 if HAVE_GALLIUM_R300
-gbm_LTLIBRARIES += pipe_r300.la
+pipe_LTLIBRARIES += pipe_r300.la
 pipe_r300_la_SOURCES = pipe_r300.c
 nodist_EXTRA_pipe_r300_la_SOURCES = dummy.cpp
 pipe_r300_la_LIBADD = \
@@ -81,7 +81,7 @@ endif
 endif
 
 if HAVE_GALLIUM_R600
-gbm_LTLIBRARIES += pipe_r600.la
+pipe_LTLIBRARIES += pipe_r600.la
 pipe_r600_la_SOURCES = pipe_r600.c
 pipe_r600_la_LIBADD = \
$(PIPE_LIBS) \
@@ -98,7 +98,7 @@ endif
 endif
 
 if HAVE_GALLIUM_RADEONSI
-gbm_LTLIBRARIES += pipe_radeonsi.la
+pipe_LTLIBRARIES += pipe_radeonsi.la
 pipe_radeonsi_la_SOURCES = pipe_radeonsi.c
 nodist_EXTRA_pipe_radeonsi_la_SOURCES = dummy.cpp
 pipe_radeonsi_la_LIBADD = \
@@ -115,7 +115,7 @@ endif
 endif
 
 if HAVE_GALLIUM_SVGA
-gbm_LTLIBRARIES += pipe_vmwgfx.la
+pipe_LTLIBRARIES += pipe_vmwgfx.la
 pipe_vmwgfx_la_SOURCES = pipe_vmwgfx.c
 pipe_vmwgfx_la_LIBADD = \
$(PIPE_LIBS) \
@@ -131,7 +131,7 @@ endif
 endif
 
 if HAVE_GALLIUM_LLVMPIPE
-gbm_LTLIBRARIES += pipe_swrast.la
+pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
 nodist_EXTRA_pipe_swrast_la_SOURCES = dummy.cpp
 pipe_swrast_la_LIBADD = \
@@ -141,7 +141,7 @@ pipe_swrast_la_LIBADD = \
 pipe_swrast_la_LDFLAGS = -no-undefined -avoid-version -module $(LLVM_LDFLAGS)
 else
 if HAVE_GALLIUM_SOFTPIPE
-gbm_LTLIBRARIES += pipe_swrast.la
+pipe_LTLIBRARIES += pipe_swrast.la
 pipe_swrast_la_SOURCES = pipe_swrast.c
 pipe_swrast_la_LIBADD = \
$(PIPE_LIBS) \
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] clover: Install CL headers.

2012-12-04 Thread Johannes Obermayr
Note: This is a candidate for the stable branches.
---
 src/gallium/state_trackers/clover/Makefile.am |   10 ++
 1 Datei geändert, 10 Zeilen hinzugefügt(+)

diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index c37d010..f068164 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -74,3 +74,13 @@ libclover_la_SOURCES = \
api/event.cpp \
api/program.cpp \
api/kernel.cpp
+
+cldir = $(includedir)/CL
+cl_HEADERS = \
+   $(top_srcdir)/include/CL/cl.h \
+   $(top_srcdir)/include/CL/cl_ext.h \
+   $(top_srcdir)/include/CL/cl_gl.h \
+   $(top_srcdir)/include/CL/cl_gl_ext.h \
+   $(top_srcdir)/include/CL/cl_platform.h \
+   $(top_srcdir)/include/CL/opencl.h \
+   $(top_srcdir)/include/CL/cl.hpp \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] clover: Install CL headers.

2012-12-04 Thread Johannes Obermayr
Note: This is a candidate for the stable branches.
---
v2: remove trailing \ in last line.
---
 src/gallium/state_trackers/clover/Makefile.am |   10 ++
 1 Datei geändert, 10 Zeilen hinzugefügt(+)

diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index c37d010..f068164 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -74,3 +74,13 @@ libclover_la_SOURCES = \
api/event.cpp \
api/program.cpp \
api/kernel.cpp
+
+cldir = $(includedir)/CL
+cl_HEADERS = \
+   $(top_srcdir)/include/CL/cl.h \
+   $(top_srcdir)/include/CL/cl_ext.h \
+   $(top_srcdir)/include/CL/cl_gl.h \
+   $(top_srcdir)/include/CL/cl_gl_ext.h \
+   $(top_srcdir)/include/CL/cl_platform.h \
+   $(top_srcdir)/include/CL/opencl.h \
+   $(top_srcdir)/include/CL/cl.hpp
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] pipe-loader: Fix some undefined symbols.

2012-12-04 Thread Johannes Obermayr
---
 src/gallium/drivers/radeon/Makefile.am  |5 +++--
 src/gallium/targets/pipe-loader/Makefile.am |3 +++
 2 Dateien geändert, 6 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index cbad5b7..adb5ebe 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -4,7 +4,8 @@ include $(top_srcdir)/src/gallium/Automake.inc
 noinst_LTLIBRARIES = libradeon.la
 
 AM_CXXFLAGS = \
-   $(filter-out -DDEBUG, $(LLVM_CXXFLAGS))
+   $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \
+   $(DEFINES)
 
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
@@ -15,7 +16,7 @@ AM_CPPFLAGS = -DEXTERNAL_LLVM
 tablegen = $(LLVM_BINDIR)/llvm-tblgen -I $(LLVM_INCLUDEDIR) -I $(srcdir) $1 $2 
-o $3
 
 libradeon_la_SOURCES = \
-   $(CXX_FILES) \
+   $(CPP_FILES) \
$(C_FILES)
 
 SIRegisterInfo.td: SIGenRegisterInfo.pl
diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1a66835..8fcd2f8 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -15,6 +15,9 @@ gbm_LTLIBRARIES =
 
 PIPE_LIBS = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
+   $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la \
+   $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
+   $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
$(DLOPEN_LIBS) \
-lpthread \
-lm
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] egl-static: Fix linking.

2012-12-04 Thread Johannes Obermayr
---
With all my patches applied automake build succeeds with:

./autogen.sh --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu 
--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --disable-dependency-tracking --enable-xvmc 
--enable-vdpau --enable-texture-float --enable-debug 
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast 
--with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,svga,swrast --enable-dri 
--enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg 
--enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa 
--enable-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl 
--enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls

Actually I should call it:
Make all perfect.
---
 src/gallium/targets/egl-static/Makefile.am |   16 
 1 Datei geändert, 8 Zeilen hinzugefügt(+), 8 Zeilen entfernt(-)

diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index bbd2592..a306ec8 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -43,7 +43,7 @@ egl_gallium_la_LIBADD = \
$(PTHREAD_LIBS) \
-lm
 
-egl_gallium_la_LDFLAGS = -no-undefined -avoid-version -module
+egl_gallium_la_LDFLAGS = -no-undefined -Wl,--allow-multiple-definition 
-avoid-version -module
 
 if HAVE_EGL_PLATFORM_X11
 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
@@ -134,24 +134,24 @@ endif
 if HAVE_GALLIUM_R300
 AM_CPPFLAGS += -D_EGL_PIPE_R300=1
 egl_gallium_la_LIBADD += \
-   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
-   $(top_builddir)/src/gallium/drivers/r300/libr300.la \
-   $(RADEON_LIBS)
+   $(top_builddir)/src/gallium/drivers/r300/libr300.la
 endif
 
 if HAVE_GALLIUM_R600
 AM_CPPFLAGS += -D_EGL_PIPE_R600=1
 egl_gallium_la_LIBADD += \
-   $(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
-   $(top_builddir)/src/gallium/drivers/r600/libr600.la \
-   $(RADEON_LIBS)
+   $(top_builddir)/src/gallium/drivers/r600/libr600.la
 endif
 
 if HAVE_GALLIUM_RADEONSI
 AM_CPPFLAGS += -D_EGL_PIPE_RADEONSI=1
 egl_gallium_la_LIBADD += \
+   $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la
+endif
+
+if NEED_RADEON_GALLIUM 
+egl_gallium_la_LIBADD += \
$(top_builddir)/src/gallium/winsys/radeon/drm/libradeonwinsys.la \
-   $(top_builddir)/src/gallium/drivers/radeonsi/libradeonsi.la \
$(RADEON_LIBS)
 endif
 
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCHv2 automake] pipe-loader: Fix some undefined symbols.

2012-12-04 Thread Johannes Obermayr
---
v2: galahad is conditional
---
 src/gallium/drivers/radeon/Makefile.am  |5 +++--
 src/gallium/targets/pipe-loader/Makefile.am |7 +++
 2 Dateien geändert, 10 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/src/gallium/drivers/radeon/Makefile.am 
b/src/gallium/drivers/radeon/Makefile.am
index cbad5b7..adb5ebe 100644
--- a/src/gallium/drivers/radeon/Makefile.am
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -4,7 +4,8 @@ include $(top_srcdir)/src/gallium/Automake.inc
 noinst_LTLIBRARIES = libradeon.la
 
 AM_CXXFLAGS = \
-   $(filter-out -DDEBUG, $(LLVM_CXXFLAGS))
+   $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \
+   $(DEFINES)
 
 AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
@@ -15,7 +16,7 @@ AM_CPPFLAGS = -DEXTERNAL_LLVM
 tablegen = $(LLVM_BINDIR)/llvm-tblgen -I $(LLVM_INCLUDEDIR) -I $(srcdir) $1 $2 
-o $3
 
 libradeon_la_SOURCES = \
-   $(CXX_FILES) \
+   $(CPP_FILES) \
$(C_FILES)
 
 SIRegisterInfo.td: SIGenRegisterInfo.pl
diff --git a/src/gallium/targets/pipe-loader/Makefile.am 
b/src/gallium/targets/pipe-loader/Makefile.am
index 1a66835..d02d1ae 100644
--- a/src/gallium/targets/pipe-loader/Makefile.am
+++ b/src/gallium/targets/pipe-loader/Makefile.am
@@ -15,10 +15,17 @@ gbm_LTLIBRARIES =
 
 PIPE_LIBS = \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
+   $(top_builddir)/src/gallium/drivers/rbug/librbug.la \
+   $(top_builddir)/src/gallium/drivers/trace/libtrace.la \
$(DLOPEN_LIBS) \
-lpthread \
-lm
 
+if HAVE_GALAHAD_GALLIUM
+PIPE_LIBS += $(top_builddir)/src/gallium/drivers/galahad/libgalahad.la
+endif
+
+
 if HAVE_GALLIUM_I915
 gbm_LTLIBRARIES += pipe_i915.la
 pipe_i915_la_SOURCES = pipe_i915.c
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCHv2 automake] egl-static: Fix linking.

2012-12-04 Thread Johannes Obermayr
---
v2: Only add -Wl,--allow-multiple-definition because r300 does not set 
NEED_RADEON_GALLIUM.

With all my patches applied automake build succeeds with:

./autogen.sh --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu 
--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --disable-dependency-tracking --enable-xvmc 
--enable-vdpau --enable-texture-float --enable-debug 
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast 
--with-gallium-drivers=i915,nouveau,r300,r600,radeonsi,svga,swrast --enable-dri 
--enable-glx --enable-osmesa --enable-gles1 --enable-gles2 --enable-openvg 
--enable-shared-glapi --enable-shared-gallium --enable-gbm --enable-xa 
--enable-gallium-egl --enable-gallium-llvm --enable-gallium-gbm --enable-opencl 
--enable-r600-llvm-compiler --enable-gallium-g3dvl --enable-glx-tls

Actually I should call it:
Make all perfect.
---
 src/gallium/targets/egl-static/Makefile.am |2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/gallium/targets/egl-static/Makefile.am 
b/src/gallium/targets/egl-static/Makefile.am
index bbd2592..17ee316 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -43,7 +43,7 @@ egl_gallium_la_LIBADD = \
$(PTHREAD_LIBS) \
-lm
 
-egl_gallium_la_LDFLAGS = -no-undefined -avoid-version -module
+egl_gallium_la_LDFLAGS = -no-undefined -Wl,--allow-multiple-definition 
-avoid-version -module
 
 if HAVE_EGL_PLATFORM_X11
 AM_CPPFLAGS += $(LIBDRM_CFLAGS)
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM = 3.2.

2012-12-03 Thread Johannes Obermayr
Contrary to old build system automake fails without LLVM_CXXFLAGS.
---
 configure.ac  |7 ++-
 src/gallium/auxiliary/Makefile.am |6 ++
 2 Dateien geändert, 12 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/configure.ac b/configure.ac
index e64f643..241b480 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1647,7 +1647,8 @@ if test x$enable_gallium_llvm = xyes; then
LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-   DEFINES=${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 
's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`
+   LLVM_VERSION_INT=`echo $LLVM_VERSION | sed -e 
's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'`
+   DEFINES=${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT
MESA_LLVM=1
 
dnl Check for Clang interanl headers
@@ -1661,9 +1662,11 @@ if test x$enable_gallium_llvm = xyes; then
 fi
 else
MESA_LLVM=0
+   LLVM_VERSION_INT=0
 fi
 else
 MESA_LLVM=0
+LLVM_VERSION_INT=0
 fi
 
 dnl Directory for XVMC libs
@@ -1925,6 +1928,8 @@ AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test 
x$enable_gallium_loader = xyes)
 AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = 
xyes)
 AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
 AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
+AM_CONDITIONAL(LLVM_NEEDS_FNORTTI, test $LLVM_VERSION_INT -ge 302)
+
 AC_SUBST([GALLIUM_MAKE_DIRS])
 
 AM_CONDITIONAL(HAVE_X11_DRIVER, echo $DRIVER_DIRS | grep 'x11' /dev/null 
21)
diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index fef1a0a..a4eee47 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -22,6 +22,12 @@ AM_CXXFLAGS = \
$(GALLIUM_CFLAGS) \
$(LLVM_CXXFLAGS)
 
+if LLVM_NEEDS_FNORTTI
+
+AM_CXXFLAGS += -fno-rtti
+
+endif
+
 libgallium_la_SOURCES += \
$(GALLIVM_SOURCES) \
$(GALLIVM_CPP_SOURCES)
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] gallium/auxiliary: Add possibility to build libgallium shared.

2012-12-03 Thread Johannes Obermayr
---
 configure.ac  |7 +++
 src/gallium/auxiliary/Makefile.am |8 
 2 Dateien geändert, 15 Zeilen hinzugefügt(+)

diff --git a/configure.ac b/configure.ac
index 241b480..e4021b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -729,6 +729,13 @@ fi
 AC_SUBST([SHARED_GLAPI])
 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=no@:@])],
+[enable_shared_gallium=$enableval],
+[enable_shared_gallium=no])
+AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test x$enable_shared_gallium = xyes)
+
 dnl
 dnl Driver specific build directories
 dnl
diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index a4eee47..0e34bee 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,8 +3,16 @@ AUTOMAKE_OPTIONS = subdir-objects
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
+if HAVE_SHARED_GALLIUM
+
+lib_LTLIBRARIES = libgallium.la
+
+else
+
 noinst_LTLIBRARIES = libgallium.la
 
+endif
+
 AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
$(GALLIUM_CFLAGS)
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCHv2 automake] gallium/auxiliary: Add possibility to build libgallium shared.

2012-12-03 Thread Johannes Obermayr
---
 configure.ac   |7 +++
 src/gallium/auxiliary/Makefile.am  |8 
 src/gallium/targets/opencl/Makefile.am |2 +-
 3 Dateien geändert, 16 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/configure.ac b/configure.ac
index 02aaa64..316d200 100644
--- a/configure.ac
+++ b/configure.ac
@@ -729,6 +729,13 @@ fi
 AC_SUBST([SHARED_GLAPI])
 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=no@:@])],
+[enable_shared_gallium=$enableval],
+[enable_shared_gallium=no])
+AM_CONDITIONAL(HAVE_SHARED_GALLIUM, test x$enable_shared_gallium = xyes)
+
 dnl
 dnl Driver specific build directories
 dnl
diff --git a/src/gallium/auxiliary/Makefile.am 
b/src/gallium/auxiliary/Makefile.am
index a4eee47..0e34bee 100644
--- a/src/gallium/auxiliary/Makefile.am
+++ b/src/gallium/auxiliary/Makefile.am
@@ -3,8 +3,16 @@ AUTOMAKE_OPTIONS = subdir-objects
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
+if HAVE_SHARED_GALLIUM
+
+lib_LTLIBRARIES = libgallium.la
+
+else
+
 noinst_LTLIBRARIES = libgallium.la
 
+endif
+
 AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/auxiliary/util \
$(GALLIUM_CFLAGS)
diff --git a/src/gallium/targets/opencl/Makefile.am 
b/src/gallium/targets/opencl/Makefile.am
index 596a83a..b8cae2b 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -8,7 +8,7 @@ libOpenCL_la_LDFLAGS = \
 
 libOpenCL_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/clover/libclover.la \
-   $(top_builddir)/src/gallium/auxiliary/libgallium.a \
+   $(top_builddir)/src/gallium/auxiliary/libgallium.la \
$(GALLIUM_PIPE_LOADER_LIBS) $(LIBUDEV_LIBS) \
-ldl \
-lclangCodeGen \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake after merge] llvmpipe: Fix build after *_soa removal.

2012-12-03 Thread Johannes Obermayr
---
 src/gallium/drivers/llvmpipe/Makefile.am |   10 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 9 Zeilen entfernt(-)

diff --git a/src/gallium/drivers/llvmpipe/Makefile.am 
b/src/gallium/drivers/llvmpipe/Makefile.am
index df40186..36d8c22 100644
--- a/src/gallium/drivers/llvmpipe/Makefile.am
+++ b/src/gallium/drivers/llvmpipe/Makefile.am
@@ -14,7 +14,6 @@ libllvmpipe_la_SOURCES = \
lp_bld_blend.c \
lp_bld_blend_aos.c \
lp_bld_blend_logicop.c \
-   lp_bld_blend_soa.c \
lp_bld_depth.c \
lp_bld_interp.c \
lp_clear.c \
@@ -52,8 +51,7 @@ libllvmpipe_la_SOURCES = \
lp_surface.c \
lp_tex_sample.c \
lp_texture.c \
-   lp_tile_image.c \
-   lp_tile_soa.c
+   lp_tile_image.c
 
 libllvmpipe_la_LDFLAGS = $(LLVM_LDFLAGS)
 
@@ -84,9 +82,3 @@ nodist_EXTRA_lp_test_conv_SOURCES = dummy.cpp
 lp_test_printf_SOURCES = lp_test_printf.c lp_test_main.c
 lp_test_printf_LDADD = libllvmpipe.la ../../auxiliary/libgallium.la 
$(LLVM_LIBS)
 nodist_EXTRA_lp_test_printf_SOURCES = dummy.cpp
-
-BUILT_SOURCES = lp_tile_soa.c
-CLEANFILES = lp_tile_soa.c
-
-lp_tile_soa.c: $(srcdir)/lp_tile_soa.py 
$(top_srcdir)/src/gallium/auxiliary/util/u_format_parse.py 
$(top_srcdir)/src/gallium/auxiliary/util/u_format_pack.py 
$(top_srcdir)/src/gallium/auxiliary/util/u_format.csv
-   $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/lp_tile_soa.py 
$(top_srcdir)/src/gallium/auxiliary/util/u_format.csv  $@
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH automake] Add -I$(top_srcdir)/include to GALLIUM_CFLAGS.

2012-12-03 Thread Johannes Obermayr
---
 src/gallium/Automake.inc |1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
index ccdb7e0..fabc2af 100644
--- a/src/gallium/Automake.inc
+++ b/src/gallium/Automake.inc
@@ -1,4 +1,5 @@
 GALLIUM_CFLAGS = \
+   -I$(top_srcdir)/include \
-I$(top_srcdir)/src/gallium/include \
-I$(top_srcdir)/src/gallium/auxiliary \
$(DEFINES)
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM = 3.2.

2012-11-30 Thread Johannes Obermayr
Also remove the recently added and overloaded LLVM_CXXFLAGS from CXXFLAGS.

Note: This is a candidate for the stable branches.
---
 src/gallium/auxiliary/Makefile |6 +-
 1 Datei geändert, 5 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index dc28003..72208f1 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -13,7 +13,11 @@ C_SOURCES += \
$(GALLIVM_SOURCES)
 CPP_SOURCES += \
$(GALLIVM_CPP_SOURCES)
-CXXFLAGS += $(LLVM_CXXFLAGS)
+
+# LLVM = 3.2 requires -fno-rtti
+ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 
's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \= 302),1)
+CXXFLAGS += -fno-rtti
+endif
 endif
 
 
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 9.0 branch] gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM = 3.2.

2012-11-30 Thread Johannes Obermayr
Note: This is a candidate for the stable branches.
---
 src/gallium/auxiliary/Makefile |5 +
 1 Datei geändert, 5 Zeilen hinzugefügt(+)

diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index 3ba3f9c..72208f1 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -13,6 +13,11 @@ C_SOURCES += \
$(GALLIVM_SOURCES)
 CPP_SOURCES += \
$(GALLIVM_CPP_SOURCES)
+
+# LLVM = 3.2 requires -fno-rtti
+ifeq ($(shell expr `echo $(LLVM_VERSION) | sed -e 
's/\([0-9]\)\.\([0-9]\)/\10\2/g'` \= 302),1)
+CXXFLAGS += -fno-rtti
+endif
 endif
 
 
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH mesa] clover: Adapt libclc's INCLUDEDIR and LIBEXECDIR to make use of the new introduced libclc.pc.

2012-11-29 Thread Johannes Obermayr
---
 configs/current.in|3 ++-
 configure.ac  |   15 ---
 src/gallium/state_trackers/clover/Makefile.am |3 ++-
 src/gallium/state_trackers/clover/llvm/invocation.cpp |4 ++--
 4 Dateien geändert, 14 Zeilen hinzugefügt(+), 11 Zeilen entfernt(-)

diff --git a/configs/current.in b/configs/current.in
index 62edfa5..597d003 100644
--- a/configs/current.in
+++ b/configs/current.in
@@ -182,7 +182,8 @@ VA_LIB_INSTALL_DIR=@VA_LIB_INSTALL_DIR@
 XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
 
 # Path to OpenCL C library libclc
-LIBCLC_PATH = @LIBCLC_PATH@
+LIBCLC_INCLUDEDIR = @LIBCLC_INCLUDEDIR@
+LIBCLC_LIBEXECDIR = @LIBCLC_LIBEXECDIR@
 
 # pkg-config substitutions
 GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
diff --git a/configure.ac b/configure.ac
index 4fb4544..872729a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1449,19 +1449,16 @@ dnl
 dnl OpenCL configuration
 dnl
 
-AC_ARG_WITH([libclc-path],
-   [AS_HELP_STRING([--with-libclc-path],
- [Path to libclc builtins library.  Example: 
--with-libclc-path=\$HOME/libclc/])],
-   [LIBCLC_PATH=$withval],
-   [LIBCLC_PATH=])
-
 AC_ARG_WITH([clang-libdir],
[AS_HELP_STRING([--with-clang-libdir],
  [Path to Clang libraries @:@default=llvm-config --libdir@:@])],
[CLANG_LIBDIR=$withval],
[CLANG_LIBDIR=])
 
-AC_SUBST([LIBCLC_PATH])
+LIBCLC_INCLUDEDIR=`pkg-config --variable=includedir libclc`
+LIBCLC_LIBEXECDIR=`pkg-config --variable=libexecdir libclc`
+AC_SUBST([LIBCLC_INCLUDEDIR])
+AC_SUBST([LIBCLC_LIBEXECDIR])
 
 if test x$enable_opencl = xyes; then
 if test x$with_gallium_drivers = x; then
@@ -1472,6 +1469,10 @@ if test x$enable_opencl = xyes; then
 AC_MSG_ERROR([gcc = 4.6 is required to build clover])
 fi
 
+if test x$LIBCLC_INCLUDEDIR == x || test x$LIBCLC_LIBEXECDIR == x; then
+AC_MSG_ERROR([pkg-config cannot use libclc.pc which is required to 
build clover])
+fi
+
 GALLIUM_STATE_TRACKERS_DIRS=$GALLIUM_STATE_TRACKERS_DIRS clover
 GALLIUM_TARGET_DIRS=$GALLIUM_TARGET_DIRS opencl
 enable_gallium_loader=yes
diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index 5241a6d..f511639 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -23,7 +23,8 @@ libclllvm_la_CXXFLAGS = \
-std=c++98 \
$(LLVM_CPPFLAGS) \
$(DEFINES) \
-   -DLIBCLC_PATH=\$(LIBCLC_PATH)/\ \
+   -DLIBCLC_INCLUDEDIR=\$(LIBCLC_INCLUDEDIR)/\ \
+   -DLIBCLC_LIBEXECDIR=\$(LIBCLC_LIBEXECDIR)/\ \
-DCLANG_RESOURCE_DIR=\$(CLANG_RESOURCE_DIR)\
 
 libclllvm_la_SOURCES = \
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp 
b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 2b07053..1fe5a73 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -113,7 +113,7 @@ namespace {
   c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
 
   // Add libclc generic search path
-  c.getHeaderSearchOpts().AddPath(LIBCLC_PATH /generic/include/,
+  c.getHeaderSearchOpts().AddPath(LIBCLC_INCLUDEDIR,
   clang::frontend::Angled,
   false, false, false);
 
@@ -169,7 +169,7 @@ namespace {
   llvm::Linker linker(clover, mod);
 
   // Link the kernel with libclc
-  linker.LinkInFile(llvm::sys::Path(LIBCLC_PATH + triple + 
/lib/builtins.bc), isNative);
+  linker.LinkInFile(llvm::sys::Path(LIBCLC_LIBEXECDIR + triple + .bc), 
isNative);
   mod = linker.releaseModule();
 
   // Add a function internalizer pass.
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH libclc] Make libclc more Linux FHS conform.

2012-11-29 Thread Johannes Obermayr
- First introducing a versioning scheme
- Add --libexecdir, --includedir and --pkgconfigdir and prefill them as well as 
--prefix
- Build all targets by default
- Create clc.pc and install it in $pkgconfigdir
- Use clang++ instead of c++
- Rename builtins.bc to built_libs/$triple.bc and install them in $libexecdir
- Includes are installed recursively to $includedir
- Finally add $(DESTDIR) for 'make install'
---
 configure.py |   67 +-
 1 Datei geändert, 52 Zeilen hinzugefügt(+), 15 Zeilen entfernt(-)

diff --git a/configure.py b/configure.py
index 5062ab6..66789a2 100755
--- a/configure.py
+++ b/configure.py
@@ -4,6 +4,10 @@ def c_compiler_rule(b, name, description, compiler, flags):
   command = %s -MMD -MF $out.d %s -c -o $out $in % (compiler, flags)
   b.rule(name, command, description +  $out, depfile=$out.d)
 
+version_major = 0;
+version_minor = 0;
+version_patch = 1;
+
 from optparse import OptionParser
 import os
 from subprocess import *
@@ -19,12 +23,34 @@ p.add_option('--with-llvm-config', metavar='PATH',
  help='use given llvm-config script')
 p.add_option('--prefix', metavar='PATH',
  help='install to given prefix')
+p.add_option('--libexecdir', metavar='PATH',
+ help='install *.bc to given dir')
+p.add_option('--includedir', metavar='PATH',
+ help='install include files to given dir')
+p.add_option('--pkgconfigdir', metavar='PATH',
+ help='install clc.pc to given dir')
 p.add_option('-g', metavar='GENERATOR', default='make',
  help='use given generator (default: make)')
 (options, args) = p.parse_args()
 
 llvm_config_exe = options.with_llvm_config or llvm-config
 
+prefix = options.prefix
+if not prefix:
+  prefix = '/usr/local'
+
+libexecdir = options.libexecdir
+if not libexecdir:
+  libexecdir = os.path.join(prefix, 'lib/clc')
+
+includedir = options.includedir
+if not includedir:
+  includedir = os.path.join(prefix, 'include')
+
+pkgconfigdir = options.pkgconfigdir
+if not pkgconfigdir:
+  pkgconfigdir = os.path.join(prefix, 'lib/pkgconfig')
+
 def llvm_config(args):
   try:
 proc = Popen([llvm_config_exe] + args, stdout=PIPE)
@@ -42,7 +68,7 @@ llvm_clang = os.path.join(llvm_bindir, 'clang')
 llvm_link = os.path.join(llvm_bindir, 'llvm-link')
 llvm_opt = os.path.join(llvm_bindir, 'opt')
 
-default_targets = ['r600--']
+default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--']
 
 targets = args
 if not targets:
@@ -57,8 +83,8 @@ b.rule(LLVM_LINK, command = llvm_link +  -o $out $in,
 b.rule(OPT, command = llvm_opt +  -O3 -o $out $in,
description = 'OPT $out')
 
-c_compiler_rule(b, LLVM_TOOL_CXX, 'CXX', 'c++', llvm_cxxflags)
-b.rule(LLVM_TOOL_LINK, c++ -o $out $in %s % llvm_core_libs, 'LINK $out')
+c_compiler_rule(b, LLVM_TOOL_CXX, 'LLVM-CXX', 'clang++', llvm_cxxflags)
+b.rule(LLVM_TOOL_LINK, clang++ -o $out $in %s % llvm_core_libs, 'LINK 
$out')
 
 prepare_builtins = os.path.join('utils', 'prepare-builtins')
 b.build(os.path.join('utils', 'prepare-builtins.o'), LLVM_TOOL_CXX,
@@ -72,9 +98,15 @@ b.rule(PREPARE_BUILTINS, %s -o $out $in % 
prepare_builtins,
 manifest_deps = set([sys.argv[0], os.path.join(srcdir, 'build', 
'metabuild.py'),
  os.path.join(srcdir, 'build', 'ninja_syntax.py')])
 
-install_files = []
+install_files_bc = []
 install_deps = []
 
+# Create libclc.pc
+clc = open('libclc.pc', 'w')
+clc.write('includedir=%(inc)s\nlibexecdir=%(lib)s\n\nName: 
libclc\nDescription: Library requirements of the OpenCL C programming 
language\nVersion: %(maj)s.%(min)s.%(pat)s\nCflags: -I${includedir}\nLibs: 
-L${libexecdir}' %
+{'inc': includedir, 'lib': libexecdir, 'maj': version_major, 'min': 
version_minor, 'pat': version_patch})
+clc.close()
+
 for target in targets:
   (t_arch, t_vendor, t_os) = target.split('-')
   archs = [t_arch]
@@ -94,7 +126,6 @@ for target in targets:
[os.path.join(srcdir, subdir, 'lib') for subdir in subdirs])
 
   clang_cl_includes = ' '.join([-I%s % incdir for incdir in incdirs])
-  install_files += [(incdir, incdir[len(srcdir)+1:]) for incdir in incdirs]
 
   # The rule for building a .bc file for the specified architecture using 
clang.
   clang_bc_flags = -target %s -I`dirname $in` %s  \
@@ -129,22 +160,28 @@ for target in targets:
 
   builtins_link_bc = os.path.join(target, 'lib', 'builtins.link.bc')
   builtins_opt_bc = os.path.join(target, 'lib', 'builtins.opt.bc')
-  builtins_bc = os.path.join(target, 'lib', 'builtins.bc')
+  builtins_bc = os.path.join('built_libs', target + '.bc')
   b.build(builtins_link_bc, LLVM_LINK, objects)
   b.build(builtins_opt_bc, OPT, builtins_link_bc)
   b.build(builtins_bc, PREPARE_BUILTINS, builtins_opt_bc, prepare_builtins)
-  install_files.append((builtins_bc, builtins_bc))
+  install_files_bc.append((builtins_bc, builtins_bc))
   install_deps.append(builtins_bc)
   b.default(builtins_bc)
 
-if options.prefix:
-  install_cmd = '  

Re: [Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.

2012-11-26 Thread Johannes Obermayr
Am Dienstag, 20. November 2012, 12:44:48 schrieb Johannes Obermayr:
 Am Dienstag, 20. November 2012, 06:41:22 schrieb Dave Airlie:
   $ llvm-config --cxxflags
  
   -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
   -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
   -fvisibility-inlines-hidden -O2 -g -D_GNU_SOURCE -Wall -W
   -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long
   -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  
  And this is why we don't include LLVM CXX flags :-)
  
  notice the -g -O2 -Wall bits? not something that pkg-config wants in its 
  flags.
  
  Dave.
 
 Does that mean the required patch does not go mainline and you want to remove 
 LLVM_CXXFLAGS from these files:
 
 $ grep -r -n -e LLVM_CXXFLAGS
 configure.ac:1491:AC_SUBST([LLVM_CXXFLAGS])
 configure.ac:1678:  LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 
 's/-DNDEBUG\//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
 src/gallium/drivers/radeon/Makefile:13:CXXFLAGS+= $(LLVM_CXXFLAGS)
 src/gallium/drivers/r600/Makefile.am:37:$(LLVM_CXXFLAGS)
 src/gallium/auxiliary/Makefile:16:CXXFLAGS += $(LLVM_CXXFLAGS)
 configs/current.in:34:LLVM_CXXFLAGS = @LLVM_CXXFLAGS@

Because Dave has not answered:
Ping to get the patch pushed by somebody with permissions.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Remove -O., -g and -Wall from LLVM_C{PP,XX}FLAGS.

2012-11-26 Thread Johannes Obermayr
---
 configure.ac |6 +++---
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index f484dc4..006f4fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1658,7 +1658,7 @@ if test x$enable_gallium_llvm = xyes; then
 
 if test x$LLVM_CONFIG != xno; then
LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/svn.*//g'`
-   LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
+   LLVM_CFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' 
-e 's/-Wall//g'`
if test x$with_llvm_shared_libs = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_LIBS=-lLLVM-`$LLVM_CONFIG --version`
@@ -1675,8 +1675,8 @@ if test x$enable_gallium_llvm = xyes; then
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
-   LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
-   LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
+   LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' 
-e 's/-Wall//g'`
+   LLVM_CPPFLAGS=`$LLVM_CONFIG --cppflags|sed -e 's/-DNDEBUG\//g' -e 
's/-pedantic//g' -e 's/-Wcovered-switch-default//g' -e 's/-O.//g' -e 's/-g//g' 
-e 's/-Wall//g'`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
DEFINES=${DEFINES} -DHAVE_LLVM=`echo $LLVM_VERSION | sed -e 
's/\([[0-9]]\)\.\([[0-9]]\)/0x0\10\2/g'`
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.

2012-11-20 Thread Johannes Obermayr
Am Dienstag, 20. November 2012, 06:41:22 schrieb Dave Airlie:
  $ llvm-config --cxxflags
 
  -I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2
  -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -fPIC
  -fvisibility-inlines-hidden -O2 -g -D_GNU_SOURCE -Wall -W
  -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long
  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 
 And this is why we don't include LLVM CXX flags :-)
 
 notice the -g -O2 -Wall bits? not something that pkg-config wants in its 
 flags.
 
 Dave.

Does that mean the required patch does not go mainline and you want to remove 
LLVM_CXXFLAGS from these files:

$ grep -r -n -e LLVM_CXXFLAGS
configure.ac:1491:AC_SUBST([LLVM_CXXFLAGS])
configure.ac:1678:  LLVM_CXXFLAGS=`$LLVM_CONFIG --cxxflags|sed -e 
's/-DNDEBUG\//g' -e 's/-pedantic//g' -e 's/-Wcovered-switch-default//g'`
src/gallium/drivers/radeon/Makefile:13:CXXFLAGS+= $(LLVM_CXXFLAGS)
src/gallium/drivers/r600/Makefile.am:37:$(LLVM_CXXFLAGS)
src/gallium/auxiliary/Makefile:16:CXXFLAGS += $(LLVM_CXXFLAGS)
configs/current.in:34:LLVM_CXXFLAGS = @LLVM_CXXFLAGS@
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.

2012-11-19 Thread Johannes Obermayr
Am Montag, 12. November 2012, 15:44:36 schrieb Tom Stellard:
 On Fri, Nov 09, 2012 at 01:56:44PM +, Tom Stellard wrote:
  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?
 

Output of llvm-config --cxxflags does not have -fno-rtti (snapshot as of 
20121117.1759):

$ llvm-config --cxxflags
-I/usr/include -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 
-fstack-protector -funwind-tables -fasynchronous-unwind-tables -g  -fPIC 
-fvisibility-inlines-hidden -O2 -g  -D_GNU_SOURCE -Wall -W 
-Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

But with the attached patch it builds again :-)

 
 If there are no objections, I'm going to commit this patch later today.
 This build breakage is blocking several important radeonsi fixes, and I
 would like to get it resolved.
 
 -Tom
 
 
  From 9639dea17e96aa8c59046117015b861fd0c0584e Mon Sep 17 00:00:00 2001
  From: Tom Stellard thomas.stell...@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
   
   From d68f14daefb9ff4884277170f5c073fdda7b66d0 Mon Sep 17 00:00:00 2001
From: Johannes Obermayr johannesoberm...@gmx.de
Date: Mon, 19 Nov 2012 19:50:37 +0100
Subject: [PATCH] Make sure LLVM_CXXFLAGS has -fno-rtti on LLVM = 3.2.

---
 configure.ac |5 +
 1 Datei geändert, 5 Zeilen hinzugefügt(+)

diff --git a/configure.ac b/configure.ac
index f484dc4..2971c3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1691,6 +1691,11 @@ if test x$enable_gallium_llvm = xyes; then
 AC_CHECK_FILE($CLANG_RESOURCE_DIR/include/stddef.h,,
 AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.]))
 fi
+
+dnl Add -fno-rtti to LLVM_CXXFLAGS for LLVM = 3.2
+if test `echo $LLVM_VERSION | sed -e 's/\([[0-9]]\)\.\([[0-9]]\)/\10\2/g'` -ge 302; then
+LLVM_CXXFLAGS=$LLVM_CXXFLAGS -fno-rtti
+fi
 else
 	MESA_LLVM=0
 fi
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl/builtin_compiler: Fix build by -I $(top_srcdir)/include.

2012-11-02 Thread Johannes Obermayr
BUG: 56664
---
 src/glsl/builtin_compiler/Makefile.am |1 +
 1 Datei geändert, 1 Zeile hinzugefügt(+)

diff --git a/src/glsl/builtin_compiler/Makefile.am 
b/src/glsl/builtin_compiler/Makefile.am
index eeac424..72032b5 100644
--- a/src/glsl/builtin_compiler/Makefile.am
+++ b/src/glsl/builtin_compiler/Makefile.am
@@ -30,6 +30,7 @@ LD = @LD_FOR_BUILD@
 LDFLAGS = @LDFLAGS_FOR_BUILD@
 
 AM_CFLAGS = \
+   -I $(top_srcdir)/include \
-I $(top_srcdir)/src/mapi \
-I $(top_srcdir)/src/mesa \
-I $(GLSL_SRCDIR) \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl/builtin_compiler/Makefile.am: Make sure GLSL_SRCDIR is defined before AM_CFLAGS.

2012-11-02 Thread Johannes Obermayr
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56685
---
 src/glsl/builtin_compiler/Makefile.am |4 ++--
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)

diff --git a/src/glsl/builtin_compiler/Makefile.am 
b/src/glsl/builtin_compiler/Makefile.am
index 72032b5..22ccf60 100644
--- a/src/glsl/builtin_compiler/Makefile.am
+++ b/src/glsl/builtin_compiler/Makefile.am
@@ -29,6 +29,8 @@ CXXFLAGS = @CXXFLAGS_FOR_BUILD@
 LD = @LD_FOR_BUILD@
 LDFLAGS = @LDFLAGS_FOR_BUILD@
 
+include ../Makefile.sources
+
 AM_CFLAGS = \
-I $(top_srcdir)/include \
-I $(top_srcdir)/src/mapi \
@@ -42,8 +44,6 @@ AM_CXXFLAGS = $(AM_CFLAGS)
 AM_YFLAGS = -v -d -p glcpp_parser_
 AM_LFLAGS = --nounistd -o$(LEX_OUTPUT_ROOT).c
 
-include ../Makefile.sources
-
 noinst_PROGRAMS = builtin_compiler
 
 builtin_compiler_SOURCES = \
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallium/auxiliary: Fix build with newer LLVM.

2012-10-27 Thread Johannes Obermayr
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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] osmesa: Create a symlinked .so.8

2012-09-01 Thread Johannes Obermayr
---
 src/mesa/drivers/osmesa/Makefile.am |8 
 1 Datei geändert, 8 Zeilen hinzugefügt(+)

diff --git a/src/mesa/drivers/osmesa/Makefile.am 
b/src/mesa/drivers/osmesa/Makefile.am
index db1d14f..0696036 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -47,6 +47,14 @@ all-local: lib@OSMESA_LIB@.la
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
ln -f .libs/lib@OSMESA_LIB@.so 
$(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so;
ln -f .libs/lib@OSMESA_LIB@.so.@VERSION@ 
$(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so.@VERSION@;
+
+# The version bump from 8.0.x to 9.0.0 can make the need of massive rebuilds on
+# current distributions when shipping an updated Mesa stack.
+# Because the soversion bump for OSMesa is not caused by a changed API we can
+# also symlink and ship a .so.8 to avoid such rebuilds.
+install-exec-hook:
+   cd $(DESTDIR)$(libdir)  \
+   ln -s lib@OSMESA_LIB@.so.@VERSION@ lib@OSMESA_LIB@.so.8;
 endif
 
 pkgconfigdir = $(libdir)/pkgconfig
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Set OSMESA_VERSION=8.

2012-09-01 Thread Johannes Obermayr
VERSION_NUMBER is not required anymore. So it will be removed.
---
 configure.ac |8 
 src/mesa/drivers/osmesa/Makefile.am  |4 ++--
 src/mesa/drivers/osmesa/osmesa.pc.in |2 +-
 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-)

diff --git a/configure.ac b/configure.ac
index 82fe225..55e5251 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,6 +26,10 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
+dnl Set internal versions
+OSMESA_VERSION=8
+AC_SUBST([OSMESA_VERSION])
+
 dnl Versions for external dependencies
 LIBDRM_REQUIRED=2.4.24
 LIBDRM_RADEON_REQUIRED=2.4.39
@@ -1920,10 +1924,6 @@ AM_CONDITIONAL(HAVE_X86_ASM, echo $DEFINES | grep 
'X86_ASM' /dev/null 21)
 AM_CONDITIONAL(HAVE_X86_64_ASM, echo $DEFINES | grep 'X86_64_ASM' /dev/null 
21)
 AM_CONDITIONAL(HAVE_SPARC_ASM, echo $DEFINES | grep 'SPARC_ASM' /dev/null 
21)
 
-# To pass as an argument to libtool's -version-number flag
-VERSION_NUMBER=`echo $VERSION | $SED 's/\./:/g'`
-AC_SUBST([VERSION_NUMBER])
-
 dnl prepend CORE_DIRS to SRC_DIRS
 SRC_DIRS=$CORE_DIRS $SRC_DIRS
 
diff --git a/src/mesa/drivers/osmesa/Makefile.am 
b/src/mesa/drivers/osmesa/Makefile.am
index db1d14f..6d087f2 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -35,7 +35,7 @@ lib_LTLIBRARIES = lib@OSMESA_LIB@.la
 
 lib@OSMESA_LIB@_la_SOURCES = osmesa.c
 
-lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @VERSION_NUMBER@ 
-no-undefined
+lib@OSMESA_LIB@_la_LDFLAGS = -module -version-number @OSMESA_VERSION@ 
-no-undefined
 lib@OSMESA_LIB@_la_LIBADD = \
$(top_builddir)/src/mesa/libmesa.la \
$(top_builddir)/src/mapi/glapi/libglapi.la
@@ -46,7 +46,7 @@ if BUILD_SHARED
 all-local: lib@OSMESA_LIB@.la
$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
ln -f .libs/lib@OSMESA_LIB@.so 
$(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so;
-   ln -f .libs/lib@OSMESA_LIB@.so.@VERSION@ 
$(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so.@VERSION@;
+   ln -f .libs/lib@OSMESA_LIB@.so.@OSMESA_VERSION@ 
$(top_builddir)/$(LIB_DIR)/lib@OSMESA_LIB@.so.@OSMESA_VERSION@;
 endif
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/src/mesa/drivers/osmesa/osmesa.pc.in 
b/src/mesa/drivers/osmesa/osmesa.pc.in
index 307255f..cd77fd7 100644
--- a/src/mesa/drivers/osmesa/osmesa.pc.in
+++ b/src/mesa/drivers/osmesa/osmesa.pc.in
@@ -6,7 +6,7 @@ includedir=@includedir@
 Name: osmesa
 Description: Mesa Off-screen Rendering library
 Requires: @OSMESA_PC_REQ@
-Version: @PACKAGE_VERSION@
+Version: @OSMESA_VERSION@
 Libs: -L${libdir} -l@OSMESA_LIB@
 Libs.private: @OSMESA_PC_LIB_PRIV@
 Cflags: -I${includedir}
-- 
1.7.10.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Make it possible to install gl.pc and osmesa.pc together.

2012-07-09 Thread Johannes Obermayr
Am Sonntag, 8. Juli 2012, 19:41:33 schrieb Kenneth Graunke:
 On 07/08/2012 03:12 PM, Johannes Obermayr wrote:
  ---
   configure.ac |1 +
   src/mesa/Makefile.am |9 ++---
   2 files changed, 7 insertions(+), 3 deletions(-)
 
 It's never been clear to me whether one can build OSMesa and non-OSMesa
 at the same time.  If you can, then of course this makes sense.

http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e7a4147c730adda047aae66c17f07d9de5b4a28

 
 Reviewed-by: Kenneth Graunke kenn...@whitecape.org
 
 

Is anybody willing to push it or should I request an account after 11 (12) 
commits pushed to mesa and a few pushed to other repositories on fdo?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Make it possible to install gl.pc and osmesa.pc together.

2012-07-09 Thread Johannes Obermayr
Am Montag, 9. Juli 2012, 09:45:56 schrieb Eric Anholt:
 osmesa didn't install gl.pc in the past as far as I can see, and I don't
 think it should -- it's not a normal GL implementation, so you want to
 be specifically looking for osmesa in your pkgconfig checks.

Mesa-demos require gl.pc (line 28) and osmesa.pc (line 36):
https://build.opensuse.org/package/view_file?file=Mesa-demos.specpackage=Mesa-demosproject=home:jobermayr

Building Mesa with

./autogen.sh --host=i586-suse-linux-gnu --build=i586-suse-linux-gnu 
--program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin 
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share 
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/lib 
--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-xvmc --enable-vdpau --enable-texture-float 
--enable-debug --enable-dri --enable-glx --enable-osmesa 
--with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast --enable-gles1 
--enable-gles2 --enable-openvg --enable-shared-glapi 
--with-gallium-drivers=i915,nouveau,r300,r600,svga,swrast --enable-gbm 
--enable-xorg --enable-xa --enable-gallium-egl --with-x --enable-gallium-llvm 
--enable-gallium-gbm --enable-gallium-g3dvl

worked for almost a year until

http://cgit.freedesktop.org/mesa/mesa/commit/?id=39785488e6a3f6beeb58372b88d49274a76d02f4

because both pc files were installed ...

After that commit OBS bitched a missing gl.pc until I applied the patch.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] Make it possible to install gl.pc and osmesa.pc together.

2012-07-08 Thread Johannes Obermayr
---
 configure.ac |1 +
 src/mesa/Makefile.am |9 ++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 46265a2..00279f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2126,6 +2126,7 @@ AC_SUBST([GALLIUM_MAKE_DIRS])
 
 AM_CONDITIONAL(HAVE_X11_DRIVER, echo $DRIVER_DIRS | grep 'x11' /dev/null 
21)
 AM_CONDITIONAL(HAVE_DRI_DRIVER, echo $DRIVER_DIRS | grep 'dri' /dev/null 
21)
+AM_CONDITIONAL(HAVE_OPENGL, test x$enable_opengl = xyes)
 AM_CONDITIONAL(HAVE_OSMESA_DRIVER, echo $DRIVER_DIRS | grep 'osmesa' 
/dev/null 21)
 
 AM_CONDITIONAL(HAVE_X86_ASM, echo $DEFINES | grep 'X86_ASM' /dev/null 21)
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index bada760..3568728 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -103,9 +103,12 @@ clean-local:
$(MAKE) -f $(srcdir)/Makefile.old clean
 
 pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = 
+
+if HAVE_OPENGL
+pkgconfig_DATA += gl.pc
+endif
 
 if HAVE_OSMESA_DRIVER
-pkgconfig_DATA = osmesa.pc
-else
-pkgconfig_DATA = gl.pc
+pkgconfig_DATA += osmesa.pc
 endif
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallivm: Fix potential buffer overflowing in strncat.

2012-06-28 Thread Johannes Obermayr
---
 src/gallium/auxiliary/gallivm/lp_bld_printf.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c 
b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
index 16ef25a..35e9197 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
@@ -118,16 +118,16 @@ lp_build_print_value(struct gallivm_state *gallivm,
 
params[1] = lp_build_const_string(gallivm, msg);
if (length == 1) {
-  util_strncat(format, type_fmt, sizeof format);
+  util_strncat(format, type_fmt, sizeof(format)-strlen(format)-1);
   params[2] = value;
} else {
   for (i = 0; i  length; ++i) {
- util_strncat(format, type_fmt, sizeof format);
+ util_strncat(format, type_fmt, sizeof(format)-strlen(format)-1);
  params[2 + i] = LLVMBuildExtractElement(builder, value, 
lp_build_const_int32(gallivm, i), );
   }
}
 
-   util_strncat(format, \n, sizeof format);
+   util_strncat(format, \n, sizeof(format)-strlen(format)-1);
 
params[0] = lp_build_const_string(gallivm, format);
return lp_build_print_args(gallivm, 2 + length, params);
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [libdrm PATCH 1/4] libkms/intel.c: Fix a memory leak and a dead assignment as well as cleanup code a bit.

2012-06-28 Thread Johannes Obermayr
---
 libkms/intel.c |   23 ---
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/libkms/intel.c b/libkms/intel.c
index 8b8249b..7bf1f76 100644
--- a/libkms/intel.c
+++ b/libkms/intel.c
@@ -93,14 +93,18 @@ intel_bo_create(struct kms_driver *kms,
if (!bo)
return -ENOMEM;
 
-   if (type == KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8) {
+   switch (type) {
+   case KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8:
pitch = 64 * 4;
size = 64 * 64 * 4;
-   } else if (type == KMS_BO_TYPE_SCANOUT_X8R8G8B8) {
+   break;
+   case KMS_BO_TYPE_SCANOUT_X8R8G8B8:
pitch = width * 4;
pitch = (pitch + 512 - 1)  ~(512 - 1);
size = pitch * ((height + 4 - 1)  ~(4 - 1));
-   } else {
+   break;
+   default:
+   free(bo);
return -EINVAL;
}
 
@@ -108,8 +112,10 @@ intel_bo_create(struct kms_driver *kms,
arg.size = size;
 
ret = drmCommandWriteRead(kms-fd, DRM_I915_GEM_CREATE, arg, 
sizeof(arg));
-   if (ret)
-   goto err_free;
+   if (ret) {
+   free(bo);
+   return ret;
+   }
 
bo-base.kms = kms;
bo-base.handle = arg.handle;
@@ -124,9 +130,8 @@ intel_bo_create(struct kms_driver *kms,
tile.handle = bo-base.handle;
tile.tiling_mode = I915_TILING_X;
tile.stride = bo-base.pitch;
-
-   ret = drmCommandWriteRead(kms-fd, DRM_I915_GEM_SET_TILING, 
tile, sizeof(tile));
 #if 0
+   ret = drmCommandWriteRead(kms-fd, DRM_I915_GEM_SET_TILING, 
tile, sizeof(tile));
if (ret) {
kms_bo_destroy(out);
return ret;
@@ -135,10 +140,6 @@ intel_bo_create(struct kms_driver *kms,
}
 
return 0;
-
-err_free:
-   free(bo);
-   return ret;
 }
 
 static int
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [libdrm PATCH 2/4] libkms/nouveau.c: Fix a memory leak and cleanup code a bit.

2012-06-28 Thread Johannes Obermayr
---
 libkms/nouveau.c |   20 +++-
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/libkms/nouveau.c b/libkms/nouveau.c
index 0e24a15..4cbca96 100644
--- a/libkms/nouveau.c
+++ b/libkms/nouveau.c
@@ -94,14 +94,18 @@ nouveau_bo_create(struct kms_driver *kms,
if (!bo)
return -ENOMEM;
 
-   if (type == KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8) {
+   switch (type) {
+   case KMS_BO_TYPE_CURSOR_64X64_A8R8G8B8:
pitch = 64 * 4;
size = 64 * 64 * 4;
-   } else if (type == KMS_BO_TYPE_SCANOUT_X8R8G8B8) {
+   break;
+   case KMS_BO_TYPE_SCANOUT_X8R8G8B8:
pitch = width * 4;
pitch = (pitch + 512 - 1)  ~(512 - 1);
size = pitch * height;
-   } else {
+   break;
+   default:
+   free(bo);
return -EINVAL;
}
 
@@ -114,8 +118,10 @@ nouveau_bo_create(struct kms_driver *kms,
arg.channel_hint = 0;
 
ret = drmCommandWriteRead(kms-fd, DRM_NOUVEAU_GEM_NEW, arg, 
sizeof(arg));
-   if (ret)
-   goto err_free;
+   if (ret) {
+   free(bo);
+   return ret;
+   }
 
bo-base.kms = kms;
bo-base.handle = arg.info.handle;
@@ -126,10 +132,6 @@ nouveau_bo_create(struct kms_driver *kms,
*out = bo-base;
 
return 0;
-
-err_free:
-   free(bo);
-   return ret;
 }
 
 static int
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [libdrm PATCH 3/4] nouveau/nouveau.c: Fix two memory leaks.

2012-06-28 Thread Johannes Obermayr
---
 nouveau/nouveau.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index 5aa4107..e91287f 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -95,6 +95,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device 
**pdev)
(dev-drm_version   0x0100 ||
 dev-drm_version = 0x0200)) {
nouveau_device_del(dev);
+   free(nvdev);
return -EINVAL;
}
 
@@ -105,6 +106,7 @@ nouveau_device_wrap(int fd, int close, struct 
nouveau_device **pdev)
ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_AGP_SIZE, gart);
if (ret) {
nouveau_device_del(dev);
+   free(nvdev);
return ret;
}
 
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [libdrm PATCH 4/4] xf86drm.c: Make more code UDEV unrelevant and fix a memory leak.

2012-06-28 Thread Johannes Obermayr
---
 xf86drm.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/xf86drm.c b/xf86drm.c
index 6ea068f..798f1fd 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -255,6 +255,7 @@ static int drmMatchBusID(const char *id1, const char *id2, 
int pci_domain_ok)
 return 0;
 }
 
+#if !defined(UDEV)
 /**
  * Handles error checking for chown call.
  *
@@ -284,6 +285,7 @@ static int chown_check_return(const char *path, uid_t 
owner, gid_t group)
path, errno, strerror(errno));
return -1;
 }
+#endif
 
 /**
  * Open the DRM device, creating it if necessary.
@@ -303,13 +305,15 @@ static int drmOpenDevice(long dev, int minor, int type)
 stat_t  st;
 charbuf[64];
 int fd;
+
+sprintf(buf, type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME, DRM_DIR_NAME, 
minor);
+drmMsg(drmOpenDevice: node name is %s\n, buf);
+
+#if !defined(UDEV)
 mode_t  devmode = DRM_DEV_MODE, serv_mode;
 int isroot  = !geteuid();
 uid_t   user= DRM_DEV_UID;
 gid_t   group   = DRM_DEV_GID, serv_group;
-
-sprintf(buf, type ? DRM_DEV_NAME : DRM_CONTROL_DEV_NAME, DRM_DIR_NAME, 
minor);
-drmMsg(drmOpenDevice: node name is %s\n, buf);
 
 if (drm_server_info) {
drm_server_info-get_perms(serv_group, serv_mode);
@@ -318,7 +322,6 @@ static int drmOpenDevice(long dev, int minor, int type)
group = (serv_group = 0) ? serv_group : DRM_DEV_GID;
 }
 
-#if !defined(UDEV)
 if (stat(DRM_DIR_NAME, st)) {
if (!isroot)
return DRM_ERR_NOT_ROOT;
@@ -1395,8 +1398,10 @@ drm_context_t *drmGetReservedContextList(int fd, int 
*count)
 }
 
 res.contexts = list;
-if (drmIoctl(fd, DRM_IOCTL_RES_CTX, res))
+if (drmIoctl(fd, DRM_IOCTL_RES_CTX, res)) {
+   drmFree(retval);
return NULL;
+}
 
 for (i = 0; i  res.count; i++)
retval[i] = list[i].handle;
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [libdrm PATCH 3/4] nouveau/nouveau.c: Fix two memory leaks.

2012-06-28 Thread Johannes Obermayr
Am Donnerstag, 28. Juni 2012, 23:06:10 schrieb Marcin Slusarz:
 On Thu, Jun 28, 2012 at 09:51:57PM +0200, Johannes Obermayr wrote:
  ---
   nouveau/nouveau.c |2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)
  
  diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
  index 5aa4107..e91287f 100644
  --- a/nouveau/nouveau.c
  +++ b/nouveau/nouveau.c
  @@ -95,6 +95,7 @@ nouveau_device_wrap(int fd, int close, struct 
  nouveau_device **pdev)
  (dev-drm_version   0x0100 ||
   dev-drm_version = 0x0200)) {
  nouveau_device_del(dev);
  +   free(nvdev);
  return -EINVAL;
  }
   
  @@ -105,6 +106,7 @@ nouveau_device_wrap(int fd, int close, struct 
  nouveau_device **pdev)
  ret = nouveau_getparam(dev, NOUVEAU_GETPARAM_AGP_SIZE, gart);
  if (ret) {
  nouveau_device_del(dev);
  +   free(nvdev);
  return ret;
  }
   
 
 nouveau_device_del already does it.
 NAK
 
 Marcin

nvdev != dev or I am wrong?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] mesa: more const qualifiers to match the latest glext.h glext.h

2012-06-27 Thread Johannes Obermayr
With the second patch this issue remains (gcc on openSUSE_12.1):

gcc -c -I../../../include -I../../../src/mapi -I../../../src/mesa 
-DMAPI_MODE_BRIDGE -DMAPI_ABI_HEADER=\glapi/glapi_mapi_tmp.h\ 
-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables -g -Wall -std=c99 
-Werror=implicit-function-declaration -Werror=missing-prototypes 
-fno-strict-aliasing -fno-builtin-memcmp -g -fmessage-length=0 -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g  -fPIC  -D_GNU_SOURCE -DPTHREADS -DDEBUG 
-DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER 
-DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING 
-DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE 
-DHAVE_LIBUDEV -DHAVE_XEXTPROTO_71 -DHAVE_LLVM=0x0302 -fvisibility=hidden 
../../../src/mapi/mapi/entry.c -o entry.o
In file included from ../../../src/mapi/mapi/mapi_tmp.h:48:0,
 from ../../../src/mapi/mapi/entry.c:69:
../../../src/mapi/glapi/glapi_mapi_tmp.h:724:45: error: conflicting types for 
'glShaderSource'
../../../include/GL/glext.h:5959:45: note: previous declaration of 
'glShaderSource' was here
In file included from ../../../src/mapi/mapi/mapi_tmp.h:48:0,
 from ../../../src/mapi/mapi/entry.c:69:
../../../src/mapi/glapi/glapi_mapi_tmp.h:6220:45: error: conflicting types for 
'glShaderSource'
../../../include/GL/glext.h:5959:45: note: previous declaration of 
'glShaderSource' was here


Regards,
Johannes

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/xa: Link with -Wl,-r instead of -r.

2012-03-05 Thread Johannes Obermayr
This is required to link with clang:
  /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 
00400160.
---
 src/gallium/state_trackers/xa/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/state_trackers/xa/Makefile 
b/src/gallium/state_trackers/xa/Makefile
index b42e619..9a822a0 100644
--- a/src/gallium/state_trackers/xa/Makefile
+++ b/src/gallium/state_trackers/xa/Makefile
@@ -39,7 +39,7 @@ default: $(XA_LIB_NAME)
 
 # Make the library
 $(XA_LIB_NAME): depend $(OBJECTS)
-   $(CC) -r -nostdlib -o $(XA_LIB_NAME) $(OBJECTS)
+   $(CC) -Wl,-r -nostdlib -o $(XA_LIB_NAME) $(OBJECTS)
 
 install: FORCE
 
-- 
1.7.7

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


  1   2   >