summaryrefslogtreecommitdiffstats
path: root/config/cc.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-08 11:27:11 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-09 17:15:23 -0400
commitc31577d102d87455f3f12086be4c0e2159fa5d35 (patch)
tree864c7c199e5b846dcf497de8b667d6c6f8c550b9 /config/cc.sh
parent5e0b721d0d929223e4308406480a1f1ca9e3f4dc (diff)
downloadbfs-c31577d102d87455f3f12086be4c0e2159fa5d35.tar.xz
build: Add a separate configuration step
Diffstat (limited to 'config/cc.sh')
-rwxr-xr-xconfig/cc.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/config/cc.sh b/config/cc.sh
new file mode 100755
index 0000000..04b142a
--- /dev/null
+++ b/config/cc.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# Copyright © Tavian Barnes <tavianator@tavianator.com>
+# SPDX-License-Identifier: 0BSD
+
+# Run the compiler and check if it succeeded
+
+printf '$ %s' "$XCC" >&2
+printf ' %q' "$@" >&2
+printf ' -o /dev/null\n' >&2
+
+$XCC "$@" -o /dev/null