-
Notifications
You must be signed in to change notification settings - Fork 0
/
cross.patch
48 lines (42 loc) · 1.36 KB
/
cross.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
chskshsgr must be built for the host.
--- runit-2.1.2/src/Makefile.orig 2014-02-11 02:03:33.904789349 +0100
+++ runit-2.1.2/src/Makefile 2014-02-11 02:19:28.968055164 +0100
@@ -170,11 +170,11 @@ byte_diff.o: byte.h byte_diff.c compile
byte_rchr.o: byte.h byte_rchr.c compile
./compile byte_rchr.c
-chkshsgr: chkshsgr.o load
- ./load chkshsgr
+chkshsgr: chkshsgr.o loadhost
+ ./loadhost chkshsgr
-chkshsgr.o: chkshsgr.c compile
- ./compile chkshsgr.c
+chkshsgr.o: chkshsgr.c compilehost
+ ./compilehost chkshsgr.c
choose: choose.sh warn-auto.sh
rm -f choose
@@ -185,6 +185,11 @@ choose: choose.sh warn-auto.sh
coe.o: coe.c coe.h compile
./compile coe.c
+compilehost:
+ cat warn-auto.sh > compilehost
+ @echo 'exec cc -c $${1+"$$@"}' >> compilehost
+ chmod 555 compilehost
+
compile: conf-cc print-cc.sh systype warn-auto.sh
rm -f compile
sh print-cc.sh > compile
@@ -246,6 +251,15 @@ iopause.h: choose compile iopause.h1 iop
iopause.o: compile iopause.c iopause.h select.h tai.h taia.h uint64.h
./compile iopause.c
+loadhost:
+ rm -f loadhost
+ @echo > loadhost
+ @echo 'systype="`cat systype`"' >> loadhost
+ @echo 'cat warn-auto.sh' >> loadhost
+ @echo 'main="$$1"; shift' >> loadhost
+ @echo 'exec cc -o "$$main" "$$main".o $${1+"$$@"}' >> loadhost
+ chmod 555 loadhost
+
load: conf-ld print-ld.sh systype warn-auto.sh
rm -f load
sh print-ld.sh > load