summaryrefslogtreecommitdiff
path: root/scripts/build/debug
diff options
context:
space:
mode:
authorKirill K. Smirnov <kirill.k.smirnov@gmail.com>2016-09-11 22:13:55 (GMT)
committerKirill K. Smirnov <kirill.k.smirnov@gmail.com>2016-09-11 22:13:55 (GMT)
commitf64f561e6f5aee05ae93af7443e144453fe31700 (patch)
tree196da72820b75694e1fa3b1c15052d91353f37e6 /scripts/build/debug
parent5fd69f7652b0854b0eeba6b96c6a80ed0efc67a2 (diff)
debug/gdb: Add comments for untrivial flags.
The necessity of --without-libexpat-prefix is not obvious and needs comments. Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
Diffstat (limited to 'scripts/build/debug')
-rw-r--r--scripts/build/debug/300-gdb.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index ac0d857..ac9a657 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -68,6 +68,10 @@ do_debug_gdb_build() {
cd "${CT_BUILD_DIR}/build-gdb-cross"
cross_extra_config=("${extra_config[@]}")
+
+ # For gdb-cross this combination of flags forces
+ # gdb configure to fall back to default '-lexpat' flag
+ # which is acceptable.
cross_extra_config+=("--with-expat")
cross_extra_config+=("--without-libexpat-prefix")
@@ -169,6 +173,16 @@ do_debug_gdb_build() {
native_extra_config+=("--with-curses")
fi
+ # Target libexpat resides in sysroot and does not have
+ # any dependencies, so just passing '-lexpat' to gcc is enough.
+ #
+ # By default gdb configure looks for expat in '$prefix/lib'
+ # directory. In our case '$prefix/lib' resolves to '/usr/lib'
+ # where libexpat for build platform lives, which is
+ # unacceptable for cross-compiling.
+ #
+ # To prevent this '--without-libexpat-prefix' flag must be passed.
+ # Thus configure falls back to '-lexpat', which is exactly what we want.
native_extra_config+=("--with-expat")
native_extra_config+=("--without-libexpat-prefix")