Commit graph

23 commits

Author SHA1 Message Date
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Micah Snyder
d46832d5cf clamav.net URL update for new docs, github issues
Replace new bugzilla ticket links with links to github issues.
Replace clamav.net/documentation links with docs.clamav.net equivalents.
2021-07-17 15:28:02 -07:00
Micah Snyder
b0fc4c1346 clang-format: c++ bytecode source
Previously we'd not clang-formatted the c++ bytecode files because:
A) It's a massive difference in format
B) I wasn't sure, at the time, which code was "ours"

Reformatting now that the LLVM source is all removed and before it gets
updated to support modern LLVM versions.
2021-07-05 15:19:02 -07:00
Micah Snyder
da23b1ceab CMake: Fix support for external LLVM (3.6)
Have to manually link libtinfo (`-ltinfo`) because our FindLLVM
didn't add it to the LLVM_LIBRARIES variable for us. See:
- https://stackoverflow.com/questions/21477407/llvm-3-5-fails-to-link

Have to remove the CXX_STANDARD setting at the top of CMakeLists.txt
because of c++90 / c++11 ABI compatibility issues w/ LLVM. See:
- https://maleadt.github.io/LLVM.jl/dev/man/troubleshooting/

Rename "llvm/Config/config.h" "llvm/Config/llvm-config.h" because
LLVM renamed it in 2.8.

Have to link LLVM manually with the test binaries that use the
clamav object library instead of libclamav shared library.
CMake does not propagate library dependencies from object files.

I tested on ubuntu:16.04 with LLVM 3.6 built from source using:
```
/usr/local/bin/cmake .. -D CMAKE_INSTALL_PREFIX=/opt/llvm/3.6 \
  -D LLVM_ENABLE_RTTI=ON
```
Then built clamav w/:
```
/usr/local/bin/cmake .. -D CMAKE_INSTALL_PREFIX=`pwd`/install \
  -D BYTECODE_RUNTIME="llvm" \
  -D LLVM_ROOT_DIR="/opt/llvm/3.6" \
  -D LLVM_FIND_VERSION="3.6.0" && make && make install
```
2021-05-19 14:20:59 -07:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
964a1e7321 Converting http urls to https urls. Primary focus was on clamav.net urls. I updated a couple others and fixes a few broken links as well. There are many (non-clamav.net) urls I didn't address, especially in 3rd party or contrib code. 2018-04-02 07:58:33 -04:00
Kevin Lin
2c859ec754 bb#11414 - integrate patch for LLVM 3.6 support 2015-10-29 17:48:45 -04:00
Mickey Sola
46a35abe56 mass update of copyright headers 2015-09-17 13:41:26 -04:00
Kevin Lin
9f8df4ae4b unified bytecode version macros into LLVM_VERSION macro 2014-07-25 12:47:18 -04:00
Kevin Lin
34d8b8cfc7 bb#10981 - applied LLVM 3.1-3.4 patch for testing
Conflicts:

	libclamav/c++/Makefile.am
	libclamav/c++/bytecode2llvm.cpp
2014-07-25 12:26:04 -04:00
David Raynor
19f9dadff6 Quiet Minix warning bb#5325 2012-06-22 16:58:21 -04:00
Török Edvin
0c79cc5529 Support building with external LLVM 2.9, and drop support for building with external 2.8
Internal version is an LLVM 2.8 with 2 patches backported from LLVM 2.9 to fix a
crash on AVX chips.
So drop support for building with external LLVM 2.8, and add support for
building with external LLVM 2.9 instead.

Caveat:
 stack smashing protection is broken on LLVM 2.9 so it is disabled

Example on Debian:
apt-get install llvm-2.9-dev
./configure --enable-llvm --with-system-llvm=/usr/bin/llvm-config-2.9
2011-05-06 16:16:33 +03:00
Török Edvin
dec93ea86f Fix bytecode and autoitea06 for Apple-style universal builds (bb #2030)
Bytecode needs to enable both PPC and X86, link in all targets,
and autoit needs fpu_endian == cpu_endian for universal builds.
2010-10-18 11:27:06 +03:00
Török Edvin
ef226b8a0e Really don't warn about x86_64 vs i386 mismatch (bb #2214). 2010-08-31 15:51:06 +03:00
Török Edvin
f4253c163f Don't warn on x86_64 vs i386 mismatches (bb #2214).
With -m32 LLVM gets the target arch right, and configure gets it wrong.
LLVM's detection always overrides the arch, so don't warn on these mismatches.

startup.cbc will get the correct arch when JIT is available, which is the only
case where the arch matters anyway.
When there is no JIT the arch reported to startup.cbc will be configure's which might be wrong.
But since there is no JIT startup.cbc shouldn't need to check the arch anyway.
It will still be able to detect sparc vs x86 though, not 32 vs 64-bit.
2010-08-18 11:01:33 +03:00
Török Edvin
f55cd65e80 Turn off win32 vs win64 mismatch warning.
LLVM doesn't have the notion of win64 in its triple parser.
2010-08-12 22:34:40 +03:00
Török Edvin
bc3a632815 Typo. 2010-08-09 19:57:30 +03:00
Török Edvin
5cd4ee8808 Mac OS X can run 64-bit app on 32-bit kernel (bb #2153).
So don't warn for these mismatches.
2010-08-09 19:47:32 +03:00
aCaB
1bb5a24d3e win32 fixes: bb#2152 and bb#2153 2010-08-05 12:08:13 +02:00
Török Edvin
69650bea38 win32 build fix.
forgot to commit.
2010-07-29 22:17:30 +03:00
Török Edvin
c85060ff79 Move environment detection code to bytecode_detect.c.
This is in preparation for bug #2078, so that the bytecodes can turn themselves off
based on more than just the arch itself.
2010-07-29 13:48:13 +03:00