From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.295.1650379648735637296 for ; Tue, 19 Apr 2022 07:47:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NUwNx1o2; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650379647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H/zMB6y0NmBR9wVvD8h4litP52Q8pUldsJrjxBRVP9A=; b=NUwNx1o2PVITP5J9+uv5gt6PkEQoxmBPWIZHBfYlWHeTRS5wP3sALmp9vh7l8fPaNJxbog TJCgvXUQmw650L3mlXLqM5EyuhsFGHVtSQUnMxTItQjzCBggF0SFCvuPr3BJJi/HapslSj aYHN6KpLOv03c+gbH11jTcuCMKWVwoY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-LYKRgArqN3ukP7gLhEVJwQ-1; Tue, 19 Apr 2022 10:47:24 -0400 X-MC-Unique: LYKRgArqN3ukP7gLhEVJwQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 666E83C14CC3; Tue, 19 Apr 2022 14:47:24 +0000 (UTC) Received: from osteffen-laptop.fritz.box (unknown [10.39.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id 884B840317D; Tue, 19 Apr 2022 14:47:23 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: bob.c.feng@intel.com, gaoliming@byosoft.com.cn, yuwei.chen@intel.com, Oliver Steffen Subject: [PATCH 1/1] BaseTools: disable stack protector (gcc, AARCH64) Date: Tue, 19 Apr 2022 16:46:57 +0200 Message-Id: <20220419144657.339414-2-osteffen@redhat.com> In-Reply-To: <20220419144657.339414-1-osteffen@redhat.com> References: <20220419144657.339414-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.10 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=osteffen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Explicity disable the stack protection with -fno-stack-protection for builds using GCC on AARCH64. The gcc on Ubuntu enables -fstack-protector-strong by default starting with Ubuntu 21.10. GenFw fails if stack protection is enabled. Signed-off-by: Oliver Steffen --- BaseTools/Conf/tools_def.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template index 9c310cf23d25..bd3edf0d219b 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1872,7 +1872,7 @@ DEFINE GCC_IA32_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double - DEFINE GCC_X64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mno-red-zone -Wno-address -mno-stack-arg-probe 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-pic -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-unwind-tables -fno-pic -fno-pie -ffixed-x18 +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-unwind-tables -fno-pic -fno-pie -ffixed-x18 -fno-stack-protector DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds -- 2.35.1