From patchwork Fri Oct 25 09:56:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 1183966 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=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="LQ1SdT2p"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46zzzY2zv8z9sPl for ; Fri, 25 Oct 2019 20:56:57 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3B5BA8758C; Fri, 25 Oct 2019 09:56:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1ORuBkG3L6o7; Fri, 25 Oct 2019 09:56:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7F9E687476; Fri, 25 Oct 2019 09:56:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F3B3C1BF5D7 for ; Fri, 25 Oct 2019 09:56:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F0AEF87476 for ; Fri, 25 Oct 2019 09:56:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fe3ds4f0xf5x for ; Fri, 25 Oct 2019 09:56:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 141C787466 for ; Fri, 25 Oct 2019 09:56:52 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id 22so1229445wms.3 for ; Fri, 25 Oct 2019 02:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qcwt76ZHPytAQssPa+v+8vblVTTTima+WXCXN58yPGE=; b=LQ1SdT2pVQ2FvSOJI2txw/B4UTFKBc11Ej8+WGfr4sK8W1T0oEaucm8lLkfiuO/xug RjM0SybIOXxu3u60mpT3L/Gy65Eoce6/ywrXZZTf0O1b+zFekjdl+AaUOWWuVzt5VF97 z6nDQPW9kDizk5Lo3TbsFNcha1EHB4Uo2+ZtFEAjUCpPdVBvdhNDO7470tMvi+icyEzF o8cZDNdcnYG1bqe6+288mhQJg9sBctr+BdoUvhJfM9DHsiNehG3eltraq/gZzQM8RoUm SLQwz5uE6rcRktUnp3WrQ7zDNfpDgTHILmLYrHl3NzvZPV1v8silTKMPgpsFYeciSNiZ hN1A== 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:mime-version :content-transfer-encoding; bh=qcwt76ZHPytAQssPa+v+8vblVTTTima+WXCXN58yPGE=; b=Tc2WdPFFdQ+YYlq8jBFmjZjAV+KEF/akDVqV/sFfRwdm/4L14ZPuZIIfjSt3AY8FVy Mv1nIf8buXqi/ru9OSwBGSB9U0NfntiysxJ5b3CNJU4Q9F3dtWWFsjcmvhr0nTwbMh7v z++LkYR2I7Aje4OCO6KQ7ggjOhawQNFlpQeU/gTqrN/ZPYnwm64U/jmdaQX+55ZHticM ASUZCKRPsRPxKpc9BI1FKeR+hR8h3N55WhcQW8xNmO9dhuG3qzTihxwefEYwJDJHoCue aahubqa8KAA7ErUrr0aQ0z92c0oBTPiv+t6IYnDk/XektivnG/y73myYU2Rh6U1BE9wy oE7Q== X-Gm-Message-State: APjAAAX5WNSiFDRmpJeJWIFCrW0rWowvKx7wbeS7GVEaMMwgFESQnOOA SRlELdzifYVpcMjuhMq3v/wyHOXQRtXs9A== X-Google-Smtp-Source: APXvYqx/3C9nJjQYjAYILLHzHIJfvv4gvazvha4Ysyg+XJui66MYIL8h4AELyPYkoyiwxqqn5Leiww== X-Received: by 2002:a1c:4045:: with SMTP id n66mr2670847wma.92.1571997410226; Fri, 25 Oct 2019 02:56:50 -0700 (PDT) Received: from godzilla.lym.embecosm-corp.com (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id z13sm1701096wrm.64.2019.10.25.02.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 02:56:49 -0700 (PDT) From: Mark Corbin To: buildroot@buildroot.org Date: Fri, 25 Oct 2019 10:56:05 +0100 Message-Id: <20191025095605.17673-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/libsigsegv: fix macro expansion error for RISC-V with musl 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: Mark Corbin , Simon Dawson Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The expansion of the SIGSEGV_FAULT_STACKPOINTER macro fails when building for RISC-V with musl because REG_SP is not defined (it is defined for glibc). This patch just replaces REG_SP with the numerical register offset (which is 2 for the stack pointer). Fixes: http://autobuild.buildroot.net/results/8d6cade2562404b9800736a3b9a2beada98bda88 Signed-off-by: Mark Corbin --- ...ion-error-when-building-for-RISC-V-w.patch | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/libsigsegv/0005-Fix-macro-expansion-error-when-building-for-RISC-V-w.patch diff --git a/package/libsigsegv/0005-Fix-macro-expansion-error-when-building-for-RISC-V-w.patch b/package/libsigsegv/0005-Fix-macro-expansion-error-when-building-for-RISC-V-w.patch new file mode 100644 index 0000000000..6906e04b1d --- /dev/null +++ b/package/libsigsegv/0005-Fix-macro-expansion-error-when-building-for-RISC-V-w.patch @@ -0,0 +1,29 @@ +From 3da9e4a8aea252143ab567678722c739793cfeb7 Mon Sep 17 00:00:00 2001 +From: Mark Corbin +Date: Fri, 25 Oct 2019 10:16:54 +0100 +Subject: [PATCH] Fix macro expansion error when building for RISC-V with + musl + +The expansion of the SIGSEGV_FAULT_STACKPOINTER macro fails when +building for RISC-V with musl because REG_SP is not defined (it is +defined for glibc). This patch just replaces REG_SP with the +numerical register offset (which is 2 for the stack pointer). + +Signed-off-by: Mark Corbin +--- + src/fault-linux-riscv64.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fault-linux-riscv64.h b/src/fault-linux-riscv64.h +index 14831bf..7fee4d3 100644 +--- a/src/fault-linux-riscv64.h ++++ b/src/fault-linux-riscv64.h +@@ -26,4 +26,4 @@ + glibc/sysdeps/unix/sysv/linux/riscv/bits/sigcontext.h + start with the same block of 32 general-purpose registers. */ + +-#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.__gregs[REG_SP] ++#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.__gregs[2] +-- +2.19.1 +