[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
Tue Jan 8 07:44:37 PST 2013


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



--- Comment #6 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2013-01-08 07:44:36 PST ---
Full (slightly updated) proposal:

* Change -defaultlib and -debuglib to accept an arbitrary number of linker
  flags. Example: -defaultlib="-lphobos2 -lrt -ldl".

* Remove all linker flags from DMD that are not strictly needed by the compiler
  generated code (i.e. all the linker flags needed only by the runtime).

* Update the sample configuration file to set -defaultlib and -debuglib
  appropriately to make the runtime work.

* Change the order in which options are passed to the linker like this
  (from left to right):

  * Options passed with -L through the command line
  * Options passed with -L through environment variables
  * Libraries specified by pragma(lib)
  * Options passed with -defaultlib/-debuglib (command line option overrides
    environment variables and environment variables override config files)
  * Options needed for the compiler generated code to work (if any)

-- 
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