VMS: turn on name mangling for all our programs

With the change to have separate object files by intent, VMS name
mangling gets done differently.  While we previously had that for
libraries only, we must now turn that on generally for our programs,
because some of them depend in internal libraries where mangled names
are all that there is.

Dynamic modules are still built with non-mangled names, which is good
enough to show that it's possible to build with our public libraries
using our public headers.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7208)
This commit is contained in:
Richard Levitte 2018-09-13 17:02:53 +02:00
parent c40af30ec5
commit 2935f6241c
8 changed files with 8 additions and 75 deletions

View file

@ -1732,10 +1732,15 @@ my %targets = (
lflags => picker(default => "/MAP='F\$PARSE(\".MAP\",\"\$\@\")'",
debug => "/DEBUG/TRACEBACK",
release => "/NODEBUG/NOTRACEBACK"),
# Because of dso_cflags below, we can't set the generic |cflags| here,
# as it can't be overriden, so we set separate C flags for libraries
# and binaries instead.
bin_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
lib_cflags => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
# no_inst_lib_cflags is used instead of lib_cflags by descrip.mms.tmpl
# for object files belonging to selected internal libraries
no_inst_lib_cflags => "",
# For modules specifically, we assume that they only use public
# OpenSSL symbols, and therefore don't need to mangle names on
# their own.
dso_cflags => "",
ex_libs => add(sub { return vms_info()->{zlib} || (); }),
shared_target => "vms-shared",
dso_scheme => "vms",

View file

@ -9,18 +9,8 @@
#include "internal/nelem.h"
#include "testutil.h"
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../ssl/ssl_locl.h"
#ifdef __VMS
# pragma names restore
#endif
static int cipher_overhead(void)
{
int ret = 1, i, n = ssl3_num_ciphers();

View file

@ -10,18 +10,7 @@
#include <string.h>
#include <openssl/e_os2.h>
#include <openssl/evp.h>
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "curve448_lcl.h"
#ifdef __VMS
# pragma names restore
#endif
#include "testutil.h"
static unsigned int max = 1000;

View file

@ -15,19 +15,9 @@
#include <openssl/ssl.h>
#include "testutil.h"
#include "internal/nelem.h"
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../ssl/ssl_locl.h"
#include "../ssl/ssl_cert_table.h"
#ifdef __VMS
# pragma names restore
#endif
#define test_cert_table(nid, amask, idx) \
do_test_cert_table(nid, amask, idx, #idx)

View file

@ -9,19 +9,8 @@
#include <openssl/ssl.h>
#include <openssl/evp.h>
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../ssl/ssl_locl.h"
#include "../ssl/record/record_locl.h"
#ifdef __VMS
# pragma names restore
#endif
#include "internal/nelem.h"
#include "testutil.h"

View file

@ -10,17 +10,7 @@
#include <openssl/ssl.h>
#include <openssl/evp.h>
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../ssl/ssl_locl.h"
#ifdef __VMS
# pragma names restore
#endif
#include "testutil.h"
#define IVLEN 12

View file

@ -9,18 +9,7 @@
#include <string.h>
#include <openssl/buffer.h>
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../ssl/packet_locl.h"
#ifdef __VMS
# pragma names restore
#endif
#include "testutil.h"
static const unsigned char simple1[] = { 0xff };

View file

@ -23,18 +23,9 @@
*
***/
#ifdef __VMS
# pragma names save
# pragma names as_is,shortened
#endif
#include "../crypto/x509v3/ext_dat.h"
#include "../crypto/x509v3/standard_exts.h"
#ifdef __VMS
# pragma names restore
#endif
static int test_standard_exts(void)
{
size_t i;