Hello,
The __builtin___clear_cache() GCC builtin is used for example by the
libffi library RISC-V port to flush the I-Cache after modifying the
code. On RISC-V the internal implementation of this GCC builtin assumes
the C library provides a __riscv_flush_icache() function.
glibc implements this function in
sysdeps/unix/sysv/linux/riscv/flush-icache.c.
Due to the lack of this function in uClibc-ng, building anything that
links against libffi fails, for example, libglib2:
FAILED: gobject/gobject-query
/home/test/autobuild/run/instance-0/output-1/host/bin/riscv64-buildroot-linux-uclibc-gcc -o gobject/gobject-query gobject/gobject-query.p/gobject-query.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--start-group glib/libglib-2.0.so.0.6400.4 gobject/libgobject-2.0.so.0.6400.4 -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/../glib:$ORIGIN/' -Wl,-rpath-link,/home/test/autobuild/run/instance-0/output-1/build/libglib2-2.64.4/build/glib -Wl,-rpath-link,/home/test/autobuild/run/instance-0/output-1/build/libglib2-2.64.4/build/gobject
/home/test/autobuild/run/instance-0/output-1/host/lib/gcc/riscv64-buildroot-linux-uclibc/9.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: /home/test/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-uclibc/sysroot/usr/lib64/libffi.so.7: undefined reference to `__riscv_flush_icache'
collect2: error: ld returned 1 exit status
Would it be possible to implement this function in uClibc-ng ?
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Recently, I couldn't build GNU Emacs on a uclibc-ng-1.0.33 system. The
issue eventually went to Gnulib; they pushed a workaround but concluded
it's a uClibc issue. Their summary, as presented in the patch in the
message below:
> On uClibc, <sys/random.h> assumes prior inclusion of <stddef.h>.
For details, see
https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00098.html
and further down the thread.
I was advised to report this to you so here it goes.
I read in a paper
<https://www.kernel.org/doc/ols/2006/ols2006v1-pages-409-420.pdf> from 2006
on kernel.org:
> It should also be noted that statically linked binaries using TLS/NPTL
are not currently supported by uClibc.
Is this still the case for uClibc-ng in 2020?
Thank you,
Evan
--
etm2131(a)columbia.edu
Hi,
does anybody plan to implement {name,open}_to_handle_at() in uclibc-ng?
These are new dependencies for iproute2.
2 years ago it was just removed from bits/fcntl.h in 42ff2bba8 ("uClibc-ng does
not implement name_to_handle_at").
Kind regards,
Petr
Starting with GCC-10 multiple definitions of global variables by will be
rejected.
https://gcc.gnu.org/gcc-10/porting_to.html
This fixes multiple definitions of _dl_pagesize and _dl_tls_static_size
while attempting static linking.
Of course this only occurs when compiling something that requires these
symbols.
First patch submission so hopefully all done correctly.
thanks,
Lance Fredrickson