Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp216069ybf; Thu, 27 Feb 2020 19:36:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzLdCzOLDhV/+oR7hNVjrkUHqhRc23OtR2cWVwXmW4ItUeorfz9ntc1DFLQrHmsmSH6FK/h X-Received: by 2002:a9d:774e:: with SMTP id t14mr1692350otl.358.1582860971871; Thu, 27 Feb 2020 19:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582860971; cv=none; d=google.com; s=arc-20160816; b=izX/sP+fdxam+YSpNbW4eOY4kTz5p67o0GWbACTFIbQ5oC1/mgO2wnifXIoVKmZKw6 t8i6r7huo9X/MLCGNsW8iq6rRFRiO6ki46qX9HoBjVZETadosKMl0PepPmswzu4SnuvQ J2CkEbiRBHhsgnAb2iJ9w42e93gko2KjIa/FED3IMfEPbZKRMWyTD6EnmDlnMXD/mUcU hcVslY2Wp3lZYTyMZxjmhRz1drKPdbM9oWB4xy7uVgztwfuTBnQ4n5HT4iZSUxpCavs8 GXABXlo56ec9agwlWeWqnfyUE/1ORxoNFKqutX6iVzVmvRbFzrdsQP/4wl9CyqKv7u3W 992Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=qzarsT77i/EP7Zb8P2fNR6mKp1jDSzbGzl3wWRC4+ic=; b=f5YBc59UPRPRmfbHrKl0y0TyszkIUUsTQ14RETFtpzDkHb9Tn/PCj/hnkrIop1dw/8 EA5c9oMMpF8+6WcPCzwGxcugLEuJdR+A8tJz6XY0/AdjOxBMWuyDX06E9e6f9XP/k3ud dw67up/BFjkCSwOrSI4xz/9EUQmGcj1Ua2bGw/U4L78J0TeKjG8jYws5Qv5ctsVP5d5K 3IREkRf1vVip0HOchdUggTTDpL++J/jEm8FC0Wms/1ytie4HKIVulMY22s5h66Fv2O89 GzEflVxT1uT1eiS9BL+3Ld15w20s6ko8LKN0cwo3o5FSxTWV/yokxh/FmI9OGxDQ9wD/ lsyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l139si1106321oih.233.2020.02.27.19.35.52; Thu, 27 Feb 2020 19:36:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730638AbgB1Den (ORCPT + 99 others); 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