[openssl-dev] OpenSSL version 1.1.0 pre release 2 published

Corinna Vinschen vinschen at redhat.com
Sun Jan 17 15:26:01 UTC 2016


Hi Richard,

On Jan 17 01:14, Richard Levitte wrote:
> In message <20160116183724.GI12431 at calimero.vinschen.de> on Sat, 16 Jan 2016 19:37:24 +0100, Corinna Vinschen <vinschen at redhat.com> said:
> 
> vinschen> Who had this funny idea to use the Windows definitions when building for
> vinschen> Cygwin?
> 
> I'm afraid that is lost in the thin web of history ;-)

Heh :)

> vinschen> <pleading>
> vinschen> 
> vinschen> Please, please, please, Cygwin is a *POSIX* layer.  Please don't use
> vinschen> Windows functions on Cygwin, use POSIX functions and POSIX methods,
> vinschen> *unless* it's really necessary.
> ....
> vinschen> </pleading>
> 
> I hear ya.
> 
> vinschen> Last but not least, we have a small build problem when building for the
> vinschen> distro:  To build the packages with additional debuginfo packages, the
> vinschen> packages must not be built with the -s option, plus we have to induce a
> vinschen> few options for the sake of creating the debuginfo information.  Up to
> vinschen> 1.0.2 we do this by tweaking openssl's build system.  We add an expression
> vinschen> $(OPT_CFLAGS) to the CFLAGS definition for that.  If there's a better,
> vinschen> easier way to do this, I'd be grateful for a hint.
> 
> OPT_FLAGS would be for optimizing, do I get that right?

Uh no, I think OPT stands for "optional" in this case.  I didn't invent
the name, actually :)

> I suggest you
> have a look at Configurations/10-main.conf, you might notice
> configuration items like debug_cflags, release_cflags, debug_lflags
> and release_lflags.  If you have a look at my refactor-build branch,
> you will see a fairly thorough Configurations/README.  If you look the
> commit titled "Refactor config - move templates docs asm templates to
> Configurations", you'll find the documentation that's applicable to
> what Configure in the master branch supports...  later editions are
> currently only supported in my branch.

I did that, but I don't see that the new build system would allow
that any better than the previous build system.  There's still no way
to induce optional build flags into a build, unless you manually
override CFLAGS, which is quite a burdon.

In our case the options in OPT_CFLAGS added by the build systems are
something along the lines of

  -ggdb -O2 -pipe -Wimplicit-function-declaration \
  -fdebug-prefix-map=${BUILDDIR}=/usr/src/debug/openssl-1.1.0-pre2-1 \
  -fdebug-prefix-map=${SOURCEDIR}=/usr/src/debug/openssl-1.1.0-pre2-1

This is required to make sure that the debuginfo is created during the
build at all, and to make sure the mapping in the debuginfo is not using
the build paths, but rather the installation paths.  Otherwise the
debuginfo pointer in the object files will point to the wrong paths.

The above is provided by the package build system and depends on the
path the build is done in, as well as the version of the package.  This
info is added by the package build system for all packages built for the
distro.

However, what that means is, we need to have a way to induce variable
content into the release_cflags from "outside".  This is usually no
problem at all for packages with, e.g., autotool-based configuration.

It's also not a Cygwin-specific problem.  I dare say that many distro
package builders have certain requirements to add variable build options
to a build to allow distro-specific build options.

It would be really nice if the OpenSSL build systems would allow that by
default.  Otherwise distros will always have to patch the package before
being able to build it in a distro-specific way.

> vinschen> The attached patchset fixes all of the above.  With this,
> vinschen> openssl-1.1.0-pre2 builds fine for Cygwin.
> 
> I'll have a closer look at all that tomorrow.

Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160117/01d08a48/attachment-0001.sig>


More information about the openssl-dev mailing list