From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 326B41A1E00 for ; Wed, 3 Aug 2016 05:51:49 -0700 (PDT) Received: by mail-it0-x22b.google.com with SMTP id j124so232710459ith.1 for ; Wed, 03 Aug 2016 05:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gFvTUuESmy4KYGZXT0pfDTFnZ8rl7wGqgu6zsnBJEow=; b=bj1veDPl0c+V/k/lL9lBFseH3C2VtJt2w24FSOP9v5R1GD0m4RZ2c3LeIR+rupYwnF MR+9PQl63hmYs3K+Ps2/HGaRUOvCR51a3q+YWYop9GH75LSG4maxWH8IpFWNsL8zCu/C VYBjQEiqj703XDkDfsZMKLxV+HQAJQH0aLF3w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gFvTUuESmy4KYGZXT0pfDTFnZ8rl7wGqgu6zsnBJEow=; b=j0uR/0gGM0gcNNt8Rj6qWTBRzFd/psztSzFakkKnyHTGeM034LBo/gXKd7h4OsOcF3 DxRQ9QvFA/ZUq0kuDKZMp+fmyfL0+CunQ1kAfxo7jZ9x1kDQb7p6gadeZaiJqH8kuszd +ulqGHDbFC9i1Dq1MDwoW4W3wsgo//yvMwCwvBLwOI/ONFCiq0NMxA2filwjdHAQL+qh cECYPqboS4qLuvb4XNoHLMoM1ONj4QYt/l0AO1TZy9egPX4h0ZUfOW0LLfkCVQZG6scD nme26VkncQqP4G6bzj6daKEX8YIqRQNIe5K5jXcLhybf8BklWgg0E6cPWm7YmG+z4Gr1 Ig6w== X-Gm-Message-State: AEkoouv8Xlsr5zfnFRmzufat/4jyM+t1VikfOIWkrSDblVkadRoPygxUYAnclw+pbdSkbJEKo9AaVzlK/3hip2yT X-Received: by 10.36.39.77 with SMTP id g74mr23949961ita.51.1470228708401; Wed, 03 Aug 2016 05:51:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Wed, 3 Aug 2016 05:51:47 -0700 (PDT) In-Reply-To: <84bbe0b7-8f05-edbf-2a71-12afdfeb985d@redhat.com> References: <1470212464-28071-1-git-send-email-ard.biesheuvel@linaro.org> <1470212464-28071-3-git-send-email-ard.biesheuvel@linaro.org> <84bbe0b7-8f05-edbf-2a71-12afdfeb985d@redhat.com> From: Ard Biesheuvel Date: Wed, 3 Aug 2016 14:51:47 +0200 Message-ID: To: Laszlo Ersek Cc: "edk2-devel@lists.01.org" , Leif Lindholm 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 12:51:49 -0000 Content-Type: text/plain; charset=UTF-8 On 3 August 2016 at 13:19, Laszlo Ersek wrote: > 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. :) > No, you're quite right. I'm still a bit confused that a SEC module can include DXE_DRIVER type libraries, but I guess it doesn't matter if there is no constructor. > Reviewed-by: Laszlo Ersek Thank you, Ard.