From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH V2] xfsprogs: do not redeclare globals provided by libraries
Date: Wed, 29 Jan 2020 11:29:45 -0800 [thread overview]
Message-ID: <20200129192945.GV3447196@magnolia> (raw)
In-Reply-To: <d9dd895f-8f16-ab11-b913-bf095c2b8071@sandeen.net>
On Wed, Jan 29, 2020 at 10:57:48AM -0600, Eric Sandeen wrote:
> On 1/29/20 10:01 AM, Darrick J. Wong wrote:
> > On Wed, Jan 29, 2020 at 09:16:58AM -0600, Eric Sandeen wrote:
> >> In each of these cases, db, logprint, and mdrestore are redeclaring
> >> as a global variable something which was already provided by a
> >> library they link with.
> >>
> >> gcc now defaults to -fno-common and trips over these global variables
> >> which are declared in utilities as well as in libxfs and libxlog, and
> >> it causes the build to fail.
> >>
> >> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> >> ---
>
> ...
>
> >> + print_exit = 1; /* -e is now default. specify -c to override */
> >
> > With the trailing whitespace after the comment fixed,
>
> oh burn. ;)
>
> > Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Though given your earlier comment on IRC, maybe we should investigate
> > why -fno-common would be useful (since Fedora turned it on??) or if it
> > should be in the regular build to catch multiply defined global vars?
>
> That's a good idea. FWIW my understanding is that it's a new default in
> gcc10.
>
> Docs say w.r.t. -fcommon: "This behavior is inconsistent with C++, and on many targets implies a speed and code size penalty on global variable references. It is mainly useful to enable legacy code to link without errors."
>
> Want me to send a V3 w/ -fno-common explicitly set?
Yes, that sounds like a better place to start a conversation about ...
whatever that option is. :)
--D
> -Eric
next prev parent reply other threads:[~2020-01-29 19:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 22:56 [PATCH] xfsprogs: do not redeclare globals provided by libraries Eric Sandeen
2020-01-28 3:29 ` Darrick J. Wong
2020-01-28 14:48 ` Eric Sandeen
2020-01-28 22:26 ` Dave Chinner
2020-01-28 22:28 ` Eric Sandeen
2020-01-28 19:42 ` Eric Sandeen
2020-01-29 15:16 ` [PATCH V2] " Eric Sandeen
2020-01-29 16:01 ` Darrick J. Wong
2020-01-29 16:57 ` Eric Sandeen
2020-01-29 19:29 ` Darrick J. Wong [this message]
2020-01-29 18:06 ` Christoph Hellwig
2020-01-29 19:47 ` [PATCH V3] " Eric Sandeen
2020-01-29 21:32 ` Christoph Hellwig
2020-01-29 22:20 ` Eric Sandeen
2020-01-29 18:05 ` [PATCH] " Christoph Hellwig
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=20200129192945.GV3447196@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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