Skip to content

Commit cc6f6d1

Browse files
fboudraJiri Slaby
authored andcommitted
builddeb: use $OBJCOPY variable instead of objcopy
commit 6b4a144 upstream. In cross-build environment, we expect to use the cross-compiler objcopy instead of the host objcopy. It fixes following build failures: objcopy --only-keep-debug lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko /srv/build/linux/debian/dbgtmp/usr/lib/debug/lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko objcopy: Unable to recognise the format of the input file `lib/modules/3.14/kernel/net/ipv6/xfrm6_mode_tunnel.ko' Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> Fixes: 810e843 ('deb-pkg: split debug symbols in their own package') Reviewed-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
1 parent b8f4d21 commit cc6f6d1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎scripts/package/builddeb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
155155
for module in $(find lib/modules/ -name *.ko); do
156156
mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
157157
# only keep debug symbols in the debug file
158-
objcopy --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
158+
$OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
159159
# strip original module from debug symbols
160-
objcopy --strip-debug $module
160+
$OBJCOPY --strip-debug $module
161161
# then add a link to those
162-
objcopy --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
162+
$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
163163
done
164164
)
165165
fi

0 commit comments

Comments
 (0)