From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3B05F138334 for ; Sat, 23 Mar 2019 09:52:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 584A3E0A43; Sat, 23 Mar 2019 09:52:48 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2FDE4E0A43 for ; Sat, 23 Mar 2019 09:52:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 086A9335CF2 for ; Sat, 23 Mar 2019 09:52:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AFF3958B for ; Sat, 23 Mar 2019 09:52:42 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1553332705.610671453f2a29a453facb500c1e7185ae32ec89.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_compile.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 610671453f2a29a453facb500c1e7185ae32ec89 X-VCS-Branch: master Date: Sat, 23 Mar 2019 09:52:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 313d835a-1bc9-43d3-a5f6-6df9e81f6124 X-Archives-Hash: 7d2324f449344fae1176a4ce990a3c46 commit: 610671453f2a29a453facb500c1e7185ae32ec89 Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Mar 23 08:57:28 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Mar 23 09:18:25 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=61067145 We cannot set new KERNEL_OUTPUTDIR when "make" has already been executed in KERNEL_DIR This would cause build failures. [Link 1] Link 1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v5.0#n1067 Signed-off-by: Thomas Deutschmann gentoo.org> gen_compile.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gen_compile.sh b/gen_compile.sh index 14d059d..5c402c8 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -280,7 +280,24 @@ compile_generic() { esac case "${argstype}" in - kernel|kernelruntask) ARGS="`compile_kernel_args`" ;; + kernel|kernelruntask) + ARGS="`compile_kernel_args`" + if [[ "${ARGS}" = *O=* ]] + then + if [ -f "${KERNEL_DIR}/.config" -o -d "${KERNEL_DIR}/include/config" ] + then + # Kernel's build system doesn't remove all files + # even when "make clean" was called which will cause + # build failures when KERNEL_OUTPUTDIR will change. + # + # See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Makefile?h=v5.0#n1067 for details + error_message="'${KERNEL_DIR}' is tainted and cannot be used" + error_message+=" to compile a kernel with different KERNEL_OUTPUTDIR set." + error_message+=" Please re-install a fresh kernel source!" + gen_die "${error_message}" + fi + fi + ;; utils) ARGS="`compile_utils_args`" ;; *) ARGS="" ;; esac