summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-08-28 17:31:03 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-08-28 17:31:03 -0400
commit34e60816adb0ea8ddb155a454676a99ab225dc8a (patch)
treede7b309feae7e452caa210f63c69ae7be388b39a
parentc125f8071b42142fc4f072b7222ace75bdadd726 (diff)
downloadbfs-34e60816adb0ea8ddb155a454676a99ab225dc8a.tar.xz
build/flags-if: Fix sed expression on BSD
`p` needs a terminating semicolon; otherwise we get sed: 1: "\|^///|{s|^/// ||; s|[^ ...": extra characters at the end of p command Fixes: 3552b79 ("build/flags: Infrastructure to detect compiler flag support")
-rwxr-xr-xbuild/flags-if.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/flags-if.sh b/build/flags-if.sh
index 7de7bbd..76e1c34 100755
--- a/build/flags-if.sh
+++ b/build/flags-if.sh
@@ -8,7 +8,7 @@
set -eu
OLD_FLAGS="$XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS $XLDLIBS"
-NEW_FLAGS=$(sed -n '\|^///|{s|^/// ||; s|[^=]*= ||; p}' "$1")
+NEW_FLAGS=$(sed -n '\|^///|{s|^/// ||; s|[^=]*= ||; p;}' "$1")
build/cc.sh "$@" $NEW_FLAGS || exit 1
# De-duplicate against the existing flags