From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (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 D95BF1A1E1E for ; Wed, 3 Aug 2016 03:02:21 -0700 (PDT) Received: by mail-it0-x22f.google.com with SMTP id f6so226526338ith.0 for ; Wed, 03 Aug 2016 03:02:21 -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=ithzqgsooQJcJ+/d6Wt1Hf/jHE+i9OG254UTpe7NMSA=; b=JqPHpd17Cnaj9Rrn6uPhxAWbnx2JDsR8zJE4/b01D7/Wtr311PJHIZpbHJ/Bv1Sr34 ZKMlm9hsTwIrPBampZIXBPq3VIgO2ijRY4YstFFoI75Zuf3LbqMCHeuYGVpCPqnIyuZQ /EkFxBBr1h4NG7T/bFkRSUcHTmvwoQSgniusg= 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=ithzqgsooQJcJ+/d6Wt1Hf/jHE+i9OG254UTpe7NMSA=; b=BRfFI8/ByKwM4OUFqqWsUWVyzr9PO0u9zuNEolIlg/jNxrHzv6EI4mZ+Dtfmgzbh3X JCk5yJPdvt4fAhxmb+OuFpZmzRd5fXz7FoqJzXG8d111T5obZWWCyF7DIwF72RCQOxoI bVmTtFjHf7gjRfP9b3cljpS5au56ZnKgE0qtGWkG99OtS2OvqyfyGb0xplFaZXqOatzR 7XgvR7Xwsvvnf7kimbQOwvam5AGlTZgG/PTFgs0hhdbze9lKrUL5xftZ3whzg48nnIhf 5yAZEq+FMMj1QyYBM33ov5tQ6zj/PxpGXkaxvb2VA//nxtbCvVN0dkIgR2CALJFfEjRZ H8dg== X-Gm-Message-State: AEkoouvULSl9fJi1sVPhBvgY411PrxGGsx6HYG+QeDiBsLWw+GVdcfNty7+qRxdV32sByC8mYvmo/S4LkExzfvNU X-Received: by 10.36.7.209 with SMTP id f200mr67444702itf.29.1470218541250; Wed, 03 Aug 2016 03:02:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Wed, 3 Aug 2016 03:02:20 -0700 (PDT) In-Reply-To: References: <1470212464-28071-1-git-send-email-ard.biesheuvel@linaro.org> <1470212464-28071-3-git-send-email-ard.biesheuvel@linaro.org> From: Ard Biesheuvel Date: Wed, 3 Aug 2016 12:02:20 +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 10:02:22 -0000 Content-Type: text/plain; charset=UTF-8 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. -- Ard.