Dash:
[t2-trunk.git] / package / base / runit / cross-compile.patch
blobe6ccc54c2157e28f777307e7946e3fbdbd706d0b
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../runit/cross-compile.patch
5 # Copyright (C) 2008 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- runit-1.7.2/src/Makefile.orig 2006-11-21 16:14:12.000000000 +0100
18 +++ runit-1.7.2/src/Makefile 2007-01-23 12:09:39.000000000 +0100
19 @@ -170,11 +170,11 @@
20 byte_rchr.o: byte.h byte_rchr.c compile
21 ./compile byte_rchr.c
23 -chkshsgr: chkshsgr.o load
24 - ./load chkshsgr
25 +chkshsgr: chkshsgr.o hostload
26 + ./hostload chkshsgr
28 -chkshsgr.o: chkshsgr.c compile
29 - ./compile chkshsgr.c
30 +chkshsgr.o: chkshsgr.c hostcompile
31 + ./hostcompile chkshsgr.c
33 choose: choose.sh warn-auto.sh
34 rm -f choose
35 @@ -187,9 +187,14 @@
37 compile: conf-cc print-cc.sh systype warn-auto.sh
38 rm -f compile
39 - sh print-cc.sh > compile
40 + sh print-cc.sh $(CC) > compile
41 chmod 555 compile
43 +hostcompile: conf-cc print-cc.sh systype warn-auto.sh
44 + rm -f hostcompile
45 + sh print-cc.sh $(HOSTCC) > hostcompile
46 + chmod 555 hostcompile
48 direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c
49 ./choose c trydrent direntry.h1 direntry.h2 > direntry.h
51 @@ -248,9 +253,14 @@
53 load: conf-ld print-ld.sh systype warn-auto.sh
54 rm -f load
55 - sh print-ld.sh > load
56 + sh print-ld.sh $(CC) > load
57 chmod 555 load
59 +hostload: conf-ld print-ld.sh systype warn-auto.sh
60 + rm -f hostload
61 + sh print-ld.sh $(HOSTCC) > hostload
62 + chmod 555 hostload
64 lock_ex.o: compile hasflock.h lock.h lock_ex.c
65 ./compile lock_ex.c
67 --- runit-1.7.2/src/print-cc.sh.orig 2006-11-21 16:14:12.000000000 +0100
68 +++ runit-1.7.2/src/print-cc.sh 2007-01-23 12:12:18.000000000 +0100
69 @@ -1,4 +1,9 @@
70 -cc="`head -n1 conf-cc`"
71 +if [ -n "$1" ]
72 +then
73 + cc="$1"
74 +else
75 + cc="`head -n1 conf-cc`"
76 +fi
77 systype="`cat systype`"
79 cat warn-auto.sh
80 --- runit-1.7.2/src/print-ld.sh.orig 2006-11-21 16:14:12.000000000 +0100
81 +++ runit-1.7.2/src/print-ld.sh 2007-01-23 12:12:46.000000000 +0100
82 @@ -1,4 +1,9 @@
83 -ld="`head -n1 conf-ld`"
84 +if [ -n "$1" ]
85 +then
86 + ld="$1"
87 +else
88 + ld="$1" || "`head -n1 conf-ld`"
89 +fi
90 systype="`cat systype`"
92 cat warn-auto.sh
93 --- runit-1.7.2/src/conf-cc.orig 2006-11-21 16:14:12.000000000 +0100
94 +++ runit-1.7.2/src/conf-cc 2007-01-23 12:03:54.000000000 +0100
95 @@ -1,5 +1,5 @@
96 -gcc -O2 -Wall
97 +$CC -O2 -Wall
99 -gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
100 +$CC -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings
102 -This will be used to compile .c files.
103 +Tis will be used to compile .c files.
104 --- runit-1.7.2/src/conf-ld.orig 2006-11-21 16:14:12.000000000 +0100
105 +++ runit-1.7.2/src/conf-ld 2007-01-23 12:04:03.000000000 +0100
106 @@ -1,3 +1,3 @@
107 -gcc -s
108 +$CC -s
110 This will be used to link .o files into an executable.