[Issue 7044] Missing a way to control the order of arguments passed to the linker makes impossible to link some programs

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 29 07:57:16 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=7044



--- Comment #20 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2013-05-29 07:57:15 PDT ---
(In reply to comment #19)
> (In reply to comment #18)
> > (In reply to comment #17)
> > > I don't agree with this, because you need to change a whole set of flags
> > > depending on which runtime you are using. -L-l is just not good enough.
> > > 
> > True, but that's not what the compiler does at the moment.
> > 
> > > This will fix the debug vs. normal runtime, true, but it doesn't help to
> > > *easily* use a different runtime library, you have to mess with the config
> > > file, but I want a way to do it from the command line, so it can be integrated
> > > in the build system.
> > 
> > [Environment-tango-X86_64]
> > ...
> > 
> > dmd -m64 -version=tango ...
> 
> Mmmm, I don't like the idea of having to mess with the config file, but since
> you can actually create one even in your home, I think I ran out of technical
> arguments, so my only objection about that solution is purely aesthetic.
> 
> Summary: I'm sold.

Well, not a 100% really. How are you parsing/planning to parse this?
---
[Environment]
DFLAGS=-w -g

[Environment-X86]
DFLAGS+=-L-L/usr/lib32

[Environment-X86_64]
DFLAGS+=-L-L/usr/lib64

[Environment-release]
DFLAGS+=-L-lphobos

[Environment-debug]
DFLAGS+=-L-lphobos_d

[Environment-linux]
DFLAGS+=-L-lrt -L-lpthread -L-ldl

[Environment-myversion]
DFLAGS=
---

What do I get if I do:
dmd file.d
dmd -release file.d
dmd -debug file.d
?
I think we either need a new section:
---
[Environment-default]
DFLAGS+=-L-lphobos
---
or something (that can't be used in a -version), or a way to *replace* a flag
(the former seems more reasonable).

Or maybe I'm not getting this right.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list