[ORLinux] uClibc patches
Jeremy Bennett
jeremy.bennett at embecosm.com
Wed Jun 1 17:32:14 CEST 2011
On Wed, 2011-06-01 at 17:10 +0300, Jonas Bonn wrote:
> Hi Jeremy,
> Thanks for the patches... see my comments below.
> This looks like a perfect opportunity for you to get your hands dirty
> with git... I'll be happy to give you a hand if you want to try to find
> me on IRC.
> /Jonas
Hi Jonas,
Thanks for the offer. I'm trying to close down a piece of work at the
moment, then I'll turn my hand to this.
<snip>
> We do not update ChangeLogs anymore... the correct procedure for
> documenting changes is to create a commit for each change in git with an
> accompanying commit message describing the changes and the reason
> therefore.
OK
> > diff --exclude .svn --exclude .git --exclude .gitignore -Naur /home/jeremy/gitdirs/uClibc/extra/Configs/defconfigs/or32 ./extra/Configs/defconfigs/or32
> > --- /home/jeremy/gitdirs/uClibc/extra/Configs/defconfigs/or32 2011-06-01 11:27:42.309865823 +0100
> > +++ ./extra/Configs/defconfigs/or32 2011-06-01 11:32:28.619866299 +0100
> > @@ -52,7 +52,7 @@
> > # DO_C99_MATH is not set
> > # DO_XSI_MATH is not set
> > # UCLIBC_HAS_FENV is not set
> > -KERNEL_HEADERS="${SYSROOT}/usr/include"
> > +KERNEL_HEADERS="/opt/or32-new/or32-linux/include"
>
> The default configuration is intended to be useable from the build
> instructions on openrisc.net... the SYSROOT variable is required here.
>
> >From your path I am guessing that you aren't using the sys-root feature
> of GCC... you're not required to, but I'd recommend it.
Unfortunately sysroot does not work completely. Early on in the GCC
installation manual it tells you this is the way to do things, and the
old ways are deprecated.
Later on in the small print you discover that sysroot does not have all
the functionality of the things it is supposed to replace, and actually
it can't be used in some circumstances.
If you've been having problems with tool chain build, this may be the
cause of the problem. I spent a long time trying to get this to work,
before discovering the small print. That's why bld-all.sh doesn't use
it.
Nice idea, but its not ready for deployment yet.
<snip>
> >
> > diff --exclude .svn --exclude .git --exclude .gitignore -Naur /home/jeremy/gitdirs/uClibc/include/math.h ./include/math.h
> > --- /home/jeremy/gitdirs/uClibc/include/math.h 2011-06-01 11:27:42.365866048 +0100
> > +++ ./include/math.h 2011-06-01 11:33:56.895995601 +0100
> > @@ -249,7 +249,11 @@
> > };
> >
> > /* Return number of classification appropriate for X. */
> > -# ifdef __NO_LONG_DOUBLE_MATH
> > +# if __GNUC_PREREQ (4, 4)
> > +# define fpclassify(x) \
> > + (__builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, \
> > + FP_ZERO, (x)))
> > +# elif defined (__NO_LONG_DOUBLE_MATH)
> > # define fpclassify(x) \
> > (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x))
> > # else
> > @@ -261,7 +265,9 @@
> > # endif
> >
> > /* Return nonzero value if sign of X is negative. */
> > -# ifdef __NO_LONG_DOUBLE_MATH
> > +# if __GNUC_PREREQ (4, 0)
> > +/* GCC has built-in implementations. */
> > +# elif defined (__NO_LONG_DOUBLE_MATH)
> > # define signbit(x) \
> > (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x))
> > # else
> > @@ -289,7 +295,10 @@
> >
> > /* Return nonzero value if X is a NaN. We could use `fpclassify' but
> > we already have this functions `__isnan' and it is faster. */
> > -# ifdef __NO_LONG_DOUBLE_MATH
> > +# if __GNUC_PREREQ (4, 2)
> > +/* GCC has built-in implementations. However, we want the definition to be available even with -fno-builtin, so define to the __builtin version. */
> > +# define isnan(x) (__builtin_isnan (x))
> > +# elif defined (__NO_LONG_DOUBLE_MATH)
> > # define isnan(x) \
> > (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x))
> > # else
> > @@ -301,7 +310,10 @@
> > # endif
> >
> > /* Return nonzero value is X is positive or negative infinity. */
> > -# ifdef __NO_LONG_DOUBLE_MATH
> > +# if __GNUC_PREREQ (4, 2)
> > +/* GCC has built-in implementations. Same issue as with isnan above. */
> > +# define isinf(x) (__builtin_isinf (x))
> > +# elif defined (__NO_LONG_DOUBLE_MATH)
> > # define isinf(x) \
> > (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x))
> > # else
>
> Very cool. Is this needed for regression testing or performance reasons
> (or some other reason)?
It fixes some regression failures.
<snip>
> > diff --exclude .svn --exclude .git --exclude .gitignore -Naur /home/jeremy/gitdirs/uClibc/test/regex/testregex.c ./test/regex/testregex.c
> > --- /home/jeremy/gitdirs/uClibc/test/regex/testregex.c 2011-06-01 11:27:42.900866758 +0100
> > +++ ./test/regex/testregex.c 2011-06-01 11:41:54.039867350 +0100
> > @@ -30,7 +30,7 @@
> > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> > */
> >
> > -static const char id[] = "\n@(#)$Id: testregex (AT&T Research) 2005-05-20 $\0\n";
> > +static const char id[] = "\n@(#)$Id: testregex.c 1548 2011-06-01 10:41:48Z jeremy $\0\n";
> >
>
> What is this?
Theses are the two uClibc source files which still have $Id in them. So
if you use a SVN environment, they'll get changed. I was just flagging
them up to remove the $Id.
ATB,
Jeremy
--
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett at embecosm.com
Web: www.embecosm.com
More information about the Linux
mailing list