public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@ml01.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH 2/2] ArmVirtPkg ARM: make relocatable PrePi users build with CLANG35
Date: Wed, 3 Aug 2016 12:02:20 +0200	[thread overview]
Message-ID: <CAKv+Gu9=xrx53S+e1ZPJY8a6zd=Jwp0wO36aenW+KjWQJ8Tx7g@mail.gmail.com> (raw)
In-Reply-To: <dc607ca6-5030-7862-a581-d024d3b10b43@redhat.com>

On 3 August 2016 at 12:00, Laszlo Ersek <lersek@redhat.com> 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 <ard.biesheuvel@linaro.org>
>> ---
>>  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.

-- 
Ard.


  reply	other threads:[~2016-08-03 10:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  8:21 [PATCH 0/2] ArmVirtPkg EmbeddedPkg: fix build for CLANG35/ARM Ard Biesheuvel
2016-08-03  8:21 ` [PATCH 1/2] EmbeddedPkg: make PrePiMemoryAllocationLib a SEC type library Ard Biesheuvel
2016-08-03  9:56   ` Laszlo Ersek
2016-08-03 10:00     ` Ard Biesheuvel
2016-08-03 11:21       ` Laszlo Ersek
2016-08-03 12:50         ` Ard Biesheuvel
2016-08-03 13:07           ` Leif Lindholm
2016-08-03  8:21 ` [PATCH 2/2] ArmVirtPkg ARM: make relocatable PrePi users build with CLANG35 Ard Biesheuvel
2016-08-03 10:00   ` Laszlo Ersek
2016-08-03 10:02     ` Ard Biesheuvel [this message]
2016-08-03 11:19       ` Laszlo Ersek
2016-08-03 12:51         ` Ard Biesheuvel
2016-08-03 13:46 ` [PATCH 0/2] ArmVirtPkg EmbeddedPkg: fix build for CLANG35/ARM Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu9=xrx53S+e1ZPJY8a6zd=Jwp0wO36aenW+KjWQJ8Tx7g@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox