aboutsummaryrefslogtreecommitdiff
path: root/libcpp/configure
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2023-11-23 13:55:43 +0300
committerAlexander Monakov <amonakov@ispras.ru>2023-11-24 16:13:56 +0300
commitab78426ae76cd4a31c384f17dd058b4ad8b39642 (patch)
tree9d402504538eff6d626d4a9aac2ee594eda1930d /libcpp/configure
parent3eb9cae6d375d222787498b15ac87f383b3834fe (diff)
downloadgcc-ab78426ae76cd4a31c384f17dd058b4ad8b39642.zip
gcc-ab78426ae76cd4a31c384f17dd058b4ad8b39642.tar.gz
gcc-ab78426ae76cd4a31c384f17dd058b4ad8b39642.tar.bz2
libcpp: configure: drop unused Valgrind detection
When top-level configure has either --enable-checking=valgrind or --enable-valgrind-annotations, we want to activate a couple of workarounds in libcpp. They do not use anything from the Valgrind API, so just delete all detection. libcpp/ChangeLog: * config.in: Regenerate. * configure: Regenerate. * configure.ac (ENABLE_VALGRIND_CHECKING): Delete. (ENABLE_VALGRIND_ANNOTATIONS): Rename to ENABLE_VALGRIND_WORKAROUNDS. Delete Valgrind header checks. * lex.cc (new_buff): Adjust for renaming. (_cpp_free_buff): Ditto.
Diffstat (limited to 'libcpp/configure')
-rwxr-xr-xlibcpp/configure70
1 files changed, 1 insertions, 69 deletions
diff --git a/libcpp/configure b/libcpp/configure
index 452e4c1..8a38c05 100755
--- a/libcpp/configure
+++ b/libcpp/configure
@@ -9116,12 +9116,6 @@ $as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
fi
-if test x$ac_valgrind_checking != x ; then
-
-$as_echo "#define ENABLE_VALGRIND_CHECKING 1" >>confdefs.h
-
-fi
-
# Check whether --enable-canonical-system-headers was given.
if test "${enable_canonical_system_headers+set}" = set; then :
enableval=$enable_canonical_system_headers;
@@ -9405,62 +9399,6 @@ case x$enable_languages in
esac
-ac_fn_c_check_header_mongrel "$LINENO" "valgrind.h" "ac_cv_header_valgrind_h" "$ac_includes_default"
-if test "x$ac_cv_header_valgrind_h" = xyes; then :
- have_valgrind_h=yes
-else
- have_valgrind_h=no
-fi
-
-
-
-# It is certainly possible that there's valgrind but no valgrind.h.
-# GCC relies on making annotations so we must have both.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <valgrind/memcheck.h>" >&5
-$as_echo_n "checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <valgrind/memcheck.h>
-#ifndef VALGRIND_DISCARD
-#error VALGRIND_DISCARD not defined
-#endif
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- gcc_cv_header_valgrind_memcheck_h=yes
-else
- gcc_cv_header_valgrind_memcheck_h=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_valgrind_memcheck_h" >&5
-$as_echo "$gcc_cv_header_valgrind_memcheck_h" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VALGRIND_DISCARD in <memcheck.h>" >&5
-$as_echo_n "checking for VALGRIND_DISCARD in <memcheck.h>... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <memcheck.h>
-#ifndef VALGRIND_DISCARD
-#error VALGRIND_DISCARD not defined
-#endif
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- gcc_cv_header_memcheck_h=yes
-else
- gcc_cv_header_memcheck_h=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_header_memcheck_h" >&5
-$as_echo "$gcc_cv_header_memcheck_h" >&6; }
-if test $gcc_cv_header_valgrind_memcheck_h = yes; then
-
-$as_echo "#define HAVE_VALGRIND_MEMCHECK_H 1" >>confdefs.h
-
-fi
-if test $gcc_cv_header_memcheck_h = yes; then
-
-$as_echo "#define HAVE_MEMCHECK_H 1" >>confdefs.h
-
-fi
-
# Check whether --enable-valgrind-annotations was given.
if test "${enable_valgrind_annotations+set}" = set; then :
enableval=$enable_valgrind_annotations;
@@ -9470,14 +9408,8 @@ fi
if test x$enable_valgrind_annotations != xno \
|| test x$ac_valgrind_checking != x; then
- if (test $have_valgrind_h = no \
- && test $gcc_cv_header_memcheck_h = no \
- && test $gcc_cv_header_valgrind_memcheck_h = no); then
- as_fn_error $? "*** valgrind annotations requested, but" "$LINENO" 5
- as_fn_error $? "*** Can't find valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
- fi
-$as_echo "#define ENABLE_VALGRIND_ANNOTATIONS 1" >>confdefs.h
+$as_echo "#define ENABLE_VALGRIND_WORKAROUNDS 1" >>confdefs.h
fi