"Sergei" == Sergei Gavrikov <w3sg@SoftHome.net> writes:
Sergei> RFC: Bart, I desire to know your point on the CDL build
Sergei> rule to archive the Tcl's stuffs. Should it be either a
Sergei> usual eCos libextras.a archive or the separate archive
Sergei> libtcl6.7.a? As I understand in last case the user's
Sergei> makefile(s) should be more complex.
You could build a libtcl6.7.a, the configuration system allows for
that, but in this case I see little point. The main reason for
allowing people to build special libraries is for companies producing
eCos packages that are proprietary software. Such companies may feel
unhappy about mixing their own object files with the standard eCos
ones in a single library. From an engineering perspective and also
from a legal perspective (AFAIK, I am not a lawyer), there is no
rationale for such feelings: at the end of the day the code will all
end up in a single executable image anyway; but explaining this to
management may sometimes be more trouble than it is worth.
However I would expect most if not all of Tcl to go into the default
library libtarget,a, not into libextras.a, to get the maximum benefit
of linker garbage collection (although for a script language
interpreter the linker will not be able to find very much to collect).
That assumes Tcl_Main() will be called explicitly by the application's
main() or by some other application thread. Tcl_Main() will initialize
the Tcl interpreter so that will cause the linker to pull in all the
code that is actually needed, including the C functions that implement
the Tcl primitives. The only reason for putting anything into
libextras.a would be if you planned to start up Tcl automatically in
its own thread via a C++ static constructor or equivalent. That C++
object would normally have to go into libextras.a or the linker is
likely to ignore it.
Bart