[Scons-dev] Problematic conflicts between C/C++ and D

Russel Winder russel at winder.org.uk
Wed Aug 23 06:37:52 EDT 2017


Personally I almost never use the default toolset, but use an explicit list of
tools in every project. So it wasn't until recently that a problem, came to
light.

Some of the C and C++ tools (on Linux I'm not sure about macOS, Windows is not
a factor here) force the shared object suffix to .os from .o. This means that
this is enforced in the default toolset. I am not sure if this causes a
problem for any of the other compilers, but it does for dmd and ldc2, but not
gdc. dmd and ldc2 assume the object suffix is always .o and will not accept
.os. 

Since in the default tools set .os is enforced for $TARGET for shared object
objects because of the action of one C/C++ tool, it breaks the ability to
create shared objects from D sources using dmd and ldc2.

The default toolset is clearly GCC oriented, and I guess this is fine. So the
way out of the problem seems to be not to use $TARGET in the dmd and ldc
tools. Does anyone know where $TARGET gets defined so I can cut and paste into
the dmd and ldc tools avoiding the use of the default suffix?


-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170823/0af1cbdd/attachment.pgp>


More information about the Scons-dev mailing list