Lines Matching +full:- +full:fpie
2 dnl Configure input file for elfutils. -*-autoconf-*-
4 dnl Copyright (C) 1996-2019 Red Hat, Inc.
32 # We want eu- as default program prefix if none was given by the user.
33 # But if the user explicitly provided --program-prefix="" then pretend
38 AC_MSG_NOTICE([No --program-prefix given, using "eu-"])
39 program_prefix="eu-"
41 AC_MSG_NOTICE([Using no program-prefix])
48 AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.])
51 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
52 AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
64 dnl debuginfo-server client & server parts.
69 AC_ARG_ENABLE(deterministic-archives,
70 [AS_HELP_STRING([--enable-deterministic-archives],
71 [ar and ranlib default to -D behavior])], [
78 [Should ar and ranlib use -D behavior by default?])
80 AC_ARG_ENABLE([thread-safety],
81 AS_HELP_STRING([--enable-thread-safety],
87 [AC_MSG_WARN([thread-safety is EXPERIMENTAL tests might fail.])])
89 AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
104 CFLAGS="$save_CFLAGS -Werror"
120 CFLAGS="$save_CFLAGS -Werror"
130 AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl
132 CFLAGS="$save_CFLAGS -fPIC -Werror"
137 fpic_CFLAGS="-fPIC"
143 AC_CACHE_CHECK([whether gcc supports -fPIE], ac_cv_fpie, [dnl
145 CFLAGS="$save_CFLAGS -fPIE -Werror"
150 fpie_CFLAGS="-fPIE"
156 dso_LDFLAGS="-shared"
158 NO_UNDEFINED=-Wl,--no-undefined
159 AC_ARG_ENABLE([sanitize-memory],
160 AS_HELP_STRING([--enable-sanitize-memory],
167 # -fsanitize=memory is not compatible with -D_FORTIFY_SOURCE, -Wl,-z,defs and --no-undefined
168 CFLAGS="$CFLAGS -fsanitize=memory -fsanitize-memory-track-origins -D_FORTIFY_SOURCE=0"
169 CXXFLAGS="$CXXFLAGS -fsanitize=memory -fsanitize-memory-track-origins -D_FORTIFY_SOURCE=0"
170 LDFLAGS="-shared"
181 ZDEFS_LDFLAGS="-Wl,-z,defs"
192 # We really want build-ids. Warn and force generating them if gcc was
193 # configure without --enable-linker-build-id
194 AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl
195 AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU…
197 AC_MSG_WARN([compiler doesn't generate build-id by default])
198 LDFLAGS="$LDFLAGS -Wl,--build-id"
201 ZRELRO_LDFLAGS="-Wl,-z,relro"
257 [CFLAGS="$CFLAGS -DBAD_FTS=1" CXXFLAGS="$CXXFLAGS -DBAD_FTS=1"])
259 # See if we can add -D_FORTIFY_SOURCE=2 or =3. Don't do it if it is already
262 AC_MSG_CHECKING([whether to add -D_FORTIFY_SOURCE=2 or =3 to CFLAGS])
264 *-D_FORTIFY_SOURCE=*)
270 CFLAGS="-D_FORTIFY_SOURCE=3 $save_CFLAGS -Werror"
275 ]])], [ AC_MSG_RESULT([yes -D_FORTIFY_SOURCE=3])
276 fortified_cflags="-D_FORTIFY_SOURCE=3" ], [])
279 if test -z "$fortified_cflags"; then
280 CFLAGS="-D_FORTIFY_SOURCE=2 $save_CFLAGS -Werror"
284 ]])], [ AC_MSG_RESULT([yes -D_FORTIFY_SOURCE=2])
285 fortified_cflags="-D_FORTIFY_SOURCE=2" ],
295 AS_HELP_STRING([--enable-debugpred],[build binaries with support to debug branch prediction]),
305 AS_HELP_STRING([--enable-gprof],[build binaries with gprof support]), [use_gprof=$enableval], [use_…
307 CFLAGS="$CFLAGS -pg"
308 LDFLAGS="$LDFLAGS -pg"
314 AS_HELP_STRING([--enable-gcov],[build binaries with gcov support]), [use_gcov=$enableval], [use_gco…
316 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
317 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
318 LDFLAGS="$LDFLAGS -fprofile-arcs"
325 AC_ARG_ENABLE([sanitize-undefined],
326 AS_HELP_STRING([--enable-sanitize-undefined],
334 CFLAGS="$CFLAGS -fsanitize=undefined -fno-sanitize-recover"
335 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover"
346 [Building with -fsanitize=undefined or not])
348 AC_ARG_ENABLE([sanitize-address],
349 AS_HELP_STRING([--enable-sanitize-address],
357 CFLAGS="$CFLAGS -fsanitize=address -fno-sanitize-recover"
358 CXXFLAGS="$CXXFLAGS -fsanitize=address -fno-sanitize-recover"
359 # Some compilers don't handle -fsanatize=address correctly with --no-undefined
360 LDFLAGS="-Wl,-z,defs -shared"
370 AS_HELP_STRING([--enable-valgrind],[run all tests under valgrind]),
384 AS_HELP_STRING([--with-valgrind],[include directory for Valgrind headers]),
388 CFLAGS="$CFLAGS -I$with_valgrind_headers"
393 CFLAGS="$save_CFLAGS -I$with_valgrind_headers" ],
397 AC_ARG_ENABLE([valgrind-annotations],
398 AS_HELP_STRING([--enable-valgrind-annotations],[insert extra annotations for better valgrind suppor…
412 AC_ARG_ENABLE([install-elfh],
413 AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]),
418 test "$use_gprof" = yes -o "$use_gcov" = yes])
420 AC_ARG_ENABLE([tests-rpath],
421 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
488 CFLAGS="$CFLAGS -D_GNU_SOURCE"
493 AS_HELP_STRING([--disable-demangler],
502 …[AC_MSG_ERROR([[__cxa_demangle not found in libstdc++, use --disable-demangler to disable demangle…
506 AS_HELP_STRING([--disable-textrelcheck],
512 AC_ARG_ENABLE([symbol-versioning],
513 AS_HELP_STRING([--disable-symbol-versioning],
526 Use --disable-symbol-versioning to build without.])
535 AC_CACHE_CHECK([whether gcc accepts -Wstack-usage], ac_cv_stack_usage, [dnl
537 CFLAGS="$CFLAGS -Wstack-usage=262144 -Werror"
543 # -Wlogical-op was too fragile in the past, make sure we get a sane one.
544 AC_CACHE_CHECK([whether gcc has a sane -Wlogical-op], ac_cv_logical_op, [dnl
546 CFLAGS="$CFLAGS -Wlogical-op -Werror"
555 # -Wduplicated-cond was added by GCC6
556 AC_CACHE_CHECK([whether gcc accepts -Wduplicated-cond], ac_cv_duplicated_cond, [dnl
558 CFLAGS="$CFLAGS -Wduplicated-cond -Werror"
565 # -Wnull-dereference was added by GCC6
566 AC_CACHE_CHECK([whether gcc accepts -Wnull-dereference], ac_cv_null_dereference, [dnl
568 CFLAGS="$CFLAGS -Wnull-dereference -Werror"
575 # -Wimplicit-fallthrough was added by GCC7
576 AC_CACHE_CHECK([whether gcc accepts -Wimplicit-fallthrough], ac_cv_implicit_fallthrough, [dnl
578 CFLAGS="$CFLAGS -Wimplicit-fallthrough -Werror"
585 # Check whether the compiler additionally accepts -Wimplicit-fallthrough=5
588 AC_CACHE_CHECK([whether the compiler accepts -Wimplicit-fallthrough=5], ac_cv_implicit_fallthrough_…
590 CFLAGS="$CFLAGS -Wimplicit-fallthrough=5 -Werror"
597 # Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported
603 AC_CACHE_CHECK([whether the compiler accepts -Wtrampolines], ac_cv_trampolines, [dnl
605 CFLAGS="$CFLAGS -Wtrampolines -Werror"
612 AC_CACHE_CHECK([whether the compiler accepts -Wno-packed-not-aligned], ac_cv_no_packed_not_aligned,…
614 CFLAGS="$CFLAGS -Wno-packed-not-aligned -Werror"
621 AC_CACHE_CHECK([whether the compiler accepts -Wuse-after-free=3], ac_cv_use_after_free3, [dnl
623 CFLAGS="$CFLAGS -Wuse-after-free=3 -Werror"
630 AC_CACHE_CHECK([whether the compiler accepts -fno-addrsig], ac_cv_fno_addrsig, [dnl
632 CFLAGS="$CFLAGS -fno-addrsig -Werror"
636 AS_IF([test "x$ac_cv_fno_addrsig" = "xyes"], CFLAGS="$CFLAGS -fno-addrsig")
643 -l*) argp_LDADD="$ac_cv_search_argp_parse" ;;
653 -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
663 -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
679 dnl Higher-level ELF support library.
682 dnl DWARF-ELF Lower-level Functions support library.
688 dnl Higher-level DWARF support library.
697 dnl CPU-specific backend libraries.
710 dnl translatable strings, we must use need-formatstring-macros here.
711 AM_GNU_GETTEXT([external], [need-formatstring-macros])
721 dnl We hide all kinds of configuration magic in lib/eu-config.h.
722 AH_BOTTOM([#include <eu-config.h>])
728 # 1.234<whatever> -> 1234<whatever>
730 [[0-9]].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
735 # 1234.567 -> "1234", "567"
739 [[0-9]][[0-9]][[0-9]]) ;;
740 [[0-9]][[0-9]]) eu_extra_version="${eu_extra_version}0" ;;
741 [[0-9]]) eu_extra_version="${eu_extra_version}00" ;;
751 0[[0-9]][[0-9]][[0-9]]) eu_version="${eu_version#0}$eu_extra_version" ;;
752 [[0-9]][[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}$eu_extra_version" ;;
753 [[0-9]][[0-9]][[0-9]]) eu_version="${eu_version}0$eu_extra_version" ;;
754 [[0-9]][[0-9]]) eu_version="${eu_version}00$eu_extra_version";;
776 # On a 64-bit host where can can use $CC -m32, we'll run two sets of tests.
797 if test ! -f ${srcdir}/libdw/known-dwarf.h; then
798 AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode])
818 AC_ARG_ENABLE([libdebuginfod],AS_HELP_STRING([--enable-libdebuginfod], [Build debuginfod client lib…
821 …AC_MSG_NOTICE([checking libdebuginfod dependencies, --disable-libdebuginfod or --enable-libdebugin…
826 …AC_MSG_ERROR([dependencies not found, use --disable-libdebuginfod to disable or --enable-libdebugi…
846 AC_ARG_ENABLE([debuginfod],AS_HELP_STRING([--enable-debuginfod], [Build debuginfod server]))
849 AC_MSG_ERROR([the compiler does not support C++11, use --disable-debuginfod to disable.])
851 AC_MSG_NOTICE([checking debuginfod dependencies, --disable-debuginfod to skip])
853 AC_MSG_ERROR([need libdebuginfod (or dummy), use --disable-debuginfod to disable.])
863 AC_MSG_ERROR([dependencies not found, use --disable-debuginfod to disable.])
873 AC_ARG_ENABLE(debuginfod-urls,
874 … [AS_HELP_STRING([--enable-debuginfod-urls@<:@=URLS@:>@],[add URLS to profile.d DEBUGINFOD_URLS])],
892 Program prefix ("eu-" recommended) : ${program_prefix}
938 if test "${prefix}" = "/usr/local" -o "${prefix}" = "/usr"; then