aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/cc
Commit message (Collapse)AuthorAgeFilesLines
* Add new configure argument --optimize-for-sizeJack Lloyd2016-11-034-0/+4
| | | | | | | | | | | Uses -Os for GCC/Clang/ICC, /O1 for MSVC. Might be used in the future to control compile time features also (eg using a large precomputed table, vs not). Does not have any influence on module selection, just informs the build that a smaller binary is preferable. [ci skip]
* Maintainer mode fixes.Jack Lloyd2016-09-211-1/+1
| | | | | | Mostly unused args and missing override notations. Fix DH - load_check calls were commented out for debugging.
* Maintainer mode fixesJack Lloyd2016-08-312-2/+2
|
* Travis CI additions and cleanupJack Lloyd2016-08-282-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert Travis build configuration to a single var instead of 4 tuple. Makes it much easier to review the builds in the Travis web UI. Adds sanitizer builds for Clang on both Linux and OS X. Clang is a different compiler from GCC and its sanitizers may catch things GCC does not. I have no idea if Apple's Clang has some magic sanitizer sauce stock LLVM does not, so maybe sanitizer build on OS X can be skipped. Adds Linux cross compile targets for ARM32, ARM64, PPC64, and MinGW x86 using the cross compiler available in Trusty. All of them build and are set up to run through qemu/wine. All of the tests currently fail and so are marked as expected fail in the Travis matrix. The ARM test runs seem to have thread problems; ARM32 thread creation just fails with an exception, as if pthreads was disabled. All other tests pass ok for ARM32. On Aarch64, it looks like there is a hard crash the first time the library tries creating a thread. Both of these might be due to statically linking the binary? I have been unable to convince Ubuntu's qemu-ppc64 to execute binaries compiled by Ubuntu's ppc64 cross compiler. I'm downloading an Ubuntu ISO to try this in a VM. Running under Wine exposes several issues, both in Wine and Botan. Many functions are stubs and it appears that entropy collection fails as a result. This triggers a bug in the FFI tests which causes a crash there. A pox on time zones; _mkgmtime is a MSVC extension and is not available on MinGW GCC. Add a last resort call that just uses the localzone variant instead. Adds valgrind target, remove a bogus poison in pubkey.cpp (it was effectively asserting that all of RSA was const time which is sadly not true at all). Moves -Wshadow to maintainer mode for GCC - GCC 4.8 has a noisy variant of -Wshadow which warns if a parameter masks a function name, but this comes up all the time in constructors. Later GCCs no longer warn about this (even with -Wshadow), so the warnings are never fixed, but they cause noise in CI output and hide interesting warnings like warning: vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores [-Wdeprecated] __vector unsigned char perm = vec_lvsl(0, static_cast<u32bit*>(nullptr));
* fix compile issue on Mac OS if MACOSX_DEPLOYMENT_TARGET<=10.8Bi112016-08-101-0/+1
|
* Fix x86 32-bit building for clang on Mac OSBi112016-08-101-0/+2
|
* Compile shared libraries (too) on FreeBSDLauri Nurmi2016-07-021-0/+2
| | | | Soname_patterns and link commands are identical to those used with Linux
* Turn MSVC warnings to /W4 and enable C4267Jack Lloyd2016-05-061-1/+1
| | | | | | Move disabling C4250 and C4251 to cmd line instead of header pragma. This means these warnings will show up in application code. But disabling warnings inside a library header is probably not good form.
* Fixed shared library behaviour on Darwin/OS X.Alastair Houghton2016-04-071-2/+4
|
* Fix remaining Wshadow warnings and enable on gcc and clangRené Korthaus2016-02-182-2/+2
|
* Add missing overrides and fix -Wpedantic 'extra ;' warningsJack Lloyd2016-01-171-1/+1
| | | | | | | | | | Remove -Wsuggest-attribute=noreturn from maintainer mode flags as it seems like outside of the assertion failure macro any other suggestion would always be a false positive (an unimplemented function or the like). Or at least, if such a function needing noreturn to assist with static analysis is added in the future it will be obvious, by virtue of the static analyzer warnings which occur due to the missing noreturn preventing the analyzer from understanding code flow.
* Enable -Wpedantic on gcc and clangRené Korthaus2016-01-132-2/+2
|
* Merge remote-tracking branch 'remotes/github/master' into noreturnDaniel Neus2016-01-091-2/+2
|\ | | | | | | | | # Conflicts: # src/build-data/cc/gcc.txt
| * move -Wsuggest-override to maintainer_warning_flagsDaniel Neus2016-01-081-2/+2
| | | | | | | | to not break compatibility with older gcc versions (available in gcc 5.1)
| * add missing overridesDaniel Neus2016-01-081-1/+1
| | | | | | | | found by gcc with -Wsuggest-override
* | add BOTAN_NORETURN macro and mark those functions that do not return with itDaniel Neus2016-01-081-1/+1
|/
* Use memcpy instead of misaligned pointer casts for reading words.Jack Lloyd2015-12-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | It works on x86, but C says it is undefined and it makes UBSan unhappy. Happily, this memcpy approach probably also works fine under processors which previously used the byte-at-a-time approach such as ARM. But for right now using memcpy here is still gated under the processor alignment flags. In my tests recent GCC and Clang seemed to produce basically identical code for either approach when using -O3; I imagine most compilers these days are very good at analyzing/inlining/unrolling memcpys. Also remove the manually unrolled versions of xor_buf, which caused problems with GCC and -O3 due to it vectorizing the loads into (aligned) SSE2 loads, which would fail when a misaligned pointer was passed. Which always seemed kind of bogus to me, but I guess that's what undefined behavior is for. Enable -O3 for GCC. With this change the test suite is clean under GCC ASan+UBSan and Clang ASan+UBSan, with the exception of one failure due to a bug in libstdc++ (GCC bug 60734) when compiled by Clang.
* Add -Wnon-virtual-dtor to GCC buildJack Lloyd2015-12-261-1/+1
| | | | GH #382
* Fix a few clang warnings. Set clang sanitizer flagsJack Lloyd2015-12-241-0/+1
|
* add support for Intel RdSeedDaniel Neus2015-12-183-0/+3
|
* Remove the strange conjoining of debug and optimization flags.Jack Lloyd2015-10-269-42/+37
| | | | | | | | | | | | | | | | | | | Previously a build had optimizations disabled completely when debug info was emitted. But there are many reasons to use optimized builds with debug symbols (running under valgrind, against afl, with Asan/Ubsan, in prod, etc). And personally I find even debugging at -O2 or -O3 is fine most of the time and worth it for the speed. Use the (now documented!) --no-optimizations flag if no optimization is desired while debugging. This also removes the distinction between library and application compile flags; there is a single optimization level that is probably good enough for everything. On Win32 it removes definding _CONSOLE for the application. This seems to be some mythical value that may have been required at some point, but is not documented anywhere I can find. Who knows what VC thinks, hoping I don't have to add this back. It also drops defining `EBUG` which is what happens when you tell cl.exe to '/DEBUG'. LOL.
* Adjust gcc.txt to arm32 and arm64 archsDaniel Seither2015-10-151-1/+2
| | | | See also -march in https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
* build system: Add framework support for OS X and iOSDaniel Seither2015-09-251-0/+1
| | | | | | | On Darwin platforms, there are frameworks that can bundle libraries and header files in a standardized directory structure. We need to support linking to them because most of the OS X or iOS-specific APIs are provided as frameworks.
* Add soname_patternSimon Warta2015-08-247-15/+15
| | | | Fixes #241
* Add so_link_command for clang debug on darwin and defaultSimon Warta2015-08-141-3/+5
| | | | Fixes #250
* Rename so_link_flags to so_link_commandsSimon Warta2015-07-219-24/+24
|
* Add binary_link_command; Use compiler configs to set RPATH on LinuxSimon Warta2015-07-213-0/+19
|
* Add debug linker for GCCSimon Warta2015-07-211-1/+2
|
* Merge compile_option into CXX_FLAGSSimon Warta2015-07-219-24/+18
|
* Have a $(LINKER) variableSimon Warta2015-07-211-1/+3
|
* Use -O0 (no optimization) in GCC debug compile flagsSimon Warta2015-07-211-2/+2
|
* Adjust MSVC compile flagsSimon Warta2015-07-211-2/+2
| | | | | | | | | | /FS is needed for parallel builds /bigobj is needed for amalgamation build. Remove explicit setting from appveyor /DEBUG is a parameter, not a precompiler constant Conflicts: src/build-data/cc/msvc.txt
* Make release/debug versions for: compile_flags, lib_opt_flags and app_opt_flagsSimon Warta2015-07-219-32/+44
| | | | | | This commit aims to preserve all settings. In some cases it will drop optimization flags and fall back to compiler's defaults in the new debug mode.
* GCC 4.8 doesn't have UbSan, remove for TravisJack Lloyd2015-07-051-1/+2
|
* Make sanitizer a build mode for easy use by developers.Jack Lloyd2015-07-051-0/+1
|
* Remove compiler settings from compilers that don't support C++11Simon Warta2015-06-282-52/+0
|
* Add coverage checking with gcov/lcovlloyd2015-04-122-0/+2
|
* Consider AES-NI as implying SSSE3 which lets us merge two of thelloyd2015-03-152-2/+2
| | | | | | amalgamation objects (aes_ni and clmul). The real advantage is for the static link, as GCM will pull in clmul via its reference, which is sufficient to also pull the AES impl into the link.
* Split amalagamation into ISA specific objectslloyd2015-02-222-4/+2
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-042-4/+4
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Stack protector flags are required also at link time, at least on MinGWlloyd2014-12-211-3/+3
| | | | Github issue 34
* Windows/VC build fixeslloyd2014-10-311-1/+1
|
* Use -O2 instead of -O3 with GCC as it seems tree-vectorize in 4.9.0lloyd2014-10-311-2/+2
| | | | causes problems when it converts unaligned loads to aligned SSE loads.
* Erroring on strict-overflow is a little too strict, GCC 4.9 is smartlloyd2014-05-261-18/+17
|
* Support restricting compiler ISAs to specific architectures. Specificallylloyd2014-05-011-1/+1
| | | | | to work around weird MSVC limitations in 32-bit mode, but maybe useful elsewhere someday. Github #11.
* Let Clang choose whichever C++ library it preferslloyd2014-03-131-4/+3
|
* Also avoid tuning for 686lloyd2014-02-131-1/+2
|
* Update Clang flags. Remove unneeded includes of init.hlloyd2014-02-091-3/+4
|
* More fixes for minified buildslloyd2014-02-091-1/+1
|
* Microsoft docs indicate VC++ 2013 has AVX2 intrinsics, so enable them.lloyd2014-01-311-1/+1
|