From patchwork Sun May 2 21:49:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1472919 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.137; helo=smtp4.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=WJcOrKVe; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 4FYKWs3mbTz9s1l for ; Mon, 3 May 2021 07:49:45 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0017540484; Sun, 2 May 2021 21:49:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qSwdhWt7eG5M; Sun, 2 May 2021 21:49:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 133EA404A6; Sun, 2 May 2021 21:49:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id D45C61BF5AE for ; Sun, 2 May 2021 21:49:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C3D72404A9 for ; Sun, 2 May 2021 21:49:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jS4RtNt0z37e for ; Sun, 2 May 2021 21:49:26 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6E0A340484 for ; Sun, 2 May 2021 21:49:26 +0000 (UTC) Received: by mail-wr1-x436.google.com with SMTP id m9so3591937wrx.3 for ; Sun, 02 May 2021 14:49:26 -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=zY60IPiM9bsPphZa93awbPw3pzj9Z+P4fCHscWkWKt4=; b=WJcOrKVe72BFgw9qKwxF6INWwWtRdfDhIGrM2DWH6PMf0TpB0I3iFy3od4J8ISDX0C XhsyAWlUf4LiwRYtiJSiAv/v0nBjaGC0xZerVMTnqsE5btnipPLeZo7JAva+IwmQVHrl tT/OYOWPpYYANs4OxVl+sapSMv9WqJhTJoZMWiErtRwxgQMi0TIK3KyYLeWayyPX7FVX lIx4NVDbuEXrY/s0/ULu3hDBzrcbUVYn1msCvRBUfROJalryVoUKVXESY0i+symt82PC T1E/P1d7q54Dkd9IKiJJEzswDTe0m/mdoQ/020gJc3dx/uep1obDxC5ZqH+fXbdFRji5 pz5Q== 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=zY60IPiM9bsPphZa93awbPw3pzj9Z+P4fCHscWkWKt4=; b=Gi1zJ83g9nru6Lgfo0wlXoSHu8ut449PIL5hNHl+gC6kPGA1uhXZqeCJu8nviMtg4L rlTgAURP7UAJtamTBTz5eH2wYRZyx/NLAogKrF12LSxwK9ZBDDtGzwEmWWttoFNvfgFT 1hyPWfiNQDGhWL+7wP9rYnYA/hTqAOCgblYSNGDVnGEh0Hx4qlvrbYR48l01dITsydJS QKDaXubwGPJMLdEe85YyH6CfS9HofLZndJpYwcmH3B/jE3q9GaENXLH2uNADvSBwgKpy MpLyx0oO2TuPH9hfyB2qjctlVM47ORBrWLiLqpzZNLRC0STrXNGKkeRKhWzfW8o9jbXk cA0g== X-Gm-Message-State: AOAM5319j9ZGX2R9mnheTLeRimrc3XE7JX4ohhlZwVrb/9KtVxYCWDAL kmCRlmbrIaE0UsULhotwHSH3WRt8/48= X-Google-Smtp-Source: ABdhPJyNRfqS44WdsqDw0CnZmqQO6BJJlzZ4zhqT6hu/F5V/umB+GlAh3rGXO0ifvmVuotL4KPmUmw== X-Received: by 2002:a5d:610d:: with SMTP id v13mr21013539wrt.173.1619992164712; Sun, 02 May 2021 14:49:24 -0700 (PDT) Received: from localhost.localdomain (2a01cb058f8a180002e04cfffe680084.ipv6.abo.wanadoo.fr. [2a01:cb05:8f8a:1800:2e0:4cff:fe68:84]) by smtp.gmail.com with ESMTPSA id o17sm8679439wmq.47.2021.05.02.14.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 May 2021 14:49:24 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sun, 2 May 2021 23:49:15 +0200 Message-Id: <20210502214919.1826571-2-romain.naour@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210502214919.1826571-1-romain.naour@gmail.com> References: <20210502214919.1826571-1-romain.naour@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V 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: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Backport an upstream patch fixing a link issue with libgc.so on RISC-V riscv64-buildroot-linux-musl/sysroot/usr/lib/libgc.so: undefined reference to `__data_start' https://gitlab.com/kubu93/buildroot/-/jobs/1229888983 Signed-off-by: Romain Naour Reviewed-by: Alistair Francis --- ...ference-to-__data_start-linker-error.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch diff --git a/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch new file mode 100644 index 0000000000..81221c9f66 --- /dev/null +++ b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch @@ -0,0 +1,33 @@ +From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001 +From: Nikita Ermakov +Date: Wed, 20 May 2020 17:57:17 +0300 +Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on + RISC-V + +Issue #294 (bdwgc). + +* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add +attribute(weak). + +(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9) +Signed-off-by: Romain Naour +--- + include/private/gcconfig.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h +index d9d45da1..d6cefa6f 100644 +--- a/include/private/gcconfig.h ++++ b/include/private/gcconfig.h +@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN + # define ALIGNMENT (CPP_WORDSZ/8) + # ifdef LINUX + # define OS_TYPE "LINUX" +- extern int __data_start[]; ++ extern int __data_start[] __attribute__((__weak__)); + # define DATASTART ((ptr_t)__data_start) + # define LINUX_STACKBOTTOM + # define DYNAMIC_LOADING +-- +2.30.2 +