diff options
author | nelsonb%netscape.com <devnull@localhost> | 2005-08-12 01:15:05 +0000 |
---|---|---|
committer | nelsonb%netscape.com <devnull@localhost> | 2005-08-12 01:15:05 +0000 |
commit | 8905d73b1468d5c7f42713cf02cebbb088293c67 (patch) | |
tree | 802ad021a02ed3586e7d2ee7f6eaf1bd237afedf | |
parent | 5da82a7e00f7e08d629ae6cc1e01e8be1993db03 (diff) | |
download | nss-hg-8905d73b1468d5c7f42713cf02cebbb088293c67.tar.gz |
Expand the number of builds that use freebl shared libraries, to include
(initially) all HPUX and all Solaris builds, including the 64-bit
builds which previously did not use freebl shared libs. There is a
problem with shlibsign on HPUX with this checkin. On HACKs branch.
Modified Files: cmd/shlibsign/Makefile lib/freebl/Makefile
lib/freebl/config.mk lib/freebl/loader.c
-rw-r--r-- | security/nss/cmd/shlibsign/Makefile | 27 | ||||
-rw-r--r-- | security/nss/lib/freebl/Makefile | 66 | ||||
-rw-r--r-- | security/nss/lib/freebl/config.mk | 13 | ||||
-rw-r--r-- | security/nss/lib/freebl/loader.c | 27 |
4 files changed, 57 insertions, 76 deletions
diff --git a/security/nss/cmd/shlibsign/Makefile b/security/nss/cmd/shlibsign/Makefile index 83a3cada1..d193d0aef 100644 --- a/security/nss/cmd/shlibsign/Makefile +++ b/security/nss/cmd/shlibsign/Makefile @@ -62,22 +62,27 @@ include ../platlibs.mk # we really should have this driven from a list file made during the normal # NSS build prodecure. # -ifndef USE_64 ifeq ($(OS_TARGET), HP-UX) - ifneq ($(OS_TEST), ia64) - LOADABLE_FREEBL= 1 - endif + ifneq ($(OS_TEST), ia64) + ifdef USE_64 + CHECKFILES += freebl_3.chk + else + CHECKFILES += freebl_32fpu_3.chk freebl_32int_3.chk + endif + endif endif ifeq ($(OS_TARGET), SunOS) - ifeq ($(CPU_ARCH), sparc) - LOADABLE_FREEBL = 1 - endif -endif + ifeq ($(CPU_ARCH), sparc) + ifdef USE_64 + CHECKFILES += freebl_64fpu_3.chk freebl_64int_3.chk + else + CHECKFILES += freebl_32fpu_3.chk freebl_32int_3.chk freebl_32int64_3.chk + endif + else + CHECKFILES += freebl_3.chk + endif endif -ifdef LOADABLE_FREEBL - CHECKFILES += freebl_pure32_3.chk freebl_hybrid_3.chk -endif CHECKLOC=$(addprefix $(DIST)/lib/$(DLL_PREFIX), $(CHECKFILES)) diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile index 2143d9990..09abed5b0 100644 --- a/security/nss/lib/freebl/Makefile +++ b/security/nss/lib/freebl/Makefile @@ -56,27 +56,12 @@ include $(CORE_DEPTH)/coreconf/config.mk GCC_OPTIMIZER = -O3 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -## We have to define this variable now so the right sources are pulled -## from manifest.mn. -## TFM works only with gcc, and we have only tested it on AMD64 so far. -#ifeq ($(CPU_ARCH),x86_64) -#ifdef NS_USE_GCC -# NSS_USE_TFM = 1 -# CSRCS += $(TFM_SRCS) -# OPTIMIZER += $(GCC_OPTIMIZER) -#endif -#endif - ####################################################################### # (4) Include "local" platform-dependent assignments (OPTIONAL). # ####################################################################### -include config.mk -ifdef NSS_USE_TFM -ANSI= -DEFINES += -DNSS_USE_TFM -endif ifdef USE_64 DEFINES += -DNSS_USE_64 @@ -158,14 +143,9 @@ ifeq ($(CPU_ARCH),x86_64) endif endif ifeq ($(CPU_ARCH),x86) -ifndef NSS_USE_TFM ASFILES = mpi_x86.s DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE DEFINES += -DMP_ASSEMBLY_DIV_2DX1D -else - OPTIMIZER = -O3 -fomit-frame-pointer - DEFINES += -DTFM_SSE2 -endif USE_FP_CODE = 1 ifdef BUILD_OPT OPTIMIZER = $(GCC_OPTIMIZER) @@ -354,12 +334,12 @@ vpath %.s $(FREEBL_PARENT)/ecl $(FREEBL_PARENT)/mpi $(FREEBL_PARENT) vpath %.asm $(FREEBL_PARENT)/ecl $(FREEBL_PARENT)/mpi $(FREEBL_PARENT) INCLUDES += -I$(FREEBL_PARENT) -I$(FREEBL_PARENT)/mpi -I$(FREEBL_PARENT)/ecl else -vpath %.h mpi ecl tfm -vpath %.c mpi ecl tfm +vpath %.h mpi ecl +vpath %.c mpi ecl vpath %.S mpi ecl vpath %.s mpi ecl vpath %.asm mpi ecl -INCLUDES += -Impi -Iecl -Itfm +INCLUDES += -Impi -Iecl endif @@ -381,14 +361,6 @@ ECL_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(ECL_USERS:.c=$(OBJ_SUFFIX))) $(ECL_OBJS): $(ECL_HDRS) -ifdef NSS_USE_TFM -TFM_USERS = rsa.c rsa_keygen.c - -TFM_OBJS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(TFM_SRCS:.c=$(OBJ_SUFFIX))) -TFM_OBJS += $(addprefix $(OBJDIR)/$(PROG_PREFIX), $(TFM_USERS:.c=$(OBJ_SUFFIX))) - -$(TFM_OBJS): $(TFM_HDRS) -endif $(OBJDIR)/$(PROG_PREFIX)mpprime$(OBJ_SUFFIX): primes.c @@ -514,28 +486,26 @@ libs:: $(ABI64_INT_DIR) $(ABI64_INT_FILES) endif endif -################### Single 64-bit ABI stuff ######################### -ifeq ($(OS_TARGET),SunOS) -ifneq ($(CPU_ARCH),sparc) -ABI64_INT_DIR = $(OBJDIR)/$(OS_TARGET)_ABI64_INT -ABI64_INT_FILES = $(addprefix $(ABI64_INT_DIR)/, $(FILES2LN)) -ALL_TRASH += $(ABI64_INT_DIR) +endif # 32b or 64b recursive builds -$(ABI64_INT_DIR): - -mkdir $(ABI64_INT_DIR) - -ln -s $(CDDIR)/mpi $(ABI64_INT_DIR) +ifdef FREEBL_BUILD_SINGLE_SHLIB +################### Single ABI stuff ######################### +SINGLE_SHLIB_DIR = $(OBJDIR)/$(OS_TARGET)_SINGLE_SHLIB +SINGLE_SHLIB_FILES = $(addprefix $(SINGLE_SHLIB_DIR)/, $(FILES2LN)) +ALL_TRASH += $(SINGLE_SHLIB_DIR) -$(ABI64_INT_FILES) : $(ABI64_INT_DIR)/% : % - ln -s $(CDDIR)/$* $(ABI64_INT_DIR) +$(SINGLE_SHLIB_DIR): + -mkdir $(SINGLE_SHLIB_DIR) + -ln -s $(CDDIR)/mpi $(SINGLE_SHLIB_DIR) -libs:: $(ABI64_INT_DIR) $(ABI64_INT_FILES) - cd $(ABI64_INT_DIR) && $(MAKE) FREEBL_RECURSIVE_BUILD=1 \ +$(SINGLE_SHLIB_FILES) : $(SINGLE_SHLIB_DIR)/% : % + ln -s $(CDDIR)/$* $(SINGLE_SHLIB_DIR) + +libs:: $(SINGLE_SHLIB_DIR) $(SINGLE_SHLIB_FILES) + cd $(SINGLE_SHLIB_DIR) && $(MAKE) FREEBL_RECURSIVE_BUILD=1 \ FREEBL_PARENT=$(CDDIR) CORE_DEPTH=$(CDDIR)/$(CORE_DEPTH) libs -endif -endif ######################## common stuff ######################### - -endif # 32b or 64b recursive builds +endif release_md:: $(libs) diff --git a/security/nss/lib/freebl/config.mk b/security/nss/lib/freebl/config.mk index 8c6f775f2..67cf1dc5e 100644 --- a/security/nss/lib/freebl/config.mk +++ b/security/nss/lib/freebl/config.mk @@ -40,19 +40,18 @@ ifndef FREEBL_RECURSIVE_BUILD ifeq ($(OS_TARGET), HP-UX) ifneq ($(OS_TEST), ia64) - ifndef USE_64 - FREEBL_EXTENDED_BUILD = 1 + FREEBL_EXTENDED_BUILD = 1 + ifdef USE_64 + FREEBL_BUILD_SINGLE_SHLIB = 1 endif endif endif ifeq ($(OS_TARGET),SunOS) - ifeq ($(CPU_ARCH),sparc) - FREEBL_EXTENDED_BUILD = 1 - endif - ifeq ($(USE_64),1) FREEBL_EXTENDED_BUILD = 1 - endif + ifneq ($(CPU_ARCH),sparc) + FREEBL_BUILD_SINGLE_SHLIB = 1 + endif endif ifdef FREEBL_EXTENDED_BUILD diff --git a/security/nss/lib/freebl/loader.c b/security/nss/lib/freebl/loader.c index 423325544..ee9cace18 100644 --- a/security/nss/lib/freebl/loader.c +++ b/security/nss/lib/freebl/loader.c @@ -44,6 +44,18 @@ #include "prerror.h" #include "prinit.h" +static const char default_name[] = { +#if defined(XP_WIN) || defined(_WINDOWS) || defined(_WIN32_WCE) + "freebl_3.dll" +#elif defined( AIX ) + "libfreebl_3_shr.a" +#elif defined( HPUX ) + "libfreebl_3.sl" +#else + "libfreebl_3.so" +#endif +}; + /* getLibName() returns the name of the library to load. */ #if defined(SOLARIS) @@ -51,9 +63,10 @@ #include <strings.h> #include <sys/systeminfo.h> + #if defined(__x86_64__) || defined(__x86_64) -static const char * getLibName(void) { return "libfreebl_3.so"; } +static const char * getLibName(void) { return default_name; } #else #if defined(NSS_USE_64) @@ -107,7 +120,7 @@ getLibName(void) } #endif /* x86_64 Solaris */ -#elif defined(HPUX) +#elif defined(HPUX) && !defined(NSS_USE_64) /* This code tests to see if we're running on a PA2.x CPU. ** It returns true (1) if so, and false (0) otherwise. */ @@ -119,15 +132,9 @@ getLibName(void) ? "libfreebl_abi32_fpu_3.sl" : "libfreebl_abi32_int32_3.sl" ; } - - #else - -static const char * -getLibName(void) -{ - return "libfreebl_3.sl"; -} +/* default case, for platforms/ABIs that have only one freebl shared lib. */ +static const char * getLibName(void) { return default_name; } #endif /* |