summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWilliam Douglas <william.douglas@intel.com>2013-05-07 12:57:42 -0700
committerWilliam Douglas <william.douglas@intel.com>2013-05-07 16:00:58 -0700
commit132a15d427a5490a7c6dcdbc6549589acb1278ad (patch)
tree0824c84fa977327f3c6b593a6ac8c2e9427fd253 /scripts
parent37c152669bb8d406ca5319b0f7ac44843629f0b3 (diff)
downloadlibrpm-tizen-132a15d427a5490a7c6dcdbc6549589acb1278ad.tar.gz
librpm-tizen-132a15d427a5490a7c6dcdbc6549589acb1278ad.tar.bz2
librpm-tizen-132a15d427a5490a7c6dcdbc6549589acb1278ad.zip
Fix 32bit kernel builds by not using eu-strip
Right now 32bit kernel builds are failing because eu-strip is not performing safe operations. In order to work around this, use objdump as before when running a kernel build (by checking for a Kconfig file in the BUILDIR). Change-Id: I8c24eaab9e0ac1dfe21484522ce4e415d21fcb14 Signed-off-by: William Douglas <william.douglas@intel.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/find-debuginfo.sh34
1 files changed, 29 insertions, 5 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 50ceb18ef..c73f06bf0 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -294,12 +294,36 @@ while read nlinks inum f; do
esac
mkdir -p "${debugdn}"
- if test -w "$f"; then
- strip_to_debug "${debugfn}" "$f"
+ if [ -e "${BUILDDIR}/Kconfig" ] ; then
+ mode=$(stat -c %a "$f")
+ chmod +w "$f"
+ objcopy --only-keep-debug $f $debugfn || :
+ (
+ shopt -s extglob
+ strip_option="--strip-all"
+ case "$f" in
+ *.ko)
+ strip_option="--strip-debug" ;;
+ *$STRIP_KEEP_SYMTAB*)
+ if test -n "$STRIP_KEEP_SYMTAB"; then
+ strip_option="--strip-debug"
+ fi
+ ;;
+ esac
+ if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
+ strip_option=
+ fi
+ objcopy --add-gnu-debuglink=$debugfn -R .comment -R .GCC.command.line $strip_option $f
+ chmod $mode $f
+ ) || :
else
- chmod u+w "$f"
- strip_to_debug "${debugfn}" "$f"
- chmod u-w "$f"
+ if test -w "$f"; then
+ strip_to_debug "${debugfn}" "$f"
+ else
+ chmod u+w "$f"
+ strip_to_debug "${debugfn}" "$f"
+ chmod u-w "$f"
+ fi
fi
if [ -n "$id" ]; then