IRIX and Tru64 platform updates [from HEAD].
authorAndy Polyakov <appro@openssl.org>
Sun, 26 Aug 2007 14:57:10 +0000 (14:57 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 26 Aug 2007 14:57:10 +0000 (14:57 +0000)
Configure
Makefile.shared
TABLE
fips/fips.c

index b928c6dd36420833de8bfe5933cb3b26503f7287..7205165826a786e71c72a6f3faae2fad9ec2036b 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -234,10 +234,10 @@ my %table=(
 # Only N32 and N64 ABIs are supported. If you need O32 ABI build, invoke
 # './Configure irix-cc -o32' manually.
 "irix-mips3-gcc","gcc:-mabi=n32 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::MD2_CHAR RC4_INDEX RC4_CHAR RC4_CHUNK_LL DES_UNROLL DES_RISC2 DES_PTR BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"irix-mips3-cc", "cc:-n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::DES_PTR RC4_CHAR RC4_CHUNK_LL DES_RISC2 DES_UNROLL BF_PTR SIXTY_FOUR_BIT::bn-mips3.o::::::::::dlfcn:irix-shared::-n32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 # N64 ABI builds.
 "irix64-mips4-gcc","gcc:-mabi=64 -mips4 -O3 -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-mabi=64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"irix64-mips4-cc", "cc:-64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W::-D_SGI_MP_SOURCE:::RC4_CHAR RC4_CHUNK DES_RISC2 DES_UNROLL SIXTY_FOUR_BIT_LONG::bn-mips3.o::::::::::dlfcn:irix-shared::-64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
 
 #### Unified HP-UX ANSI C configs.
 # Special notes:
index 64e51333a13012c5e078e1ec0b8f2e95480ca770..004e25dfe3237bca5d38a18aeac8f16a75925068 100644 (file)
@@ -284,7 +284,7 @@ link_o.alpha-osf1:
                SHLIB_SOVER=; \
                ALLSYMSFLAGS='-all'; \
                NOALLSYMSFLAGS='-none'; \
-               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared"; \
+               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
                if [ -n "$$SHLIB_HIST" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
                fi; \
@@ -305,7 +305,7 @@ link_a.alpha-osf1:
                SHLIB_SOVER=; \
                ALLSYMSFLAGS='-all'; \
                NOALLSYMSFLAGS='-none'; \
-               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared"; \
+               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-B,symbolic"; \
                if [ -n "$$SHLIB_HIST" ]; then \
                        SHAREDFLAGS="$$SHAREDFLAGS -set_version $$SHLIB_HIST"; \
                fi; \
@@ -428,7 +428,7 @@ link_o.irix:
                ($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
                ALLSYMSFLAGS="$${MINUSWL}-all"; \
                NOALLSYMSFLAGS="$${MINUSWL}-none"; \
-               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
+               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
        fi; \
        $(LINK_SO_O)
 link_a.irix:
@@ -442,7 +442,7 @@ link_a.irix:
                ($(CC) -v 2>&1 | grep gcc) > /dev/null && MINUSWL="-Wl,"; \
                ALLSYMSFLAGS="$${MINUSWL}-all"; \
                NOALLSYMSFLAGS="$${MINUSWL}-none"; \
-               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"; \
+               SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname,$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX,-B,symbolic"; \
        fi; \
        $(LINK_SO_A)
 link_app.irix:
diff --git a/TABLE b/TABLE
index d6b6eeb8ccf2c8f82569e5917b8fc113cf90bf4e..9d9585a551206a7341fda483f64f3b1f7ec0727d 100644 (file)
--- a/TABLE
+++ b/TABLE
@@ -2351,7 +2351,7 @@ $arflags      =
 
 *** irix-mips3-cc
 $cc           = cc
-$cflags       = -n32 -mips3 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
+$cflags       = -n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W
 $unistd       = 
 $thread_cflag = -D_SGI_MP_SOURCE
 $sys_id       = 
@@ -2405,7 +2405,7 @@ $arflags      =
 
 *** irix64-mips4-cc
 $cc           = cc
-$cflags       = -64 -mips4 -O2 -use_readonly_const -DTERMIOS -DB_ENDIAN -DBN_DIV3W
+$cflags       = -64 -mips4 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W
 $unistd       = 
 $thread_cflag = -D_SGI_MP_SOURCE
 $sys_id       = 
index 0518a2e97e7fbbe6dada7f1ad7eb77ad5bc6bceb..2fe800a9cc0ed530b6dff15eaff665ab54ac250e 100644 (file)
@@ -209,7 +209,11 @@ int FIPS_check_incore_fingerprint(void)
     {
     unsigned char sig[EVP_MAX_MD_SIZE];
     unsigned int len;
+#if defined(__sgi) && (defined(__mips) || defined(mips))
+    extern int __dso_displacement[];
+#else
     extern int OPENSSL_NONPIC_relocated;
+#endif
 
     if (FIPS_text_start()==NULL)
        {
@@ -224,7 +228,11 @@ int FIPS_check_incore_fingerprint(void)
        {
        if (FIPS_signature>=FIPS_rodata_start && FIPS_signature<FIPS_rodata_end)
            FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH_SEGMENT_ALIASING);
+#if defined(__sgi) && (defined(__mips) || defined(mips))
+       else if (__dso_displacement!=NULL)
+#else
        else if (OPENSSL_NONPIC_relocated)
+#endif
            FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH_NONPIC_RELOCATED);
        else
            FIPSerr(FIPS_F_FIPS_CHECK_INCORE_FINGERPRINT,FIPS_R_FINGERPRINT_DOES_NOT_MATCH);