zsh-workers
 help / color / mirror / code / Atom feed
* dynamic modules without libzsh.so?
@ 2005-08-23  0:01 Anthony Heading
  2005-08-23  2:52 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Heading @ 2005-08-23  0:01 UTC (permalink / raw)
  To: zsh-workers


Hi,

How does one build the core zsh statically (i.e. with
builtin.o etc as part of the main executable, not in
libzsh-4.2.5.so), while still having zle and zftp
and so on created as loadable modules?

None of the configure invocations I've tried seem
to work, and while config.modules has link=static for
zsh/main that doesn't seem to stop libzsh-($VERSION).so
being built, since this seems to be controlled by
the expansion of Src/Makefile.in.

FWIW, the reason I want to do this is to have a
moveable zsh binary which is not dependent on an
embedded RPATH to the shared lib (and this is on
Solaris 8 where $ORIGIN support is broken).

Thanks

Anthony

PS.  On Solaris with gcc 4 (and I think earlier)
dynamic modules get disabled by default - it's
necessary to set DLLDFLAGS=-shared to override
a default setting of '-G' which doesn't work

This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dynamic modules without libzsh.so?
  2005-08-23  0:01 dynamic modules without libzsh.so? Anthony Heading
@ 2005-08-23  2:52 ` Bart Schaefer
  2005-08-23  3:27   ` Anthony Heading
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2005-08-23  2:52 UTC (permalink / raw)
  To: zsh-workers

On Aug 22,  8:01pm, Anthony Heading wrote:
}
} How does one build the core zsh statically (i.e. with
} builtin.o etc as part of the main executable, not in
} libzsh-4.2.5.so), while still having zle and zftp
} and so on created as loadable modules?

Several (though not all) of the dynamic linking schemes supported by
the zsh build process will not allow runtime-linkable libraries to
make reference to global symbols from a static library.  libzsh-*.so
forms a bridge in those environments, and therefore is always built
as a dynamic shared object unless the _entire_ zsh binary is static.

So the answer is, you can't do it, unless (a) your dynamic linker is
not one of those that requires it to be shared, and (b) you construct
the necessary compile and link commands by hand [or by editing the
zsh build system, which amounts to the same thing].


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: dynamic modules without libzsh.so?
  2005-08-23  2:52 ` Bart Schaefer
@ 2005-08-23  3:27   ` Anthony Heading
  0 siblings, 0 replies; 3+ messages in thread
From: Anthony Heading @ 2005-08-23  3:27 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers


On Tue, Aug 23, 2005 at 02:52:12AM +0000, Bart Schaefer wrote:
> So the answer is, you can't do it, unless (a) your dynamic linker is
> not one of those that requires it to be shared, and (b) you construct
> the necessary compile and link commands by hand [or by editing the
> zsh build system, which amounts to the same thing].

Thanks for the info.  For Solaris, (a) is certainly no problem - 
and maybe fine for any ELF-based system - it's really just a linker
option (-E or --export-dynamic with GNU ld).  I'll hack it manually
for now -  I'd suggest though it would be a nice option to support.

Thanks

Anthony

This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-23  3:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-23  0:01 dynamic modules without libzsh.so? Anthony Heading
2005-08-23  2:52 ` Bart Schaefer
2005-08-23  3:27   ` Anthony Heading

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).