[openssl-dev] [openssl.org #3969] [PATCH] Add OPENSSL_SYS_UEFI

David Woodhouse dwmw2 at infradead.org
Fri Aug 7 14:40:27 UTC 2015


Updated patch. I had hoped to cope with the setting of SIXTY_FOUR_BIT
vs. THIRTY_TWO_BIT with nasty tricks, but those didn't work.

For the EDKII build we can't configure OpenSSL separately for the
specific architecture and toolchain we're using. People might be
building on Windows and not even have perl available; it looks like
we'll ship a prepackaged opensslconf.h with instructions to "download
the OpenSSL tarball and drop this in place".

So in our own headers on the EDKII side, we define SIXTY_FOUR_BIT or
THIRTY_TWO_BIT as appropriate for the target. And we need opensslconf.h
*not* to set it at all.

I had attempted the horrid trick of *also* setting CONFIG_HEADER_BN_H
in our own headers, to nastily bypass that part of opensslconf.h
entirely. But that doesn't work if opensslconf.h gets included *first*.
Which does actually happen when building with MSVC for some reason,
although not with GCC.

This version also reduces the false matches on Windows caused by using
the MSVC toolchain (which defines _WIN32) to build EDK II. We do still
explicitly undefine _WIN32 on our command line, but it would be useful
to fix remaining instances of _WIN32 to depend on OPENSSL_SYS_WIN32
instead and reduce the need for that. I might do that later, but in the
meantime let's at least not make the problem *worse* with my original
placement of OPENSSL_SYS_UEFI in e_os.h.

Also tidy up the definition of the standard integer types to make it
work cleanly in the MSVC build.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RT3969-Add-OPENSSL_SYS_UEFI.patch
Type: text/x-patch
Size: 5649 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20150807/8e1492c8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5691 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20150807/8e1492c8/attachment-0001.bin>


More information about the openssl-dev mailing list