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

Bill Deegan bill at baddogconsulting.com
Wed Aug 23 12:56:34 EDT 2017


Don't avoid TARGET..

Here's where it's defined:
src/engine/SCons//Tool/cc.py:    env['SHOBJSUFFIX'] = '.os'
src/engine/SCons//Tool/cxx.py:    env['SHOBJSUFFIX'] = '.os'

Will setting the SHOBJSUFFIX in the relevant D tools do the trick?



On Wed, Aug 23, 2017 at 3:37 AM, Russel Winder <russel at winder.org.uk> wrote:

> 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
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170823/93770bdc/attachment.html>


More information about the Scons-dev mailing list