From: Török E. <edw...@gm...> - 2010-05-03 08:42:14
|
On 05/03/2010 11:36 AM, mes...@li... wrote: > From: Francis Galiegue <fga...@gm...> > Subject: [Mesa3d-dev] LLVM and udis86 dependencies > To: mes...@li... > Message-ID: > <x2z...@ma...> > Content-Type: text/plain; charset=ISO-8859-1 > > In the current HEAD, in configure.ac: > > ---- > 1182- [enable_gallium=yes]) > 1183-if test "x$enable_gallium" = xyes; then > 1184- SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets" > 1185: AC_CHECK_HEADER([udis86.h], [HAS_UDIS86="yes"], > 1186- [HAS_UDIS86="no"]) > 1187- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) > 1188-fi > -- > 1340- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen > bitwriter` -lstdc++" > 1341- > 1342- if test "x$HAS_UDIS86" != xno; then > 1343: LLVM_LIBS="$LLVM_LIBS -ludis86" > 1344- DEFINES="$DEFINES -DHAVE_UDIS86" > 1345- fi > 1346- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` > ---- > > This means basically that the udis86 dependency is "automagic" if you > elect to build with LLVM support. > > I have a case here of a miscompiled udis86 (missing -fPIC, preventing > relocation) on a setup where LLVM was NOT compiled with udis86. > > Would it be possible to make the udis86 dependency optional (ie, > --with-udis86 option to ./configure)? LLVM 2.7 includes a disassembler of its own (libEnhancedDisassembly.so), could that one be used instead of udis86? Best regards, --Edwin |
From: José F. <jfo...@vm...> - 2010-05-03 09:22:24
|
On Mon, 2010-05-03 at 01:42 -0700, Török Edwin wrote: > On 05/03/2010 11:36 AM, mes...@li... wrote: > > From: Francis Galiegue <fga...@gm...> > > Subject: [Mesa3d-dev] LLVM and udis86 dependencies > > To: mes...@li... > > Message-ID: > > <x2z...@ma...> > > Content-Type: text/plain; charset=ISO-8859-1 > > > > In the current HEAD, in configure.ac: > > > > ---- > > 1182- [enable_gallium=yes]) > > 1183-if test "x$enable_gallium" = xyes; then > > 1184- SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets" > > 1185: AC_CHECK_HEADER([udis86.h], [HAS_UDIS86="yes"], > > 1186- [HAS_UDIS86="no"]) > > 1187- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) > > 1188-fi > > -- > > 1340- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen > > bitwriter` -lstdc++" > > 1341- > > 1342- if test "x$HAS_UDIS86" != xno; then > > 1343: LLVM_LIBS="$LLVM_LIBS -ludis86" > > 1344- DEFINES="$DEFINES -DHAVE_UDIS86" > > 1345- fi > > 1346- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` > > ---- > > > > This means basically that the udis86 dependency is "automagic" if you > > elect to build with LLVM support. > > > > I have a case here of a miscompiled udis86 (missing -fPIC, preventing > > relocation) on a setup where LLVM was NOT compiled with udis86. > > > > Would it be possible to make the udis86 dependency optional (ie, > > --with-udis86 option to ./configure)? > > LLVM 2.7 includes a disassembler of its own (libEnhancedDisassembly.so), > could that one be used instead of udis86? Yes, that would be nice. udis86 seems a bit unmaintained a the moment. I've sent a few patches for some SSE4 opcodes to the maintainer and they weren't checked in yet. I thought about bundling its source in mesa, but when I saw news of LLVM's disassembler plans I thought it was better to wait. But I don't have time to look into this myself. If you don't have time either then a simple patch to make udis86 optional should be good enough for now. Jose |
From: Török E. <edw...@gm...> - 2010-05-03 13:03:41
|
On 05/03/2010 12:22 PM, José Fonseca wrote: > On Mon, 2010-05-03 at 01:42 -0700, Török Edwin wrote: >> On 05/03/2010 11:36 AM, mes...@li... wrote: >>> From: Francis Galiegue <fga...@gm...> >>> Subject: [Mesa3d-dev] LLVM and udis86 dependencies >>> To: mes...@li... >>> Message-ID: >>> <x2z...@ma...> >>> Content-Type: text/plain; charset=ISO-8859-1 >>> >>> In the current HEAD, in configure.ac: >>> >>> ---- >>> 1182- [enable_gallium=yes]) >>> 1183-if test "x$enable_gallium" = xyes; then >>> 1184- SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets" >>> 1185: AC_CHECK_HEADER([udis86.h], [HAS_UDIS86="yes"], >>> 1186- [HAS_UDIS86="no"]) >>> 1187- AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) >>> 1188-fi >>> -- >>> 1340- LLVM_LIBS="`$LLVM_CONFIG --libs jit interpreter nativecodegen >>> bitwriter` -lstdc++" >>> 1341- >>> 1342- if test "x$HAS_UDIS86" != xno; then >>> 1343: LLVM_LIBS="$LLVM_LIBS -ludis86" >>> 1344- DEFINES="$DEFINES -DHAVE_UDIS86" >>> 1345- fi >>> 1346- LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` >>> ---- >>> >>> This means basically that the udis86 dependency is "automagic" if you >>> elect to build with LLVM support. >>> >>> I have a case here of a miscompiled udis86 (missing -fPIC, preventing >>> relocation) on a setup where LLVM was NOT compiled with udis86. >>> >>> Would it be possible to make the udis86 dependency optional (ie, >>> --with-udis86 option to ./configure)? >> >> LLVM 2.7 includes a disassembler of its own (libEnhancedDisassembly.so), >> could that one be used instead of udis86? > > Yes, that would be nice. > > udis86 seems a bit unmaintained a the moment. I've sent a few patches > for some SSE4 opcodes to the maintainer and they weren't checked in yet. > I thought about bundling its source in mesa, but when I saw news of > LLVM's disassembler plans I thought it was better to wait. > > But I don't have time to look into this myself. If you don't have time > either then a simple patch to make udis86 optional should be good enough > for now. Sounds good, make udis86 optional now, and when someone has time to write a patch for using llvm's disassembler then udis86 can be dropped completely. Best regards, --Edwin |
From: Francis G. <fga...@gm...> - 2010-05-03 13:39:40
|
On Mon, May 3, 2010 at 3:03 PM, Török Edwin <edw...@gm...> wrote: [...] > > Sounds good, make udis86 optional now, and when someone has time to > write a patch for using llvm's disassembler then udis86 can be dropped > completely. > Untested (I have disabled LLVM support since I have encountered these problems), but there is an llvm-config command, IIRC, similarly to pkg-config, which can tell us which LDFLAGS/CPPFLAGS to use. Why not use this command, if the only requirement for Mesa is LLVM and not udis86? -- Francis Galiegue, fga...@gm... "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) |