summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.4/patches/209-build_fixes.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-13 22:51:49 +0200
committerFelix Fietkau <nbd@openwrt.org>2016-03-20 17:29:15 +0100
commit60c1f0f64d23003a19a07d6b9638542130f6641d (patch)
tree8fb2787f4c49baded97cd55e0c371fe1cffce2b6 /target/linux/generic-2.4/patches/209-build_fixes.patch
parentd58a09110ccfa95f06c983fe796806f2e035c9d2 (diff)
parentb3ce218b51746d3a576221ea542facf3a1703ab2 (diff)
downloadmtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.zip
mtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.gz
mtk-20170518-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.bz2
finally move buildroot-ng to trunk
Diffstat (limited to 'target/linux/generic-2.4/patches/209-build_fixes.patch')
-rw-r--r--target/linux/generic-2.4/patches/209-build_fixes.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/generic-2.4/patches/209-build_fixes.patch b/target/linux/generic-2.4/patches/209-build_fixes.patch
new file mode 100644
index 0000000..235ee04
--- /dev/null
+++ b/target/linux/generic-2.4/patches/209-build_fixes.patch
@@ -0,0 +1,48 @@
+diff -urN linux.old/Makefile linux.dev/Makefile
+--- linux.old/Makefile 2005-08-26 13:41:41.689634168 +0200
++++ linux.dev/Makefile 2005-08-26 13:44:34.233403528 +0200
+@@ -354,7 +354,7 @@
+ @rm -f .ver1
+
+ include/linux/version.h: ./Makefile
+- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
++ @-expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
+ (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
+ @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
+ @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
+@@ -509,7 +509,7 @@
+ ifdef CONFIG_MODVERSIONS
+ $(MAKE) update-modverfile
+ endif
+- scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
++ find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep -- > .hdepend
+ scripts/mkdep -- init/*.c > .depend
+
+ ifdef CONFIG_MODVERSIONS
+--- linux.old/Rules.make 2005-08-31 00:37:34.363109288 +0200
++++ linux.dev/Rules.make 2005-08-31 13:59:20.140676296 +0200
+@@ -126,7 +126,7 @@
+ # This make dependencies quickly
+ #
+ fastdep: dummy
+- $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- $(wildcard *.[chS]) > .depend
++ find -name '*.[chS]' | xargs $(TOPDIR)/scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- > .depend
+ ifdef ALL_SUB_DIRS
+ $(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
+ endif
+@@ -176,7 +176,14 @@
+ _modinst__: dummy
+ ifneq "$(strip $(ALL_MOBJS))" ""
+ mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR)
+- cp $(sort $(ALL_MOBJS)) $(MODLIB)/kernel/$(MOD_DESTDIR)
++ #@cp $(sort $(ALL_MOBJS)) $(MODLIB)/kernel/$(MOD_DESTDIR)
++ for f in $(ALL_MOBJS) ; do \
++ $(OBJCOPY) -R __ksymtab -R .comment -R .note -x \
++ `$(NM) $$f | cut -f3- -d' ' | sed -n \
++ -e 's/__module_parm_\(.*\)/-K \1/p' \
++ -e 's/__ks..tab_\(.*\)/-K \1/p'` \
++ $$f $(MODLIB)/kernel/$(MOD_DESTDIR)$(MOD_TARGET)`basename $$f`; \
++ done
+ endif
+
+ .PHONY: modules_install