summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-19 12:58:16 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-19 13:00:34 -0400
commit9dc954f168e225a8044c99c2b267572ea228c456 (patch)
tree1bd2c41c8ac599aecec47eddc6fbf2acd2020ec2 /config
parent10f665bd0ea6954fce620325aeeecb5e869f7479 (diff)
downloadbfs-9dc954f168e225a8044c99c2b267572ea228c456.tar.xz
config: Don't build config tests with -o /dev/null
macOS doesn't like it, complaining that error: cannot parse the debug map for '/dev/null': The file was not recognized as a valid object file clang: error: dsymutil command failed with exit code 1 (use -v to see invocation) Use a temporary file instead.
Diffstat (limited to 'config')
-rwxr-xr-xconfig/cc.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/cc.sh b/config/cc.sh
index e6883f5..45d51ca 100755
--- a/config/cc.sh
+++ b/config/cc.sh
@@ -5,6 +5,12 @@
# Run the compiler and check if it succeeded
-set -eux
+set -eu
-$XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $XLDLIBS -o /dev/null
+TMP=$(mktemp)
+trap 'rm -f "$TMP"' EXIT
+
+(
+ set -x
+ $XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $XLDLIBS -o "$TMP"
+)