Skip to content
Snippets Groups Projects
Commit 329d5cb7 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

on linux and fbsd use -pthread option for compiling and linking instead

of -D_REENTRANT and -lpthread.


git-svn-id: http://root.cern.ch/svn/root/trunk@9268 27541ba8-7e3a-0410-8455-c3a389f83636
parent 98a58466
No related branches found
No related tags found
No related merge requests found
// @(#)root/base:$Name: $:$Id: TROOT.cxx,v 1.123 2004/05/15 00:34:22 rdm Exp $
// @(#)root/base:$Name: $:$Id: TROOT.cxx,v 1.124 2004/05/15 07:31:18 brun Exp $
// Author: Rene Brun 08/12/94
/*************************************************************************
......@@ -1371,7 +1371,6 @@ void TROOT::InitThreads()
}
}
//______________________________________________________________________________
TClass *TROOT::LoadClass(const char *classname) const
{
......
......@@ -36,7 +36,7 @@ SOFLAGS = -shared -Wl,-soname,
SOEXT = so
# System libraries:
SYSLIBS = -lm -ldl -lpthread $(OSTHREADLIBDIR) $(OSTHREADLIB) -rdynamic
SYSLIBS = -lm -ldl $(OSTHREADLIBDIR) $(OSTHREADLIB) -rdynamic
XLIBS = $(XPMLIBDIR) $(XPMLIB) $(X11LIBDIR) -lX11
CILIBS = -lm -ldl -rdynamic
CRYPTLIBS = -lcrypt
......
# @(#)root/config:$Name: $:$Id: rootrc.in,v 1.72 2004/05/18 11:32:49 rdm Exp $
# @(#)root/config:$Name: $:$Id: rootrc.in,v 1.73 2004/05/18 11:56:38 rdm Exp $
# Author: Fons Rademakers 22/09/95
# ROOT Environment settings are handled via the class TEnv. To see
......@@ -273,7 +273,6 @@ Plugin.TVirtualX: x11 TGX11 GX11 "TGX11(const char*,con
+Plugin.TVirtualX: win32 TGWin32 Win32 "TGWin32(const char*,const char*)"
+Plugin.TVirtualX: win32gdk TGWin32 Win32gdk "TGWin32(const char*,const char*)"
+Plugin.TVirtualX: qt TGQt GQt "TGQt(const char*,const char*)"
+Plugin.TVirtualX: qtwin32 TQtThread GQt "TQtThread(const char*,const char*)"
Plugin.TGuiFactory: root TRootGuiFactory Gui "TRootGuiFactory()"
+Plugin.TGuiFactory: win32 TWin32GuiFactory Win32 "TWin32GuiFactory()"
+Plugin.TGuiFactory: qt TQtRootGuiFactory QtRoot "TQtRootGuiFactory()"
......
......@@ -899,21 +899,22 @@ fi
# Check for posix thread library
#
case $platform in
linux|macosx)
macosx)
if test "x$enable_thread" = "x"; then
enable_thread="yes"
fi
;;
fbsd)
if test "x$enable_thread" = "xyes"; then
threadlib="-pthread"
threadlibdir=
linux|fbsd)
if test "x$enable_thread" = "x"; then
enable_thread="yes"
threadlib="-pthread"
threadlibdir=
fi
;;
esac
if test "x$enable_thread" = "xyes" && \
test ! "$platform" = "win32" && \
test ! "$platform" = "fbsd" ; then
test "x$threadlib" = "x" ; then
check_library "libpthread" "$enable_shared" "$threadlibdir" \
$THREAD $THREAD/lib /usr/lib /usr/local/lib /usr/lib/X11 \
/usr/local/lib/X11 /usr/X11R6/lib /usr/local/X11R6/lib \
......
......@@ -28,10 +28,24 @@ THREADLIB := $(LPATH)/libThread.$(SOEXT)
# used in the main Makefile
ALLHDRS += $(patsubst $(MODDIRI)/%.h,include/%.h,$(THREADH))
ALLLIBS += $(THREADLIB)
ifeq ($(PLATFORM),linux)
CXXFLAGS += -pthread
CFLAGS += -pthread
CINTCXXFLAGS += -pthread
CINTCFLAGS += -pthread
else
ifeq ($(PLATFORM),fbsd)
CXXFLAGS += -pthread
CFLAGS += -pthread
CINTCXXFLAGS += -pthread
CINTCFLAGS += -pthread
else
CXXFLAGS += -D_REENTRANT
CFLAGS += -D_REENTRANT
CINTCXXFLAGS += -D_REENTRANT
CINTCFLAGS += -D_REENTRANT
endif
endif
# include all dependency files
INCLUDEFILES += $(THREADDEP)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment