Skip to content

Commit

Permalink
PRODKERNEL: strip multiple kpatch-cc prefixes
Browse files Browse the repository at this point in the history
For debugging kpatch-build, cope with a confused state where the
kpatch-cc prefix is applied twice. When stable this should not happen,
and should be complained of. While developing, just peel them off

Tested: with later commits

Upstream-Plan: 190514358
Signed-off-by: Pete Swain <[email protected]>
  • Loading branch information
swine committed Sep 20, 2022
1 parent b99d393 commit 6bd90c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kpatch-build/kpatch-cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ if [[ ${KPATCH_GCC_DEBUG:-0} -ne 0 ]]; then
set -o xtrace
fi

# cope with multiply-prefixed invocation
while [[ "$1" =~ /kpatch-cc$ ]]; do
echo >&2 kpatch-cc: stuttered prefix
shift
done

TOOLCHAINCMD="$1"
shift

Expand Down

0 comments on commit 6bd90c6

Please sign in to comment.