void-packages/srcpkgs/runit/patches/cross.patch

49 lines
1.4 KiB
Diff
Raw Normal View History

2014-02-11 02:37:56 +01:00
chskshsgr must be built for the host.
2014-09-24 10:29:02 +02:00
--- 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
2014-02-11 02:37:56 +01:00
@@ -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