All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Taube <mr.bossman075@gmail.com>
To: buildroot@buildroot.org
Cc: Jesse Taube <Mr.Bossman075@gmail.com>
Subject: [Buildroot] [PATCH] package/uclibc: Fix build when RVA is disabled
Date: Mon,  2 Sep 2024 13:59:56 -0400	[thread overview]
Message-ID: <20240902175956.2837858-1-Mr.Bossman075@gmail.com> (raw)

If the RVA option is disabled uclibc won't build with Shared libraries
enabled or Threads enabled. Add guards against this.

When the RVA option is disabled, the build fails with the
following errors:
With Threads enabled:

  LD libuClibc-1.0.48.so
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(err.os): in function `.L0 ':
err.c:(.text+0xa0): undefined reference to `__atomic_compare_exchange_4'
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(err.os): in function `.L6':
err.c:(.text+0x138): undefined reference to `__atomic_exchange_4'
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(__cxa_finalize.os): in function `.L3':
__cxa_finalize.c:(.text+0xac): undefined reference to `__atomic_compare_exchange_8'
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(fork.oS): in function `.L23':
fork.c:(.text+0x130): undefined reference to `__atomic_fetch_add_4'
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(sem_timedwait.oS): in function `.L5':
sem_timedwait.c:(.text+0xe0): undefined reference to `__atomic_fetch_add_8'

With Shared libraries enabled:

  LD libuClibc-1.0.48.so
riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(__cxa_finalize.os): in function `.L3':
__cxa_finalize.c:(.text+0xa4): undefined reference to `__atomic_compare_exchange_8'

Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
 arch/Config.in           | 2 +-
 package/uclibc/Config.in | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/Config.in b/arch/Config.in
index f39c33ef7f..d0052782be 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -431,7 +431,7 @@ choice
 config BR2_BINFMT_ELF
 	bool "ELF"
 	depends on BR2_USE_MMU
-	select BR2_BINFMT_SUPPORTS_SHARED
+	select BR2_BINFMT_SUPPORTS_SHARED if !BR2_riscv || BR2_RISCV_ISA_RVA
 	help
 	  ELF (Executable and Linkable Format) is a format for libraries
 	  and executables used across different architectures and
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 73ddd5ef58..f7edd417c6 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -78,13 +78,13 @@ choice
 
 config BR2_PTHREADS_NATIVE
 	bool "Native POSIX Threading (NPTL)"
-	depends on BR2_USE_MMU
+	depends on BR2_USE_MMU && (!BR2_riscv || BR2_RISCV_ISA_RVA)
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
 
 config BR2_PTHREADS
 	bool "linuxthreads"
-	depends on !BR2_aarch64 && !BR2_aarch64_be
+	depends on !BR2_aarch64 && !BR2_aarch64_be && (!BR2_riscv || BR2_RISCV_ISA_RVA)
 	select BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PTHREADS_NONE
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2024-09-02 18:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-02 17:59 Jesse Taube [this message]
2024-09-03 18:55 ` [Buildroot] [PATCH] package/uclibc: Fix build when RVA is disabled Thomas Petazzoni via buildroot
2024-09-05 10:39   ` Waldemar Brodkorb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240902175956.2837858-1-Mr.Bossman075@gmail.com \
    --to=mr.bossman075@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.