Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull misc kbuild updates from Michal Marek: "This is the less critical kbuild stuff for v3.18-rc1: - make deb-pkg debuginfo fix, ppc64el support and warning fix for recent dpkg tools - make TAGS fixes - new coccinelle patch - kbuild documentation improvements" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: deb-pkg: remove obsolete -isp option to dpkg-gencontrol coccinelle: misc: semantic patch to delete overly complex return code processing deb-pkg: Add support for powerpc little endian builddeb: put the dbg files into the correct directory scripts/tags.sh: fix DEFINE_HASHTABLE in emacs case scripts/tags.sh: remove *PCGFLAGS regular expressions scripts/tags.sh: Don't specify kind-spec for emacs' ctags/etags Documentation: kbuild: Improve grammar Documentation: kbuild: Remove obsolete dtc_cpp section Documentation: kbuild: Improve if_changed documentation Documentation: kbuild: Remove obsolete include/asm symlink step
This commit is contained in:
@@ -37,7 +37,7 @@ create_package() {
|
||||
s390*)
|
||||
debarch=s390$(grep -q CONFIG_64BIT=y $KCONFIG_CONFIG && echo x || true) ;;
|
||||
ppc*)
|
||||
debarch=powerpc ;;
|
||||
debarch=$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo ppc64el || echo powerpc) ;;
|
||||
parisc*)
|
||||
debarch=hppa ;;
|
||||
mips*)
|
||||
@@ -64,7 +64,7 @@ create_package() {
|
||||
fi
|
||||
|
||||
# Create the package
|
||||
dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg-gencontrol $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
}
|
||||
|
||||
@@ -152,18 +152,16 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
|
||||
rmdir "$tmpdir/lib/modules/$version"
|
||||
fi
|
||||
if [ -n "$BUILD_DEBUG" ] ; then
|
||||
(
|
||||
cd $tmpdir
|
||||
for module in $(find lib/modules/ -name *.ko); do
|
||||
mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
|
||||
# only keep debug symbols in the debug file
|
||||
$OBJCOPY --only-keep-debug $module $dbg_dir/usr/lib/debug/$module
|
||||
# strip original module from debug symbols
|
||||
$OBJCOPY --strip-debug $module
|
||||
# then add a link to those
|
||||
$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $module
|
||||
done
|
||||
)
|
||||
for module in $(find $tmpdir/lib/modules/ -name *.ko -printf '%P\n'); do
|
||||
module=lib/modules/$module
|
||||
mkdir -p $(dirname $dbg_dir/usr/lib/debug/$module)
|
||||
# only keep debug symbols in the debug file
|
||||
$OBJCOPY --only-keep-debug $tmpdir/$module $dbg_dir/usr/lib/debug/$module
|
||||
# strip original module from debug symbols
|
||||
$OBJCOPY --strip-debug $tmpdir/$module
|
||||
# then add a link to those
|
||||
$OBJCOPY --add-gnu-debuglink=$dbg_dir/usr/lib/debug/$module $tmpdir/$module
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user