httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <>
Subject Different shared ld flags for libhttpd (vs. modules)
Date Tue, 15 Dec 1998 03:56:36 GMT
  I need to pass different linker flags when building libhttpd
as a dynamic library that when linking the modules.  Our linker
has different types of dynamically loadable files.

  That is, libhttpd.dylib (MH_DYLIB format file) wants to be a
dynamic shared library, which can be referenced on the cc command
line as -lhttpd. The linker will put the reference to the file
into the binary so that it gets loaded when the binary launches.

  The modules, however, are built as Mach-O bundles, which are
meant to be loaded via the dyld API (ie. mod_so) at runtime. The
linker treats these fairly differently.

  I'm wondering how people feel about the idea of separating
compile-time libraries and runtime bundles respectively. I think
the diff would be smaller if I made a new name cooresponding to
the library, but I can't think of a name for the library flags
which makes it clear that LDFLAGS_SHLIB isn't it.

  Would this sort of change bother people? Is there a better
strategy (other than complaining about our funky-but-lovable-
once-you-get-to-know-it linker, I mean).

  The goal is to get Apache to use shared_core, which I think might
be useful if we were to want to use some Apache API routines in,
for example, a configuration tool. This also dodges the problem of
having the makefiles not strip all the symbols out of the httpd
binary, since that makes the modules not find the ap_ routines
and die; I use a special flag to strip telling it to strip all
but those symbols.


View raw message