Re: [PATCH] Cross-compiling linux kernel on non GNU platform

From: Ralf Baechle (ralf@uni-koblenz.de)
Date: Mon Jun 26 2000 - 14:36:36 EST


On Mon, Jun 26, 2000 at 12:32:30PM +0200, lamarqu1 wrote:

> since 2.4.0-test1, 'make depend' is broken if 'find(1)' is
> not the GNU one.
>
> Here's a patch against 2.4.0-test2 to address the problem. I just
> change the '-or' operator to '-o' which is the same according to
> the man.

This is not the only crosscompilation problem. Many operating systems,
especially SysV variants have low limits for the maximal length of
the commandline and environment. In some cases kernel tuning is an
option, often it isn't. Below my patches which I'm using to crosscompile
Linux on IRIX 6. They use xargs and env -i to deal with those
limitations.

  Ralf

diff -urN linux-2.4.0-test2/Makefile linux-sgi/Makefile
--- linux-2.4.0-test2/Makefile Sun Jun 25 23:09:07 2000
+++ linux-sgi/Makefile Sun Jun 25 02:44:44 2000
@@ -402,9 +402,10 @@
         rm -rf $(TOPDIR)/include/linux/modules
         $(MAKE) -C Documentation/DocBook mrproper
 distclean: mrproper
- rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
- -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
- -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS tags
+ find . -type f \( -name core -o -name '*.orig' -o -name '*.rej' \
+ -o -name '*~' -o -name '*.bak' -o -name '#*#' \
+ -o -name '.*.orig' -o -name '.*.rej' -o -name '.SUMS' \
+ -o -size 0 -o -name TAGS -o -name tags \) -print | env -i xargs rm -f
 
 backup: mrproper
         cd .. && tar cf - linux/ | gzip -9 > backup.gz
@@ -426,11 +427,11 @@
         $(MAKE) -C Documentation/DocBook html
 
 sums:
- find . -type f -print | sort | xargs sum > .SUMS
+ find . -type f -print | sort | env -i xargs sum > .SUMS
 
 dep-files: scripts/mkdep archdep include/linux/version.h
         scripts/mkdep init/*.c > .depend
- scripts/mkdep `find $(FINDHPATH) -name SCCS -prune -or -follow -name \*.h ! -name modversions.h -print` > .hdepend
+ find $(FINDHPATH) -name SCCS -prune -or -follow -name \*.h ! -name modversions.h -print | env -i PATH="$(PATH)" HPATH="$(HPATH)" xargs scripts/mkdep > .hdepend
         $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
 
 ifdef CONFIG_MODVERSIONS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:10 EST