www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - use dmd for bare metal i386

reply Dmitry Ponyatov <dponyatov gmail.com> writes:
Is dmd able to be forced not include some unneeded information 
into target object files to make bare metal 32-bit code?

Need some samples and build scripts to do it. Or maybe move to 
ldc2 required
Oct 13 2023
next sibling parent Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Friday, 13 October 2023 at 22:14:36 UTC, Dmitry Ponyatov wrote:
 Is dmd able to be forced not include some unneeded information 
 into target object files to make bare metal 32-bit code?

 Need some samples and build scripts to do it. Or maybe move to 
 ldc2 required
You need ldc or gdc
Oct 13 2023
prev sibling parent Adam D Ruppe <destructionator gmail.com> writes:
On Friday, 13 October 2023 at 22:14:36 UTC, Dmitry Ponyatov wrote:
 Is dmd able to be forced not include some unneeded information 
 into target object files to make bare metal 32-bit code?

 Need some samples and build scripts to do it.
Make an empty file called object.d in your build directory then compile with dmd and it won't emit much of anything in there. I've run dmd programs on bare metal x86 many times in the past (but not recently, i have so many other things to do) including for one section of my "D Cookbook" almost ten years ago now (it is easier now than it used to be, back then you had to have something in object.d, now an empty one is mostly permitted)
Oct 13 2023