summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-10 11:25:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-10 13:15:49 -0400
commit8f5ce115d51d31756b6911310a0deb1bafba46c0 (patch)
treeae18654c49ab6afd5454d57caad4a48151691171 /config
parent35656951c896281a1ca581fdc63daecb1681a2d4 (diff)
downloadbfs-8f5ce115d51d31756b6911310a0deb1bafba46c0.tar.xz
config/cc.sh: Pass all the flags when running the compiler
Diffstat (limited to 'config')
-rwxr-xr-xconfig/cc.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/config/cc.sh b/config/cc.sh
index 04b142a..7e5c0d5 100755
--- a/config/cc.sh
+++ b/config/cc.sh
@@ -5,8 +5,12 @@
# Run the compiler and check if it succeeded
-printf '$ %s' "$XCC" >&2
-printf ' %q' "$@" >&2
-printf ' -o /dev/null\n' >&2
+set -eux
-$XCC "$@" -o /dev/null
+$XCC \
+ $BFS_CPPFLAGS $XCPPFLAGS ${EXTRA_CPPFLAGS:-} \
+ $BFS_CFLAGS $XCFLAGS ${EXTRA_CFLAGS:-} \
+ $XLDFLAGS ${EXTRA_LDFLAGS:-} \
+ "$@" \
+ $XLDLIBS ${EXTRA_LDLIBS:-} $BFS_LDLIBS \
+ -o /dev/null