public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48083] New: DEPENDENCIES_OUTPUT + -no-integrated-cpp produces bad dependencies
@ 2011-03-12 1:27 cgd at google dot com
2021-08-12 14:04 ` [Bug driver/48083] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: cgd at google dot com @ 2011-03-12 1:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48083
Summary: DEPENDENCIES_OUTPUT + -no-integrated-cpp produces bad
dependencies
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: cgd@google.com
gcc version 4.6.0 20110311 (experimental) (GCC), but I reproduced this all the
way back to 4.2.x.
$ : > null.c
# Hey, we have an empty file!
$ DEPENDENCIES_OUTPUT=/dev/stdout ./gcc -c null.c
null.o: null.c
# Yeah! Those are my deps all right!
$ DEPENDENCIES_OUTPUT=/dev/stdout ./gcc -c null.c -no-integrated-cpp
null.o: null.c
cccUba7s.o: /tmp/cccUba7s.i
# Huh?!?! WHAT?!?!?!
also happens with -save-temps or -traditional-cpp instead of
-no-integrated-cpp.
also happens with SUNPRO_DEPENDENCIES instead of DEPENDENCIES_OUTPUT.
what's happening is that -no-integrate-cpp causes cc1 to be invoked twice:
once with the original source file,
and once with the .i file output by the first invocation.
While the second invocation would have such as -MMD stripped, it still have has
the DEPENDENCIES_OUTPUT or SUNPRO_DEPENDENCIES variables set in its
environment.
there's a horrible kludge that can be used to make this work as expected
(strategically insert -MF/dev/null into the second cc1 invocations in
default_compilers), that would be Wrong.
Probably a better solution would be to add a new internal option, to indicate
that the 'stage' of the compilation, and then use that to avoid processing the
env vars.
(I would suggest a new -M option to cancel dependency generation, and then pass
that internally ... but i think that could be really confusing because of the
way gcc handles (or doesn't handle) relative parameter position.)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug driver/48083] DEPENDENCIES_OUTPUT + -no-integrated-cpp produces bad dependencies
2011-03-12 1:27 [Bug c/48083] New: DEPENDENCIES_OUTPUT + -no-integrated-cpp produces bad dependencies cgd at google dot com
@ 2021-08-12 14:04 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-12 14:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48083
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-08-12
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, though I don't know why anyone would use -no-integrated-cpp these
days anyways.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-12 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-12 1:27 [Bug c/48083] New: DEPENDENCIES_OUTPUT + -no-integrated-cpp produces bad dependencies cgd at google dot com
2021-08-12 14:04 ` [Bug driver/48083] " pinskia at gcc dot gnu.org
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).