summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* configure.ac contains BashismsMark Wielaard2023-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Autoconf scripts are supposed to be written in POSIX-compatible shell language. elfutils commits 0ffe2874e75d48cb88936e119e5284ff2bf664d9 and 3fa98a6f29b0f370e32549ead7eb897c839af980 introduced Bashisms to configure.ac that cause errors when /bin/sh is not Bash. Example error when /bin/sh is Dash: ./configure: 8748: test: xyes: unexpected operator The cause of the error is the use of a non-existent == operator in expressions passed to the 'test' built-in command. POSIX shell specifies only an = operator for testing string equality. * configure.ac: Replace == by = in use_msan and enable_demangler comparisons. https://sourceware.org/bugzilla/show_bug.cgi?id=30196 Reported-by: Matt Whitlock <sourceware@mattwhitlock.name> Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.189elfutils-0.189Mark Wielaard2023-03-031-2/+2
| | | | | | | | | Set version to 0.189 Update NEWS and elfutils.spec.in Set copyright year in configure.ac and printversion. Regenerate po/*.po files. Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Check for and -Wuse-after-free=3 when availableMark Wielaard2023-02-211-1/+10
| | | | | | | gcc already includes -Wuse-after-free=2 in -Wall. -Wuse-after-free=3 also warns for indeterminate pointers in equality expressions. Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Error when demangler is enabled, but libstdc++ support isn'tMark Wielaard2023-02-171-1/+2
| | | | | | | | | There have been a couple of cases where demangler support has been accidentially been disabled because libstdc++ wasn't there/installed during build. Make it an error if --disable-demangler isn't explicitly given. Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Add --enable-sanitize-memoryIlya Leoshkevich2023-02-141-0/+24
| | | | | | | | | | | | | | | | | | | | Add support for clang Memory Sanitizer [1], which detects the usage of uninitialized values. While elfutils itself is already checked with valgrind, checking code that depends on elfutils requires elfutils to be built with MSan. MSan is not linked into shared libraries, and is linked into executables statically. Therefore, unlike the other sanitizers, MSan needs to be configured fairly early, since we need to drop -D_FORTIFY_SOURCE [2], -Wl,-z,defs and --no-undefined. Disable a few tests that run for more than 5 minutes due to test files being statically linked with MSan. [1] https://clang.llvm.org/docs/MemorySanitizer.html [2] https://github.com/google/sanitizers/issues/247 Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
* backends: Support returning lvalue and rvalue referencesIlya Leoshkevich2023-02-141-2/+9
| | | | | | | | | On the low level, they are the same as pointers. The change needs to be done for all backends, so define a function and a macro to avoid repetition. Also add a native test, which has to be implemented in C++. Add the configure check for it. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
* configure: Add --disable-demanglerIlya Leoshkevich2023-02-091-1/+7
| | | | | | | __cxa_demangle is normally implemented in the C++ runtime library, instrumenting which for MSan is a hassle. Add a knob for disbling it. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
* configure: Use -fno-addrsig if possibleIlya Leoshkevich2023-02-091-0/+8
| | | | | | | | | | | By default, clang produces .llvm_addrsig sections [1]. The GNU toolchain does not know how to handle them yet [2], so just ask clang not to generate them for the time being. [1] https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105625 Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
* debuginfod PR29975 & PR29976: decrease default concurrencyFrank Ch. Eigler2023-01-111-0/+6
| | | | | | | ... based on rlimit (rlimig -n NUM) ... based on cpu-affinity (taskset -c A,B,C,D ...) Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* support ZSTD compression algorithmMartin Liska2022-12-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config/ChangeLog: * libelf.pc.in: Add LIBLZSTD to Requires.private. ChangeLog: * configure.ac: Detect ZSTD streaming API. libelf/ChangeLog: * Makefile.am: Use zstd_LIBS. * elf_compress.c: (__libelf_compress): Split into ... (__libelf_compress_zlib): ... this. (do_zstd_cleanup): New. (zstd_cleanup): New. (__libelf_compress_zstd): New. (__libelf_decompress): Switch in between zlib and zstd. (__libelf_decompress_zlib): Renamed from __libelf_decompress. (__libelf_decompress_zstd): New. (__libelf_decompress_elf): Dispatch in between compression algorithms. (elf_compress): Likewise. * elf_compress_gnu.c (elf_compress_gnu): Call with ELFCOMPRESS_ZLIB. * libelfP.h (__libelf_compress): Add new argument. (__libelf_decompress): Add chtype argument. src/ChangeLog: * elfcompress.c (enum ch_type): Add ZSTD. (parse_opt): Parse "zstd". (get_section_chtype): New. (process_file): Support zstd compression. (main): Add zstd to help. * readelf.c (elf_ch_type_name): Rewrite with switch. tests/ChangeLog: * Makefile.am: Add ELFUTILS_ZSTD if zstd is enabled. * run-compress-test.sh: Test zstd compression algorithm for debug sections.
* Prepare for 0.188elfutils-0.188Mark Wielaard2022-11-021-1/+1
| | | | | | | | Set version to 0.188 Update elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure.ac: Update AC_PROG_CC and AC_PROG_LEX for autoconf 2.70Mark Wielaard2022-10-271-2/+2
| | | | | | | | | With autoconf 2.70 we must use AC_PROG_CC (which will check for c11 and c99), for earlier versions we'll use AC_PROG_CC_C99. Also use AC_PROG_LEX([noyywrap]), the extra argument is ignored with earlier versions, but required for 2.70. Signed-off-by: Mark Wielaard <mark@klomp.org>
* tests: Disable run-debuginfod-federation-metrics.sh for old libmicrohttpdMark Wielaard2022-06-021-0/+2
| | | | | | | | | On really old libmicrohttpd the run-debuginfod-federation-metrics.sh test will crash debuginfod after too many file descriptors have been used. libmicrohttpd looses track of the state and aborts instead of producing an error. Just disable the testcase on these very old versions. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.187elfutils-0.187Mark Wielaard2022-04-251-2/+2
| | | | | | | | | Set version to 0.187 Update NEWS and elfutils.spec.in Set copyright year in configure.ac and printversion. Regenerate po/*.po files. Signed-off-by: Mark Wielaard <mark@klomp.org>
* libelf: Check for mremap, elf_update needs it for ELF_C_RDWR_MMAPMark Wielaard2022-04-241-1/+4
| | | | | | | | | | | Add a AC_CHECK_FUNCS configure check for mremap. Some systems like KFreeBSD and the Hurd don't have it. Also add a configure warning because without mremap elf_update will often fail when ELF_C_RDWR_MMAP is used. ELF_C_RDWR_MMAP is an elfutils extension to libelf. https://sourceware.org/bugzilla/show_bug.cgi?id=27337 Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Don't check whether -m64 works for 32bit host biarch checkMark Wielaard2022-03-241-2/+0
| | | | | | | | | | Running a 32bit backtrace test against a 64bit binary doesn't work. Only a 64bit binary can backtrace a 32bit binary. So disable the biarch check that inserts -m64 for a 32bit host. https://sourceware.org/bugzilla/show_bug.cgi?id=24158 Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Use AS_HELP_STRING instead of AC_HELP_STRING.Mark Wielaard2022-03-141-2/+2
| | | | | | | | In most places we already used AS_HELP_STRING. A few places used AC_HELP_STRING. Which has been deprecated for a long time. Use AS_HELP_STRING instead of AC_HELP_STRING everywhere. Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Test for _FORTIFY_SOURCE=3 support.Mark Wielaard2022-03-141-10/+27
| | | | | | | | | | | | | | | | | | | | | | _FORTIFY_SOURCE=3 adds extra glibc (dynamic) fortification checks when using GCC 12. This adds a configure check to see if -D_FORTIFY_SOURCE=3 can be used. If not, configure will fall back to -D_FORTIFY_SOURCE=2. On some older glibc versions (glibc 2.17) using -D_FORTIFY_SOURCE=3 provides the same fortification as _FORTIFY_SOURCE=2. On some newer glibc versions and older GCC (glibc 2.34 amd gcc 11) using -D_FORTIFY_SOURCE=3 produces a not supported warning (and we fall back to -D_FORTIFY_SOURCE=2). With newer glibc and newer GCC versions (glibc 2.35 and gcc 12) -D_FORTIFY_SOURCE=3 will use the newer dynamic fortification checks. This patch also makes sure that AC_PROG_CXX is used earlier so that CXXFLAGS is always setup correctly (even if we then don't use it). And it outputs both the CFLAGS and CXXFLAGS as used at the end. Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure: Add --enable-sanitize-addressMark Wielaard2021-12-091-0/+25
| | | | | | | | | | | | | | | | --enable-sanitize-address makes sure that all code is compiled with -fsanitizer=address and all tests run against libasan. It can be combined with --enable-sanitize-undefined, but not with --enable-valgrind. In maintainer mode there is one program that causes leaks, i386_gendis, so disable leak detection for that program. One testcase, test_nlist, needs special linker flags, make sure it also uses -fsanitizer=address when using the address sanitizer. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.186elfutils-0.186Mark Wielaard2021-11-101-1/+1
| | | | | | | | Set version to 0.186 Update NEWS and elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure.ac: rework gnu99 ext check to allow clangAdrian Ratiu2021-08-311-34/+1
| | | | | | | | | | | | | | | | | | | | | It is true that Clang does not support all gnu99 extensions [1], but not all of them are used in the codebase and over time there have been code cleanup efforts to improve Clang support. For example after commit 779c57ea ("readelf: Pull advance_pc() in file scope") there are no more nested function declarations and elfutils now builds fine with Clang. So in the interest of enabling Clang builds we remove the only remaining blocker: the configure checks for nested functions and variable length arrays which are also unused. Considering mixed decls and code is also part of c99 standard, the entire check becomes redundant and we can just replace AC_PROG_CC -> AC_PROG_CC_C99. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964 Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
* handle libc implementations which do not provide `error.h`Saleem Abdulrasool2021-08-271-0/+3
| | | | | | | | | | | | | Introduce a configure time check for the presence of `error.h`. In the case that `error.h` is not available, we can fall back to `err.h`. Although `err.h` is not a C standard header (it is a BSD extension), many libc implementations provide. If there are targets which do not provide an implementation of `err.h`, it would be possible to further extend the implementation to be more portable. This resolves bug #21008. Signed-off-by: Saleem Abdulrasool <abdulras@google.com>
* lib: Add static inline reallocarray fallback functionMark Wielaard2021-07-291-0/+3
| | | | Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.185elfutils-0.185Mark Wielaard2021-05-221-1/+1
| | | | | | | | Set version to 0.185 Update NEWS and elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.184elfutils-0.184Mark Wielaard2021-05-101-1/+1
| | | | | | | | Set version to 0.184 Update NEWS and elfutils.spec.in Regenerate po/*.po files Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Set child thread names via pthread_setname_np()Frank Ch. Eigler2021-03-301-0/+3
| | | | | | | | | In order to assist problem diagnosis / monitoring, use this gnu-flavoured pthread function to set purpose names to the various child threads debuginfod starts. libmicrohttpd already sets this for its threads. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* build: Check for -Wno-packed-not-aligned supportTimm Bäder2021-03-061-0/+9
| | | | | | | Clang does not support this warning, so check for compiler support before using it. Signed-off-by: Timm Bäder <tbaeder@redhat.com>
* build: Check for -Wtrampolines supportTimm Bäder2021-03-061-0/+9
| | | | | | | Clang does not support -Wtrampolines, so check if the compiler supports it before using it. Signed-off-by: Timm Bäder <tbaeder@redhat.com>
* build: Check for -Wimplicit-fallthrough=5 separatelyTimm Bäder2021-03-011-0/+12
| | | | | | | | | | | | GCC accepts the =5, which means it doesn't try to parse any comments and only accepts the fallthrough attribute in code. Clang does not ever parse any comments and always wants the fallthrough attribute anyway. Clang also doesn't accept the =n parameter for -Wimplicit-fallthrough. Test for =5 separately and use it if supported and fall back to just -Wimplicit-fallthrough otherwise. Signed-off-by: Timm Bäder <tbaeder@redhat.com>
* Prepare for 0.183Mark Wielaard2021-02-051-2/+2
| | | | | | | | | Set version to 0.183 Update NEWS and elfutils.spec.in. Set copyright year in configure.ac and printversion. Regenerate po/*.po files. Signed-off-by: Mark Wielaard <mark@klomp.org>
* libdwfl: use GNU strerror_r only when available.Érico Rolim2021-02-051-0/+5
| | | | | | | | | | Some C libraries don't provide the GNU version of strerror_r, only the XSI-compliant one. We use the GNU version when available, since it fits the code better, and otherwise use the XSI-compliant one. https://sourceware.org/bugzilla/show_bug.cgi?id=21010 Signed-off-by: Érico Rolim <erico.erc@gmail.com>
* Add coverage targetDmitry V. Levin2021-01-121-0/+3
| | | | | | | | | | | Implement a target for capturing code coverage using lcov. It is available when elfutils is configured using --enable-gcov. Tested with autoreconf -if && ./configure --enable-maintainer-mode --enable-gcov && make && make check && make coverage Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* Modernize gettext infrastructureDmitry V. Levin2020-12-161-4/+10
| | | | | | | | | | | | | | | Switch to use AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION, and AM_GNU_GETTEXT_REQUIRE_VERSION, this allows to stop bundling gettext infrastructure files and let autoreconf invoke autopoint which will set the gettext infrastructure up. Use this opportunity to create separate .gitignore files for m4/ and po/ directories. Tested with autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* m4: remove unneeded Makefile.amDmitry V. Levin2020-12-151-2/+0
| | | | | | | | | | | m4 files do not have to listed in EXTRA_DIST, in fact, biarch.m4 has not been listed since its very beginning in 2013, and nobody seems to have noticed so far. Tested with autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])Dmitry V. Levin2020-12-151-1/+0
| | | | | | | | | | Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4", that is enough for autoreconf to do the right thing. Tested with autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* Fix spelling typos in NEWS, NOTES, TODO, and in comments of configure.acDmitry V. Levin2020-12-121-3/+3
| | | | | | | | | | | | | | | | | | | accidently -> accidentally approriate -> appropriate depencies -> dependencies endianess -> endianness funtions -> functions indeces -> indices indentified -> identified ist -> is mutliple -> multiple nessesary -> necessary optimze -> optimize severly -> severely suport -> support tranformation -> transformation Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* Remove unused tests/configure.acDmitry V. Levin2020-12-111-2/+0
| | | | | | | | | | | | | | | | tests/configure.ac was introduced 15 years ago by commit d7f8d0caa7a357f9f4765e5dc93255f5057eba2e. However, the ability to build tests as a separate project was broken by the same author 4 years later by commit 22359e265395fd2f8267190ef97f5417770e6206, if not earlier. An attempt to run autoreconf in tests would currently fail with the following automake error: automake: error: cannot open < config/eu.am: No such file or directory Apparently, nobody builds tests as a separate project for more than 10 years, so cleanup the remains of that unused and broken code. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* configure.ac: simplify argp checkDmitry V. Levin2020-12-111-23/+8
| | | | | | | Rewrite argp check using the same AC_SEARCH_LIBS based method used earlier in the fts check. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* configure.ac: fix typo in error diagnosticsDmitry V. Levin2020-12-111-1/+1
| | | | | Fixes: da855fc9c ("Support building when fts and obstack aren't part of libc") Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* debuginfod: export DEBUGINFOD_SONAME macro in debuginfod.hDmitry V. Levin2020-12-091-1/+4
| | | | | | | | Add DEBUGINFOD_SONAME macro to API for use by those of libdebuginfod clients that would like to dlopen the library in the same way as __libdwfl_debuginfod_init does. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* Support building when fts and obstack aren't part of libc.Érico Rolim2020-11-031-0/+20
| | | | | | | | - Make configure.ac test for fts and obstack availability; - Add fts and obstack ldflags to all files that need them; - Add missing argp ldflags to programs in debuginfod/. Signed-off-by: Érico Rolim <erico.erc@gmail.com>
* Prepare for 0.182Mark Wielaard2020-10-311-1/+1
| | | | | | | | Set version to 0.182. Update NEWS and elfutils.spec.in. Regenerate po/*.po files. Signed-off-by: Mark Wielaard <mark@klomp.org>
* PR25461: add /etc/profile.d files for default $DEBUGINFOD_URLSFrank Ch. Eigler2020-10-081-0/+13
| | | | | | | | | | | | | To give distros a simple knob to let their userbase enjoy debuginfod services, we add a --enable-debuginfod-urls[=URLS] to the configury. This propagates to $DEBUGINFOD_URLS environment variable settings in /etc/profile.d/debuginfod.{sh,csh} files. The default is nothing. If simply enabled, the current prototype public server is used. If enabled with parameters, the builder/distro can specify a default URL search path of their own. Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
* libdwfl: Add ZSTD support.Mark Wielaard2020-09-211-2/+11
| | | | | | | | | | | | | | | Newer kernels might be compressed using ZSTD add support to libdwfl open so we can can automatically read ZSTD compressed files and kernel images. The support is very similar to the bzip2 and lzma support, but slightly different. With a bit more macros it could maybe have used the gzip.c USE_INFLATE code path. But I felt that the many macros didn't really help understand the code. So the unzip routine has a slightly different code path for ZSTD. https://sourceware.org/bugzilla/show_bug.cgi?id=26632 Signed-off-by: Mark Wielaard <mark@klomp.org>
* Prepare for 0.181elfutils-0.181Mark Wielaard2020-09-081-1/+1
| | | | | | | | Set version to 0.181. Update NEWS and elfutils.spec.in. Regenerate po/*.po files. Signed-off-by: Mark Wielaard <mark@klomp.org>
* libdwfl: do not dlopen libdebuginfod.so in --disable-libdebuginfod modeDmitry V. Levin2020-08-311-1/+4
| | | | | | | | | | | debuginfod-client.c used to try to dlopen libdebuginfod.so even if libdebuginfod was completely disabled using --disable-libdebuginfod. Fix this by disabling build of debuginfod-client.c and disabling all __libdwfl_debuginfod_* invocations in --disable-libdebuginfod mode. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Mark Wielaard <mark@klomp.org>
* configure.ac: Set -DBAD_FTS=1 also for CXXFLAGS.Mark Wielaard2020-07-221-1/+2
| | | | | | | debuginfod.cxx checks whether or not BAD_FTS is defined. This only matters on old 32bit arches. Signed-off-by: Mark Wielaard <mark@klomp.org>
* debuginfod: Add --disable-libdebuginfod and --enable-libdebuginfod=dummy.Mark Wielaard2020-07-041-6/+28
| | | | | | | | | | Make it possible to build just the debuginfod client or to create a dummy libdebuginfod that doesn't link against libcurl. The dummy library can be used for bootstrapping. For testing purposes you can also build debuginfod against the dummy libdebuginfod but then the debuginfod server will not be able to do delegation. Signed-off-by: Mark Wielaard <mark@klomp.org>
* elfutils/configure.ac: use $READELF, not readelfSergei Trofimovich2020-06-151-1/+1
| | | | | | | | | | | | | | | Allow user to specify own readelf. Use detected readelf, not 'readelf'. Noticed when was building elfutils on tuple-prefixed toolchain: ``` checking whether the compiler generates build-ids... ./configure: line 5197: readelf: command not found no ``` Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Prepare for 0.180elfutils-0.180Mark Wielaard2020-06-111-2/+2
| | | | | | | | | | Set version to 0.180. Update NEWS and elfutils.spec.in. Set copyright year in printversion. Regenerate po/*.po files. Update .gitignore. Signed-off-by: Mark Wielaard <mark@klomp.org>