GCC 16, the -MD -MF<file-for-dependencies> is not filled when compilation fails.
Project / Subsystem
gcc / gcc
Date
2026-05-27
Proposer
Basile STARYNKEVITCH <basile@starynkevitch.net>
Source type
public_inbox
Consensus
Proposed
Sentiment
—/10
Technical tradeoffs
- • Requires changes to GCC's internal dependency generation logic.
- • A workaround might involve post-processing the compiler output to extract dependency information.
All attributes
- project
- gcc
- subsystem
- gcc
- patch_id
- —
- discussion_id
- 3d97af6a8549cee2dee2860440dc4954d79aba07.camel@starynkevitch.net
- source_type
- public_inbox
- title
- GCC 16, the -MD -MF<file-for-dependencies> is not filled when compilation fails.
- headline
- GCC 16 doesn't fill -MF dependency file on compilation failure
- tldr
- GCC 16 with -MD -MF doesn't write dependency files when compilation fails; the author seeks a workaround without patching GCC.
- proposer
- Basile STARYNKEVITCH <basile@starynkevitch.net>
- consensus
- Proposed
- outcome
- proposed
- sentiment_score
- —
- technical_tradeoffs
-
- • Requires changes to GCC's internal dependency generation logic.
- • A workaround might involve post-processing the compiler output to extract dependency information.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • gcc
- • makefile
- • dependencies
- • build system
- url
- https://inbox.sourceware.org/gcc/3d97af6a8549cee2dee2860440dc4954d79aba07.camel@starynkevitch.net
- bugzilla_url
- —
- date
- 2026-05-27T00:00:00.000Z
GCC 16, the -MD -MF<file-for-dependencies> is not filled when compilation fails.
Basile Starynkevitch reports that GCC 16.1 doesn’t create or update the dependency file specified by the -MF option when compilation fails. He is looking for a way to ensure the file is populated even when compilation errors occur, as this would aid in debugging complex Makefiles. Without a fix, debugging build systems becomes harder.