Re: SCons, D, and shared objects

Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org>
Newsgroups gmane.comp.programming.tools.scons.devel
Message-ID <CAEyG4CFi15S14wOA+jpKNWW02ig=swRNM9T-upYJOy_oi_WtxQ@mail.gmail.com>
Would this apply only to shared objects built from D source code?
Or would it have to apply to all shared object whether built from c/c++ or
D ?



On Wed, Jun 21, 2017 at 3:39 AM, Russel Winder <[email protected]> wrote:

> In the beginning, DMD always created statically linked executables and
> static libraries. Go has gone that route as well. However to interwork
> with C and C++, D has had to embrace shared objects. I had begun to
> hack something together in the dmd, ldc, and gdc tools sometime back.
> Now for SCons 3.0 I'd like to have it working properly. On Linux and
> UNIX with dmd and ldc anyway. OSX and macOS remain a problem for dmd,
> and gdc hasn't really caught up yet.
>
> There is a problem.
>
> The C and C++ tools assume that on Linux for shared libraries creation,
> the objects should have the extension .os instead of .o. The D
> compilers do not accept this, they demand .o extension. So what is the
> problem? SHOBJSUFFIX. This is a global value shared by all tools. The
> default is .o. One of the C or C++ compiler tools sets it to .os. This
> is not a problem for builds that explicitly declare environments and
> limit the tools to D tools – which is what I do for all my builds which
> is why the problem has only recent;y come to light. If you use not
> envronment or a new environment with no tools specification you get all
> the tools and so the extension is forced to .os and all D compilations
> for shared libraries fail.
>
> So my problem is how to incorporate a SHDOBJSUFFIX so as to separate D
> builds to work around this problem. What I need to know is where the
> TARGET symbol is construction so I can create a variant of the default
> for the D tooling. All the compilation commands rely on TARGET and
> SOURCE and TARGET appears always to use SHOBJSUFFIX for shared object
> building.
>
> Sorry about the long explanation. I am hoping that I have just missed
> something very simple, and that someone can tell me what this is – or
> at least point me int he right direction.
>
> --
> Russel.
> ============================================================
> =================
> Dr Russel Winder      t: +44 20 7585 2200   voip:
> sip:[email protected]
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.