aboutsummaryrefslogtreecommitdiffhomepage
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-14 10:45:21 +0100
committerlemon <lsof@mailbox.org>2025-12-14 10:45:21 +0100
commit59ca5a8db396e3e9c395793d49e1cab05d2d3261 (patch)
treee3a4bb8b3c30b49c0cb3fb47104fca4b0e346179 /bootstrap.sh
parent903eaccb5e41d57e72836cf6e94e5b59236db704 (diff)
elf: use a hashmap for looking up symbols
Gets rid of linear-time findsym(), though needs some extra indirection to emit sorted symbols.
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index e4acdc4..1665239 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,7 +1,11 @@
#!/bin/env sh
set -eo pipefail
-cc=gcc
+if [ -x $CC ]; then
+ cc=gcc
+else
+ cc=$CC
+fi
cflags="-std=c11"
src=$(grep -o '\([_A-Za-z0-9/]\)\+\.c' < Makefile)
X() {