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 C60FB1A1E00 for ; Wed, 3 Aug 2016 04:19:13 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E82085543; Wed, 3 Aug 2016 11:19:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-59.phx2.redhat.com [10.3.116.59]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u73BJB55004233; Wed, 3 Aug 2016 07:19:12 -0400 To: Ard Biesheuvel References: <1470212464-28071-1-git-send-email-ard.biesheuvel@linaro.org> <1470212464-28071-3-git-send-email-ard.biesheuvel@linaro.org> Cc: "edk2-devel@lists.01.org" , Leif Lindholm From: Laszlo Ersek Message-ID: <84bbe0b7-8f05-edbf-2a71-12afdfeb985d@redhat.com> Date: Wed, 3 Aug 2016 13:19:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 03 Aug 2016 11:19:13 +0000 (UTC) Subject: Re: [PATCH 2/2] ArmVirtPkg ARM: make relocatable PrePi users build with CLANG35 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 11:19:13 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 08/03/16 12:02, Ard Biesheuvel wrote: > On 3 August 2016 at 12:00, Laszlo Ersek wrote: >> On 08/03/16 10:21, Ard Biesheuvel wrote: >>> The clang developers have made a backward incompatible change to the >>> command line arguments, and have replaced '-mllvm -arm-use-movt=0' >>> with '-mno-movt'. This does not matter for most ARM platforms, and >>> therefore it has been removed from the default CLANG35/ARM CC flags >>> in patch 1c63516075b3 ("BaseTools CLANG35: drop problematic use-movt >>> and save-temps options"), but as it turns out, the relocatable PrePi >>> implementation used by ArmVirtQemuKernel and ArmVirtXen will fail to >>> build if it contains MOVT/MOVW pairs, due to the fact that these are >>> not runtime relocatable under ELF. >>> >>> Since they are runtime relocatable under PE/COFF, and GenFw does the >>> right thing when encountering them, selectively controlling their >>> use is more appropriate than disabling them altogether. Therefore, >>> this patch adds the -mno-movt argument only for the platforms that >>> use the relocatable PrePi, and only for the module types that may >>> be pulled into its build. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Ard Biesheuvel >>> --- >>> ArmVirtPkg/ArmVirtQemuKernel.dsc | 8 ++++++++ >>> ArmVirtPkg/ArmVirtXen.dsc | 9 +++++++++ >>> 2 files changed, 17 insertions(+) >>> >>> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc >>> index 01a1d9b4613b..6c536d9bbd2d 100644 >>> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc >>> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc >>> @@ -45,6 +45,9 @@ [LibraryClasses.ARM] >>> ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.inf >>> ArmCpuLib|ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf >>> >>> +[LibraryClasses.ARM.SEC] >>> + ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf >>> + >> >> How does this library resolution change relate to the stated purpose of >> the patch? >> > > It prevents a version of ArmLib being pulled into the build of the > relocatable PrePi that was built using the BuildOptions for DXE_DRIVER > type modules. > I think it would be reasonable to add this one paragraph to the commit message as well. If you disagree, I won't insist. :) Reviewed-by: Laszlo Ersek