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

49 lines
1.2 KiB
Diff

chskshsgr must be built for the host.
--- a/src/Makefile 2014-07-18 18:38:30.305068171 +0200
+++ b/src/Makefile 2014-07-18 18:40:28.028069614 +0200
@@ -117,11 +117,11 @@
byte_zero.o: byte.h byte_zero.c compile
./compile byte_zero.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
@@ -137,6 +137,11 @@
sh print-cc.sh > compile
chmod 555 compile
+compilehost:
+ cat warn-auto.sh > compilehost
+ @echo 'exec cc -c $${1+"$$@"}' >> compilehost
+ chmod 555 compilehost
+
direntry.h: choose compile direntry.h1 direntry.h2 trydrent.c
./choose c trydrent direntry.h1 direntry.h2 > direntry.h
@@ -198,6 +203,15 @@
sh print-ld.sh > load
chmod 555 load
+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
+
lock_ex.o: compile hasflock.h lock.h lock_ex.c
./compile lock_ex.c