[openssl-dev] Building VC-WIN32 with VS2012 and above breaks older CPU compatability

Richard Levitte levitte at openssl.org
Fri Aug 26 19:18:08 UTC 2016


In message <CABUUa3KJhKLSd=5UxWxZn+-X03dKjD983G3M1vyez4eM51Ln2w at mail.gmail.com> on Fri, 26 Aug 2016 14:31:57 -0400, Scott Ware <wsware at gmail.com> said:

wsware> On Fri, Aug 26, 2016 at 12:01 PM, Scott Ware <wsware at gmail.com> wrote:
wsware> > When building with Visual Studio 2008 SSE is disabled by default. When
wsware> > building with Visual Studio 2012 and above you must supply a new flag
wsware> > /arch:IA32 to not build with SSE. Would it be acceptable to update the
wsware> > Configure process to add the /arch:IA32 if Visual Studio 2012 or
wsware> > greater is detected? This applies to the normal C code. We ran into
wsware> > issues when running on an AMD Geode processor.
wsware> >
wsware> > I tested changing the VC-32.pl on OpenSSL 1.0.2g and it worked well,
wsware> > but I see the whole build process has changed in Current. I wanted to
wsware> > find out if this is an acceptable change before I figure out the new
wsware> > Configure process and submit a patch.
wsware> >
wsware> 
wsware> Something like this will work

Having eyed it, it looks functional.  A small comment, though:

wsware> @@ -1335,6 +1341,9 @@ sub vms_info {
wsware>          as               => sub { vc_win32_info()->{as} },
wsware>          asflags          => sub { vc_win32_info()->{asflags} },
wsware>          asoutflag        => sub { vc_win32_info()->{asoutflag} },
wsware> +        lib_cflags       => add( sub { vc_win32_info()->{cflags} } ),
wsware> +        dso_cflags       => add( sub { vc_win32_info()->{cflags} } ),
wsware> +        bin_cflags       => add( sub { vc_win32_info()->{cflags} } ),
wsware>          ex_libs          => add(sub {
wsware>              my @ex_libs = ();
wsware>              # WIN32 UNICODE build gets linked with unicows.lib for

lib_cflags, dso_cflags and bin_cflags are fields meant for each
specific typ och final product and are combined with the cflags field.
If you're gonna add the exact same value to all three, you might as
well only having this:

    cflags => add(sub { vc_win32_info()->{cflags} } ),

Cheers,
Richard

-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-dev mailing list