linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH v2] tst_libext2fs: Avoid multiple definition of global variables
Date: Tue, 11 Feb 2020 14:22:13 -0600	[thread overview]
Message-ID: <f75ab2d5-9c59-a190-6fa5-c5f0e645da9c@redhat.com> (raw)
In-Reply-To: <20200210152459.19903-1-lczerner@redhat.com>

On 2/10/20 9:24 AM, Lukas Czerner wrote:
> gcc version 10 changed the default from -fcommon to -fno-common and as a
> result e2fsprogs make check tests fail because tst_libext2fs.c end up
> with a build error.
> 
> This is because it defines two global variables debug_prog_name and
> extra_cmds that are already defined in debugfs/debugfs.c. With -fcommon
> linker was able to resolve those into the same object, however with
> -fno-common it's no longer able to do it and we end up with multiple
> definition errors.
> 
> Fix the problem by using SKIP_GLOBDEFS macro to skip the variables
> definition in debugfs.c. Note that debug_prog_name is also defined in
> lib/ext2fs/extent.c when DEBUG macro is used, but this does not work even
> with older gcc versions and is never used regardless so I am not going to
> bother with it.
> 
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
> v2: Previous fix wasn't really working properly

What was not working properly?

It seemed reasonable to me.  The new mechanism looks like it would work,
but the first patch seemed more obvious, so I'd like to know what the problem
was.

Thanks,
-Eric


  reply	other threads:[~2020-02-11 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 13:21 [PATCH] tst_libext2fs: Avoid multiple definition of global variables Lukas Czerner
2020-02-06 17:52 ` Eric Sandeen
2020-02-06 19:20   ` Lukas Czerner
2020-02-10 15:24 ` [PATCH v2] " Lukas Czerner
2020-02-11 20:22   ` Eric Sandeen [this message]
2020-02-11 21:08     ` Eric Sandeen
2020-02-13 23:08   ` Eric Sandeen
2020-02-28  3:34   ` Theodore Y. Ts'o

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=f75ab2d5-9c59-a190-6fa5-c5f0e645da9c@redhat.com \
    --to=sandeen@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 NNTP newsgroup(s).