D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3627 - -of with a filename with a double extension confuses linker
Summary: -of with a filename with a double extension confuses linker
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: patch
: 2886 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-12-17 12:29 UTC by Vladimir Panteleev
Modified: 2014-02-24 15:30 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch (683 bytes, patch)
2009-12-17 12:29 UTC, Vladimir Panteleev
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Vladimir Panteleev 2009-12-17 12:29:27 UTC
Created attachment 526 [details]
Proposed patch

Starting with DMD 1.030, DMD will create object files using the base filename
specified in -of. If the filename specified in -of has a double extension (for
example, main_02.d.exe), DMD will attempt to pass to the linker only
"main_02.d", omitting the ".obj" extension. However, the linker will notice
that the suppled filename already has an extension, and tries to open
"main_02.d" instead of "main_02.d.obj".

This problem currently breaks DStress, at least on Windows.

The attached patch checks for double extensions when constructing the linker
argument list, and passes through the full file name in those cases.
Comment 1 Don 2010-09-02 01:38:18 UTC
*** Issue 2886 has been marked as a duplicate of this issue. ***
Comment 2 Walter Bright 2010-09-11 18:35:13 UTC
http://www.dsource.org/projects/dmd/changeset/676 and 677