diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-12-14 13:14:44 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-12-14 13:14:44 +0000 |
commit | 7061632fcb9417da64b4ab7670ef90a39feabbb3 (patch) | |
tree | bab58f2c6627a33833dfe5fc3f83c7b53be383c7 /include | |
parent | 95758e8d2c729d4aa76b56f54a26397a6eb9336f (diff) | |
download | upstream-7061632fcb9417da64b4ab7670ef90a39feabbb3.tar.gz upstream-7061632fcb9417da64b4ab7670ef90a39feabbb3.tar.bz2 upstream-7061632fcb9417da64b4ab7670ef90a39feabbb3.zip |
build: speed up kernel symbol export stripping
GNU grep has a high per-expression setup overhead when compiling regular
expressions. Use -F to force it to interpret the input as fixed strings,
which is much faster (fraction of a second instead of multiple minutes).
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39049 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-build.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk index 27c7aee17a..d34365837d 100644 --- a/include/kernel-build.mk +++ b/include/kernel-build.mk @@ -76,9 +76,9 @@ define BuildKernel xargs $(TARGET_CROSS)nm | \ awk '$$$$1 == "U" { print $$$$2 } ' | \ sort -u > $(KERNEL_BUILD_DIR)/mod_symtab.txt - $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | grep ' r __ksymtab' | sed -e 's,........ r __ksymtab_,,' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt - grep -f $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_include.txt - grep -vf $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_exclude.txt + $(TARGET_CROSS)nm -n $(LINUX_DIR)/vmlinux.o | grep -F ' r __ksymtab' | sed -e 's,........ r __ksymtab_,,' > $(KERNEL_BUILD_DIR)/kernel_symtab.txt + grep -Ff $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_include.txt + grep -Fvf $(KERNEL_BUILD_DIR)/mod_symtab.txt $(KERNEL_BUILD_DIR)/kernel_symtab.txt > $(KERNEL_BUILD_DIR)/sym_exclude.txt ( \ echo '#define SYMTAB_KEEP \'; \ cat $(KERNEL_BUILD_DIR)/sym_include.txt | \ |