From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796325505; b=bfN4++J+lcHEmJ/uu81vG9gcss4Loy2612r6xCqNLxiPJFsT+NsRYSkXtSBFpYL/4T+t nLHOmPFUGcDlmyAJn6vCvVu7WE/wR/mYksmEdTPNohTOQrjvBgzclZy/4DfYy/u2T5jdo 8gohainzu001kDF/gi53DgGLSCByFkNs1vIiwTq+PWGgFvAnbXBpnXJYwnuEB712N3G8l 7N/GPpADYo6zgPfUIpj14HmV2idhLpI6H4xA0Nu4VnC2jerZMTGd+RPhqX5kYhnHmi8iN ZTOwO6WtpgH27XY7xPR5srTtRyle5+ZYb10QI4CJToknhHJeq+0djM80HjHDW3QAe0g== 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=xr4kclQq4+TPGDgpkTGKluhWXm0M1U108mKLRMQT+K2WbynceqPJ9hRTIEWIzGrUNk1n Rd2HAb1NPjWG7cNjQnN8qvT/x5m1mr8VBc9lYwyI/2GHuQUbzk0gr3gc9DTJw4QEuUfcY dTf2ibObJUL4fEQqiw3XfTf4BwsWBYnqkKjOreL1YWyrl5FXttx9PNVNrIqr5sYTCOQU1 I3PRUarI0Get5wtxakcyOdTdF1KmxYTBNWv0OI2uO9PVQ22HDnSDxARzDUblJ94nyZ6MK H4huAO6ODHCdpuDpwvqRTl48tj5UhboarrhS5iqtCC/SyKikazx7mAb2JxaC9ir+HwA== 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.161.70 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (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 12269606A681 for ; Thu, 3 Dec 2026 19:18:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 12269606A681 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-oo1-f70.google.com with SMTP id 006d021491bc7-71ad06319caso77932eaf.3 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=iC/9Xiwj1S2mg+hpzZcEyi4BiY8l5Pm/EAstQw7inHG9/njPB6mRDFdu1rb2pFH/GO WzHQWMSkVRpZPK60VlitTW5NRNJkhkaX4jHmTX+bp5rtuYYrEpYnxaHVkQkQuCFruAhX NyIdpfm5YCZ7JylRwmZfIItLOnvXBElmMTXdNIyRIqTIRCGW4+5MwvjulPikGF0/Bf+w lVgOurL+QeF0wliUq7igoLXnQYPWskzaj4F3onbnwYlYgHi/OZDMD8kgii+nu+0V0XPE w6c3z6smd1rB5NzN9BRbK48Cnzin4yhZ4bDcUE2vjIpovRnp5QRU7qdahhf4xHmnXZeI MOsw== X-Forwarded-Encrypted: i=1; AL+hErHfw8vjwz56O6nUWgbw3ZguPAavSUXN2ra24CwyWzMzlDwNHhku8y63osO2y19md2GF0bPXPZBVzCQ7mHI=@vger.kernel.org X-Gm-Message-State: APuU4Z/VoWK4HLZowMopHVomNNtOAyoUtLO3MjdJetFtVRoP6pIKy2dO K4B5ikE+Jwfp9YnrZY2X18xrMCNgGWyJjkUWp0LrqqjSEMqFWo7hk9pPtnSCmkm0ybUJfhPlGw= = 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-kernel@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