fix the kernel symbol export patch for arm/powerpc
[openwrt.git] / target / linux / generic-2.4 / patches / 209-build_fixes.patch
1 --- a/Makefile
2 +++ b/Makefile
3 @@ -362,7 +362,7 @@ include/linux/compile.h: $(CONFIGURATION
4 @rm -f .ver1
5
6 include/linux/version.h: ./Makefile
7 - @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
8 + @-expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
9 (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
10 @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
11 @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
12 @@ -500,7 +500,7 @@ dep-files: scripts/mkdep archdep include
13 ifdef CONFIG_MODVERSIONS
14 $(MAKE) update-modverfile
15 endif
16 - scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
17 + find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep -- > .hdepend
18 scripts/mkdep -- init/*.c > .depend
19
20 ifdef CONFIG_MODVERSIONS
21 --- a/Rules.make
22 +++ b/Rules.make
23 @@ -126,7 +126,7 @@ endif
24 # This make dependencies quickly
25 #
26 fastdep: dummy
27 - $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- $(wildcard *.[chS]) > .depend
28 + find . -name '*.[chS]' | xargs $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- > .depend
29 ifdef ALL_SUB_DIRS
30 $(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
31 endif
32 @@ -176,7 +176,14 @@ modules: $(ALL_MOBJS) dummy \
33 _modinst__: dummy
34 ifneq "$(strip $(ALL_MOBJS))" ""
35 mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR)
36 - cp $(sort $(ALL_MOBJS)) $(MODLIB)/kernel/$(MOD_DESTDIR)
37 + #@cp $(sort $(ALL_MOBJS)) $(MODLIB)/kernel/$(MOD_DESTDIR)
38 + for f in $(ALL_MOBJS) ; do \
39 + $(OBJCOPY) -R __ksymtab -R .comment -R .note -x \
40 + `$(NM) $$f | cut -f3- -d' ' | sed -n \
41 + -e 's/__module_parm_\(.*\)/-K \1/p' \
42 + -e 's/__ks..tab_\(.*\)/-K \1/p'` \
43 + $$f $(MODLIB)/kernel/$(MOD_DESTDIR)$(MOD_TARGET)`basename $$f`; \
44 + done
45 endif
46
47 .PHONY: modules_install
This page took 0.043852 seconds and 5 git commands to generate.