samba, samba-ads: Update to 3.5.6 for security fixes
[openembedded.git] / classes / module_strip.bbclass
blob6a298fdde9cf2b6b9e76f5d038dc164e4d2c35d7
1 PACKAGESTRIPFUNCS += "do_strip_modules"
3 # inherit to get get_kernelmajorversion();
4 inherit linux-kernel-base
6 # may be inherited by kernel.bbclass which sets KERNEL_MAJOR_VERSION
7 KERNEL_MAJOR_VERSION ?= "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
9 do_strip_modules () {
10         if test -e ${PKGD}/lib/modules; then
11                 if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then
12                         modules="`find ${PKGD}/lib/modules -name \*.ko`"
13                 else
14                         modules="`find ${PKGD}/lib/modules -name \*.o`"
15                 fi
16                 if [ -n "$modules" ]; then
17                         for module in $modules ; do
18                                 if ! [ -d "$module"  ] ; then
19                                         ${STRIP} -v -g $module
20                                 fi
21                         done    
22                 fi
23         fi