From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796325505; b=Ox/mZ6nQW7VQrJnEotXkgqG3+jJD7Cm+ePa7ZEoPWts4JO9ZEZFuFnMnGsbXXh1iR2Cg dmYjPIcVIypt4sFhFSdNUW9p/EoDTCUfU8OL0oij5OpyGEVwxeFT8n3Uj3aPiQ6dfvjVX /HAsIUrrML1b/IE+E4g2UjF5B0dEi1TphQQUNBWsH6jq2Rlu+qi8PgW33QWhZcDSkkMer ewkmdSz1+PgmL7ClQaqcCpXU7AhJ9feDzot6a2PmGEW/5p/ImcIr29UTGq7HkpCCjQpOr tFofOrxn4sg/XRyFyYUlIrX/1pIsAAo9TRytCaNB98nm/ZHhsdF23FKYp6nHv0oQ+9Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796325505; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:Mime-Version: X-Mailer:Message-ID:Subject:From:To:Cc:Content-Type; bh=wF6fEfU7/FAzBEIv/hGC9dKQaC9subpPbeCBbCmKngA=; b=havjoL+455FVjfMx5xkbyEgTtb05BPbANlg3AGG//qJ+U3vk8H2r2yUtvMRStIw4ZoFO njoI87GapEsVDL4id/OwwHK+anEMtWrUlNZCtsvase0EoagDdPKNAl5VnOCwtafrxek5Y CVMfod37f6LNsADlfpBDZqPqxo9S9laAFIXJ0FcDevM64S7GSS7SqBeWkbIcRsXjqnLnc ad6wCB+j0sHBidrOaGuiY+KtjibwxQRVsKnkss+eeQ01pD+eqrrF7arYQug6REXUgOftV BBaJMgmP4saNAs17bJJ+8EYdax1FO+PqdTrd0r9X8RlnAF0zO16SiIj/rF0Gv1Rkv+A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--elsk.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=HomOZPPd; arc=none smtp.remote-ip=209.85.167.200 Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E247606A6A1 for ; Thu, 3 Dec 2026 19:18:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1E247606A6A1 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--elsk.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=HomOZPPd Received: by mail-oi1-f200.google.com with SMTP id 5614622812f47-4dc57e2a3f2so284742b6e.0 for ; Thu, 03 Dec 2026 11:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796325504; x=1796930304; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:mime-version:date:from :to:cc:subject:date:message-id:reply-to:content-type; bh=wF6fEfU7/FAzBEIv/hGC9dKQaC9subpPbeCBbCmKngA=; b=HomOZPPdsc53TItAyBRgs6gUbeyplOjj+V794Unt6KWyldeLag2onE4uT1JjMkU1zN KOab1dchEjJfXZc1EV4ZxFhjQk7Z1oygQZNnof+crJMPEhoIBbZtWBcmYCr4RzbZfWaR A1J8+kJHURMEB3aEMlo6hwH0F5vRliGQGLLvrQU6jCkbq8IB2pa/HP/5dZ49/K7l3ers TargKO9mAcQHqw8uO0xxvdXNdVdP2sMeOWeifK9WDsEvYKvIr5P7Y0km90ckPeOIOR/6 0GVqoQHbzPGPOC8QMSVpIX36C4BMo7lQjewtrp4QPFDpxwJjNCEMgUx/CzpIeOvisZ6s a+FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796325504; x=1796930304; h=content-type:cc:to:from:subject:message-id:mime-version:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=wF6fEfU7/FAzBEIv/hGC9dKQaC9subpPbeCBbCmKngA=; b=qJDqHyRWeXfOEm7EOOhMeNO9WxI6g5Hy8khOenH2+jNnchgJn38xVzJRwe6puhco+0 /vw/jxb8lwZiUDZuOlqVC++1E62DubZBA/g5nQ3/EEsK7TLEo+cOhs/xW0czSc1TjXYl RPTA80s90HV4btcflSP59sVAjQB5miANoVbwHhUpv9lxbx9ljt10UTUetSk6a/g1hZ2C ThTi+nSWNAaep0ynSW9fFJ+22XpIBzmNshopoWkzHbLPXW/RVQm4M6Omw88lKjfWXdr3 4455IEmlDavU2NvNuaPHhpVKWpikpzMZ6ztauMKAgXHYIvt+Pn1UMyEX+mtNFUJykFFP Mn3g== X-Forwarded-Encrypted: i=1; AL+hErGHCtlVeKYtKL6yOXs11nz87QyFg1OmPjqSY6nwA+yf/nqU8gjss6a4axJFeslzOwuXew1Ra0+AxxuSXMc=@vger.kernel.org X-Gm-Message-State: APuU4Z+TTrjih7/YwaIW6UzQeyJEISQWUFU2p8rRyL5BcAkJm6EQyUP7 cKkek5C6KPpB2hrqRSqAA503u9GWVHqLekh2F4LhkppSJI5lcCkDY/rZuOqxs4UEmRHhsbfWqw= = X-Received: from jap26.prod.google.com ([2002:a05:6638:a5a:b0:619:60f2:6a27]) (user=elsk job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:c2d3:20b0:70d:dc1f:8886 with SMTP id 006d021491bc7-71b39528bc8mr29401451eaf.19.1796325503912; Thu, 03 Dec 2026 11:18:23 -0800 (PST) Date: Thu, 3 Dec 2026 19:18:20 +0000 X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 X-Mailer: git-send-email 2.56.1.915.g69d5ec7298-goog Message-ID: <20261203191820.2576904-1-elsk@google.com> Subject: [PATCH] kbuild: serialize scripts after scripts_unifdef From: HONG Yifan To: Nathan Chancellor , Nicolas Schier Cc: Masahiro Yamada , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com, HONG Yifan , stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" When CONFIG_HEADERS_INSTALL is enabled, the prepare target depends on both prepare0 -> archprepare -> scripts and headers -> scripts_unifdef with no ordering between scripts and scripts_unifdef. Both targets invoke $(MAKE) $(build)=scripts concurrently: scripts: $(MAKE) $(build)=scripts scripts_unifdef: $(MAKE) $(build)=scripts scripts/unifdef Because scripts/Makefile lists unifdef in hostprogs, scripts/Makefile.host adds scripts/unifdef to targets, causing scripts/Makefile.build to include scripts/.unifdef.cmd as soon as scripts/unifdef exists. If scripts reads scripts/.unifdef.cmd while scripts_unifdef is still writing it via fixdep, make aborts with: scripts/.unifdef.cmd:1: *** missing separator. Stop. make[2]: *** [Makefile:1400: scripts] Error 2 Make scripts depend on scripts_unifdef under CONFIG_HEADERS_INSTALL so scripts_unifdef finishes before scripts enters scripts/. Keeping the dependency under CONFIG_HEADERS_INSTALL avoids building scripts/unifdef when it is not needed and preserves "make headers" without a .config. Bug triage, instrumented reproduction, and patch drafting were assisted by Gemini. Fixes: e949f4c2d6a3 ("kbuild: add CONFIG_HEADERS_INSTALL and loosen the dependency of samples") Cc: stable@vger.kernel.org Signed-off-by: HONG Yifan --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 5aac6f1b011e..787e041b5d7e 100644 --- a/Makefile +++ b/Makefile @@ -1518,6 +1518,7 @@ endif ifdef CONFIG_HEADERS_INSTALL prepare: headers +scripts: scripts_unifdef endif PHONY += scripts_gen_init_cpio base-commit: 63fdb511c27afcebce797e3db580b3534ddfa639 -- 2.56.1.915.g69d5ec7298-goog