On Friday 13 February 2009 14:15, rhabarber1848 wrote:
> Hi,
> 
> this commit
> http://sources.busybox.net/index.py/trunk/uClibc/libm/ldouble_wrappers.c?r1=24914&r2=25221&diff_format=h
> 
> lead to an error when compiling Busybox 1.7.2:
> 
> >   LINK    busybox_unstripped
> > Trying libraries: crypt m
> > Failed: powerpc-tuxbox-linux-uclibc-gcc -o
> busybox_unstripped -Wl,-Map -Wl,busybox_unstripped.map -Wl,--warn-common 
> -Wl,--sort-common -Wl,--gc-sections -Wl,--start-group
> applets/built-in.o archival/lib.a archival/libunarchive/lib.a
> console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a
> debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a
> ipsvd/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a miscutils/lib.a
> modutils/lib.a networking/lib.a networking/libiproute/lib.a
> networking/udhcp/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a
> sysklogd/lib.a util-linux/lib.a archival/built-in.o
> archival/libunarchive/built-in.o console-tools/built-in.o
> coreutils/built-in.o coreutils/libcoreutils/built-in.o
> debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o
> findutils/built-in.o init/built-in.o ipsvd/built-in.o libbb/built-in.o
> libpwdgrp/built-in.o loginutils/built-in.o miscutils/built-in.o
> modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o
> networking/udhcp/built-in.o procps/built-in.o runit/built-in.o
> selinux/built-in.o shell/built-in.o sysklogd/built-in.o
> util-linux/built-in.o -Wl,--end-group -Wl,--start-group -Wl,--start-group 
> -lcrypt -lm -Wl,--end-group -Wl,--end-group
> > /root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so:
> undefined reference to `__GI___isnanl'
> > /root/tuxbox/work_uclibc/image/cdk/lib/gcc/powerpc-tuxbox-linux-uclibc/3.4.6/../../../../powerpc-tuxbox-linux-uclibc/lib/nof/libm.so:
> undefined reference to `__GI___isinfl'
> > collect2: ld returned 1 exit status
> 
> Attached you will find a patch fixing the problem.
> 
> Cheers, rhabarber1848

Well, it broke testsuite compile.
I believe the bug is in incorrect (incomplete)
scrubbing if libm_hiiden_proto().

Does attached patch help (instead of your proposal)?
--
vda
diff -d -urpN uClibc.8/include/math.h uClibc.9/include/math.h
--- uClibc.8/include/math.h	2009-02-08 23:43:46.000000000 +0100
+++ uClibc.9/include/math.h	2009-02-14 04:16:51.000000000 +0100
@@ -46,9 +46,6 @@ __BEGIN_DECLS
 /* Get general and ISO C99 specific information.  */
 #include <bits/mathdef.h>
 
-#if !(defined _LIBC && (defined NOT_IN_libc && defined IS_IN_libm))
-# define libm_hidden_proto(name, attrs...)
-#endif
 
 /* The file <bits/mathcalls.h> contains the prototypes for all the
    actual math functions.  These macros are used for those prototypes,
@@ -59,13 +56,15 @@ __BEGIN_DECLS
   __MATHDECL (_Mdouble_,function,suffix, args)
 #define __MATHDECL(type, function,suffix, args) \
   __MATHDECL_1(type, function,suffix, args);
+
 #define __MATHCALLX(function,suffix, args, attrib)	\
   __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
+#define __MATHDECL_1(type, function,suffix, args) \
+  extern type __MATH_PRECNAME(function,suffix) args __THROW
 #define __MATHDECLX(type, function,suffix, args, attrib) \
   __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \
   __MATHDECLI_MAINVARIANT(function)
-#define __MATHDECL_1(type, function,suffix, args) \
-  extern type __MATH_PRECNAME(function,suffix) args __THROW
+
 /* Decls which are also used internally in libm.
    Only the main variant is used internally, no need to try to avoid relocs
    for the {l,f} variants.  */
@@ -76,16 +75,24 @@ __BEGIN_DECLS
   __MATHDECLI_MAINVARIANT(function)
 /* Private helpers for purely macro impls below.
    Only make __foo{,f,l} visible but not (the macro-only) foo.  */
-#define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
-  __MATHDECL_1(type, __CONCAT(__,function),suffix, args) \
-						__attribute__ (attrib); \
+#if defined _LIBC
+# define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
+  __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib); \
   libm_hidden_proto(__MATH_PRECNAME(__##function,suffix))
+#else
+# define __MATHDECL_PRIV(type, function,suffix, args, attrib) \
+  __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib);
+#endif
 
-#define __MATHDECLI_MAINVARIANT libm_hidden_proto
-#define _Mdouble_		double
-#define __MATH_PRECNAME(name,r)	__CONCAT(name,r)
-# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
-# define _Mdouble_END_NAMESPACE   __END_NAMESPACE_STD
+#if defined _LIBC
+# define __MATHDECLI_MAINVARIANT(x) libm_hidden_proto(x)
+#else
+# define __MATHDECLI_MAINVARIANT(x)
+#endif
+#define _Mdouble_		 double
+#define __MATH_PRECNAME(name,r)  __CONCAT(name,r)
+#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
+#define _Mdouble_END_NAMESPACE   __END_NAMESPACE_STD
 #include <bits/mathcalls.h>
 #undef	_Mdouble_
 #undef _Mdouble_BEGIN_NAMESPACE
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to