Browse Source

The correct naming convention for RHEL is
RHEL4_x86_64_gcc3_OPT.OBJ
The makefiles were assuming that if the string 86 was found in uname -m
it should use x86 for the arch. However, it should only do this if
uname -m is not x86_64. Also, for RHEL/Linux, we do not have to add the
NS64TAG just before the _OPT (or _DBG) since it's already in the arch.
Other platforms continue to use the other naming convention. The
default naming convention for the mozilla components is
Linux2.6_x86_64_glibc_PTH_64_OPT.OBJ. I considered using Wan-Teh's
instructions about source builds, but that would cause many changes to
be made to our makefiles, so I just changed the way we calculate the
mozilla OBJDIR name from the regular OBJDIR name. These changes are
pretty much the same for adminutil, setuputil, adminserver, and ldapserver.

For ldapserver, I had to change nsarch (adminserver changed nsarch in a
different way). I also got rid of the 32 bit specific setup stuff. I
assume this was due to 32 bit NES admin server, so we can get rid of
this for the future, because we will have all native 64 bit apps. I also
went ahead and rolled in the gcc4 changes since they are safe for gcc3
as well.

Rich Megginson 20 years ago
parent
commit
7dc6aaa83b
8 changed files with 40 additions and 39 deletions
  1. 2 2
      buildpaths.mk
  2. 1 10
      ldap/Makefile
  3. 7 3
      ldap/cm/Makefile
  4. 1 7
      ldap/cm/newinst/Makefile
  5. 1 1
      ldap/nsldap.mk
  6. 3 3
      ldap/servers/plugins/replication/repl5_replica.c
  7. 10 0
      nsarch
  8. 15 13
      nsconfig.mk

+ 2 - 2
buildpaths.mk

@@ -71,10 +71,10 @@ ifdef MOZILLA_SOURCE_ROOT
   # subdir of mozilla/dist, and their naming convention is different than
   # ours - we need to map ours to theirs
   ifneq (,$(findstring RHEL3,$(NSOBJDIR_NAME)))
-    MOZ_OBJDIR_NAME = $(subst _gcc3_,_glibc_PTH_,$(subst RHEL3,Linux2.4,$(NSOBJDIR_NAME)))
+    MOZ_OBJDIR_NAME = $(subst _gcc3_,_glibc_PTH$(NS64TAG)_,$(subst RHEL3,Linux2.4,$(NSOBJDIR_NAME)))
   else
   ifneq (,$(findstring RHEL4,$(NSOBJDIR_NAME)))
-    MOZ_OBJDIR_NAME = $(subst _gcc3_,_glibc_PTH_,$(subst RHEL4,Linux2.6,$(NSOBJDIR_NAME)))
+    MOZ_OBJDIR_NAME = $(subst _gcc3_,_glibc_PTH$(NS64TAG)_,$(subst RHEL4,Linux2.6,$(NSOBJDIR_NAME)))
   else
     MOZ_OBJDIR_NAME = $(NSOBJDIR_NAME)
   endif

+ 1 - 10
ldap/Makefile

@@ -62,16 +62,7 @@ ifneq ($(ARCH), WINNT)
 	cd systools; $(MAKE) $(MFLAGS) all
 	# new unix installer
 ifeq ($(USE_SETUPUTIL), 1)
-	# passing $(OBJDIR) as ORIGINAL_OBJDIR since USE_64 info is cleaned up
-	# and lost in cm/newinst
-	cd cm/newinst; $(MAKE) $(MFLAGS) ORIGINAL_OBJDIR=$(ABS_OBJDIR) all
-ifeq ($(USE_64),1)
-	# In 64-bit builds, we build the installer 32-bit, which has the side-effect that the uninstaller and ns-update scripts
-	# get copied into the 32-bit output directory by the makefile above. However, we later want to package them and expect
-	# to see them in the 64-bit output directory. So, here we copy them over.
-	$(CP) $(RELDIR_32)/bin/slapd/admin/bin/ns-update $(LDAP_ADMIN_BIN_RELDIR)
-	$(CP) $(RELDIR_32)/bin/slapd/admin/bin/uninstall $(LDAP_ADMIN_BIN_RELDIR)
-endif # USE_64
+	cd cm/newinst; $(MAKE) $(MFLAGS)  all
 endif # USE_SETUPUTIL
 else # not WINNT
 ifeq ($(USE_SETUPUTIL), 1)

+ 7 - 3
ldap/cm/Makefile

@@ -254,11 +254,15 @@ ifeq ($(ARCH), Linux)
 ZIP_FLAGS=-r -T -n .gif
 endif
 
+ifeq ($(ARCH), Linux)
+MAKEARCH=$(ARCH)
+else
 ifeq ($(USE_64), 1)
 MAKEARCH=$(ARCH)64
 else
 MAKEARCH=$(ARCH)
 endif
+endif
 
 PACKAGE_SETUP_LIBS_32=$(subst $(NS64TAG),,$(PACKAGE_SETUP_LIBS))
 
@@ -598,7 +602,7 @@ ifeq ($(USE_SETUPUTIL),1)
 endif
 
 # copy in our product .inf files
-	$(INSTALL) -m 755 $(OBJDIR_32)/*.inf $(INSTDIR)/slapd
+	$(INSTALL) -m 755 $(OBJDIR)/*.inf $(INSTDIR)/slapd
 
 # strip the executables in the optimized build
 ifeq ($(DEBUG), optimize)
@@ -668,10 +672,10 @@ endif
 # do one last check for aix. aix zip doesn't like -r -T 
 	$(ZIP) -T  $(INSTDIR)/slapd/ns$(DIR).zip
 # install the ns-config file into the slapd package directory
-	$(INSTALL) -m 755 $(RELDIR_32)/bin/slapd/admin/bin/ns-config $(INSTDIR)/slapd
+	$(INSTALL) -m 755 $(RELDIR)/bin/slapd/admin/bin/ns-config $(INSTDIR)/slapd
 
 # if we are packaging our own version of the components, we need them during setup too
-	-@for file in $(PACKAGE_SETUP_LIBS_32) ; \
+	-@for file in $(PACKAGE_SETUP_LIBS) ; \
 	do if [ -f $$file ] ; \
 	then $(INSTALL) -m 755 $$file $(INSTDIR)/slapd ; \
 	fi ; \

+ 1 - 7
ldap/cm/newinst/Makefile

@@ -41,12 +41,6 @@
 
 .SUFFIXES: .cc
 
-# We do this to force a 32-bit build of this stuff, even in a 64-bit build 
-# (because we want to avoid various complexities inherenet in having a 64-bit
-# installer rubbing shoulders with other 32-bit stuff at install time).
-COMPONENT_DEPS := 1
-override USE_64=
-
 BUILD_ROOT = ../../..
 LDAP_SRC = ../..
 
@@ -96,7 +90,7 @@ else
 BINS=$(addprefix $(BINDEST)/, $(PROGS))
 endif
 INFO= $(OBJDIR)/$(DIR)
-PATCHINFO= $(ORIGINAL_OBJDIR)/$(DIR)
+PATCHINFO= $(ABS_OBJDIR)/$(DIR)
 
 # Source for staged installation utilities
 INCDIR=$(SETUPUTIL_INCLUDE) -I$(LDAP_SRC)/admin/include -I$(LDAP_SRC)/admin/lib -I$(LDAP_SRC)/admin/src

+ 1 - 1
ldap/nsldap.mk

@@ -1490,7 +1490,7 @@ ifeq ($(ARCH), Linux)
 #
 
 # compiler to use, e.g. CC=cc or CC=gcc
-CC=/usr/bin/gcc -fwritable-strings
+CC=/usr/bin/gcc
 
 # give full path to hostname since it may not be in user's path
 HOSTNAME=/bin/hostname

+ 3 - 3
ldap/servers/plugins/replication/repl5_replica.c

@@ -108,9 +108,9 @@ static void _replica_update_state (time_t when, void *arg);
 static char * _replica_get_config_dn (const Slapi_DN *root);
 static char * _replica_type_as_string (const Replica *r);
 /* DBDB, I think this is probably bogus : */
-int replica_create_ruv_tombstone(Replica *r);
-void assign_csn_callback(const CSN *csn, void *data);
-void abort_csn_callback(const CSN *csn, void *data);
+static int replica_create_ruv_tombstone(Replica *r);
+static void assign_csn_callback(const CSN *csn, void *data);
+static void abort_csn_callback(const CSN *csn, void *data);
 static void eq_cb_reap_tombstones(time_t when, void *arg);
 static CSN *_replica_get_purge_csn_nolock (const Replica *r);
 static void replica_get_referrals_nolock (const Replica *r, char ***referrals);

+ 10 - 0
nsarch

@@ -607,6 +607,16 @@ EOF
 	  fi
           ns_printf
           exit 0
+	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_x86_64"; then
+	  #echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
+	  GNU_NAME="${UNAME_MACHINE}-unknown-linux"
+          NS_NAME="${UNAME_SYSTEM}"
+          NS_RELEASE="${UNAME_RELEASE}"
+	  if echo "$NS_RELEASE" | grep >/dev/null 2>&1 "2.0."; then
+		NS_RELEASE="2.0"
+	  fi
+          ns_printf
+          exit 0
 	elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
 	  #echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
 	  GNU_NAME="${UNAME_MACHINE}-unknown-linuxaout"

+ 15 - 13
nsconfig.mk

@@ -256,8 +256,10 @@ endif
 
 NSOS_TEST1       := $(shell uname -m)
 ifeq ($(NSOS_ARCH),Linux)
-  ifeq (86,$(findstring 86,$(NSOS_TEST1)))
-    NSOS_TEST1    = x86
+  ifneq (x86_64, $(NSOS_TEST1))
+    ifeq (86,$(findstring 86,$(NSOS_TEST1)))
+      NSOS_TEST1    = x86
+    endif
   endif
 
   ifeq ($(USE_LIBC),1)
@@ -273,8 +275,10 @@ ifeq ($(NSOS_ARCH),Linux)
   NSCONFIG_NOTAG  = $(NSCONFIG)
 else
   ifeq ($(NSOS_ARCH),RHEL)
-    ifeq (86,$(findstring 86,$(NSOS_TEST1)))
-      NSOS_TEST1    = x86
+    ifneq (x86_64, $(NSOS_TEST1))
+      ifeq (86,$(findstring 86,$(NSOS_TEST1)))
+        NSOS_TEST1    = x86
+      endif
     endif
     NSCONFIG        = $(NSOS_ARCH)$(NSOS_RELEASE)_$(NSOS_TEST1)_$(GCC_VERSION)
     NSCONFIG_NOTAG  = $(NSCONFIG)
@@ -297,6 +301,8 @@ else
       NSCONFIG_NOTAG   = $(NSOS_ARCH)$(NSOS_RELEASE_NOTAG)
     endif
     endif
+    NSCONFIG += $(NS64TAG)
+    NSCONFIG_NOTAG += $(NS64TAG)
   endif
 endif
 
@@ -337,13 +343,9 @@ ifeq ($(NSOS_ARCH),WINNT)
     NSOBJDIR_NAME_32     = $(NSCONFIG)$(NSOBJDIR_TAG).OBJ
   endif
 else
-  NSOBJDIR_NAME     = $(NSCONFIG)$(NS64TAG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAME_32  = $(NSCONFIG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAME1    = $(NSCONFIG)$(NS64TAG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAMEeh   = $(NSCONFIG)_eh$(NS64TAG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAMEaCC   = $(NSCONFIG)$(NS64TAG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAME_NOTAG = $(NSCONFIG_NOTAG)$(NS64TAG)$(NSOBJDIR_TAG).OBJ
-  NSOBJDIR_NAME1_NOTAG = $(NSCONFIG_NOTAG)$(NS64TAG)$(NSOBJDIR_TAG).OBJ
+  NSOBJDIR_NAME     = $(NSCONFIG)$(NSOBJDIR_TAG).OBJ
+  NSOBJDIR_NAME_32  = $(subst $(NS64TAG),,$(NSOBJDIR_NAME))
+  NSOBJDIR_NAME1    = $(NSOBJDIR_NAME)
 endif
 
 
@@ -667,8 +669,8 @@ export NO_DB2=1
 else 
 ifeq ($(ARCH), Linux)
 OSVERSION	:= $(basename $(shell uname -r))
-CC=/usr/bin/gcc -fwritable-strings
-CXX=/usr/bin/g++ -fwritable-strings
+CC=/usr/bin/gcc
+CXX=/usr/bin/g++
 CCC=$(CXX)
 LD=$(CXX)
 ARCH_DEBUG=-g