Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 956DBC433EF for ; Thu, 16 Dec 2021 02:52:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 874C0811A7; Thu, 16 Dec 2021 03:52:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=dooray.com header.i=@dooray.com header.b="hFxNT3zF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D090381423; Thu, 16 Dec 2021 03:51:59 +0100 (CET) Received: from mscreen.etri.re.kr (mscreen.etri.re.kr [129.254.9.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 27CE980F90 for ; Thu, 16 Dec 2021 03:51:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=etri.re.kr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ckim@etri.re.kr Received: from unknown (HELO send002-relay.gov-dooray.com) (211.180.235.153) by 129.254.9.16 with ESMTP; 16 Dec 2021 11:51:48 +0900 X-Original-SENDERIP: 211.180.235.153 X-Original-MAILFROM: ckim@etri.re.kr X-Original-RCPTTO: u-boot@lists.denx.de Received: from [10.162.225.106] (HELO smtp001-imp.gov-dooray.com) ([10.162.225.106]) by send002-relay.gov-dooray.com with SMTP id f67fb9ae61baa9c4; Thu, 16 Dec 2021 11:51:48 +0900 DKIM-Signature: a=rsa-sha256; b=hFxNT3zFZKmDbgERJi6DaAvL5SzLT93g+3o/OhbAmU6+3JkCATb/bsa1BbUQ0KhgjMI3cqi+vw j9SR/GbttIe+JI3IjUjZtxoqvGuqLk5tRgzdoe9ZS7TYp52yQaeTXFcFNbXcOGdPgrq2nsF+E5Fg qRyx5NTr4PujDJpaqQtmN7pWH8DjWDY8nv8vD9kCEI2cqgDeJhV2Ae4i4XezcqguASZMdK5HQ7jf nXxrzfmEeJYN+p1Haj8N5Oq44C8MrtpUnD96ezy2K2oiGrhOrjV/KK4m2UjKbXj8sMc62oHnpvRs uM6jifsmc6tHc4CFgJhUwXSwJmYZOlaiRohkjFYw==; c=relaxed/relaxed; s=selector; d=dooray.com; v=1; bh=htTo4ibMg2o1yPcjkApOsAQmZasTr+jDNdZF6gfcvlU=; h=From:To:Subject:Message-ID; Received: from [129.254.132.39] (HELO CHANKIMPC) ([129.254.132.39]) by smtp001-imp.gov-dooray.com with SMTP id b17754bb61baa9c3; Thu, 16 Dec 2021 11:51:47 +0900 From: "Chan Kim" To: "U-Boot Mailing List" Subject: [question] how is include path selected when compiling a .c file? Date: Thu, 16 Dec 2021 11:51:47 +0900 Message-ID: <065101d7f227$de41a790$9ac4f6b0$@etri.re.kr> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdfyJiuZ7fTFw2WhTt2HD+kbzVlaRQ== Content-Language: ko Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.38 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hello, For example In file arch/arm/cpu/arm1136/mx31/timer.c, I see #include #include #include #include There are 13 files named common.h files and 4405 files doing '#include '. I can guess what file it is including but can't figure out exactly how the default include path (-I cflag ) is set for each .c file. I know the top Makefile has this line. UBOOTINCLUDE := \ -Iinclude \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ $(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \ $(if $(CONFIG_HAS_THUMB2), \ $(if $(CONFIG_CPU_V7M), \ -I$(srctree)/arch/arm/thumb1/include), \ -I$(srctree)/arch/arm/thumb1/include)) \ -I$(srctree)/arch/$(ARCH)/include \ -include $(srctree)/include/linux/kconfig.h And some other lower Makefiles additively add -I option according to the configuration. But still can't figure it out. For example in the above arch/arm/cpu/arm1136/mx31/timer.c file, I guess the #include Is including ./arch/arm/include/asm/arch-mx31/imx-regs.h. Could anyone explain it to me? Thank you! Chan Kim