bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82)


From: Eli Zaretskii
Subject: Re: Dynamic objects (was: .ONESEHLL not working as expected in 3.82)
Date: Mon, 29 Apr 2013 22:12:36 +0300

> Date: Mon, 29 Apr 2013 18:19:09 +0100
> From: Tim Murphy <address@hidden>
> Cc: "Paul D. Smith" <address@hidden>, "address@hidden" <address@hidden>
> 
> > 2. The fact that the dynamic object's file extension (.so) is exposed
> >    to the Makefile is unfortunate, because it will hurt portability of
> >    Makefiles: the extension on Windows is .dll.  Can we omit the
> >    extension and append it internally?
> >
> 
> "load" allows one to build the plugin from within the makefile so you have
> to deal with platform specific problems right there.

How can one deal with them?  The underlying OS is not easily
detectable by Make.

In any case, these problems are bets avoided to begin with, rather
than solved when they appear.

> >    . I suggest to request that the buffers for expansions and
> >      evaluation by gmk_expand and gmk_eval be provided by the caller.
> >      It is not safe (and not very convenient) to return buffers
> >      allocated internally by these functions, because the dynamic
> >      object might be compiled/linked with an incompatible
> >      implementation of memory allocation routines.
> >
> 
> Yes!
> 
> IMHO the plugin needs to be able to allocate and deallocate memory in
> "gmakes world" i.e. you need gmk_alloc() and gmk_free().

That could also work, but sometimes will probably be inconvenient.
E.g., you'd need to copy data from a buffer that was already
allocated, just not with Make-compatible allocator.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]