public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-developers@cygwin.com
Subject: Re: automake issue
Date: Fri, 22 Oct 2021 10:44:19 +0200	[thread overview]
Message-ID: <YXJ542jMGKMaQ0Bq@calimero.vinschen.de> (raw)
In-Reply-To: <6ebe96b4-e9a7-1607-23e8-524c7560aadf@cornell.edu>

On Oct 21 15:33, Ken Brown wrote:
> On 10/21/2021 9:08 AM, Jon Turney wrote:
> > On 21/10/2021 11:48, Corinna Vinschen wrote:
> > > On Oct 20 16:58, Ken Brown wrote:
> > > > I was debugging with what I thought was an unoptimized build of cygwin1.dll
> > > > (with -O0 in CXXFLAGS), but then I discovered that malloc.cc was actually
> > > > compiled with -O3.  This is because of the following snippet from
> > > > winsup/cygwin/Makefile.am:
> > > > [...]
> > I couldn't find any history which suggests these flags are here due to
> > evidence ('using -O3 makes this benchmark faster'), rather than
> > guesswork ('these files probably contain hotspots, so use -O3 to make it
> > go faster!').
> 
> It's too bad we don't know why this was done.

Optimization.  Either 9 or 16 years ago.  Using very different GCC
versions and *only* on 32 bit at the time.  It's pretty unlikely they
are still needed, especially on 64 bit.  If it works fine without them,
we should just remove them.

> In the meantime, I'll work
> around the problem by using a private branch in which that block is removed.
> I tried Corinna's suggestion of setting CFLAGS=-g, but that didn't produce
> an unoptimized build.  I still saw '-O2 -g' when building newlib and '-O2 -g
> -g -O2' when building cygwin.

Yeah, I configure the entire tree with C{XX}FLAGS=-g from scratch for
en entirely unoptimized tree, because I want newlib usually unoptimized
as well.


Corinna

      reply	other threads:[~2021-10-22  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 20:58 Ken Brown
2021-10-21 10:48 ` Corinna Vinschen
2021-10-21 13:08   ` Jon Turney
2021-10-21 19:33     ` Ken Brown
2021-10-22  8:44       ` Corinna Vinschen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YXJ542jMGKMaQ0Bq@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-developers@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).