Skip to content

Commit 34e6081

Browse files
committed
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")
1 parent c125f80 commit 34e6081

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/flags-if.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
set -eu
99

1010
OLD_FLAGS="$XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS $XLDLIBS"
11-
NEW_FLAGS=$(sed -n '\|^///|{s|^/// ||; s|[^=]*= ||; p}' "$1")
11+
NEW_FLAGS=$(sed -n '\|^///|{s|^/// ||; s|[^=]*= ||; p;}' "$1")
1212
build/cc.sh "$@" $NEW_FLAGS || exit 1
1313

1414
# De-duplicate against the existing flags

0 commit comments

Comments
 (0)