summaryrefslogtreecommitdiffstats
path: root/m4
Commit message (Collapse)AuthorAgeFilesLines
* Add code coverage supportVasil Velichkov2019-11-302-0/+318
| | | | | | | | | | | | | | | | | | | | | The coverage report shows what code is covered by tests and what is not and the ratio could be tracked over time. These reports will allow us to identify code that is not being tested and improve the test suites. To enable the reports configure with --enable-code-coverage and execute "make check-code-coverage". The HTML report will be generated in a subdirectory with name libosmocore-$(PACKAGE_VERSION)-coverage/index.html The report is generated using gcov, lcov and lcov_cobertura tools and the OSMO_AC_CODE_COVERAGE macro. The osmo_ax_code_coverage.m4 is a copy of ax_code_coverage.m4 taken from autoconf-archive v2018.03.13. It was copied to avoid the additional external dependency and renamed to avoid overwriting it in case autoconf-archive is already installed as we are going to install it in $(datadir)/aclocal in order to be reused in other osmocom's projects. Closes: OS#1987 Change-Id: I6f4ffb91bd7f3dd070aa09dd16d5ad1faf130a4c
* logging: Introduce mutex API to manage log_target in multi-thread envsPau Espin Pedrol2019-10-091-0/+486
| | | | | | | | | | | | | | | | | | | | log_enable_multithread() enables use of locks inside the implementation. Lock use is disabled by default, this way only multi-thread processes need to enable it and suffer related complexity/performance penalties. Locks are required around osmo_log_target_list and items inside it, since targets can be used, modified and deleted by different threads concurrently (for instance, user writing "logging disable" in VTY while another thread is willing to write into that target). Multithread apps and libraries aiming at being used in multithread apps should update their code to use the locks introduced here when containing code iterating over osmo_log_target_list explictly or implicitly by obtaining a log_target (eg. osmo_log_vty2tgt()). Related: OS#4088 Change-Id: Id7711893b34263baacac6caf4d489467053131bb
* configure: Allow disabling workaround for TLS bug in old ARM gcc versionsPau Espin Pedrol2019-08-061-0/+22
| | | | | | | | | | | | Some toolchains (such as sysmobts 201705 one) containing the TLS bug on old ARM gcc versions (<7.3.0) also crash if the initial workaround found is aplied (CFLAGS="-mtls-dialect=gnu2"). In that scenario, let's provide a way to disable the workaround (to avoid "ld" crashing) and warn the user about requirement to build with -O0 to avoid runtime crashes. Related: OS#4062 Related: SYS#4628 Change-Id: I04ff8c702eabcf4f6e7b59e11aece2744267cefe
* configure: Autodetect TLS bug on ARM with old gcc and apply workaroundPau Espin Pedrol2019-08-061-0/+29
| | | | | | | | | | | | Check if compiler being used contains the bug. GCC 7.3.0 is the oldest version containing the fix, and version 6.3.0 is known to contain the bug. Bug is only known to appear so far only on ARM32. If the bug is present, gcc will generate a wrong binary which wil lend up segfaulting when accessing TLS (__thread) variables under certain conditions. Related: OS#4062 Related: SYS#4628 Change-Id: I8acc2cf41b73da0c3290f1cefd79f2bc68b0e77d
* conv_acc: Our code requires SSSE3, not just SSE3Harald Welte2017-11-171-9/+9
| | | | | | | | | | | | | | | The accelerated convolutional decoder uses SSSE3 instructions such as PSIGNW (via _mm_sign_epi16) which go beyond what SSE3 offers. So let's make sure we use the right compiler flag (-mssse3) and also the right runtime check. Without this patch, we would use illegal instructions e.g. on Opteron Gen3 such as Opteron 2427, which are also used as build.opensuse.org build hosts (build31 through build36) where we wouldn't pass "make check" as a result. Change-Id: I2754164384109f2821fd98ffb48f625893f2923d Fixes: OS#2386
* configure.ac: fix build on systems without SIMD supportVadim Yanitskiy2017-05-111-3/+4
| | | | | | | HAVE_AVX2, HAVE_SSE3 and HAVE_SSE4_1 were never defined if CPU architecture doesn't match the (86*|x86_64*|amd64*) condition. Change-Id: If0c3128f9768f95c1f5f955db242e71c81384c6c
* configure.ac: add SIMD detection capabilitiesVadim Yanitskiy2017-05-072-0/+156
| | | | | | | | | | | | | | | | | | | This change adds a check whether compiler supports some SIMD (Single Instruction, Multiple Data) instructions. It is enabled by default, and can be disabled by configure option --disable-simd. The check macro is based on the AX_EXT from autoconf-archive: www.gnu.org/software/autoconf-archive/ax_ext.html And depends on the ax_check_compile_flag macro: www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html Currently only the following SIMD extensions are being checked: AVX2, SSE3, SSE4.1, but adding others is also possible. All found extensions are being defined in the 'config.h' header. Change-Id: Idf8fff984bd936a75c7c307338df88ba4b005817
* Create a dummy m4 directory to make autoreconf --install --force workHolger Hans Peter Freyther2010-03-241-0/+1
Even when removing AC_CONFIG_MACRO_DIR aclocal insisted that it needs to have a m4 directory. Make it happy by providing one. As git is not tracking directories I needed to add a dummy file.