Bugs item #458583, was opened at 2001-09-04 17:48
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=458583&group_id=3152

Category: Architecture: Server (nsd)
Group: aolserver3_4
Status: Open
Resolution: None
Priority: 5
Submitted By: Adam Zell (zellster)
Assigned to: Nobody/Anonymous (nobody)
Summary: incorrect build flags for SunPro cc

Initial Comment:
>From Sun's cc man page:

...
-mt  Passes D_REENTRANT to preprocessor. Appends
-lthread after all other user-specified libraries on
the command line.  If you are doing your own
multithread coding, you must use this option in the
compile and link steps. To obtain faster execution,
this option requires a multiprocessor system. On a
single-processor system, the resulting executable
usually runs more slowly with this option.
...

Modified Makefile.global to always pass -mt to compiler
   and linker.

Index: include/Makefile.global
===================================================================
RCS file:
/cvsroot/aolserver/aolserver/include/Makefile.global,v
retrieving revision 1.26.2.5
diff -c -r1.26.2.5 Makefile.global
*** include/Makefile.global     2001/05/17 22:44:03     1.26.2.5
--- include/Makefile.global     2001/09/05 00:46:22
***************
*** 107,115 ****
          CC=$(PURIFY) /opt/SUNWspro/bin/cc
          #CCOPTIMIZE = -x02
          CCOPTIMIZE = -g
!         CFLAGS+=$(CCOPTIMIZE) -KPIC -erroff=%none
!         LD=/usr/ccs/bin/ld
!         LDSO=$(LD) -G
          ifneq (,$(findstring sparc,$(PLAT)))
              CFLAGS+=-xarch=v8plusa
          else
--- 107,115 ----
          CC=$(PURIFY) /opt/SUNWspro/bin/cc
          #CCOPTIMIZE = -x02
          CCOPTIMIZE = -g
!         CFLAGS+=$(CCOPTIMIZE) -KPIC -erroff=%none -mt
!         LDFLAGS+=-mt
!         LDSO=$(CC) -G -mt
          ifneq (,$(findstring sparc,$(PLAT)))
              CFLAGS+=-xarch=v8plusa
          else
***************
*** 124,130 ****
      endif

      NSDLIBS=-lm
!     LIBS+=-lsocket -lnsl -ldl -lposix4 -lthread
-lresolv -R $(RPATH)
      AR=/usr/ccs/bin/ar
      CFLAGS+=-D_POSIX_PTHREAD_SEMANTICS=1
-DUSE_PTHREAD_SYSSCOPE=1 \
              -DUSE_PTHREAD_PSHARED=1 -DHAVE_ETIME_BUG=1 \
--- 124,130 ----
      endif

      NSDLIBS=-lm
!     LIBS+=-lsocket -lnsl -ldl -lposix4 -lpthread
-lresolv -R $(RPATH)
      AR=/usr/ccs/bin/ar
      CFLAGS+=-D_POSIX_PTHREAD_SEMANTICS=1
-DUSE_PTHREAD_SYSSCOPE=1 \
              -DUSE_PTHREAD_PSHARED=1 -DHAVE_ETIME_BUG=1 \






----------------------------------------------------------------------

You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=458583&group_id=3152

Reply via email to