From nobody Sun Nov 24 23:34:48 2024 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F31FF1CCB27; Thu, 31 Oct 2024 21:29:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730410191; cv=none; b=FAyDep2sESe/I0RmDtGKBXH7cPU069xSyU4jeuBchpJOAQoxc4QK4tTztvUoY9WtnSbVNkXzj37TkXcVNbP2s9vbSm2f0Vcvx4PBKDe7dNr9WfxjaCRuabSMJqXR+D74vq0FgozAlAK3DQOraiYqftC13vKM1ltYN4hCoC/TOHY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730410191; c=relaxed/simple; bh=owAgnNno4/xN6qOoLGi+tgKmvLVsT8n3b5AkzSBlenk=; h=Date:From:To:Subject:Cc:MIME-Version:Message-ID:Content-Type; b=cPkmmp26F1Ffgv235xKGt4cpcQ033/RPHv87V2P4ztD8n0zOCZz3+ByIEPq8dV/2syD2RHWANl893Oag8ZpXoJDWreRQRz6/j2+DuTi5ZVtcp53X/UmLcX5YifFu2SL2zyTte+8ZLOVZMjV5t4k5BSRtLwQPPjIAc6OkAw+SNV8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vFi5kmaw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EpN49OLf; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vFi5kmaw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EpN49OLf" Date: Thu, 31 Oct 2024 21:29:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730410184; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4sfY5VUQJ3sPQI2tTRxTdQHVhr8gJgnLG63k/oZNhs=; b=vFi5kmawKD6Ivk4f/EuHDKyrPR35+30LBpEBpH248pxx9A+jw5JfdzlzmfKcNApgtwdszU 8oHy/W53GbeK6XfrhuZ/noFn4eGpPV/TFRxhcn3THEgXV4WLTa2QPww3VT3VsYrxp6hE1H 6kel0AKzOb9xYRjB838EOVh8nm9m6Wb5B7dLuevGx8pl9Wgd9N6aj43SehEprwCZO96Jc8 u6bEYyLNUvVeXCZ605FlhHnJTrW6Q0CvCvlIW7Gv6/EfD3DHIsOX7hWShuNiifhE+Ndlj7 bUE9/wC1te7KkFWxXLtT3JNvavWG/jIpAgJhMSL/GMFc4zdPLo6D9hnFwb+jEw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730410184; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4sfY5VUQJ3sPQI2tTRxTdQHVhr8gJgnLG63k/oZNhs=; b=EpN49OLfeSPavMskpUDRLsWV+8m/ELYzhwgIj1AAl5k/GfZ74OMiBxxuAaXAn14z4G4exU Bv8JTbtc7YACXUCg== From: "tip-bot2 for HONG Yifan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] objtool: Also include tools/include/uapi Cc: HONG Yifan , Josh Poimboeuf , x86@kernel.org, linux-kernel@vger.kernel.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <173041018327.3137.9923437774880377307.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the objtool/core branch of tip: Commit-ID: 32b504854bd96f707a03c6ddecb0af9d7fbc4775 Gitweb: https://git.kernel.org/tip/32b504854bd96f707a03c6ddecb0af9d7= fbc4775 Author: HONG Yifan AuthorDate: Tue, 08 Oct 2024 23:47:17=20 Committer: Josh Poimboeuf CommitterDate: Thu, 17 Oct 2024 15:13:06 -07:00 objtool: Also include tools/include/uapi When building objtool against a sysroot that contains a stripped down version of the UAPI headers, the following error happens: In file included from arch/x86/decode.c:10: In file included from .../tools/arch/x86/include/asm/insn.h:10: In file included from /include/asm/byteorder.h:9: In file included from /include/linux/byteorder/little_endian.h= :15: In file included from /include/linux/stddef.h:9: In file included from .../tools/include/linux/compiler_types.h:36: .../tools/include/linux/compiler-gcc.h:3:2: error: "Please don't includ= e directly, include instead." 3 | #error "Please don't include directly, i= nclude instead." | ^ 1 error generated. As hinted by the error, this is because /include/linux/stddef.h (a stripped-down version of uapi/include/linux/stddef.h) includes linux/compiler_types.h directly. However, this gets resolved to tools/include/linux/compiler_types.h, which is not expected to be included directly. To resolve this, I added tools/include/uapi to the include paths when building objtool. With this trick, linux/stddef.h is resolved to tools/include/uapi/linux/stddef.h, which doesn't include linux/compiler_types.h. Signed-off-by: HONG Yifan Signed-off-by: Josh Poimboeuf --- tools/objtool/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index bf7f7f8..f56e277 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -24,6 +24,7 @@ LIBELF_LIBS :=3D $(shell $(HOSTPKG_CONFIG) libelf --libs= 2>/dev/null || echo -lel all: $(OBJTOOL) =20 INCLUDES :=3D -I$(srctree)/tools/include \ + -I$(srctree)/tools/include/uapi \ -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \ -I$(srctree)/tools/arch/$(SRCARCH)/include \ -I$(srctree)/tools/objtool/include \