[Cbe-oss-dev] memalign weirdness in newlib
Patrick Mansfield
patmans at us.ibm.com
Tue Jan 8 10:08:44 EST 2008
On Tue, Jan 08, 2008 at 09:36:07AM +1100, Michael Ellerman wrote:
> On Mon, 2008-01-07 at 11:22 -0800, Patrick Mansfield wrote:
> Is there any doco on building newlib for cell, and how to get the
> compiler to use a custom built version?
Here's what I use:
For CVS, there are some newlib checkout instructions online, but:
cvs -z3 -d :pserver:anoncvs at sources.redhat.com:/cvs/src login
[hit enter, no password]
cvs -z3 -d :pserver:anoncvs at sources.redhat.com:/cvs/src co newlib
Then to build (modified instructions from a script I use):
src=$(pwd)/src/newlib
bld=$(pwd)/src/spu-obj
mkdir ${bld}
cd ${bld}
${src}/configure --prefix=/usr --mandir=/usr/share/man \
--infodir=/usr/share/info --disable-shared --disable-threads \
--disable-checking --with-headers --with-system-zlib \
--disable-multilib --disable-nls \
--enable-version-specific-runtime-libs
--program-prefix=spu- \
--target=spu > cfg.out 2>&1
make -j4 > make.out 2>&1
# And then as root:
sudo make install
The above will overwrite your current SPU newlib install (in /usr/spu),
this is not as bad as overwriting you glibc install, since you can just
re-install the newlib rpm if something is borken.
And then spu-gcc will just work ... I never figured out how to use a
different install prefix.
You can also build spu-gcc and newlib at the same time by adding a symlink
to the gcc directory, and then building.
-- Patrick Mansfield
More information about the cbe-oss-dev
mailing list