uclibc: remove obsolete patches for git version
[openembedded.git] / classes / module_strip.bbclass
blob998fb86461cdb69a84e3f4816c1d95d6af5892a1
1 PACKAGESTRIPFUNCS += "do_strip_modules"
3 # may be inherited by kernel.bbclass which sets KERNEL_MAJOR_VERSION
4 KERNEL_MAJOR_VERSION ?= "${@get_kernelmajorversion('${KERNEL_VERSION}')}"
6 do_strip_modules () {
7         if test -e ${PKGD}/lib/modules; then
8                 if [ "${KERNEL_MAJOR_VERSION}" == "2.6" ]; then
9                         modules="`find ${PKGD}/lib/modules -name \*.ko`"
10                 else
11                         modules="`find ${PKGD}/lib/modules -name \*.o`"
12                 fi
13                 if [ -n "$modules" ]; then
14                         for module in $modules ; do
15                                 if ! [ -d "$module"  ] ; then
16                                         ${STRIP} -v -g $module
17                                 fi
18                         done    
19                 fi
20         fi