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 B59DB21AE30C7 for ; Thu, 1 Jun 2017 01:31:59 -0700 (PDT) Received: by mail-it0-x22b.google.com with SMTP id m47so30302240iti.1 for ; Thu, 01 Jun 2017 01:33:00 -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=YyquPyMm8FuDkhLdSud/tkihUcJUCrSoFWWvI3uLXwQ=; b=JIEH6fPZyKUlHcKGy6h+w6G732anVbm2ZX9LRcnts2N9ud6GOcTgKFE8ay1km5LfYy vkqAuDv1W6IqhzgmknMxufSe1/k+c/xFpwv3Jgs7CwMXhl1tuRK/euaRw8OnCnS3OZeJ vMCG6sXKCO2tWvoLiHr1UBCxrh3piI2pabctE= 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=YyquPyMm8FuDkhLdSud/tkihUcJUCrSoFWWvI3uLXwQ=; b=sKsibJyd7kwSWlxFW3Xy5LSftqGBNRPTziL8KSrlbtqnm0S+D0Dg9LBXwqH78+ri3z B7bmulAVJiMVzrDCHxe8ZTt0cbv0RzvWSbYuq+NWCEyMVnAvx2TEVTOWOY4RAmr0F+LE P53WxPueGCvCT+vKVf7kv22/gf6J9ZeLS8UpzNSY3ysRgX779du0IllSRz8rPl98/HUX AAvcAPvrs0A/gohWM65N3D8WO8qFS35P2NmASyj2AAnPBvPjVymHvxWWD7Ua/3schwvE g70jygq8wGlmLxJ/yyU7K1rKQOwAosb3VfnppT42T0mHowz1zxLk1gSGuuQP2eDIMvOG vbUQ== X-Gm-Message-State: AODbwcBGMvfBM3kdsQ68yz42utwoMjJn8nD3KQ+ezONSqmIJ4+coqD1D Bv0ZTWUvuOkFd404A+giAUMombZu6myK X-Received: by 10.36.80.7 with SMTP id m7mr1371629itb.73.1496305980172; Thu, 01 Jun 2017 01:33:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.24 with HTTP; Thu, 1 Jun 2017 01:32:59 -0700 (PDT) In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D743EC5@shsmsx102.ccr.corp.intel.com> References: <20170531165754.3s47aohyn4zvpc4h@xps13.dannf> <4A89E2EF3DFEDB4C8BFDE51014F606A14D743EC5@shsmsx102.ccr.corp.intel.com> From: Ard Biesheuvel Date: Thu, 1 Jun 2017 08:32:59 +0000 Message-ID: To: "Gao, Liming" Cc: dann frazier , "Zhu, Yonghong" , "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: Thu, 01 Jun 2017 08:32:00 -0000 Content-Type: text/plain; charset="UTF-8" On 1 June 2017 at 00:45, Gao, Liming wrote: > Reviewed-by: Liming Gao > Pushed as a6b5380642c4 Thanks, Ard. >>-----Original Message----- >>From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >>Sent: Thursday, June 01, 2017 1:31 AM >>To: dann frazier ; Gao, Liming ; >>Zhu, Yonghong >>Cc: edk2-devel@lists.01.org ; Leif Lindholm >> >>Subject: Re: [PATCH v3] BaseTools/GCC ARM/AARCH64: Force disable PIE >> >>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 >>>