From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A652C3F2CF for ; Fri, 28 Feb 2020 03:34:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 788F424692 for ; Fri, 28 Feb 2020 03:34:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730700AbgB1Den (ORCPT ); Thu, 27 Feb 2020 22:34:43 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:45090 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730630AbgB1Den (ORCPT ); Thu, 27 Feb 2020 22:34:43 -0500 Received: from callcc.thunk.org (guestnat-104-133-8-109.corp.google.com [104.133.8.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 01S3Yax8019385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 22:34:38 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 45663421A71; Thu, 27 Feb 2020 22:34:36 -0500 (EST) Date: Thu, 27 Feb 2020 22:34:36 -0500 From: "Theodore Y. Ts'o" To: Lukas Czerner Cc: linux-ext4@vger.kernel.org, sandeen@redhat.com Subject: Re: [PATCH v2] tst_libext2fs: Avoid multiple definition of global variables Message-ID: <20200228033436.GA101220@mit.edu> References: <20200130132122.21150-1-lczerner@redhat.com> <20200210152459.19903-1-lczerner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200210152459.19903-1-lczerner@redhat.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Feb 10, 2020 at 04:24:59PM +0100, 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 Applied, thanks. - Ted