From: Bernd Edlinger Date: Wed, 16 Dec 2020 18:47:18 +0000 (+0100) Subject: Warn about static libs vs. source-highlight only when necessary X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0455b7d325801142694c0a222acb08c7e2739f7d;p=binutils-gdb.git Warn about static libs vs. source-highlight only when necessary Avoid the error message when source-highlight is actually available. 2020-12-19 Bernd Edlinger * configure.ac: Move the static libs vs. source-highlight error message to a better place. * configure: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a7b93353bf2..3cae03aaede 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-12-19 Bernd Edlinger + + * configure.ac: Move the static libs vs. source-highlight + error message to a better place. + * configure: Regenerate. + 2020-12-18 Hannes Domani * gdb-gdb.py.in: Fix main_type field name. diff --git a/gdb/configure b/gdb/configure index 24e6fbc8fa7..51b4d1921c5 100755 --- a/gdb/configure +++ b/gdb/configure @@ -12069,13 +12069,13 @@ $as_echo "no - pkg-config not found" >&6; } as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 fi else - case "$LDFLAGS" in - *static-libstdc*) - as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 - ;; - esac - if ${pkg_config_prog_path} --exists source-highlight; then + case "$LDFLAGS" in + *static-libstdc*) + as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 + ;; + esac + SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` diff --git a/gdb/configure.ac b/gdb/configure.ac index 32f25d96551..28703d795b6 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1238,15 +1238,15 @@ if test "${enable_source_highlight}" != "no"; then AC_MSG_ERROR([pkg-config was not found in your system]) fi else - case "$LDFLAGS" in - *static-libstdc*) - AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl + if ${pkg_config_prog_path} --exists source-highlight; then + case "$LDFLAGS" in + *static-libstdc*) + AC_MSG_ERROR([source highlight is incompatible with -static-libstdc++; dnl either use --disable-source-highlight or dnl --without-static-standard-libraries]) - ;; - esac + ;; + esac - if ${pkg_config_prog_path} --exists source-highlight; then SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` AC_DEFINE([HAVE_SOURCE_HIGHLIGHT], 1,