From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 D865721B03877 for ; Wed, 24 May 2017 15:27:08 -0700 (PDT) Received: by mail-io0-x22e.google.com with SMTP id p24so126843938ioi.0 for ; Wed, 24 May 2017 15:27:08 -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=pwTqnNqHrSHNxTiLcvQ9aDn1w4cYOeyR4kJHKm57UUc=; b=FLYLfkT85ZCKNLLrdwJkDqFvGKcFn1oIcw1i4oCsgUj9ELM1SLvREc4f8lvBbYpyuG Jgp7u+wXNidMavVvp89NsA4WNI2YpWdiJiQU9GFEoPTVtUrXsruwhBODNRllhdFNJVA8 LXeMU1C6ni/R6lzwXmUWmehi25Q3qmqRWJUmY= 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=pwTqnNqHrSHNxTiLcvQ9aDn1w4cYOeyR4kJHKm57UUc=; b=rgfkB7kgZeZaKZ24EkPc26VRh2LW6XFRGa6Jzz2VJQK4dSYiNZlrFomf5pLOPeHwUC DV178wodF4QJBNmjqJJ3XfLFcto/27VDh5QNXcTp3/+pLP4CNtOJJZTpRdSGwMoqRwdw F3FznNG4/qoCL/Ld9LuCuJsGyR6ORU/mMhl99CH6BFvCl3waF16NQotGxrwNJKh6u1Tb Sm9a5IR6xKIuVb5mRqefwl9Ok1VWAazfyhkbTTKjGWMAxuiuaJn4F5Jfp/+7BPL4CkhJ ljCEVp/ZiTcbi9dmE9Z/357zGLznnvrRU2CJBZHSjZEoNIZgzPr0kPokavDe7yt2YMJd hXAg== X-Gm-Message-State: AODbwcDhY15wJPXTSgr/QuxhbhEi5pwmd83jZINye1NVEGYuoVLOVM6N sD/V8SBjpdpQ7Gt8KFY4jpSqfJi9mbNe X-Received: by 10.107.130.166 with SMTP id m38mr37931283ioi.87.1495664827920; Wed, 24 May 2017 15:27:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.164.24 with HTTP; Wed, 24 May 2017 15:27:07 -0700 (PDT) In-Reply-To: <20170524202618.kgxxlewemfn4rpho@xps13.dannf> References: <20170524202618.kgxxlewemfn4rpho@xps13.dannf> From: Ard Biesheuvel Date: Wed, 24 May 2017 15:27:07 -0700 Message-ID: To: dann frazier Cc: Leif Lindholm , Yonghong Zhu , Liming Gao , "edk2-devel@lists.01.org" Subject: Re: [PATCH v2] 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, 24 May 2017 22:27:09 -0000 Content-Type: text/plain; charset="UTF-8" On 24 May 2017 at 13:26, dann frazier wrote: > v2: > * Replace -no-pie w/ -static for compat with GCC 4.9 > For my understanding, could you elaborate on what goes wrong if you omit -static / -no-pie? > 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 > --- > BaseTools/Conf/tools_def.template | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template > index 4b1b7b548c..fc0bf2ff70 100755 > --- a/BaseTools/Conf/tools_def.template > +++ b/BaseTools/Conf/tools_def.template > @@ -4339,14 +4339,14 @@ 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 > DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections > -DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map > +DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -static -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map > DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 > DEFINE GCC_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 > DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) > -- > 2.11.0 >