2010/1/27 Török Edwin <edwinto...@gmail.com>: > On 01/27/2010 12:48 PM, Renato Botelho wrote: >> 2010/1/26 Török Edwin <edwinto...@gmail.com>: >> >>> On 12/22/2009 02:39 PM, Renato Botelho wrote: >>> >>>> 2009/12/22 Török Edwin <edwinto...@gmail.com>: >>>> >>>> >>>>> Yes, I opened a bug about that now: >>>>> https://wwws.clamav.net/bugzilla/show_bug.cgi?id=1781 >>>>> >>>>> For now the workaround for the user is to set the CPU for the build to >>>>> at least i486. >>>>> >>>>> >>>> OK, i'll mark clamav-devel port as BROKEN on FreeBSD i386 for now. >>>> >>> Hi Renato, >>> >>> I have added the mutex workaround when building on i386, sorry for >>> taking so long to fix. >>> Also removed the Perl dependency from LLVM's configure, which would be >>> needed only if we'd use LLVM's buildsystem. >>> We don't use that, I've written a Makefile.am for LLVM. >>> >>> ClamAV should now build again on i386/FreeBSD, please test and report if >>> you still have any build problems. >>> >>> The fix is in the git master repository (if you use git). If you are >>> using a snapshot, then it will be in tomorrow's snapshot. >>> >> >> I had started the tests, but i was thinking something, i think we just have >> a "name" problem here, FreeBSD call 32-bit arch as i386, but it doesn't >> mean that is i386, looking at FreeBSD kernel config file we have 3 >> possibilities of CPU: >> >> cpu I486_CPU >> cpu I586_CPU >> cpu I686_CPU >> >> As you can see, it's not really i386, so, i think we can build llvm thread >> safe. >> > > Would this solve it in your ports makefile (or is it too late to override?): > CPUTYPE?=i586
The problem is I cannot set this var under ports Makefile > That way the user can still set the CPUTYPE explicitly in /etc/make.conf > to something better, > and we'd get a good default (i586 instead of i386). > LLVM JIT generates code for pentium and above only, so if you really run > it on a i386/i486 ClamAV won't > use LLVM's JIT (but fallback to an interpreter). If user choose to set it on make.conf ports will respect. > Please add back this code to libclamav/c++/bytecode2llvm.cpp while > testing if CPUTYPE override works: > #if !defined(LLVM_MULTITHREADED) || !LLVM_MULTITHREADED > #error "Multithreading not available for llvm?" > #endif > >> What do you think about it? >> > > I think the problem is how FreeBSD's gcc is built. > If gcc is built with i386-* triple, it will generate i386 code by > default. Debian's is built as i486-linux-gnu. > Anyway I don't think we can do anything about how gcc is built for old > versions of FreeBSD. The oldest supported FreeBSD version is 6.x, and on this version we just support i486+ CPUs on kernel. Based on this, when FreeBSD say you i386-freebsd it just try to say it's running x86 arch, but cpu supported is 486+ I'll try to contact someone directly from freebsd gcc team. Anyway, clamav built fine on FreeBSD 6, 7 and 8 i386 and amd64. If you have some time, take a look at build logs here: http://freebsd1.asmallorange.com/index.php?action=describe_port&id=566 http://freebsd2.asmallorange.com/index.php?action=describe_port&id=365 Thanks -- Renato Botelho _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html Please submit your patches to our Bugzilla: http://bugs.clamav.net