VMS: Use strict refdef extern model when building library object files
authorRichard Levitte <levitte@openssl.org>
Mon, 22 Aug 2016 08:17:27 +0000 (10:17 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 22 Aug 2016 13:50:28 +0000 (15:50 +0200)
Most of the time, this isn't strictly needed.  However, in the default
extern model (called relaxed refdef), symbols are treated as weak
common objects unless they are initialised.  The librarian doesn't
include weak symbols in the (static) libraries, which renders them
invisible when linking a program with said those libraries, which is a
problem at times.

Using the strict refdef model is much more like standard C on all
other platforms, and thereby avoid the issues that come with the
relaxed refdef model.

Note: this doesn't apply to VAX C.  It's possible that this will make
OpenSSL building with VAX C difficult some time in the future if it
isn't already.  However, VAX C is a very old compiler that we don't
expect to see too often, as DEC C (a.k.a VMS C) should have replaced
it a long time ago.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/crypto-lib.com
ssl/ssl-lib.com

index 1423cac288d2434f5e850442f3446009f273b0d0..37dc418bf5593135ad012fc81fcfebb12b35e6a6 100644 (file)
@@ -1222,7 +1222,7 @@ $     CC = "CC"
 $     IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
         THEN CC = "CC/DECC"
 $     CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
-       "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
+       "''POINTER_SIZE' /NOLIST /PREFIX=ALL /EXTERN_MODEL=STRICT_REFDEF" + -
        " /INCLUDE=(''CC_INCLUDES')"+ -
        CCEXTRAFLAGS
 $!
index 43fea17541722d87cd6c0f789a8a51e79293219a..bf67265a46e9470dd1824f606d1c7ad95adfdb2e 100644 (file)
@@ -941,7 +941,7 @@ $     CC = "CC"
 $     IF ARCH.EQS."VAX" .AND. F$TRNLNM("DECC$CC_DEFAULT").NES."/DECC" -
         THEN CC = "CC/DECC"
 $     CC = CC + " /''CC_OPTIMIZE' /''DEBUGGER' /STANDARD=RELAXED"+ -
-       "''POINTER_SIZE' /NOLIST /PREFIX=ALL" + -
+       "''POINTER_SIZE' /NOLIST /PREFIX=ALL /EXTERN_MODEL=STRICT_REFDEF" + -
        " /INCLUDE=(''CC_INCLUDES') " + CCEXTRAFLAGS
 $!
 $!    Define The Linker Options File Name.