Alan Coopersmith wrote:
> 
> Arvind Srinivasan wrote:
> > One of the ongoing discussions 
> > (http://mail.opensolaris.org/pipermail/webstack-discuss/2007-August/thread.html#190)
> >  on the webstack-discuss mailing list is about addressing the problem of 
> > concurrent bitness of Apache installations [32- vs. 64- bit]. Specifically, 
> > the issue is about the 'include' and 'build' directories, whose contents 
> > differ depending on whether we built a 32-bit vs. 64-bit server. Downstream 
> > modules need to use the 'include' & 'build' directory that corresponds to 
> > whether they are building a 32-bit vs. 64-bit module.
> >
> > AFAIK, there are no established naming conventions or directory hierarchies 
> > in Solaris, for putting header files and build rules etc for 32-bit vs. 
> > 64-bit in separate directories.
> 
> For include files, the Solaris convention is that you have
> one set of include files for both 32-bit & 64-bit builds,
> and use #ifdef _LP64 in the include files for anything
> that has to be different between the two types of builds.

Depending on the position where the header is included |_LP64| may not
be available.
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/Makefile.asthdr
has the following comment about that issue:
-- snip --
35 # Define the symbol used to distinguish between 32bit and 64bit parts
of the
36 # include file. We cannot use |_LP64| here because not every compiler
(like
37 # Studio 10/11/12) sets it by default (this doesn't harm because the
AST
38 # includes are OS- and platform-specific anyway) and we can't rely on
the
39 # system includes like <sys/isa_defs.h> because "/usr/bin/diff
-D<symbol>"
40 # adds the "#ifdef <symbol>" before any other content and "injecting"
an
41 # "#include <sys/isa_defs.h>" will alter the behaviour of the AST
code
42 # in unpredictable ways (e.g. the resulting code will not longer
work).
43 # Sun-Bug #6524070 ("RFE: Please set |_LP64| for 64bit platforms by
default
44 # (like gcc does)") has been filed against the Sun Studio compiler as
RFE
45 # to set |_LP64| for 64bit targets.
46 # (INTEL_BLD is '#' for a Sparc build and SPARC_BLD is '#' for an
Intel build)
47 $(SPARC_BLD)AST64BITCPPSYMBOL = __sparcv9
48 $(INTEL_BLD)AST64BITCPPSYMBOL = __amd64
-- snip --

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to