Making kpatch-build compatible with custom gcc names

After changing the gcc name in a linux tree to gcc72, kpatch-build failed to
produce hotpatches with the error message "ERROR: no changed objects found."

This is due to a wrapper script called kpatch-gcc, called while kpatch-build
builds the kernel, which checks if the compiler name matches exactly gcc,
failing the check when comparing to gcc72, and thus not producing the expected
file changed_objs containing the list of changed objects.

This commit fixes this issue by loosening the check on the gcc name.

Signed-off-by: Bruno Loreto <loretob@amazon.com>
Reviewed-by: Bjoern Doebel <doebel@amazon.com>
Reviewed-by: Amit Shah <aams@amazon.com>
Reviewed-by: Pawel Wieczorkiewicz <wipawel@amazon.com>
This commit is contained in:
Bruno Loreto 2019-05-09 19:15:11 +02:00
parent 19c7564242
commit 4c40c3ff4b
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ fi
declare -a args=("$@")
if [[ "$TOOLCHAINCMD" = "gcc" ]] ; then
if [[ "$TOOLCHAINCMD" =~ "gcc" ]] ; then
while [ "$#" -gt 0 ]; do
if [ "$1" = "-o" ]; then
obj="$2"