From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7D17921A6F108 for ; Mon, 29 May 2017 03:20:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E01BE81222; Mon, 29 May 2017 10:21:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E01BE81222 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E01BE81222 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-94.phx2.redhat.com [10.3.116.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 163141899E; Mon, 29 May 2017 10:21:28 +0000 (UTC) To: Ard Biesheuvel , "Kinney, Michael D" Cc: Felix Poludov , "Gao, Liming" , "afish@apple.com" , "Wu, Hao A" , "edk2-devel@lists.01.org" , "Fan, Jeff" References: <1495581673-10788-1-git-send-email-michael.d.kinney@intel.com> <542CF652F8836A4AB8DBFAAD40ED192A4C5E94B8@shsmsx102.ccr.corp.intel.com> <56801ADE-446F-43C2-9C99-5500E8EE5881@apple.com> <340C28EC-60CF-4390-A8AD-25F9DA22538F@apple.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D734727@shsmsx102.ccr.corp.intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D734868@shsmsx102.ccr.corp.intel.com> <9333E191E0D52B4999CE63A99BA663A00302B22075@atlms1.us.megatrends.com> From: Laszlo Ersek Message-ID: <96d9776d-d265-2cb5-01e7-033d84e10449@redhat.com> Date: Mon, 29 May 2017 12:21:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 29 May 2017 10:21:31 +0000 (UTC) Subject: Re: [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 May 2017 10:20:33 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/27/17 14:27, Ard Biesheuvel wrote: > On 26 May 2017 at 23:06, Kinney, Michael D wrote: >> Felix, >> >> Yes. I agree. I will work on a Bugzilla issue for this topic >> and I prefer the idea of updating Base.h to check _MSC_VER value. >> >> The one challenge is that 'static' could be added in front of >> GLOBAL_REMOVE_IF_UNREFERENCED, and it will build correctly with >> VS2012 and newer, but would fail with older VS versions that >> require __declspec(selectany) for size optimization. >> > > As has been pointed out already in this thread (by Laszlo, I think), ( It was Andrew's observation: http://mid.mail-archive.com/56801ADE-446F-43C2-9C99-5500E8EE5881@apple.com ) > STATIC may trigger 'unused symbol' warnings that break the build under > our warnings-as-errors policy, since the compiler can infer that no > external references exist. So while STATIC is absolutely the way > forward, #define'ing it in a way that affects existing code is likely > to cause problems. >