From 34e60816adb0ea8ddb155a454676a99ab225dc8a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 28 Aug 2024 17:31:03 -0400 Subject: 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") --- build/flags-if.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build') 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 -- cgit v1.2.3