-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt building OpenSSL 3.0 for VMS #15317
Conversation
VMS C can be notoriously informative about certain things, such as unsupported pragmas. The case here is that it doesn't support "#pragma once", and since we use those quite a lot, that's a lot of repeated information. We simply turn that warning off.
Get it back in sync with the other templates, and correct a few syntax errors that have crept in. Fixes openssl#14247
VMS unpackers will typically convert any period ('.') in directory names to underscores, since the period is a path separator on VMS, just like '/' is a path separator on Unix. Our fallback mechanism needs to account for that.
It was looking in the wrong place in %unified_info to determine if the library would be installed or not.
`use lib` needs Unix formatted paths. For VMS, it means that we must make sure to convert paths, and we may as well generalise it. In this case, we need to adapt the functions sourcedir() and sourcefile()
Instead of what we used to do, put all include directories in a number of DCL variables and generate the /INCLUDE qualifier value on the command line, we instead generate VMS C specific header files with include directory pragmas, to be used with the VMS C's /FIRST_INCLUDE qualifier. This also shortens the command line, the size of which is limited. VMS C needs to have those include directories specified in a Unix form, to be able to safely merge #include paths with them when searching through them. Fixes openssl#14247
crypto/ec/curve448/ has a series of inclusions that throws VMS C off, so we compensate for it the same way as we have done before. Fixes openssl#14247
We have pretty long symbol names, so they need to be shortened to fit in the linker's 31 character limit on symbols. Symbol name shortening with the VMS C compiler works in such a way that a symbol name that's longer than 31 characters is mangled into its first original 22 characters, followed by a dollar sign and the 32-bit CRC of the original symbol name in hexadecimal.
Windows failure fixed |
A bit of quoting is all that's needed, and it doesn't hurt other platforms.
Small tweak added, please re-approve |
Still approved |
VMS C can be notoriously informative about certain things, such as unsupported pragmas. The case here is that it doesn't support "#pragma once", and since we use those quite a lot, that's a lot of repeated information. We simply turn that warning off. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
VMS unpackers will typically convert any period ('.') in directory names to underscores, since the period is a path separator on VMS, just like '/' is a path separator on Unix. Our fallback mechanism needs to account for that. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
It was looking in the wrong place in %unified_info to determine if the library would be installed or not. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
`use lib` needs Unix formatted paths. For VMS, it means that we must make sure to convert paths, and we may as well generalise it. In this case, we need to adapt the functions sourcedir() and sourcefile() Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
Instead of what we used to do, put all include directories in a number of DCL variables and generate the /INCLUDE qualifier value on the command line, we instead generate VMS C specific header files with include directory pragmas, to be used with the VMS C's /FIRST_INCLUDE qualifier. This also shortens the command line, the size of which is limited. VMS C needs to have those include directories specified in a Unix form, to be able to safely merge #include paths with them when searching through them. Fixes #14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
We have pretty long symbol names, so they need to be shortened to fit in the linker's 31 character limit on symbols. Symbol name shortening with the VMS C compiler works in such a way that a symbol name that's longer than 31 characters is mangled into its first original 22 characters, followed by a dollar sign and the 32-bit CRC of the original symbol name in hexadecimal. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
A bit of quoting is all that's needed, and it doesn't hurt other platforms. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from #15317)
Merged 58ad786 Turn off VMS C's info about unsupported pragmas |
VMS C can be notoriously informative about certain things, such as unsupported pragmas. The case here is that it doesn't support "#pragma once", and since we use those quite a lot, that's a lot of repeated information. We simply turn that warning off. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
Get it back in sync with the other templates, and correct a few syntax errors that have crept in. Fixes openssl#14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
VMS unpackers will typically convert any period ('.') in directory names to underscores, since the period is a path separator on VMS, just like '/' is a path separator on Unix. Our fallback mechanism needs to account for that. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
It was looking in the wrong place in %unified_info to determine if the library would be installed or not. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
`use lib` needs Unix formatted paths. For VMS, it means that we must make sure to convert paths, and we may as well generalise it. In this case, we need to adapt the functions sourcedir() and sourcefile() Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
Instead of what we used to do, put all include directories in a number of DCL variables and generate the /INCLUDE qualifier value on the command line, we instead generate VMS C specific header files with include directory pragmas, to be used with the VMS C's /FIRST_INCLUDE qualifier. This also shortens the command line, the size of which is limited. VMS C needs to have those include directories specified in a Unix form, to be able to safely merge #include paths with them when searching through them. Fixes openssl#14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
crypto/ec/curve448/ has a series of inclusions that throws VMS C off, so we compensate for it the same way as we have done before. Fixes openssl#14247 Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
We have pretty long symbol names, so they need to be shortened to fit in the linker's 31 character limit on symbols. Symbol name shortening with the VMS C compiler works in such a way that a symbol name that's longer than 31 characters is mangled into its first original 22 characters, followed by a dollar sign and the 32-bit CRC of the original symbol name in hexadecimal. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
A bit of quoting is all that's needed, and it doesn't hurt other platforms. Reviewed-by: Tim Hudson <tjh@openssl.org> (Merged from openssl#15317)
The biggest part of adapting the build of OpenSSL 3.0 to VMS was to deal with a larger and varying number of inclusion directories.
With pre-3.0, these directories were relatively few, so its descrip.mms (what Unix folks call "Makefile") did a few dirty hacks using logical names and that was that, and the command line was still kept within the command line length limit (which is pretty short).
With 3.0, the strategy needed to be changed. Fortunately, the VMS C compiler has the qualifier
/FIRST_INCLUDE
(corresponding to gcc's-include
flag) and a useful pragma,#pragma include_directory "/path/to/header/files"
, so what we do is to automatically generate header files with the appropriate inclusion directories for diverse cases, and use them when compiling.The rest of the changes is simply playing catch-up with what has happened with the Unix and Windows Makefile templates.
A consequence of this is that many of the rather special variables in descrip.mms are removed, as going through them is pretty cumbersome and benefits no one. Instead, a set of useful perl variables are set up in descrip.mms.tmpl, and are used directly by the perl fragments
Fixes #14247
Note that this does not include diverse C source file changes that are needed to build without errors. Those will come in a separate PR.