diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-04-19 12:58:16 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-04-19 13:00:34 -0400 |
commit | 9dc954f168e225a8044c99c2b267572ea228c456 (patch) | |
tree | 1bd2c41c8ac599aecec47eddc6fbf2acd2020ec2 | |
parent | 10f665bd0ea6954fce620325aeeecb5e869f7479 (diff) | |
download | bfs-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.
-rwxr-xr-x | config/cc.sh | 10 |
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" +) |