From: Dima Sorkin <dima.sorkin@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: makefile generation with gcc
Date: Sun, 01 Jan 2006 11:39:00 -0000 [thread overview]
Message-ID: <e40293600601010339x22ffa7f1qd328594b8d0768e2@mail.gmail.com> (raw)
Hi.
This change of gcc4 vs gcc3 makes some problems for me:
gcc3: with -MM -MP: missing header files are ignored.
gcc4: with -MM -MP: if some header file not found - it results in error.
with -MM -MP -MG: all names of missing headers are written as is.
I want to auto-generate dependencies between my header-files.
Some of my header files include headers from external libraries of huge size
(for example "BOOST C++ lib").
gcc4 -MM -MP:
1) If I give to gcc4 only the paths to my headers' locations (with -I option),
it does not find headers from external libs, which results in error.
I tried the "gcc4 -MM -MP -MG", but there is another problem:
2) gcc4 adds phony targets for missing headers too. When running "make",
"make" does not find these targets (as they are also not on it's path),
so it decides to update them (by empty rule). This, on each "make" invocation,
results in recompilation of the whole project, as "missing" headers become
more "updated" then all real targets in makefile.
3) If I give to gcc4 also the paths to external libs headers, everything
works just fine. But it results into huge dependency lists - tens of kilobytes
and more per ".o" target, as it writes amounts of "external" headers into the
makefile.
Is there a way to cause gcc4 ignore missing headers like the gcc3 did?
Or other solution ?
Thank you,
Dima.
next reply other threads:[~2006-01-01 11:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-01 11:39 Dima Sorkin [this message]
2006-07-18 14:12 ` Dima Sorkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e40293600601010339x22ffa7f1qd328594b8d0768e2@mail.gmail.com \
--to=dima.sorkin@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).