From patchwork Sat May 8 19:41:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1475908 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pYYVjbgY; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FcyQk5dp6z9tld for ; Sun, 9 May 2021 05:42:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2B505606E0; Sat, 8 May 2021 19:42:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cRh4pPxr7Atq; Sat, 8 May 2021 19:42:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 7AD6A60650; Sat, 8 May 2021 19:42:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B4F9B1BF3FD for ; Sat, 8 May 2021 19:42:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B177660650 for ; Sat, 8 May 2021 19:42:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P9MUkEJGKROm for ; Sat, 8 May 2021 19:42:37 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by smtp3.osuosl.org (Postfix) with ESMTPS id 9E0016063C for ; Sat, 8 May 2021 19:42:36 +0000 (UTC) Received: by mail-wm1-x330.google.com with SMTP id a10-20020a05600c068ab029014dcda1971aso6816867wmn.3 for ; Sat, 08 May 2021 12:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nKJiHDjAqU8+8PzWr4q+YpShVeO7aptK3fRfdrPAjPo=; b=pYYVjbgYhrRwmgIQSFaPs5+Wett3dqx2+0t0AK7S7hQ6zVANJlHc0BTHVoMHCjAAPw ZXwo6E+iegjiur6q/hjHt2hGhrXRdqNNItibMqfTiNXGOAgQk4rVIx5eXN1n5eYjtUGj w+pZjaGvMTy+23Gsr1yJ5Z+jg0UKsyboRHinqXSYhU1bPVJA2uqn6bW4fsMCWO4RPEsb ARrxeYtTIprgO8MgYkgClCQTAGQiXKZc9AIqlRA5gj7zbEES79Qfoq9/UnyCQxPq+nPJ uuE4F/3x7xF9HZ6I1J+w4JAXeSj05zRGJrjelKa32vzeA1FURDtDaoPvHZVuUj95Nj3P LFTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nKJiHDjAqU8+8PzWr4q+YpShVeO7aptK3fRfdrPAjPo=; b=F6iVNP/kUf5YONEv+piJ/v7Js+Y3hHPLGqF+2wTTMrp0CNKnm0zrWi8SPUeHwr0Z3r WS3kF5e5jl9sGM6SBeVNcNftxrdhuHL+W7FISeCCF4IgY6WUWRxKT3iQv96EOvcSnj3b uMzLI+qbaBQV5JFdB1t0yqtnnP85bD8hUO7Ij6lEfUuHsK4wZrKp3s38FWQZKNFcS2xj u3oqF/FBaGRnrDOGTsOVt1GSnahzgxYUSKlYcgTJAbg6+2lyiC4KPpIKD4uZdUqE/I5n BxDp0n1SwAmfSdWAse0nE+PArb3NiGDouGF/Rwle0D4kf2GVRwURZb/QWVtxijyY2s9h HA/g== X-Gm-Message-State: AOAM533q8rIpaNIzmtWkyG4Nezm3uFP/WLcPitUjI+goxKkxE3NldfJq rlUBGZQCuW5bRMJv4fS+16xfQWvBxFU= X-Google-Smtp-Source: ABdhPJzao7cowJgVEJkBoop385vCGqfjU8W/MLWJL5gWXbfQfVnfpwOBm4cTmLQXIz6AZ0DJ5l0+PA== X-Received: by 2002:a05:600c:214d:: with SMTP id v13mr5410700wml.13.1620502954977; Sat, 08 May 2021 12:42:34 -0700 (PDT) Received: from kali.home (lfbn-ren-1-1383-171.w86-229.abo.wanadoo.fr. [86.229.230.171]) by smtp.gmail.com with ESMTPSA id h14sm16985148wrq.45.2021.05.08.12.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 12:42:34 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 8 May 2021 21:41:55 +0200 Message-Id: <20210508194155.3678473-2-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210508194155.3678473-1-fontaine.fabrice@gmail.com> References: <20210508194155.3678473-1-fontaine.fabrice@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] boot/opensbi: unconditionally disable SSP X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix build failure raised since commit 810ba387bec3c5b6904e8893fb4cb6f9d3717466 Fixes: - https://gitlab.com/kubu93/buildroot/-/jobs/1247043359 Signed-off-by: Fabrice Fontaine --- ...Makefile-unconditionally-disable-SSP.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 boot/opensbi/0002-Makefile-unconditionally-disable-SSP.patch diff --git a/boot/opensbi/0002-Makefile-unconditionally-disable-SSP.patch b/boot/opensbi/0002-Makefile-unconditionally-disable-SSP.patch new file mode 100644 index 0000000000..c4edd37f1a --- /dev/null +++ b/boot/opensbi/0002-Makefile-unconditionally-disable-SSP.patch @@ -0,0 +1,53 @@ +From e389d5fbc296e496db15368b2b621e0f178f7f34 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 8 May 2021 21:28:10 +0200 +Subject: [PATCH] Makefile: unconditionally disable SSP + +Though -nostdlib is passed in {C,+AS,DTSCPP}FLAGS, -fno-stack-protector +must also be passed to avoid linking errors related to undefined +references to '__stack_chk_guard' and '__stack_chk_fail' if toolchain +enforces -fstack-protector. + +Fixes: + - https://gitlab.com/kubu93/buildroot/-/jobs/1247043359 + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/riscv/opensbi/pull/211] +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index eeffe6b..1419360 100644 +--- a/Makefile ++++ b/Makefile +@@ -203,7 +203,7 @@ GENFLAGS += $(libsbiutils-genflags-y) + GENFLAGS += $(platform-genflags-y) + GENFLAGS += $(firmware-genflags-y) + +-CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2 ++CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-stack-protector -fno-strict-aliasing -O2 + CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + CFLAGS += -mno-save-restore -mstrict-align + CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) +@@ -217,7 +217,7 @@ CPPFLAGS += $(GENFLAGS) + CPPFLAGS += $(platform-cppflags-y) + CPPFLAGS += $(firmware-cppflags-y) + +-ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__ ++ASFLAGS = -g -Wall -nostdlib -fno-stack-protector -D__ASSEMBLY__ + ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ASFLAGS += -mno-save-restore -mstrict-align + ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) +@@ -236,7 +236,7 @@ MERGEFLAGS += -r + MERGEFLAGS += -b elf$(PLATFORM_RISCV_XLEN)-littleriscv + MERGEFLAGS += -m elf$(PLATFORM_RISCV_XLEN)lriscv + +-DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-builtin -D__DTS__ -x assembler-with-cpp ++DTSCPPFLAGS = $(CPPFLAGS) -nostdinc -nostdlib -fno-stack-protector -fno-builtin -D__DTS__ -x assembler-with-cpp + + # Setup functions for compilation + define dynamic_flags +-- +2.30.2 +