diff options
author | Alexey Neyman <stilor@att.net> | 2019-03-09 18:01:30 -0800 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2019-03-09 18:01:30 -0800 |
commit | 1e25ebc7e04b610bf8324d6e428b320b3ed87009 (patch) | |
tree | c1dfad3008b064b3d029b5cf4942c71395e9defd /config/debug | |
parent | 32af07341db19d0291f962dc0ffbb49429d06358 (diff) | |
download | crosstool-ng-1e25ebc7e04b610bf8324d6e428b320b3ed87009.tar.gz crosstool-ng-1e25ebc7e04b610bf8324d6e428b320b3ed87009.tar.bz2 crosstool-ng-1e25ebc7e04b610bf8324d6e428b320b3ed87009.zip |
Move GDB build into a common backend function
... needed to create a common runtime test for an incompatible change
in glibc API.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'config/debug')
-rw-r--r-- | config/debug/gdb.in | 7 | ||||
-rw-r--r-- | config/debug/gdb.in.gdbserver | 71 | ||||
-rw-r--r-- | config/debug/gdb.in.native | 46 |
3 files changed, 48 insertions, 76 deletions
diff --git a/config/debug/gdb.in b/config/debug/gdb.in index f5f7578b..32170c1b 100644 --- a/config/debug/gdb.in +++ b/config/debug/gdb.in @@ -4,7 +4,6 @@ source "config/debug/gdb.in.cross" source "config/debug/gdb.in.native" -source "config/debug/gdb.in.gdbserver" config GDB_HAS_PKGVERSION_BUGURL bool @@ -32,3 +31,9 @@ config GDB_DEP_CXX11 def_bool y depends on !CONFIGURE_has_cxx11 select GDB_REQUIRE_older_than_8_0 + +config GDB_HAS_IPA_LIB + bool + depends on GDB_7_2_or_later + default y + diff --git a/config/debug/gdb.in.gdbserver b/config/debug/gdb.in.gdbserver deleted file mode 100644 index d7f1bb81..00000000 --- a/config/debug/gdb.in.gdbserver +++ /dev/null @@ -1,71 +0,0 @@ -# Menu for the native gdbserver - -config GDB_GDBSERVER - bool - prompt "gdbserver" - default y - depends on ! BARE_METAL - select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later - help - Build and install a gdbserver for the target, to run on the target. - -if GDB_GDBSERVER - -config GDB_GDBSERVER_HAS_IPA_LIB - bool - depends on GDB_7_2_or_later - default y - -config GDB_GDBSERVER_STATIC - bool - prompt "Build a static gdbserver" - depends on EXPERIMENTAL - help - In case you have trouble with dynamic loading of shared libraries, - you will find that a static gdbserver comes in handy. - - However, it has been noticed at least on x86 that enabling this - option produces an invalid gdbserver binary. It is linked with - "-static -Wl,--dynamic-list=..." which - # (a) requests invalid program interpreter - # (b) crashes glibc/uClibc-ng and does not work with musl - # See https://sourceware.org/ml/libc-alpha/2017-03/msg00267.html - - It is possible it would work with other architectures, hence it is - not completely removed. Use with care and report to the mailing list - if the resulting gdbserver works. - - For further details, see: - https://sourceware.org/bugzilla/show_bug.cgi?id=19617 - https://sourceware.org/bugzilla/show_bug.cgi?id=21086 - -config GDB_GDBSERVER_STATIC_LIBSTDCXX - bool - prompt "Link against static libstdc+++" - depends on !GDB_GDBSERVER_STATIC - default n - help - Say 'y' if you do not want gdbserver to require libstdc++.so on the - target. - -config GDB_GDBSERVER_BUILD_IPA_LIB - bool - prompt "Build the IPA library" - depends on GDB_GDBSERVER_HAS_IPA_LIB && !GDB_GDBSERVER_STATIC - help - gdbserver >= 7.2 comes with an optional library to use tracepoints, - the In Process Agent (IPA) library, libinproctrace.so. - - Say 'y' if you indend to use tracepoints when debugging your - programs with gdbserver. - - Note: Currently, building this library is not possible when the - gdbserver is built statically. This is a limitation in - crosstool-NG, so do not bug upstream about it... - -endif # GDB_GDBSERVER - -if BARE_METAL -comment "In bare-metal, you'll need to " -comment "provide your own gdbserver stub." -endif # BARE_METAL diff --git a/config/debug/gdb.in.native b/config/debug/gdb.in.native index 48c85756..1ee8ad12 100644 --- a/config/debug/gdb.in.native +++ b/config/debug/gdb.in.native @@ -1,4 +1,4 @@ -# Menu for the native GDB +# Menu for the native GDB binaries (GDB itself and gdbserver) config GDB_NATIVE bool @@ -12,11 +12,35 @@ config GDB_NATIVE help Build and install a native gdb for the target, to run on the target. -if GDB_NATIVE +config GDB_GDBSERVER + bool + prompt "gdbserver" + default y + depends on ! BARE_METAL + select LIBC_UCLIBC_WCHAR if LIBC_UCLIBC && GDB_8_0_or_later + help + Build and install a gdbserver for the target, to run on the target. + +if GDB_NATIVE || GDB_GDBSERVER + +config GDB_NATIVE_BUILD_IPA_LIB + bool + prompt "Build the IPA library" + depends on GDB_HAS_IPA_LIB && !GDB_NATIVE_STATIC + help + gdbserver >= 7.2 comes with an optional library to use tracepoints, + the In Process Agent (IPA) library, libinproctrace.so. + + Say 'y' if you intend to use tracepoints when debugging your + programs with gdbserver. + + Note: Currently, building this library is not possible when the + gdbserver is built statically. This is a limitation in + crosstool-NG, so do not bug upstream about it... config GDB_NATIVE_STATIC bool - prompt "Build a static native gdb" + prompt "Build a static gdb binaries" depends on EXPERIMENTAL help In case you have trouble with dynamic loading of shared libraries, @@ -31,10 +55,24 @@ config GDB_NATIVE_STATIC It is possible it would work with other architectures, hence it is not completely removed. Use with care and report to the mailing list - if the resulting gdbserver works. + if the resulting binaries work. For further details, see: https://sourceware.org/bugzilla/show_bug.cgi?id=19617 https://sourceware.org/bugzilla/show_bug.cgi?id=21086 +config GDB_NATIVE_STATIC_LIBSTDCXX + bool + prompt "Link against static libstdc+++" + depends on !GDB_NATIVE_STATIC + default n + help + Say 'y' if you do not want gdbserver to require libstdc++.so on the + target. + endif # GDB_NATIVE + +if BARE_METAL +comment "In bare-metal, you'll need to " +comment "provide your own gdbserver stub." +endif # BARE_METAL |