From 55eed57d5271c3b06c5bc549040b213cdcf610fa Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 16 Nov 2018 15:45:15 +0100 Subject: [busybox] only apply Makefile fix if CC is set --- core/modules/busybox/module.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/modules/busybox') diff --git a/core/modules/busybox/module.build b/core/modules/busybox/module.build index e960849f..9214a484 100644 --- a/core/modules/busybox/module.build +++ b/core/modules/busybox/module.build @@ -15,7 +15,10 @@ fetch_source() { if ! grep -q 'suspend.*"no"' "util-linux/rtcwake.c"; then git apply "${MODULE_DIR}/rtcwake-compat.patch" || perror "Could not apply busybox patch for rtcwake compat with util-linux" fi - sed -i -r 's/^CC\s*=\s*(\S)/CC ?= \1/' Makefile || perror "Could not patch Makefile" + # make sure Makefile allows a preset CC + if [ -n "$CC" ]; then + sed -i -r 's/^CC\s*=\s*(\S)/CC ?= \1/' Makefile || perror "Could not patch Makefile" + fi cd .. || perror "cd .. failed" } -- cgit v1.2.3-55-g7522