aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgdb/contrib/cc-with-tweaks.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index c6f0f62..0ad0091 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -74,6 +74,11 @@ READELF=${READELF:-readelf}
DWZ=${DWZ:-dwz}
DWP=${DWP:-dwp}
+# shellcheck disable=SC2206 # Allow word splitting.
+STRIP_ARGS_STRIP_DEBUG=(${STRIP_ARGS_STRIP_DEBUG:---strip-debug})
+# shellcheck disable=SC2206 # Allow word splitting.
+STRIP_ARGS_KEEP_DEBUG=(${STRIP_ARGS_KEEP_DEBUG:---only-keep-debug})
+
have_link=unknown
next_is_output_file=no
output_file=a.out
@@ -267,11 +272,11 @@ if [ "$want_gnu_debuglink" = true ]; then
debug_file="$tmpdir"/$(basename "$output_file").debug
# Create stripped and debug versions of output_file.
- strip --strip-debug "${output_file}" \
+ strip "${STRIP_ARGS_STRIP_DEBUG[@]}" "${output_file}" \
-o "${stripped_file}"
rc=$?
[ $rc != 0 ] && exit $rc
- strip --only-keep-debug "${output_file}" \
+ strip "${STRIP_ARGS_KEEP_DEBUG[@]}" "${output_file}" \
-o "${debug_file}"
rc=$?
[ $rc != 0 ] && exit $rc