|Main Archive Page > Month Archives > clamav-devel archives|
On 01/27/2010 12:48 PM, Renato Botelho wrote: > 2010/1/26 Török Edwin <email@example.com>: >
>> On 12/22/2009 02:39 PM, Renato Botelho wrote:
>>> 2009/12/22 Török Edwin <firstname.lastname@example.org>: >>> >>> >>>> 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
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).
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.