From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c06::22b; helo=mail-io0-x22b.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::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 21C1920356896 for ; Thu, 16 Nov 2017 07:04:40 -0800 (PST) Received: by mail-io0-x22b.google.com with SMTP id v21so5548473ioi.4 for ; Thu, 16 Nov 2017 07:08:50 -0800 (PST) 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=5MFkXbH2LT5T6FmhAOORWtabD/rHc7AzJ/WRbj8zX+s=; b=QYm0QryB/btanMrlZjkZkxn9y1VER7OQ0fT+cwmtop5RFbvftR6PUYUVAiBlsvnPg9 Ea/qU7LY42gJM2u7gCo3dCmsF6ps/W+kze0FuftdketX6K53bgZSFjPDxfk/HJYf3fFS E/qcpwAtFQPLiMX0uDqkfA5ih36xWA+4en9Mg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5MFkXbH2LT5T6FmhAOORWtabD/rHc7AzJ/WRbj8zX+s=; b=ARtpEkZEjQ5Iv+DfXHmiPBID3u09HHrHEsXqX7RgTm5OipJi3raJPKVstcF6EPEuJd vMSenVSVgs5ptjnkFuyRrHGpTxI/ktoMGx5Lffaehesu6arAwJ8zUdxBoK56lQdJPu0L kTmIPAR4fSlJuBo6aJ7QJ0IPPwKtssUXx1G245DMTGXhFvvwj+QR68lfNAQegLEe+vsS h4HXugrazYU8D6XSP+VotbQt0rr1Nx0kjsSC0fHFxMLtF0zZoY9bP65qk4azGEObqwW6 kQtBNXEOaWTAIKsyW1CvjjYdWD0008UmasjB+bCzpzXrPwVOjze1oWrsYYQOBaU+wtHC Jl6w== X-Gm-Message-State: AJaThX7DvHVaLIYthEKuLyJ2mTgeJyScPnSxnJXvzODwrOHd/l090RC+ 43cRVONjAOELDnLzOEH2H/dzHjtCzadTRgaZ8se6Fw== X-Google-Smtp-Source: AGs4zMbhEk61iPI5/lYTvPdDoMeWxVymWq2DpIVc+Y6TJT0z92z+CYHrPkVndb2b3nBvBQsD+jtYGYXYpIBjiSSDRHk= X-Received: by 10.107.151.19 with SMTP id z19mr2010897iod.248.1510844929851; Thu, 16 Nov 2017 07:08:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.104.3 with HTTP; Thu, 16 Nov 2017 07:08:49 -0800 (PST) In-Reply-To: References: <20171101150125.13679-1-ard.biesheuvel@linaro.org> <4A89E2EF3DFEDB4C8BFDE51014F606A14E176A26@SHSMSX104.ccr.corp.intel.com> From: Ard Biesheuvel Date: Thu, 16 Nov 2017 15:08:49 +0000 Message-ID: To: Marcin Wojtas Cc: "Gao, Liming" , "edk2-devel@lists.01.org" , "daniel.thompson@linaro.org" , "leif.lindholm@linaro.org" Subject: Re: [PATCH] BaseTools/tools_def AARCH64 ARM: disable PIE linking for .aslc sources 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: Thu, 16 Nov 2017 15:04:41 -0000 Content-Type: text/plain; charset="UTF-8" On 16 November 2017 at 15:07, Marcin Wojtas wrote: > Hi Ard, > > 2017-11-16 15:48 GMT+01:00 Ard Biesheuvel : >> On 16 November 2017 at 14:38, Marcin Wojtas wrote: >>> Hi Ard, >>> >>> With both PIE disabling patches for AARCH64, when compiling ACPI tables with >>> gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- >>> I get following errors: >>> [...] >>> aarch64-linux-gnu-gcc: error: unrecognized command line option '-no-pie' >>> Do I understand correctly, that I should either revert those patches >>> or upgrade to the newer toolchain? >>> >> >> Ugh. >> >> I thought GCC 5 and later implemented -no-pie, but apparently not. >> >> Does this fix your build? I will need to check whether it fixes the >> original issue, but hopefully your toolchain doesn't choke on this: >> >> diff --git a/BaseTools/Conf/tools_def.template >> b/BaseTools/Conf/tools_def.template >> index aebd7d558633..111fe8da7773 100755 >> --- a/BaseTools/Conf/tools_def.template >> +++ b/BaseTools/Conf/tools_def.template >> @@ -4496,10 +4496,10 @@ DEFINE GCC5_AARCH64_CC_FLAGS = >> DEF(GCC49_AARCH64_CC_FLAGS) >> DEFINE GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS) >> DEFINE GCC5_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS) -no-pie >> DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) -Wno-error >> -DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -no-pie >> +DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) >> -Wl,-no-pie >> DEFINE GCC5_AARCH64_DLINK2_FLAGS = >> DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error >> DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS) -no-pie >> -DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = >> DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -no-pie >> +DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = >> DEF(GCC49_AARCH64_ASLDLINK_FLAGS) -Wl,-no-pie >> >> #################################################################################### >> # >> > > Unfortunately no change, still: > aarch64-linux-gnu-gcc: error: unrecognized command line option '-no-pie' > In order to make sure, I double checked twice cleaninig everything and > rebuilding from scratch. > Thanks, but it doesn't matter anyway: it doesn't fix the original issues on affected toolchains. It appears the only way we can deal with this is introducing GCC6 and move the workaround there. Thanks, Ard.