Skip to content

Commit

Permalink
debug/gdb: restore comments
Browse files Browse the repository at this point in the history
There are two separate issues with gdb configure usage:
1) inspecting build system libraries while cross-compiling;
2) preferring a shared library over static one.

The first usage issue is described and fixed now.
The second issue was described but the notes were removed
for some reason. This patch restores those notes.

Suggested-by: Alexey Neyman <stilor@att.net>
Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
  • Loading branch information
KirillSmirnov committed Dec 5, 2016
1 parent f64f561 commit ee1c043
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/build/debug/300-gdb.sh
Expand Up @@ -72,6 +72,12 @@ do_debug_gdb_build() {
# For gdb-cross this combination of flags forces
# gdb configure to fall back to default '-lexpat' flag
# which is acceptable.
#
# NOTE: DO NOT USE --with-libexpat-prefix (until GDB configure is smarter)!!!
# It conflicts with a static build: GDB's configure script will find the shared
# version of expat and will attempt to link that, despite the -static flag.
# The link will fail, and configure will abort with "expat missing or unusable"
# message.
cross_extra_config+=("--with-expat")
cross_extra_config+=("--without-libexpat-prefix")

Expand Down Expand Up @@ -183,6 +189,12 @@ do_debug_gdb_build() {
#
# To prevent this '--without-libexpat-prefix' flag must be passed.
# Thus configure falls back to '-lexpat', which is exactly what we want.
#
# NOTE: DO NOT USE --with-libexpat-prefix (until GDB configure is smarter)!!!
# It conflicts with a static build: GDB's configure script will find the shared
# version of expat and will attempt to link that, despite the -static flag.
# The link will fail, and configure will abort with "expat missing or unusable"
# message.
native_extra_config+=("--with-expat")
native_extra_config+=("--without-libexpat-prefix")

Expand Down

0 comments on commit ee1c043

Please sign in to comment.