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.web11.5287.1650442589449116536 for ; Wed, 20 Apr 2022 01:16:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TEO/E5AI; 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=1650442588; 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=dG1MEjuShXcBx1aXoHH5RHVxkf7chYEhHgEB5oc1Y9U=; b=TEO/E5AIQOxQ7gJYbYXPKkfsfao8ytPHq4Jt6ShgTgtug6LulmfKtQ6iqadIBE/eT3cCZk xc/RlXl4O5wPXFYnloCK+r1YceAv1rY7nmCR1vifXZhgP+zRuJPPz/wBGukFzLLC9yiJhJ mKer3q123gw0+3ikjd9IFJ1dsSbHDgI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-443-wQRvB1xbM1O0cW9rjTzfCw-1; Wed, 20 Apr 2022 04:16:25 -0400 X-MC-Unique: wQRvB1xbM1O0cW9rjTzfCw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 468FD802803; Wed, 20 Apr 2022 08:16:25 +0000 (UTC) Received: from osteffen-laptop.redhat.com (unknown [10.39.193.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6869A4050C42; Wed, 20 Apr 2022 08:16:24 +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 v2 1/1] BaseTools: disable stack protector (gcc, AARCH64) Date: Wed, 20 Apr 2022 10:16:03 +0200 Message-Id: <20220420081603.27503-2-osteffen@redhat.com> In-Reply-To: <20220420081603.27503-1-osteffen@redhat.com> References: <16E78AC5D5F67B5F.27458@groups.io> <20220420081603.27503-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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..1a49671a2708 100755 --- a/BaseTools/Conf/tools_def.template +++ b/BaseTools/Conf/tools_def.template @@ -1915,7 +1915,7 @@ DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GC DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS) -DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) +DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS) -fno-stack-protector DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS) DEFINE GCC48_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm DEFINE GCC48_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 -- 2.36.0