summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components.mk12
-rw-r--r--nsconfig.mk37
-rw-r--r--nsdefs.mk25
3 files changed, 55 insertions, 19 deletions
diff --git a/components.mk b/components.mk
index c0ebfbef..807ffb5c 100644
--- a/components.mk
+++ b/components.mk
@@ -189,11 +189,7 @@ NSPR_BUILD_DIR = $(NSCP_DISTDIR_FULL_RTL)/nspr
NSPR_ABS_BUILD_DIR = $(NSCP_ABS_DISTDIR_FULL_RTL)/nspr
NSPR_LIBPATH = $(NSPR_BUILD_DIR)/lib
NSPR_INCLUDE = -I$(NSPR_BUILD_DIR)/include
-ifeq ($(ARCH), Linux)
-NSPR_IMPORT = $(COMPONENTS_DIR)/nspr20/$(NSPR_RELDATE)/RHEL3/$(FULL_RTL_OBJDIR)
-else
NSPR_IMPORT = $(COMPONENTS_DIR)/nspr20/$(NSPR_RELDATE)/$(FULL_RTL_OBJDIR)
-endif
NSPR_LIBS_TO_PKG = $(addsuffix .$(DLL_SUFFIX),$(addprefix $(NSPR_LIBPATH)/lib,$(NSPR_LIBNAMES)))
LIBS_TO_PKG += $(NSPR_LIBS_TO_PKG)
@@ -235,11 +231,7 @@ DBM_BUILD_DIR = $(NSCP_DISTDIR_FULL_RTL)/dbm
DBM_LIBPATH = $(DBM_BUILD_DIR)/lib
DBM_INCDIR = $(DBM_BUILD_DIR)/include
DBM_DEP = $(DBM_LIBPATH)/libdbm.$(LIB_SUFFIX)
-ifeq ($(ARCH), Linux)
-DBM_IMPORT = $(COMPONENTS_DIR)/dbm/$(DBM_RELDATE)/RHEL3/$(NSOBJDIR_NAME)
-else
DBM_IMPORT = $(COMPONENTS_DIR)/dbm/$(DBM_RELDATE)/$(NSOBJDIR_NAME)
-endif
DBM_INCLUDE = -I$(DBM_INCDIR)
DBM_LIBNAMES = dbm
@@ -288,11 +280,7 @@ else
SECURITY_BINNAMES = certutil derdump pp pk12util ssltap modutil shlibsign
endif
SECURITY_LIBNAMES = ssl3 nss3 softokn3
-ifeq ($(ARCH), Linux)
-SECURITY_IMPORT = $(COMPONENTS_DIR)/nss/$(SECURITY_RELDATE)/RHEL3/$(FULL_RTL_OBJDIR)
-else
SECURITY_IMPORT = $(COMPONENTS_DIR)/nss/$(SECURITY_RELDATE)/$(FULL_RTL_OBJDIR)
-endif
SECURITY_LIBNAMES.pkg = $(SECURITY_LIBNAMES)
SECURITY_LIBNAMES.pkg += smime3
diff --git a/nsconfig.mk b/nsconfig.mk
index 294a9984..2afe1cb9 100644
--- a/nsconfig.mk
+++ b/nsconfig.mk
@@ -58,6 +58,24 @@ endif
NSOS_RELEASE := $(shell uname -r)
NSOS_RELEASE_NOTAG = $(NSOS_RELEASE)
+# Check if we're on RHEL
+ifeq ($(NSOS_ARCH), Linux)
+ NSOS_TEST := $(shell cat /etc/redhat-release)
+ ifeq ($(findstring Taroon, $(NSOS_TEST)),Taroon)
+ NSOS_ARCH := RHEL
+ NSOS_RELEASE := 3
+ # Always use gcc on RHEL
+ GCC_VERSION := gcc$(word 1, $(shell gcc --version | sed 's/gcc.*GCC.\s//' | sed 's/\..*//'))
+ else
+ ifeq ( $(findstring Nahant, $(NSOS_TEST)),Nahant)
+ NSOS_ARCH := RHEL
+ NSOS_RELEASE := 4
+ # Always use gcc on RHEL
+ GCC_VERSION := gcc$(word 1, $(shell gcc --version | sed 's/gcc.*GCC.\s//' | sed 's/\..*//'))
+ endif
+ endif
+endif
+
ifeq ($(NSOS_ARCH), AIX)
NSOS_TEST := $(shell uname -v)
ifeq ($(NSOS_TEST),3)
@@ -206,12 +224,20 @@ ifeq ($(NSOS_ARCH),Linux)
NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1)$(LIBC_VERSION)$(PTHREAD_TAG)
NSCONFIG_NOTAG = $(NSCONFIG)
else
- ifeq ($(NSOS_TEST1),i86pc)
- NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1)
- NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)_$(NSOS_TEST1)
+ ifeq ($(NSOS_ARCH),RHEL)
+ ifeq (86,$(findstring 86,$(NSOS_TEST1)))
+ NSOS_TEST1 = x86
+ endif
+ NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1)_$(GCC_VERSION)
+ NSCONFIG_NOTAG = $(NSCONFIG)
else
- NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)
- NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)
+ ifeq ($(NSOS_TEST1),i86pc)
+ NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1)
+ NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)_$(NSOS_TEST1)
+ else
+ NSCONFIG = $(NSOS_ARCH)$(NSOS_RELEASE)
+ NSCONFIG_NOTAG = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)
+ endif
endif
endif
@@ -547,6 +573,7 @@ LINK_DLL=$(CCC) $(DLL_LDFLAGS) -o $@
PEER_ARCH=irix
export NO_DB2=1
+
else
ifeq ($(ARCH), Linux)
OSVERSION := $(basename $(shell uname -r))
diff --git a/nsdefs.mk b/nsdefs.mk
index d2626107..96f627f8 100644
--- a/nsdefs.mk
+++ b/nsdefs.mk
@@ -51,6 +51,18 @@ ifdef USE_64
NS64TAG=_64
endif
+# Check if we're on RHEL
+ifeq ($(BUILD_ARCH), Linux)
+ ARCH_TEST := $(shell cat /etc/redhat-release)
+ ifeq ($(findstring Taroon, $(ARCH_TEST)),Taroon)
+ BUILD_ARCH = RHEL3
+ else
+ ifeq ($(findstring Nahant, $(ARCH_TEST)),Nahant)
+ BUILD_ARCH = RHEL4
+ endif
+ endif
+endif
+
# Should we build Java code on this platform?
ifndef BUILD_JAVA_CODE
ifeq ($(BUILD_ARCH),SOLARIS)
@@ -140,7 +152,11 @@ endef
#
# Set up these names because most of the makefiles use them now.
#
-ARCH=$(BUILD_ARCH)
+ifeq ($(findstring RHEL, $(BUILD_ARCH)), RHEL)
+ ARCH = Linux
+else
+ ARCH=$(BUILD_ARCH)
+endif
SECURITY=$(BUILD_SECURITY)
DEBUG=$(BUILD_DEBUG)
B_FORTEZZA=$(BUILD_FORTEZZA)
@@ -185,7 +201,12 @@ ARCHPROCESSOR=$(ARCH)
ifdef INCLUDE_SSL
SSL_PREFIX=-ssl
endif
-NS_BUILD_FLAVOR = $(ARCH)$(NS64TAG)-$(SECURITY)$(SSL_PREFIX)-$(DEBUG)$(RTSUFFIX)-$(BUILD_FORTEZZA)$(BUILD_PTHREADS)-$(DIR)
+ifeq ($(findstring RHEL, $(BUILD_ARCH)), RHEL)
+ NS_BUILD_FLAVOR = $(BUILD_ARCH)$(NS64TAG)-$(SECURITY)$(SSL_PREFIX)-$(DEBUG)$(RTSUFFIX)-$(BUILD_FORTEZZA)$(BUILD_PTHREADS)-$(DIR)
+ ARCHPROCESSOR = $(BUILD_ARCH)
+else
+ NS_BUILD_FLAVOR = $(ARCH)$(NS64TAG)-$(SECURITY)$(SSL_PREFIX)-$(DEBUG)$(RTSUFFIX)-$(BUILD_FORTEZZA)$(BUILD_PTHREADS)-$(DIR)
+endif
NC_BUILD_FLAVOR = $(NSCONFIG)$(NSOBJDIR_TAG).OBJ
ifeq ($(ARCH), WINNT)
ifeq ($(PROCESSOR), ALPHA)