Commit Graph

17 Commits

Author SHA1 Message Date
Peter Matula
8fea90b2f7
New build system (#730)
* something working

* progress

* progress

* progress

* cmake: fix common and add ctypes

* src/serdes: new build system

* new build system for pdbparser

* new build system for yaracpp

* new build system for crypto component

* new build system for config

* refactor cmake for retdec-configtool

* new build system for idr2pat

* new build system for ar-extractor and its LLVM dependency

* refactor the new build system

* new build for ar-extractortool

* new build system for macho-extractor and macho-extractortool

* new build for ctypesparser, demangler, and demanglertool

* new build for llvm-support and llvmir-emul

* new build for capstone2llvmir and capstone2llvmirtool

* new build for fileformat, loader, cpdetect, fileinfo

* new build for most remaining modules

* cmake/options.cmake: fix debugformat enable settings

* some build system fixes

* cmake/options.cmake: make RETDEC_ENABLE_ALL into option

this allows us to set it to ODD and build only documentation

* tests: new build system for unit tests

* pelib: fix doxygen comment

* retdec/retdec: remove unused include of llvm-support/diagnostics.h

* fileformat: do not include openssl in headers

* cmake: make install paths relative.

When they are absolute, then all the paths in instaled cmake scripts are absolute - install dir could not be moved.

* deps/yara: refactor cmake to properly install libs

* deps/yara: small cosmetic changes

* deps/llvm: refactor cmake to properly install libs

* deps/capstone: refactor cmake to properly install libs

* deps: refactor cmake files

* deps: refactor cmake files

* deps/yaramod: refactor cmake to properly install libs

* CMakeLists.txt: fix files installation

* config/retdec-config-config.cmake: fix required component order

Looks like this may matter (on some machines or cmake version).

* deps/llvm: fix include installation

* fileformat/cmake: do not use openssl-crypto

For some reasons, this can cause linking problems on some machines.

* deps/yaramod: fix link library order

* deps/googletests: fix target link library order

* rtti-finder: make deps PUBLIC.

I have no idea why it doesn't work with PRIVATE.

* deps/yaramod: fix formatting

* cmake: more refactorization...

1. Protect against including the same target file multiple times. It looks like this was not a problem, but who knows.
2. Use find_package() instead of find_dependency(). It looks like the later does not work correctly for components on some CMake versions.

* cmake: do not create version files for all components

Only the main RetDec version file is needed.

* cmake: propagate current project version to package config files

It is used to find the same version retdec components.

* CMakeLists.txt: replace AnyNewerVersion -> ExactVersion in compatibility settings

Since we probably will make breaking changes, make retdec installation compatible only with the same version.

* cmake: remove all COMPONENT options, these are not really needed

* cmake: move dependency finders inside double target protection conditions

* cmake: prefix all deps targets with retdec::deps::

* fileinfo: add openssl-crypto dep

* Revert "fileinfo: add openssl-crypto dep"

This reverts commit e1645d7fd5.

* remove RETDEC_FORCE_OPENSSL_BUILD option, always build OpenSSL

* cmake: refactorization

* deps/whereami: fix include paths

* deps/tinyxml+whereami: fix included dirs

* deps/yaramod: fix pog_fmt lib installation

* deps/whereami: properly install target, not as part of utils.

Previous version should work, but there is a CMake bug in older versions which screws it up on Windows and macOS.

* crypto: link retdec::deps::openssl-crypto as PUBLIC

* bin2llvmir/providers/debugformat: fix segfault

Co-authored-by: Peter Matula <imatula@fit.vutbr.cz>
2020-04-05 16:50:56 +02:00
Matula Peter
9bd5b98b95 deps/elfio: add README.md file. 2020-01-15 09:35:10 +01:00
Matula Peter
1d97c698b4 deps/elfio: move ELFIO sources from their own repo directly to the this repo. 2020-01-08 14:03:35 +01:00
Peter Matula
658bb9d545 deps: fix #279, support for using local repository clones of RetDec deps 2019-04-25 14:08:13 +02:00
Petr Zemek
5b478c72df Fix links to repositories after the move from avast-tl to avast.
We have moved all of our repositories in https://github.com/avast-tl to
https://github.com/avast.
2019-04-17 09:09:58 +02:00
Peter Matula
5a7af3dca5 deps/elfio: update dependency to the latest commit. 2019-01-18 13:07:47 +01:00
Peter Matula
92cdb3e263
Issue 457 (#468)
* fieformat/elf: add section/segment name to dynamic table structure.

* fileinfo/elf: use fileformat's dynamic table instead of parsing it again

* fileformat/elf: whitelist DT entry types used to limit symtab size.

* fileformat/elf: parse PLT assicoated relocations.

* fileformat+fileinfo: add usage type to import entries.

* fileformat/elf: try to load dynamic segment even if it is too big.

i.e. it goes beyond file size - load only up to the file size.

* fileformat/elf: do not remove @@GLIBC_ symbol prefix in fileformat.

* fileformat/elf: load dynamic section even if symbol table was loaded

* fileformat/elf: load segment dynamic table if section table was empty.

* fileformat/elf: code refactoring.

* deps/elfio: use the latest elfio commit.

* fileformat/elf: fix reading dynamic segment from dynamic section.

* fileformat/elf: read DYNAMIC symtab if different from section symtabs

* deps/elfio: update dependency to the last commit.
2019-01-18 11:59:41 +01:00
Michal Bandzi
0c7e6bd8ba deps/elfio: use newer commit for repository download 2018-05-03 21:43:05 +02:00
Peter Matula
296ebfe5fd Merge branch 'master' into faster-build
# Conflicts:
#	deps/capstone/CMakeLists.txt
#	deps/elfio/CMakeLists.txt
#	deps/llvm/CMakeLists.txt
2018-01-22 16:32:05 +01:00
Peter Matula
a991b17a7f deps: propagate C/C++ compilers to all deps. 2018-01-22 16:20:10 +01:00
Peter Matula
abd817cb90 deps/elfio: disable CONFIGURE_COMMAND -- this is header only lib. 2018-01-19 13:18:55 +01:00
Petr Zemek
405e21d96f Add DOWNLOAD_NAME for each external project.
Reasons:
- Downloaded archives will have more meaningful names (e.g. capstone.zip
  instead of 27c713fe4f6eaf9721785932d850b6291a6073fe.zip).
- This prevents collisions between projects (e.g. both yaracpp and yaramod are
  in version 1.0.1 at the moment, so they were both downloaded as v1.0.1.zip).
2018-01-19 11:57:50 +01:00
Petr Zemek
13365143f9 Remove useless cmake_minimum_required() command from nested CMakeLists.txt files.
We just need this command in the top-level CMakeLists.txt.
2018-01-12 09:20:33 +01:00
Petr Zemek
9ef11c96d2 Unify formatting in CMakeLists.txt files.
* Remove redundant first empty line from some files.
* Convert spaces to tabs.
* Remove redundant comments.
2018-01-12 09:00:52 +01:00
Petr Zemek
1e8294c264 Download external projects via URL instead of GIT_REPOSITORY.
The use of URL is safer than GIT_REPOSITORY as CMake does not update the cloned
repository when GIT_TAG changes. On the other hand, it downloads new sources
when URL changes.
2018-01-12 08:33:07 +01:00
Peter Matula
30a9f172a1 deps: remove target guards from CMake files. 2018-01-10 16:33:15 +01:00
Peter Matula
7cad5076c0 all in one repo, no submodules, deps via cmake external project 2018-01-05 11:26:55 +01:00