Deutsch English Français Italiano |
<vnvqq9$2qqi$2@news.muc.de> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: Alan Mackenzie <acm@muc.de> Newsgroups: comp.lang.c Subject: Re: What are GCC's "Standard system directories" on GNU/Linux? Date: Wed, 5 Feb 2025 13:58:33 -0000 (UTC) Organization: muc.de e.V. Message-ID: <vnvqq9$2qqi$2@news.muc.de> References: <vnvik4$2qqi$1@news.muc.de> <slrnvq6ohl.983.dan@djph.net> Injection-Date: Wed, 5 Feb 2025 13:58:33 -0000 (UTC) Injection-Info: news.muc.de; posting-host="news.muc.de:2001:608:1000::2"; logging-data="93010"; mail-complaints-to="news-admin@muc.de" User-Agent: tin/2.6.4-20241224 ("Helmsdale") (FreeBSD/14.2-RELEASE-p1 (amd64)) Bytes: 2442 Lines: 48 Hello, Dan. Dan Purgert <dan@djph.net> wrote: > On 2025-02-05, Alan Mackenzie wrote: >> In the GCC manual, section 3.16 "Options for Directory Search" partially >> describes where, how, and in what order GCC finds #include files when >> compiling. >> >> It's the "partially" bit which is getting on my nerves. The manual >> section contains a priority list for finding #include files, but the >> fifth item just vaguely states: >> >> 5. Standard system directories are scanned. >> >> . Which directories are these? Where is this documented? > It is, as I recall, defined at compile time of gcc. You can get your > system-specific "standard system directories" by running the command: > echo | gcc -xc -E -v - > It'll print out a bunch of stuff, starting off with the compile-time > options that were used when compiling gcc itself. The bit you're > looking for being listed out under the heading: > #include <...> search starts here: > HTH Thank you indeed! That was extremely helpful, and told me everything I need to know. I'm creating my own version of the linux kernel, and have several application programs to build that must #include files from this version rather than the standard ones. The listing from the command you gave me tells me that <linux/kd.h> will be read from /usr/include/linux/kd.h, and so on. Now I know that, I can amend the Makefiles. > -- > |_|O|_| > |_|_|O| Github: https://github.com/dpurgert > |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- Alan Mackenzie (Nuremberg, Germany).