[uClibc]How to use uCLibc in a cross compile environement.

Erik Andersen andersen at codepoet.org
Wed Apr 23 19:06:23 UTC 2003


On Wed Apr 23, 2003 at 02:47:49PM -0400, Thierry De Corte wrote:
> 
> > Hi thierry
> >
> > I think your problem is during the configuration
> > of your uclibc cross compiler. You had to put your
> > SHARED_LIB_LOADER_PATH to /lib instead of
> > /usr/powerpc-linux-uclibc/lib/.
> >
> > Try it and tell me what happen ! :-)
> 
> Thanks, setting SHARED_LIB_LOADER_PATH is working....
> 
> I have a new problem... When I run any programs (including "hello world"), I
> get an unresolved symbol for __subdf3. Since I removed UCLIBC_HAS_FLOAT in
> .config (my PPC405 doesn't support floats), I'm wondering why it still want
> to link to a float function. The problem seems to come from the function
> erand48_r which use a double*.
> 
> Since erand_r is used in stdlib, I guess I must remove all rand
> functionnality from ucLibc...

Does applying this patch fix the problem for you?


--- Makefile	22 Nov 2002 03:05:25 -0000	1.50
+++ Makefile	23 Apr 2003 19:05:39 -0000
@@ -54,12 +54,12 @@
 MOBJ2=atexit.o on_exit.o __exit_handler.o exit.o
 CSRC =	abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c mkstemp64.c \
 	rand.c random.c random_r.c setenv.c system.c div.c ldiv.c getpt.c \
-	ptsname.c grantpt.c unlockpt.c gcvt.c drand48.c drand48-iter.c \
-	drand48_r.c erand48.c erand48_r.c jrand48.c jrand48_r.c lrand48.c \
+	ptsname.c grantpt.c unlockpt.c gcvt.c drand48-iter.c \
+	drand48_r.c erand48.c jrand48.c jrand48_r.c lrand48.c \
 	lrand48_r.c mrand48.c mrand48_r.c nrand48.c nrand48_r.c rand_r.c \
 	srand48.c srand48_r.c calloc.c valloc.c
 ifeq ($(UCLIBC_HAS_FLOATS),y)
-	CSRC += strtod.c strtof.c strtold.c
+	CSRC += strtod.c strtof.c strtold.c drand48.c erand48_r.c
 endif
 COBJS=$(patsubst %.c,%.o, $(CSRC))
 

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--


More information about the uClibc mailing list