Updated glibc-2.7 for geode

Bernardo Innocenti bernie at codewiz.org
Wed Nov 28 08:32:19 EST 2007


Rob Savoye wrote:

> Here's my patch to glibc.spec. I attached my modified copy. Also Prefix
> doesn't appear to actually work, so be careful, as installing glibc on
> top of an existing system can often trash it. The main change was to the
> configure line. Supposedly you can use -target with rpmbuild to set
> geode, but it doesn't work. So this is a bit hacked, but passing
> --with-cpu=geode when configuring glibc does the trick.

I finally found the time to update your patch to glibc-2.7-2 from Fedora
and tried building it.  The resulting spec and srpm are here:

  http://www.codewiz.org/pub/glibc-geode-2.7/


I used an F7 environment with updated binutils for the build-id
thing and updated rpm for the debuginfo thing.  I've been using
a cvs checkout:

 cvs -d :pserver:anonymous at cvs.fedora.redhat.com:/cvs/pkgs co glibc
 cp -a glibc/devel glibc/OLPC-2
 cd glibc/OLPC-2
 echo OLPC-2 >branch
 [...apply my glibc.spec.patch...]
 make geode

Building outside the CVS environment requires some fiddling:

  rpmbuild --define "dist .olpc2" --define "olpc 2" --target geode -ba glibc.spec


My build fails like this:

---cut---
gcc   -nostdlib -nostartfiles -r -o /home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.os \
         -Wl,-d -Wl,--whole-archive
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(memcpy_chk.os): In function `__memcpy_chk':
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/debug/memcpy_chk.c:32: multiple definition of `__memcpy_chk'
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(memcpy.os):(.text+0x0): first defined here
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(mempcpy_chk.os): In function `__mempcpy_chk':
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/debug/mempcpy_chk.c:33: multiple definition of `__mempcpy_chk'
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(mempcpy.os):(.text+0x0): first defined here
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(memset_chk.os): In function `__memset_chk':
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/debug/memset_chk.c:28: multiple definition of `__memset_chk'
/home/bernie/src/pkgs/glibc/OLPC-2/glibc-20071017T2029/build-i586-linuxnptl/libc_pic.a(memset.os):(.text+0x0): first defined here
collect2: ld returned 1 exit status
--cut---

Damn'it... they probably changed the interface slightly in
glibc 2.7.  If you have time to look into this, that would
be great.  Otherwise, I may give it a shot when I got some
more time.

By the way, why can't we drop the geode optimized routines in
sysdeps/i386/i686?  The i686 subarch has many more asm
optimizations that we may like to have on the geode too.

We've been using the i686 binary on the laptop since before
I joined the project, so we're not concerned by ISA
compatibility issues.

-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/



More information about the Devel mailing list