From Colin McDonald:

"Some makedefs fixes for Solaris:

    For multithreaded applications the -mt option must be specified on both
    the compile and link steps, to ensure correct behaviour.  According to
    the Sun compiler documentation it sets REENTRANT flags in the system
    header files, and links the -lthread library in the correct order.

    When compiling shared libraries the -KPIC option should be specified.
    Although Solaris will handle shared libraries without
    position-independent code there is a performance penalty.  The linker
    reference manual says: 'If a shared object is built from code that is
    not position-independent, the text segment will usually require a large
    number of relocations to be performed at runtime. Although the runtime
    linker is equipped to handle this, the system overhead this creates can
    cause serious performance degradation'."
This commit is contained in:
Robert Osfield 2005-06-24 15:39:29 +00:00
parent e8cc8f06c5
commit f2b4ac179d

View File

@ -185,7 +185,7 @@ ifeq ($(OS),SunOS)
C++ = CC
DEPARG = -xM1
INC +=
DEF += -features=extensions -w
DEF += -features=extensions -w -mt -KPIC
OPTF = -xO4
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
SHARED = -G
@ -198,7 +198,7 @@ ifeq ($(OS),SunOS)
ARCHINST =
endif
OTHER_LIBS = -lCstd -lOpenThreads
LINKARGS =
LINKARGS = -mt
GIF_LIBS = /usr/local/lib/libgif.a
TIFF_LIB = /usr/local/lib/libtiff.a
JPEG_INCLUDE = -I/usr/local/include