summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2005-05-10 23:17:04 +0000
committerRob Crittenden <rcritten@redhat.com>2005-05-10 23:17:04 +0000
commitb03fcfc5fb3fa876b7ef4be45d90868b8f6e6def (patch)
treee082ba7d6108634404e6702994eab622cf4ca39e
parentb95f9a9277761ecdd25b48314efd1e3797dc3b13 (diff)
downloadds-b03fcfc5fb3fa876b7ef4be45d90868b8f6e6def.tar.gz
ds-b03fcfc5fb3fa876b7ef4be45d90868b8f6e6def.tar.xz
ds-b03fcfc5fb3fa876b7ef4be45d90868b8f6e6def.zip
Changes so DS can be built with gcc on Solaris.
Pass these build variables to gmake: NO_MDUPDATE=1 NS_USE_GCC=1
-rw-r--r--httpd/src/unixso.mk4
-rw-r--r--ldap/nsldap.mk8
-rw-r--r--ldap/servers/slapd/libmakefile7
-rw-r--r--lib/base/dnsdmain.cpp2
-rw-r--r--nsconfig.mk15
5 files changed, 34 insertions, 2 deletions
diff --git a/httpd/src/unixso.mk b/httpd/src/unixso.mk
index 8c0c4661..5dccb206 100644
--- a/httpd/src/unixso.mk
+++ b/httpd/src/unixso.mk
@@ -62,8 +62,12 @@ SOLINK2=$(SOLINK)
endif
ifeq ($(ARCH), SOLARIS)
+ifdef NS_USE_NATIVE
DLL_LDFLAGS += -h $(SONAME)
EXTRA_LIBS += -R .:../../lib:../../bin/https:../../plugins/java/bin:../wai/lib
+else
+EXTRA_LIBS += -Wl,-R,.:../../lib:../../bin/https:../../plugins/java/bin:../wai/lib
+endif
ADM_EXTRA = $(GCCLIB)
endif
diff --git a/ldap/nsldap.mk b/ldap/nsldap.mk
index e3ad1286..6e681f70 100644
--- a/ldap/nsldap.mk
+++ b/ldap/nsldap.mk
@@ -955,8 +955,10 @@ PLATFORM=sunos5
# ranlib not needed under SunOS5
RANLIB = true
+ifdef NS_USE_NATIVE
# be explicit about which CC to use
CC=cc -v
+endif
# gie full path to hostname since it may not be in user's path
HOSTNAME=/usr/ucb/hostname
@@ -966,7 +968,11 @@ INSTALL=$(LDAP_SRC)/build/install.sh
# Flags required to cause compiler to generate code suitable for use in
# a shared library.
+ifdef NS_USE_NATIVE
SLCFLAGS= -KPIC
+else
+SLCFLAGS= -fPIC
+endif
# Extra linker options needed when creating shared libraries
DYNALIBS=
@@ -981,7 +987,9 @@ LDRPATHFLAG_PREFIX=-R
# flag to pass to ld to set a shared library's "internal name"
# this is used like this, for example: $(SONAMEFLAG_PREFIX)libldap.so
+ifdef NS_USE_NATIVE
SONAMEFLAG_PREFIX=-h
+endif
THREADS= -DTHREAD_SUNOS5_LWP
PLAT_ADMCFLAGS= -DSVR4 -DSOLARIS
diff --git a/ldap/servers/slapd/libmakefile b/ldap/servers/slapd/libmakefile
index fdc70aeb..e1f6945b 100644
--- a/ldap/servers/slapd/libmakefile
+++ b/ldap/servers/slapd/libmakefile
@@ -149,10 +149,15 @@ endif
ifeq ($(ARCH), SOLARIS)
LINK_DLL += -z defs
# removed -lcx from the following line
-EXTRA_LIBS += -lCstd -lCrun -lm -lw -lc
+EXTRA_LIBS += -lm -lw -lc
+ifdef NS_USE_NATIVE
+EXTRA_LIBS += -lCstd -lCrun
+endif
# with the Forte 6 and later compilers, we must use CC to link
+ifdef NS_USE_NATIVE
LD=CC
endif
+endif
#ifeq ($(ARCH), OSF1)
#DLL_LDFLAGS=-shared -all -error_unresolved -taso -ySVRCORE_RegisterPinObj
diff --git a/lib/base/dnsdmain.cpp b/lib/base/dnsdmain.cpp
index c974c2da..8a2ba133 100644
--- a/lib/base/dnsdmain.cpp
+++ b/lib/base/dnsdmain.cpp
@@ -70,7 +70,7 @@ extern int getdomainname(char *, size_t);
#else
extern int getdomainname(char *, int);
#endif /* Linux */
-#if defined(HPUX) || defined (UnixWare) || defined(Linux) || defined(IRIX6_5)
+#if defined(HPUX) || defined (UnixWare) || defined(Linux) || defined(IRIX6_5) || defined(SOLARIS_GCC)
extern int gethostname (char *name, size_t namelen);
#else
#ifndef AIX
diff --git a/nsconfig.mk b/nsconfig.mk
index ab6c45e2..e8bc8e3b 100644
--- a/nsconfig.mk
+++ b/nsconfig.mk
@@ -1083,15 +1083,27 @@ ifeq ($(ARCH), SOLARIS)
# Therefore no need to separate from catalog server
#
OSVERSION := $(shell uname -r | sed "y/./0/")
+ifndef NS_USE_GCC
NS_USE_NATIVE=1
+else
+CC=gcc
+CXX=g++
+CCC=$(CXX)
+endif
+ifdef NS_USE_NATIVE
CC=cc -v
CXX=CC +w
CCC=$(CXX)
LD=$(CC)
+endif
ARCH_OPT=-xO2
ARCH_CFLAGS=-DSVR4 -D__svr4 -D__svr4__ -D_SVID_GETTOD -DOSVERSION=$(OSVERSION)
ifdef USE_64
+ifdef NS_USE_NATIVE
ARCH_CFLAGS += -xarch=v9
+else
+ ARCH_CFLAGS += -m64
+endif
endif
ARCH_DEBUG=-g
RANLIB=true
@@ -1108,6 +1120,9 @@ NLIST=-lelf
VERITY_ARCH=_solaris
NSPR_DEFINES += -DNSPR20 -D_PR_NTHREAD -D_REENTRANT
PEER_ARCH=solaris
+ifndef NS_USE_NATIVE
+NSPR_DEFINES += -DSOLARIS_GCC
+endif
# XXXrobm BARF
# ifeq ($(NSOS_RELEASE), 5.3)