[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] eglibc builds and tests on mpc8540
- To: Jim Blandy <jimb@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] eglibc builds and tests on mpc8540
- From: Clemens Koller <clemens.koller@xxxxxxxxxxx>
- Date: Fri, 25 May 2007 17:47:45 +0200
Hello, Jim and Steven!
Thank you for giving me a helping hand on my way through eglibc.
Sorry, for the long mail. I just want to give you some overall
status update and for further documentation:
>>> What linux kernel headers and glibc-headers do you recommend?
>> 2.6.12 kernel headers are ok.
Okay, I've found some ppc'ish 2.6.14.1 which look clean.
>>> What build environment (hosts, binutils, gcc...) do you recommend?
>>>
>> You will need a gcc-4.1.1 with soft-fp long double patches from
>> bugzilla 2749, for a recent gcc-4.2 and a recent binutils (2.17).
Are the patches in some of latest gcc-branches or in trunk?
If yes, in which branches? Did anybody test these?
>> libc-2.5 powerpc WILL NOT build without long double support.
>
> http://www.eglibc.org/prerequisites is meant to explain what's needed
> to build EGLIBC.
> Also, EGLIBC.cross-building has reasonably detailed instructions for a
> generic build from straight sources --- binutils, kernel, GCC, and
> EGLIBC. We don't want to expand those instructions to describe every
> possible variation in the build process, but if they're unclear or
> don't work the way they claim to, we'd love to hear about it.
...I've read that. The link to the GCC patches is currently not working.
(sources.redhat.com is not responding) I'll try later.
I also want to mention the thread:
http://www.eglibc.org/archives/patches/msg00017.html
Which seems to be helpful, and is hopefully up to date.
I've build several older glibc-2.3.5 more or less successful without
the floating point stuff and without dedicated e500 SPE support.
Currently, I've planned to start using plain gcc-4.2.0 and hope
that I need less patches as for gcc-4.1.2 or 4.1.1.
I will see, if I can have a look at the patches.
Let me again give you some information of how my system looks like:
$ uname -a
Linux ecam 2.6.21-rc5-g9a5ee4cc #4 Mon Apr 2 21:31:53 CEST 2007 ppc e500 GNU/Linux
$ cat /proc/cpuinfo
processor : 0
cpu : e500
revision : 2.0 (pvr 8020 0020)
bogomips : 823.29
chipset : 8540
Vendor : Freescale Semiconductor
Machine : mpc8540ads
clock : 825MHz
PVR : 0x80200020
SVR : 0x80300020
PLL setting : 0x5
Memory : 256 MB
$ gcc -v
Using built-in specs.
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.2.0/configure --prefix=/usr --libexecdir=/usr/lib --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable-nls --with-x=no --with-float=soft --with-cpu=8540 --with-tune=8540
Thread model: posix
gcc version 4.2.0 (ckcore)
$ ld -v
GNU ld version 2.17
Well, I want to build eglibc in an automated system (based on the CRUX Linux package system).
So, my build script currently (still bogus) looks like:
# Description: The embedded C library used in the GNU system
# URL: http://www.eglibc.org/
# Maintainer: Clemens Koller, clemens dot koller at anagramm dot de
name=eglibc
version=svn2289
release=1
source=(http://crux.nu/files/dist/kernel-headers-2.6.14-1.tar.bz2
hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
build() {
# get latest eglibc trunk from svn
# svn co svn://svn.eglibc.org/trunk eglibc
cp -al $SRC/../../eglibc/libc $SRC/eglibc
cp -al $SRC/../../eglibc/linuxthreads $SRC/eglibc/libc
cp -al $SRC/../../eglibc/localedef $SRC/eglibc/libc
cp -al $SRC/../../eglibc/ports $SRC/eglibc/libc
#patch glibc
# patch -d $name-$version -p1 < $SRC/$name-$version-dl-profile.patch
#install and build kernel headers
mkdir -p $PKG/usr/include/asm
cp -r $SRC/kernel-headers/{linux,asm-generic} $PKG/usr/include
cp -r $SRC/kernel-headers/asm-{ppc,powerpc}/* $PKG/usr/include/asm
chown root:root $PKG/usr
#try it unpatched for now
#mv $SRC/eglibc/libc/* $SRC/eglibc
mkdir build
cd build
../eglibc/configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--with-headers=$PKG/usr/include \
--enable-kernel=2.6.0 \
--enable-add-ons \
--enable-shared \
--disable-profile \
--with-tls \
--with-__thread \
--without-gd \
--without-cvs \
--without-selinux
# --with-cpu=8540 \
# --without-fp \
# --with-headers=/usr/include \
make
make check
make install_root=$PKG install
make install_root=$PKG localedata/install-locales
cp ../{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
rm -rf $PKG/usr/share/locale
}
Currently, I have two open issues:
1. --with-cpu=8540 doesn't work. Error: The 8540 in powerpc is not supported.
2. I am using the latest grep-2.5.1a but:
checking for grep that handles long lines and -e... Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
configure: error: no acceptable grep could be found in /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/opt/bin:/usr
make[1]: Failed to remake makefile `/usr/ports/ckcore/eglibc-svn/work/src/build/config.make'.
rm -f /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.o; > /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.o
rm -f /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.os; > /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.o
rm -f /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.oS; > /usr/ports/ckcore/eglibc-svn/work/src/build/stamp.o
cd /usr/ports/ckcore/eglibc-svn/work/src/build && ar cruv libc.a `cat stamp.o`
: /usr/ports/ckcore/eglibc-svn/work/src/build/libc.a
cd /usr/ports/ckcore/eglibc-svn/work/src/build && ar cruv libc_pic.a `cat stamp.os`
: /usr/ports/ckcore/eglibc-svn/work/src/build/libc_pic.a
cd /usr/ports/ckcore/eglibc-svn/work/src/build && ar cruv libc_nonshared.a `cat stamp.oS`
: /usr/ports/ckcore/eglibc-svn/work/src/build/libc_nonshared.a
make[1]: *** No rule to make target `/usr/ports/ckcore/eglibc-svn/work/src/build/Versions.all', needed by `/usr/psions.h'. Stop.
make[1]: Leaving directory `/usr/ports/ckcore/eglibc-svn/work/src/eglibc'
make: *** [all] Error 2
=======> ERROR: Building '/usr/ports/ckcore/eglibc-svn/eglibc#2.5-svn2289-1.pkg.tar.gz' failed.
Googling tells me that this problem ist related to the latest autoconf-2.61:
http://www.nabble.com/minor-problem-with-current-(20070507)-CVS-code-on-OS-2-t3706551.html
Well... some work is left :-)
--
Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com