Bug: https://bugs.gentoo.org/654748
gcc/configure.ac * Add --enable-systemtap switch to explicitly allow for disabling systemtap even if the target libc supports it. --- gcc/configure.ac | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/gcc/configure.ac b/gcc/configure.ac index 90cad309762..7dfb9a58cdd 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -6904,14 +6904,24 @@ AC_SUBST([enable_default_ssp]) # Test for <sys/sdt.h> on the target. GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) -AC_MSG_CHECKING(sys/sdt.h in the target C library) -have_sys_sdt_h=no -if test -f $target_header_dir/sys/sdt.h; then - have_sys_sdt_h=yes - AC_DEFINE(HAVE_SYS_SDT_H, 1, - [Define if your target C library provides sys/sdt.h]) -fi -AC_MSG_RESULT($have_sys_sdt_h) + +AC_ARG_ENABLE([systemtap], + [AS_HELP_STRING([--enable-systemtap], + [enable systemtap static probe points [default=auto]])]) + +AS_IF([test x$enable_systemtap != xno], [ + AC_MSG_CHECKING([sys/sdt.h in the target C library]) + have_sys_sdt_h=no + AS_IF([test -f "$target_header_dir/sys/sdt.h"], [ + have_sys_sdt_h=yes + AC_DEFINE([HAVE_SYS_SDT_H], [1], + [Define if your target C library provides sys/sdt.h]) + ]) + AC_MSG_RESULT([$have_sys_sdt_h]) + AS_IF([test x$enable_systemtap = xyes && test x$have_sys_sdt_h = xno], [ + AC_MSG_ERROR([sys/sdt.h was not found]) + ]) +]) # Check if TFmode long double should be used by default or not. # Some glibc targets used DFmode long double, but with glibc 2.4 -- 2.35.1