# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../runit/cross-compile.patch # Copyright (C) 2008 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- runit-1.7.2/src/Makefile.orig 2006-11-21 16:14:12.000000000 +0100 +++ runit-1.7.2/src/Makefile 2007-01-23 12:09:39.000000000 +0100 @@ -170,11 +170,11 @@ byte_rchr.o: byte.h byte_rchr.c compile ./compile byte_rchr.c -chkshsgr: chkshsgr.o load - ./load chkshsgr +chkshsgr: chkshsgr.o hostload + ./hostload chkshsgr -chkshsgr.o: chkshsgr.c compile - ./compile chkshsgr.c +chkshsgr.o: chkshsgr.c hostcompile + ./hostcompile chkshsgr.c choose: choose.sh warn-auto.sh rm -f choose @@ -187,9 +187,14 @@ compile: conf-cc print-cc.sh systype warn-auto.sh rm -f compile - sh print-cc.sh > compile + sh print-cc.sh $(CC) > compile chmod 555 compile +hostcompile: conf-cc print-cc.sh systype warn-auto.sh + rm -f hostcompile + sh print-cc.sh $(HOSTCC) > hostcompile + chmod 555 hostcompile + direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c ./choose c trydrent direntry.h1 direntry.h2 > direntry.h @@ -248,9 +253,14 @@ load: conf-ld print-ld.sh systype warn-auto.sh rm -f load - sh print-ld.sh > load + sh print-ld.sh $(CC) > load chmod 555 load +hostload: conf-ld print-ld.sh systype warn-auto.sh + rm -f hostload + sh print-ld.sh $(HOSTCC) > hostload + chmod 555 hostload + lock_ex.o: compile hasflock.h lock.h lock_ex.c ./compile lock_ex.c --- runit-1.7.2/src/print-cc.sh.orig 2006-11-21 16:14:12.000000000 +0100 +++ runit-1.7.2/src/print-cc.sh 2007-01-23 12:12:18.000000000 +0100 @@ -1,4 +1,9 @@ -cc="`head -n1 conf-cc`" +if [ -n "$1" ] +then + cc="$1" +else + cc="`head -n1 conf-cc`" +fi systype="`cat systype`" cat warn-auto.sh --- runit-1.7.2/src/print-ld.sh.orig 2006-11-21 16:14:12.000000000 +0100 +++ runit-1.7.2/src/print-ld.sh 2007-01-23 12:12:46.000000000 +0100 @@ -1,4 +1,9 @@ -ld="`head -n1 conf-ld`" +if [ -n "$1" ] +then + ld="$1" +else + ld="$1" || "`head -n1 conf-ld`" +fi systype="`cat systype`" cat warn-auto.sh --- runit-1.7.2/src/conf-cc.orig 2006-11-21 16:14:12.000000000 +0100 +++ runit-1.7.2/src/conf-cc 2007-01-23 12:03:54.000000000 +0100 @@ -1,5 +1,5 @@ -gcc -O2 -Wall +$CC -O2 -Wall -gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings +$CC -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -This will be used to compile .c files. +Tis will be used to compile .c files. --- runit-1.7.2/src/conf-ld.orig 2006-11-21 16:14:12.000000000 +0100 +++ runit-1.7.2/src/conf-ld 2007-01-23 12:04:03.000000000 +0100 @@ -1,3 +1,3 @@ -gcc -s +$CC -s This will be used to link .o files into an executable.