Skip to content

Commit

Permalink
find-systype.sh: remove unused "systype" mechanism
Browse files Browse the repository at this point in the history
The "systype" machanism is merely a system info gatherer, and the info it
collects is (mostly) not used anywhere. The only seemingly important info is
the kernel and kernel version (or the lack thereof), and has been moved to
where it is used (print-ar.sh)

This gets rid of two cross-incompatible buildtime programs.
One tried to find if the build was happening on NeXT, but that's not an
operating system that print-ar.sh cares about. The other tried to do cpuid on
x86, which is useless to the build.

This seems to implement what void-linux#11 started.
  • Loading branch information
0x5c committed Mar 27, 2023
1 parent 66ec476 commit 6c5bb6d
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 204 deletions.
13 changes: 5 additions & 8 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ choose: choose.sh warn-auto.sh
coe.o: coe.c coe.h compile
./compile coe.c

compile: conf-cc print-cc.sh systype warn-auto.sh
compile: conf-cc print-cc.sh warn-auto.sh
rm -f compile
sh print-cc.sh > compile
chmod 555 compile
Expand Down Expand Up @@ -235,7 +235,7 @@ iopause.h: choose compile iopause.h1 iopause.h2 load trypoll.c
iopause.o: compile iopause.c iopause.h select.h tai.h taia.h uint64.h
./compile iopause.c

load: conf-ld print-ld.sh systype warn-auto.sh
load: conf-ld print-ld.sh warn-auto.sh
rm -f load
sh print-ld.sh > load
chmod 555 load
Expand All @@ -246,7 +246,7 @@ lock_ex.o: compile hasflock.h lock.h lock_ex.c
lock_exnb.o: compile hasflock.h lock.h lock_exnb.c
./compile lock_exnb.c

makelib: print-ar.sh systype warn-auto.sh
makelib: print-ar.sh warn-auto.sh
rm -f makelib
sh print-ar.sh > makelib
chmod 555 makelib
Expand Down Expand Up @@ -358,10 +358,10 @@ subgetopt.o: compile subgetopt.c subgetopt.h
./compile subgetopt.c

sysdeps: compile direntry.h hasflock.h hasmkffo.h hassgact.h \
hassgprm.h haswaitp.h iopause.h load select.h systype \
hassgprm.h haswaitp.h iopause.h load select.h \
uint64.h reboot_system.h uw_tmp.h socket.lib
rm -f sysdeps
cat systype compile load socket.lib >>sysdeps
cat compile load socket.lib >>sysdeps
grep sysdep direntry.h >>sysdeps
grep sysdep haswaitp.h >>sysdeps
grep sysdep hassgact.h >>sysdeps
Expand All @@ -375,9 +375,6 @@ uint64.h reboot_system.h uw_tmp.h socket.lib
grep sysdep uw_tmp.h >>sysdeps
cat sysdeps

systype: find-systype.sh trycpp.c x86cpuid.c
sh find-systype.sh > systype

tai_now.o: compile tai.h tai_now.c uint64.h
./compile tai_now.c

Expand Down
1 change: 0 additions & 1 deletion src/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ strerr_die.o
strerr_sys.o
subgetopt.o
sysdeps
systype
tai_now.o
tai_pack.o
tai_sub.o
Expand Down
143 changes: 0 additions & 143 deletions src/find-systype.sh

This file was deleted.

3 changes: 2 additions & 1 deletion src/print-ar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ cat warn-auto.sh
echo 'main="$1"; shift'
echo 'rm -f "$main"'
echo 'ar cr "$main" ${1+"$@"}'
case "`cat systype`" in
kern="$(uname -s | tr '/:[A-Z]' '..[a-z])')-$(uname -r | tr /: ..)" || kern="unknown"
case $kern in
sunos-5.*) ;;
unix_sv*) ;;
irix64-*) ;;
Expand Down
1 change: 0 additions & 1 deletion src/print-cc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
cc="`head -n1 conf-cc`"
systype="`cat systype`"

cat warn-auto.sh
echo exec "$cc" '-c ${1+"$@"}'
1 change: 0 additions & 1 deletion src/print-ld.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ld="`head -n1 conf-ld`"
systype="`cat systype`"

cat warn-auto.sh
echo 'main="$1"; shift'
Expand Down
9 changes: 0 additions & 9 deletions src/trycpp.c

This file was deleted.

40 changes: 0 additions & 40 deletions src/x86cpuid.c

This file was deleted.

0 comments on commit 6c5bb6d

Please sign in to comment.