Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5333212ybv; Tue, 11 Feb 2020 13:42:44 -0800 (PST) X-Google-Smtp-Source: APXvYqy+m1EIWaijBo0UuNXi43c7+93sww4d7yJyC0n2l9kEubV6gywkZJ6PQuIkp5MUhtnjBRXq X-Received: by 2002:a05:6808:24e:: with SMTP id m14mr4317754oie.168.1581457364423; Tue, 11 Feb 2020 13:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581457364; cv=none; d=google.com; s=arc-20160816; b=LZb85+0tmvO7lFeR7t5HmkIxJEYJ5jWzP+7fuAgcIjTLtyWbkcqwSNH/SaDpXBknNS lw8I2LDdZYvLKI5HuD5xc+ZJldgSa7Wad0bfOaqc3EHeFhPcl/vekw+NPwXMoiVh1kDU 8cEUibWEcyH3pgcuI0QPmmmK2pUTW6xcfJ5YVAr6Se1exZecVOPxTbl68lz6ZuLxQ/3N 40MBvnF0Z9pqB1OJO5iGMNlZxlTwm1NTEdHn5B4YWEasFc+5yCPRuCAnyvoFv5KhlPCT 3pNqjb0jZSpV/kNPnE/+xTSE1bM4ZE/+iq8QHEwES7nYnShfapljTEXJUBmuBmVn2P/g hK1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=5bD3yovag2fIgarV4jsr+j0HIPraUUFbfuVz3Lcns4Q=; b=Sp8H/j8zXCMM0Zh7T0mqpzxRfooIt3CsVVmrmvEvbxian2ROld1hNqNTui80JdYviE GvojKxWqD5MU2FxK6mvw2eKrTC++f3KAzLhRmOsZJmqxkSlq6esC6Ene1WXU9bsVYXmU P5DrSAdV4eO2YvT+SKwYcriqxvXW7roNEl12VTQBs6Zeihq73OwVUAVs4qs+gMDQYGKw 2zI3yBhudbqVYjGMv8IfAVUAKwFae2eZtSb4mTPC0aPwWvEUSJCvBcP+wZmm/XinAfCW 39Mkd5EZig3ARZSzUoJua/qap4lZ56H7uVQAATeqHuZgo+CkSEIo1XGDaHDciKHVpePI 7wmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E6h1GvAL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si2598503otp.5.2020.02.11.13.42.33; Tue, 11 Feb 2020 13:42:44 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E6h1GvAL; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731077AbgBKUWW (ORCPT + 99 others); Tue, 11 Feb 2020 15:22:22 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44343 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731076AbgBKUWW (ORCPT ); Tue, 11 Feb 2020 15:22:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581452540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5bD3yovag2fIgarV4jsr+j0HIPraUUFbfuVz3Lcns4Q=; b=E6h1GvALIMk+6N0fN809qn/LNerEWauu/ZE97eF3pAgpB80Q+Ug7DrLH3w1dLtQjF7O4Vd vy0mMzr59Qq2c3miJScrmLjeM8mrmyQuHmGCGIluI7E2vvEeWA3F6GunhgNFj50Rso/CBq FaMX/bqlkOTI6jl+TEIEQxcTKwswlFw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-377-M4rYFIEIMFODbqhK1iaeew-1; Tue, 11 Feb 2020 15:22:16 -0500 X-MC-Unique: M4rYFIEIMFODbqhK1iaeew-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B31E36125A; Tue, 11 Feb 2020 20:22:15 +0000 (UTC) Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4C1110246E3; Tue, 11 Feb 2020 20:22:14 +0000 (UTC) Subject: Re: [PATCH v2] tst_libext2fs: Avoid multiple definition of global variables To: Lukas Czerner , linux-ext4@vger.kernel.org Cc: tytso@mit.edu References: <20200130132122.21150-1-lczerner@redhat.com> <20200210152459.19903-1-lczerner@redhat.com> From: Eric Sandeen Message-ID: Date: Tue, 11 Feb 2020 14:22:13 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200210152459.19903-1-lczerner@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 > --- > 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