From: Stephen Hemminger <shemminger@linux-foundation.org>
To: linux-kernel@vger.kernel.org
Subject: Re: linux-2.6.21 and __udivid3
Date: Thu, 26 Apr 2007 12:57:06 -0700 [thread overview]
Message-ID: <20070426125706.077a3a72@freekitty> (raw)
In-Reply-To: 20070426175526.GR3468@stusta.de
On Thu, 26 Apr 2007 19:55:26 +0200
Adrian Bunk <bunk@stusta.de> wrote:
> On Fri, Apr 27, 2007 at 12:24:32AM +0900, l l wrote:
> > Hi,
> >
> > How to link libgcc.a with linux-2.6.21?
> >
> > LD .tmp_vmlinux1
> > kernel/built-in.o: In function `timespec_add_ns':
> > /usr/src/linux-2.6.21/kernel/timer.c:828: undefined reference to
> > `__udivdi3'
> > /usr/src/linux-2.6.21/kernel/timer.c:841: undefined reference to
> > `__udivdi3'
> > /usr/src/linux-2.6.21/kernel/timer.c:1311: undefined reference to
> > `__udivdi3'
> > make[1]: *** [.tmp_vmlinux1] Error 1
> > make[1]: Leaving directory `/usr/src/linux-2.6.21'
> > make: *** [debian/stamp-build-kernel] Error 2
>
> I assume this is a plain 2.6.21 from ftp.kernel.org?
>
> > cc -v
> > Using built-in specs.
> > Target: i686-pc-linux-gnu
> > Configured with: ../gcc/configure --prefix=/usr --libexecdir=/usr/lib
> > --enable-shared --enable-threads=posix --enable-__cxa_atexit
> > --enable-clocale=gnu --enable-languages=c,c++,treelang
> > --with-system-zlib --with-gmp --enable-mpfr
> > --enable-libstdcxx-allocator=mt
> > Thread model: posix
> > gcc version 4.3.0 20070420 (experimental)
>
> Can you reproduce this with gcc 4.1?
> If yes, please send your .config .
>
> > TIA
>
> cu
> Adrian
>
I wonder if GCC 4.3 is trying to optimize this loop into a divide/remainder?
If so, then it is time to give the gcc developers a little talking to.
static inline void timespec_add_ns(struct timespec *a, u64 ns)
{
ns += a->tv_nsec;
while(unlikely(ns >= NSEC_PER_SEC)) {
ns -= NSEC_PER_SEC;
a->tv_sec++;
}
a->tv_nsec = ns;
}
--
Stephen Hemminger <shemminger@linux-foundation.org>
next prev parent reply other threads:[~2007-04-26 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-26 15:24 linux-2.6.21 and __udivid3 l l
2007-04-26 15:32 ` Peter Zijlstra
2007-04-26 17:55 ` Adrian Bunk
2007-04-26 19:57 ` Stephen Hemminger [this message]
2007-04-27 0:30 ` l l
2007-04-27 0:56 ` l l
2007-04-27 9:11 ` Andrew Morton
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=20070426125706.077a3a72@freekitty \
--to=shemminger@linux-foundation.org \
--cc=linux-kernel@vger.kernel.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.