From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (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 21EB62095A595 for ; Wed, 31 May 2017 10:29:46 -0700 (PDT) Received: by mail-it0-x233.google.com with SMTP id m47so371746iti.0 for ; Wed, 31 May 2017 10:30:46 -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=oCB60be62gnteWE0VU4j6+Q/9dAYkrFJqekjcx7DUCA=; b=GO0KScrLFzdSRY6f5Zu3rnUvnfZN6UKaMgI9hSnYP5/3d4FS8Gpx+1TgoSqYvMh3vS Ik7Qpnck0klhkx/V5jlutC9XgnVxzPTB9gAM8UNyQkKw0Nuzkela+S2cRPmK5xo9GgTt CY2d4yxbYWrGqKXlXQ6cvKrrQpI8EIyLDGUAY= 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=oCB60be62gnteWE0VU4j6+Q/9dAYkrFJqekjcx7DUCA=; b=gTKztu6nsfvmicSheYx7LtahvejXUPU0QPm2Z5P0nlw71DsEqcbYbjQBKhpYufw/td AbkPsWYeOrxY8y7ixHJ7cUV+duMVIQ9m9nrA9RQO9H0Qiw0d6YOZf0kGQsFViYpI7zKf G2q+v78LS2uODXaqI8e7R4lvQqFk52z1QQS+SK2OUZ7dqqO5FherP/kfMcTVHyM8c+z7 iFqpmHQvjsgu7sHebDIzTGTWeUTBc60H8n9QWw7Q0XwXY6q7fWBC3K/2JZzPxku+wHgh hjb+AwTtiJsOATmWX25a1e4RB69ZEoJxrkWwh3RptCA0Vf94Kz4KZZe4qTZ97iBsBpXh lvDA== X-Gm-Message-State: AODbwcAYd43vL6BPJqXqKnA6QcuMTKtpzBXGFakDfPzcCNKeT9Nscr/v NC18aItprEjUQiw3jRbpQJWJ76Vq0tFt X-Received: by 10.36.224.133 with SMTP id c127mr8857371ith.73.1496251844510; Wed, 31 May 2017 10:30:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.24 with HTTP; Wed, 31 May 2017 10:30:44 -0700 (PDT) In-Reply-To: <20170531165754.3s47aohyn4zvpc4h@xps13.dannf> References: <20170531165754.3s47aohyn4zvpc4h@xps13.dannf> From: Ard Biesheuvel Date: Wed, 31 May 2017 17:30:44 +0000 Message-ID: To: dann frazier , Liming Gao , Yonghong Zhu Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH v3] BaseTools/GCC ARM/AARCH64: Force disable PIE 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: Wed, 31 May 2017 17:29:46 -0000 Content-Type: text/plain; charset="UTF-8" On 31 May 2017 at 16:57, dann frazier wrote: > v3: > * Drop -static, no longer needed after: > 00b00cc5 BaseTools/Scripts: discard .gnu.hash section in GCC builds > v2: > * Replace -no-pie w/ -static for compat with GCC 4.9 > > After Debian's toolchain switched to PIE by default, our edk2 builds began > to fail to build (GCC49 w/ gcc 6.3). This patch fixes the build by forcing > off PIE for both ARM and AARCH64 builds. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: dann frazier Hi Dan, This looks fine to me, although I only just spotted that ARM now uses -fno-pie only, whereas AARCH64 uses -fno-pic -fno-pie. I'd prefer to have the two aligned, but I can fix that up when committing. Liming, Yonghong: any objections? If not, I will go ahead and merge it (with -fno-pic added for ARM as well) Thanks, Ard. > --- > BaseTools/Conf/tools_def.template | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template > index 4b1b7b548c..f68c836bca 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -4339,9 +4339,9 @@ DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-stri > DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe > DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe > DEFINE GCC_IPF_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -minline-int-divide-min-latency > -DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft > +DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pie > DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access > -DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic > +DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-pic -fno-pie > DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align > DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie > DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds > -- > 2.11.0 >