From f2b4ac179d1bc41241eebd6e3217fa5f8cd1cae9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 24 Jun 2005 15:39:29 +0000 Subject: [PATCH] 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'." --- Make/makedefs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Make/makedefs b/Make/makedefs index 13193a89d..6c8f638a2 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -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