• Owen Rafferty's avatar
    kbuild: rewrite check-local-export in sh/awk · 033a52d0
    Owen Rafferty authored
    Remove the bash build dependency for those who otherwise do not
    have it installed. This also provides a significant speedup:
    
    $ make defconfig
    $ make yes2modconfig
    
    ...
    
    $ find  .  -name "*.o" | grep -v vmlinux | wc
         3169      3169     89615
    $ export NM=nm
    $ time sh -c 'find . -name "*.o" | grep -v vmlinux | xargs -n1
    ./scripts/check-local-export'
    
    Without patch:
        0m15.90s real     0m12.17s user     0m05.28s system
    
    With patch:
    dash + nawk
        0m02.16s real     0m02.92s user     0m00.34s system
    
    dash + busybox awk
        0m02.36s real     0m03.36s user     0m00.34s system
    
    dash + gawk
        0m02.07s real     0m03.26s user     0m00.32s system
    
    bash + gawk
        0m03.55s real     0m05.00s user     0m00.54s system
    Signed-off-by: default avatarOwen Rafferty <owen@owenrafferty.com>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    033a52d0
check-local-export 1.74 KB