www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC2 compiled with MSVC forces object files to end with .obj

reply "Dwhatever" <not real.com> writes:
I use a Visual Studio compiled LDC2 and use it for cross 
compiling ARM targets. I need to use the binutils linker and 
there the default object file extension is .o rather than .obj. 
Is there a possibility for LDC2 to output the default object file 
extension to .o instead of .obj?

Right now I just do a rename in the makefile but it would be nice 
if LDC2 could do this directly.

BTW. The binary version of LDC2 compiled with MSVC on this site 
is compiled as a Debug version. This makes it dependent on 
MSVCP110D.dll which is not provided in the redistributable C++ 
libraries. I've successfully compiled it as Release and it is 
also way faster because the run time checks are disabled. In the 
future, compile it as Release instead.
Dec 21 2013
next sibling parent "Kai Nacke" <kai redstar.de> writes:
On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
 I use a Visual Studio compiled LDC2 and use it for cross 
 compiling ARM targets. I need to use the binutils linker and 
 there the default object file extension is .o rather than .obj. 
 Is there a possibility for LDC2 to output the default object 
 file extension to .o instead of .obj?

 Right now I just do a rename in the makefile but it would be 
 nice if LDC2 could do this directly.
I created an issue for this bug: https://github.com/ldc-developers/ldc/issues/566
 BTW. The binary version of LDC2 compiled with MSVC on this site 
 is compiled as a Debug version. This makes it dependent on 
 MSVCP110D.dll which is not provided in the redistributable C++ 
 libraries. I've successfully compiled it as Release and it is 
 also way faster because the run time checks are disabled. In 
 the future, compile it as Release instead.
Well, I will do this when I create an official release. For now, the binaries are provided "as-is" because there are still problems. Nevertheless, if you find bugs in the MSVC version please report them! Regards, Kai
Jan 01 2014
prev sibling parent reply "Kai Nacke" <kai redstar.de> writes:
On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
 I use a Visual Studio compiled LDC2 and use it for cross 
 compiling ARM targets. I need to use the binutils linker and 
 there the default object file extension is .o rather than .obj. 
 Is there a possibility for LDC2 to output the default object 
 file extension to .o instead of .obj?
You can set a target triple: -mtriple=arm-linux. Then the file extension .o is used. Regards, Kai
Jan 02 2014
parent "Dwhatever" <not real.com> writes:
On Thursday, 2 January 2014 at 16:28:01 UTC, Kai Nacke wrote:
 On Saturday, 21 December 2013 at 14:31:25 UTC, Dwhatever wrote:
 I use a Visual Studio compiled LDC2 and use it for cross 
 compiling ARM targets. I need to use the binutils linker and 
 there the default object file extension is .o rather than 
 .obj. Is there a possibility for LDC2 to output the default 
 object file extension to .o instead of .obj?
You can set a target triple: -mtriple=arm-linux. Then the file extension .o is used. Regards, Kai
Thanks, that seems to do the trick.
Jan 02 2014