[66737] trunk/dports/sysutils/clamav

dluke at macports.org dluke at macports.org
Wed Apr 21 13:13:07 PDT 2010


Revision: 66737
          http://trac.macports.org/changeset/66737
Author:   dluke at macports.org
Date:     2010-04-21 13:13:04 -0700 (Wed, 21 Apr 2010)
Log Message:
-----------
Clamav, update patch for ppc/llvm from upstream + revbump

Modified Paths:
--------------
    trunk/dports/sysutils/clamav/Portfile
    trunk/dports/sysutils/clamav/files/ppc_llvm_patch.diff

Modified: trunk/dports/sysutils/clamav/Portfile
===================================================================
--- trunk/dports/sysutils/clamav/Portfile	2010-04-21 19:54:51 UTC (rev 66736)
+++ trunk/dports/sysutils/clamav/Portfile	2010-04-21 20:13:04 UTC (rev 66737)
@@ -5,7 +5,7 @@
 
 name			clamav
 version		 	0.96
-revision		2
+revision		3
 categories	  	sysutils
 maintainers	 	geeklair.net:dluke
 description	 	clamav antivirus software

Modified: trunk/dports/sysutils/clamav/files/ppc_llvm_patch.diff
===================================================================
--- trunk/dports/sysutils/clamav/files/ppc_llvm_patch.diff	2010-04-21 19:54:51 UTC (rev 66736)
+++ trunk/dports/sysutils/clamav/files/ppc_llvm_patch.diff	2010-04-21 20:13:04 UTC (rev 66737)
@@ -1,3 +1,22 @@
+diff --git ChangeLog ChangeLog
+index 4049421..2c93a08 100644
+--- ChangeLog
++++ ChangeLog
+@@ -1,3 +1,14 @@
++Fri Apr  2 16:19:26 EEST 2010 (edwin)
++-------------------------------------
++ * libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp:
++ Fix the previous PowerPC workaround to not crash when not using the JIT.
++
++Fri Apr  2 13:09:54 EEST 2010 (edwin)
++------------------------------------
++ * libclamav/c++/{bytecode2llvm.cpp,llvm/lib/ExecutionEngine/JIT/JIT.cpp,
++     llvm/lib/Target/PowerPC/PPCISelLowering.cpp}: Workaround LLVM JIT PowerPC relocation bug (bb #1921).
++    Based on Gary Benson's workaround for OpenJDK Shark / IcedTea.
++
+ Wed Mar 31 19:30:59 CEST 2010 (tk)
+ ----------------------------------
+  * V 0.96
 diff --git libclamav/c++/bytecode2llvm.cpp libclamav/c++/bytecode2llvm.cpp
 index 003894e..3b38259 100644
 --- libclamav/c++/bytecode2llvm.cpp
@@ -59,20 +78,24 @@
  	for (unsigned i=0;i<bcs->count;i++) {
  	    const struct cli_bc *bc = &bcs->all_bcs[i];
 diff --git libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
-index b6c3367..0f880c9 100644
+index b6c3367..4fc7d5a 100644
 --- libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
 +++ libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
-@@ -255,7 +255,8 @@ public:
+@@ -255,7 +255,12 @@ public:
      MutexGuard guard(Lock);
      JITs.erase(jit);
    }
 -  void *getPointerToNamedFunction(const char *Name) const {
++  bool empty() {
++    MutexGuard guard(Lock);
++    return JITs.empty();
++  }
 +  void *getPointerToNamedFunction(const char *Name,
 +                                  bool AbortOnFailure = true) const {
      MutexGuard guard(Lock);
      assert(JITs.size() != 0 && "No Jit registered");
      //search function in every instance of JIT
-@@ -267,7 +268,19 @@ public:
+@@ -267,7 +272,19 @@ public:
      }
      // The function is not available : fallback on the first created (will
      // search in symbol of the current program/library)
@@ -93,7 +116,7 @@
    }
  };
  ManagedStatic<JitPool> AllJits;
-@@ -283,6 +296,22 @@ extern "C" {
+@@ -283,6 +300,22 @@ extern "C" {
    }
  }
  
@@ -101,7 +124,7 @@
 +  // getPointerToNamedFunctionOrNull - same as the above, but returns
 +  // NULL instead of aborting if the function cannot be found.
 +  void *getPointerToNamedFunctionOrNull(const char *Name) {
-+    return AllJits->getPointerToNamedFunction(Name, false);
++    return !AllJits->empty() ? AllJits->getPointerToNamedFunction(Name, false) : 0;
 +  }
 +}
 +
@@ -109,7 +132,7 @@
 +  // getPointerToGlobalIfAvailable - same as the above, but for global
 +  // variables, and only for those that have been codegened already.
 +  void *getPointerToGlobalIfAvailable(GlobalValue *V) {
-+    return AllJits->getPointerToGlobalIfAvailable(V);
++    return !AllJits->empty() ? AllJits->getPointerToGlobalIfAvailable(V) : 0;
 +  }
 +}
 +
@@ -117,7 +140,7 @@
           JITMemoryManager *JMM, CodeGenOpt::Level OptLevel, bool GVsWithCode)
    : ExecutionEngine(M), TM(tm), TJI(tji), AllocateGVsWithCode(GVsWithCode),
 diff --git libclamav/c++/llvm/lib/Target/PowerPC/PPCISelLowering.cpp libclamav/c++/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
-index 3d81afa..3fe793c 100644
+index 3d81afa..167a0e6 100644
 --- libclamav/c++/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
 +++ libclamav/c++/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
 @@ -2450,6 +2450,9 @@ void PrepareTailCall(SelectionDAG &DAG, SDValue &InFlag, SDValue &Chain,
@@ -141,7 +164,7 @@
 +  // If the callee is an ExternalSymbol node, and the symbol can be
 +  // resolved to a function pointer, then insert that pointer as a
 +  // constant.  This causes the next block of code to fall into the
-+  // block that emits an indirect call.  This works around 
++  // block that emits an indirect call.  This works around
 +  //
 +  // This works for Shark because the only kinds of call that Shark
 +  // makes that do not already fall into the indirect call block are
@@ -151,7 +174,7 @@
 +    if (FuncPtr)
 +      Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT);
 +  }
-+  if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {	
++  if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(Callee)) {
 +    void *FuncPtr = getPointerToGlobalIfAvailable(G->getGlobal());
 +    if (FuncPtr)
 +      Callee = DAG.getConstant((uint64_t) FuncPtr, PtrVT);
@@ -160,4 +183,3 @@
    // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every
    // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol
    // node so that legalize doesn't hack it.
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100421/ecb323fb/attachment-0001.html>


More information about the macports-changes mailing list