public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: Disable source-highlight static libstdc++ check
@ 2020-06-02  3:52 Stephanos Ioannidis
  2020-06-02 15:17 ` Eli Zaretskii
  2020-06-15 14:06 ` Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Stephanos Ioannidis @ 2020-06-02  3:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Stephanos Ioannidis

This patch removes the libstdc++ static linking prevention check when
the libsource-highlight (aka. GNU Source Highlight) library is used.

The commit d806ea2d0ef362fcddd2c1659f537b68aa114203 introduced this
requirement in order to prevent exception handling issues when mixing
dynamic C++ libraries and static libstdc++; however, this restriction
does not apply when all linked C++ libraries are in the static form.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
---
 gdb/configure    | 6 ------
 gdb/configure.ac | 8 --------
 2 files changed, 14 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index b572d414ca..f659a4772b 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -11344,12 +11344,6 @@ $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
       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 ca0da7980c..6d5526a516 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1179,14 +1179,6 @@ 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
-either use --disable-source-highlight or dnl
---without-static-standard-libraries])
-        ;;
-    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`
-- 
2.26.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: Disable source-highlight static libstdc++ check
  2020-06-02  3:52 [PATCH] gdb: Disable source-highlight static libstdc++ check Stephanos Ioannidis
@ 2020-06-02 15:17 ` Eli Zaretskii
  2020-06-15 14:06 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2020-06-02 15:17 UTC (permalink / raw)
  To: Stephanos Ioannidis; +Cc: gdb-patches

> From: Stephanos Ioannidis <root@stephanos.io>
> Date: Tue,  2 Jun 2020 12:52:06 +0900
> Cc: Stephanos Ioannidis <root@stephanos.io>
> 
> This patch removes the libstdc++ static linking prevention check when
> the libsource-highlight (aka. GNU Source Highlight) library is used.
> 
> The commit d806ea2d0ef362fcddd2c1659f537b68aa114203 introduced this
> requirement in order to prevent exception handling issues when mixing
> dynamic C++ libraries and static libstdc++; however, this restriction
> does not apply when all linked C++ libraries are in the static form.

This LGTM, and is exactly what I did last time I built GDB with
source-highlight.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb: Disable source-highlight static libstdc++ check
  2020-06-02  3:52 [PATCH] gdb: Disable source-highlight static libstdc++ check Stephanos Ioannidis
  2020-06-02 15:17 ` Eli Zaretskii
@ 2020-06-15 14:06 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2020-06-15 14:06 UTC (permalink / raw)
  To: Stephanos Ioannidis; +Cc: gdb-patches

>>>>> "Stephanos" == Stephanos Ioannidis <root@stephanos.io> writes:

Hi.  Thanks for the patch.

Stephanos> This patch removes the libstdc++ static linking prevention check when
Stephanos> the libsource-highlight (aka. GNU Source Highlight) library is used.

Patches have to come with a ChangeLog entry.
See the contribution checklist:

https://sourceware.org/gdb/wiki/ContributionChecklist

Stephanos> The commit d806ea2d0ef362fcddd2c1659f537b68aa114203 introduced this
Stephanos> requirement in order to prevent exception handling issues when mixing
Stephanos> dynamic C++ libraries and static libstdc++; however, this restriction
Stephanos> does not apply when all linked C++ libraries are in the static form.

It seems like this would just reintroduce the build problem that this
addition was intended to fix.  Maybe some option to circumvent this
check would be better.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-15 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-02  3:52 [PATCH] gdb: Disable source-highlight static libstdc++ check Stephanos Ioannidis
2020-06-02 15:17 ` Eli Zaretskii
2020-06-15 14:06 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).