D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7678 - Add -cflags switch for DMD that allows passing flags to GCC or ${CC}
Summary: Add -cflags switch for DMD that allows passing flags to GCC or ${CC}
Status: RESOLVED DUPLICATE of issue 17390
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks: 5278
  Show dependency treegraph
 
Reported: 2012-03-09 23:25 UTC by Chad Joan
Modified: 2017-06-09 11:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Chad Joan 2012-03-09 23:25:23 UTC
On Linux and a few other hosts, DMD uses gcc (or whatever is defined in the CC environment variable) to do its linking.  Currently there seems to be no way to pass flags into this C compiler.  

This becomes a problem when you NEED to change the flags passed into that compiler.  The -Llinkerflag, unfortunately, doesn't help here.  An example of this is issue 5278 (http://d.puremagic.com/issues/show_bug.cgi?id=5278).  Without this patch, I would need to go through a lot of hoops just to upgrade my compiler every time.
Comment 1 Chad Joan 2012-03-09 23:34:47 UTC
Pull request:
https://github.com/D-Programming-Language/dmd/pull/794
Comment 2 Martin Nowak 2017-06-09 11:10:51 UTC
Let's go with LDC's -Xcc switch.

*** This issue has been marked as a duplicate of issue 17390 ***