The first working ps3toolchain release!

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

The first working ps3toolchain release!

Post by ooPo »

How can you get it?

svn export svn://svn.ps2dev.org/ps3/trunk/ps3toolchain

What does it include?

PPU: binutils-2.17.50, gcc-4.2.0, newlib-1.15.0
SPU: binutils-2.17.50, gcc-4.3-20070608, newlib-1.15.0

Anything else I should know?

The PPU toolchain was compiled with a target of powerpc64-unknown-linux-gnu, except for newlib which used powerpc64-unknown-none. This means there's no startup code (crt0) so it is of limited use at the moment.

Support for the SPU has been included by IBM in the latest binutils, gcc and newlib sources. No extra patching is needed, however I haven't tested SPU code yet so who knows. :)

Both PPU and SPU should work with C++ code, again this is untested at present.

I've tested it by building the otheros demo program...
Image
...which is very cool, btw.

I'm sure plenty of bugs and tweaks and general 'Why did you do it THAT way?!' will be said, but in the meantime...

Enjoy!
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

<jimp> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
<jimp> ../scripts/012-gcc-4.3-20070608-spu-stage1.sh: Failed.
<jimp> sudo apt-get install libgmp3-dev libmpfr-dev
<jimp> seems better now
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

I think I will worship you as a god... No less...
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

I've tried it under cygwin :

It seems all bin and lib have been made successfully for ppu.
Did you change anything to OS Demo (makefile for example)?
I will try to compile it, but if you have a modified version for ps3dev, that will save my time.

For the spu, it's another matter, but I guess we have time for fixing it :
generating import library for 'cygiconv-2.dll'
gcc ... -o as-new.exe ...
(...)
make: *** [all] Error 2
../scripts/011-binutils-2.17.50-spu.sh failed
(no useful error message, sorry)
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

Ok, just had to add "ppu-" prefix in front of gcc and objcopy in marcus's other os demo makefile and it compiled fine...

Just need to test the result now... Exciting!
ps2devman
Posts: 259
Joined: Mon Oct 09, 2006 3:56 pm

Post by ps2devman »

It works!
I've used otheros.self v1.0 with the otheros.bld, result of my compilation under cygwin! It's great!

Big thank and congrats from all cygwin users!

Cygwin users! Orgy is opened!
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Post by ldesnogu »

Good job ooPo :)

Just a quick note, for people who don't know: gcc 4.3 is not ready for release and won't be before months; it's been chosen because it's the first gcc branch that has native support for SPU. If you find bugs, send them to the gcc bug mailing-list...

BTW ooPo, if you feel the need to port some other toolchain I have a difficult one for you: ARM, gcc 2.3.2, linux 2.6.15, soft float + hardware FP :D And in case you wonder, it's a real target, my NAS, a Synology DS107+.
Laurent
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Will linux 2.6.x even compile on gcc-2.3.2?

I did do an arm toolchain for the gp2x a while back which may help you, though:

http://dev.oopo.net/files/ARCHIVES/gp2x ... 25.tar.bz2

The open2x project should probably have a more up to date toolchain, but it may have gp2x-specific patches by now.
ldesnogu
Posts: 94
Joined: Sat Apr 17, 2004 10:37 pm

Post by ldesnogu »

ooPo wrote:Will linux 2.6.x even compile on gcc-2.3.2?
Oops I meant glibc 2.3.2 of course :)
gcc is 3.4.3 IIRC.

At least that's the info I extracted...

I know about the gp2x, it alas won't fit. Oh well I think it's time I build such a toolchain from scratch myself!
Laurent
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

Nice work with the toolchain.

I tried this under cygwin (I know cygwin is shitty but thats one of the options you have for windows)

PPU toolchain builds without any problem whatsoever.

SPU has this issue though:

make[4]: Entering directory `/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils'
gcc -o bin2c.exe -D_GNU_SOURCE -I. -I../../binutils -I../bfd -I../../binutils/../bfd -I../../binutils/../include -I./../intl -DLOCALEDIR="\"/usr/
local/ps3dev/spu/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 ..
/../binutils/bin2c.c ../../binutils/version.c
../../binutils/bin2c.c: In function `main':
../../binutils/bin2c.c:89: warning: implicit declaration of function `_fileno'
../../binutils/bin2c.c:89: warning: implicit declaration of function `_setmode'

Ok, that is a warning only so when I try to use the line directly (without -Werror) I get this:

$ gcc -o bin2c.exe -D_GNU_SOURCE -I. -I../../binutils -I../bfd -I../../binutils/../bfd -I../../binutils/../include -I./../intl -DLOCALEDIR=
"\"/usr/local/ps3dev/spu/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -
O2 ../../binutils/bin2c.c ../../binutils/version.c
../../binutils/bin2c.c: In function `main':
../../binutils/bin2c.c:89: warning: implicit declaration of function `_fileno'
../../binutils/bin2c.c:89: warning: implicit declaration of function `_setmode'
/cygdrive/c/Users/emoon/AppData/Local/Temp/cczduqXu.o: In function `main':
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/bin2c.c:62: undefined reference to `_libintl_bindtextdomain'
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/bin2c.c:63: undefined reference to `_libintl_textdomain'
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/bin2c.c:84: undefined reference to `_libintl_gettext'
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/bin2c.c:85: undefined reference to `_libintl_gettext'
/cygdrive/c/Users/emoon/AppData/Local/Temp/cc3XiV57.o: In function `print_version':
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/version.c:34: undefined reference to `_libintl_gettext'
/home/emoon/ps3toolchain/build/binutils-2.17.50/build-spu/binutils/../../binutils/version.c:35: undefined reference to `_libintl_gettext'
collect2: ld returned 1 exit status

Any idea about that one? I have look that much into it yet
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

Solved by just make the line:

gcc -o bin2c.exe -D_GNU_SOURCE -I. -I../../binutils -I../bfd -I../../binutils/../bfd -I../../binutils/../include -I./../intl -DLOCALEDIR=
"\"/usr/local/ps3dev/spu/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -
O2 ../../binutils/bin2c.c ../../binutils/version.c ../intl/libintl.a
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Try adding '--disable-nls' to the configure line for binutils.
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

i got this under cygwin :P

Code: Select all

/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/xgcc -B/home/0
xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/ -B/ppu/ppu/bin/ -B/p
pu/ppu/lib/ -isystem /ppu/ppu/include -isystem /ppu/ppu/sys-include -O2 -O2 -g -
O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmi
ssing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc
 -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include  -I../../gcc
/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive -fno-inline-fun
ctions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhi
bit_libc -msdata=none \
  -c ../../gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/xgcc -B/home/0
xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/ -B/ppu/ppu/bin/ -B/p
pu/ppu/lib/ -isystem /ppu/ppu/include -isystem /ppu/ppu/sys-include -O2 -O2 -g -
O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmi
ssing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc
 -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include  -I../../gcc
/../libdecnumber -I../libdecnumber  -g0 -finhibit-size-directive -fno-inline-fun
ctions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhi
bit_libc -fPIC -msdata=none \
  -c ../../gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFS_O \
  -o crtbeginS.o
/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/as&#58; line 2&#58; ex
ec&#58; -m&#58; invalid option
exec&#58; usage&#58; exec &#91;-cl&#93; &#91;-a name&#93; file &#91;redirection ...&#93;
/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/as&#58; line 2&#58; ex
ec&#58; -m&#58; invalid option
exec&#58; usage&#58; exec &#91;-cl&#93; &#91;-a name&#93; file &#91;redirection ...&#93;
make&#91;2&#93;&#58; *** &#91;crtbegin.o&#93; Error 1
make&#91;2&#93;&#58; *** Waiting for unfinished jobs....
make&#91;2&#93;&#58; *** &#91;crtbeginS.o&#93; Error 1
make&#91;2&#93;&#58; Leaving directory `/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu
-stage2/gcc'
make&#91;1&#93;&#58; *** &#91;all-gcc&#93; Error 2
make&#91;1&#93;&#58; Leaving directory `/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu
-stage2'
make&#58; *** &#91;all&#93; Error 2
10011011 00101010 11010111 10001001 10111010
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

I get a similar thing for gcc-spu stage 1:

Code: Select all

configure&#58;2370&#58; /home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -v </dev/null >&5
Reading specs from /home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/specs
Target&#58; spu
Configured with&#58; ../configure --prefix=/usr/local/ps3dev/spu --target=spu --enable-languages=c --with-newlib
Thread model&#58; single
gcc version 4.3.0 20070608 &#40;experimental&#41;
configure&#58;2373&#58; $? = 0
configure&#58;2375&#58; /home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -V </dev/null >&5
xgcc&#58; '-V' must come at the start of the command line
configure&#58;2378&#58; $? = 1
configure&#58;2397&#58; /home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -o conftest -O2 -g -O2    conftest.c  >&5
/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/as&#58; line 60&#58; exec&#58; &#58; not found
configure&#58;2400&#58; $? = 1
configure&#58;2566&#58; checking for suffix of object files
configure&#58;2587&#58; /home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/xgcc -B/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/ -B/usr/local/ps3dev/spu/spu/bin/ -B/usr/local/ps3dev/spu/spu/lib/ -isystem /usr/local/ps3dev/spu/spu/include -isystem /usr/local/ps3dev/spu/spu/sys-include -c -O2 -g -O2   conftest.c >&5
/home/emoon/ps3toolchain/build/gcc-4.3-20070608/build-spu-stage1/./gcc/as&#58; line 60&#58; exec&#58; &#58; not found
configure&#58;2590&#58; $? = 1
configure&#58; failed program was&#58;
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main &#40;&#41;
| &#123;
| 
|   ;
|   return 0;
| &#125;
configure&#58;2604&#58; error&#58; cannot compute suffix of object files&#58; cannot compile
I will try to rebuild binutils now for spu and try again
Last edited by emoon on Sat Jun 16, 2007 11:13 pm, edited 1 time in total.
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

ooPo wrote:Try adding '--disable-nls' to the configure line for binutils.
Alright. I will try that
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

ooPo: A small notice. In the gcc-spu scripts its say:

Code: Select all

wget --continue ftp&#58;//sourceware.org/pub/gcc/snapshots/LATEST-4.3/gcc-4.3-20070608.tar.bz2 || &#123; exit 1; &#125;
you might want to change it to:

Code: Select all

wget --continue ftp&#58;//sourceware.org/pub/gcc/snapshots/4.3-20070608/gcc-4.3-20070608.tar.bz2 || &#123; exit 1; &#125;
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Ok, will do.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Small update in the repository:
Added: --disable-nls
Added checks for libmpfr and libgmp3.
Work started on porting newlib to the PPU.
Also changed the download link for gcc-4.3 as pointed out by emoon.

Work with newlib is going slowly as I've never actually ported it before, and I'm trying to properly work with autoconf/automake instead of just bypassing them for the first time. If anyone with experience wants to step up and help out I wouldn't turn them away. :)
hallo007
Posts: 36
Joined: Sat May 13, 2006 6:15 pm

Post by hallo007 »

how long will it take to install the tooclhain?
hallo007
Posts: 36
Joined: Sat May 13, 2006 6:15 pm

Post by hallo007 »

error

Code: Select all

/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/li
gloss.a'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
i.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
n.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
1.o'&#58; No such host or network path
/usr/bin/install&#58; cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
2.o'&#58; No such host or network path
make&#91;3&#93;&#58; *** &#91;install&#93; Error 1
make&#91;3&#93;&#58; Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u/ppu/libgloss/ppu'
make&#91;2&#93;&#58; *** &#91;install&#93; Error 2
make&#91;2&#93;&#58; Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u/ppu/libgloss'
make&#91;1&#93;&#58; *** &#91;install-target-libgloss&#93; Error 2
make&#91;1&#93;&#58; Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u'
make&#58; *** &#91;install&#93; Error 2
../scripts/003-newlib-1.15.0-ppu.sh&#58; Failed.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
2.o': No such host or network path
Notice the '//' at the beginning of the pathname? Just what did you set $PS3DEV to? It looks like your machine thinks this is a network share as a result.
hallo007
Posts: 36
Joined: Sat May 13, 2006 6:15 pm

Post by hallo007 »

strange , i jost copied the this in cygwin
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

I actually got the same thing but for spu newlib. What I did was edit the Makefile by removing en "/" on the destination and ran make install again and it worked.

So now:

emoon@Chiana ~
$ ppu-gcc --version
ppu-gcc (GCC) 4.2.0
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

emoon@Chiana ~
$ spu-gcc --version
spu-gcc (GCC) 4.3.0 20070608 (experimental)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Yah! :)
hallo007
Posts: 36
Joined: Sat May 13, 2006 6:15 pm

Post by hallo007 »

wich one do I need to delete?

Code: Select all

# Copyright &#40;c&#41; 1998 Cygnus Support
#
# The authors hereby grant permission to use, copy, modify, distribute,
# and license this software and its documentation for any purpose, provided
# that existing copyright notices are retained in all copies and that this
# notice is included verbatim in any distributions. No written agreement,
# license, or royalty fee is required for any of the authorized uses.
# Modifications to this software may be copyrighted by their authors
# and need not follow the licensing terms described here, provided that
# the new terms are clearly indicated on the first page of each file where
# they apply.

VPATH = ../../../../libgloss/ppu
srcdir = ../../../../libgloss/ppu
objdir = .
srcroot = $&#40;srcdir&#41;/../..
objroot = $&#40;objdir&#41;/../..

prefix = /usr/local/ps3dev/ppu
exec_prefix = $&#123;prefix&#125;

host_alias = ppu
target_alias = ppu
program_transform_name = s,^,ppu-,;

bindir = $&#123;exec_prefix&#125;/bin
libdir = $&#123;exec_prefix&#125;/lib
tooldir = $&#40;exec_prefix&#41;/$&#40;target_alias&#41;

# Multilib support variables.
# TOP is used instead of MULTI&#123;BUILD,SRC&#125;TOP.
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = /usr/bin/install -c
INSTALL_DATA = /usr/bin/install -c -m 644

SHELL =	/bin/sh

CC = ppu-gcc -B/home/Leen/ps3toolchain/build/newlib-1.15.0/build-ppu/ppu/newlib/ -isystem /home/Leen/ps3toolchain/build/newlib-1.15.0/build-ppu/ppu/newlib/targ-include -isystem /home/Leen/ps3toolchain/build/newlib-1.15.0/newlib/libc/include

AS = ppu-as

AR = ppu-ar

LD = ppu-ld

RANLIB = ppu-ranlib

OBJDUMP = `t='$&#40;program_transform_name&#41;'; echo objdump | sed -e $$t`
OBJCOPY = `t='$&#40;program_transform_name&#41;'; echo objcopy | sed -e $$t`

# object files needed
OBJS = close.o fstat.o  isatty.o  lseek.o  read.o  sbrk.o  write.o

# Object files specific to particular targets.
EVALOBJS = $&#123;OBJS&#125;

GCC_LDFLAGS = `if &#91; -d $&#123;objroot&#125;/../gcc &#93; ; \
	then echo -L$&#123;objroot&#125;/../gcc ; fi`

CRTOBJS = crti.o crtn.o crt1.o crt2.o
OUTPUTS = libgloss.a $&#40;CRTOBJS&#41;

NEWLIB_CFLAGS = `if &#91; -d $&#123;objroot&#125;/newlib &#93;; then echo -I$&#123;objroot&#125;/newlib/targ-include -I$&#123;srcroot&#125;/newlib/libc/include; fi` -ffunction-sections -fdata-sections
NEWLIB_LDFLAGS = `if &#91; -d $&#123;objroot&#125;/newlib &#93;; then echo -B$&#123;objroot&#125;/newlib/ -L$&#123;objroot&#125;/newlib/; fi`

INCLUDES = -I. -I$&#40;srcdir&#41;/..

# Note that when building the library, $&#123;MULTILIB&#125; is not the way multilib
# options are passed; they're passed in $&#40;CFLAGS&#41;.
CFLAGS_FOR_TARGET = $&#123;MULTILIB&#125; $&#123;INCLUDES&#125; $&#123;NEWLIB_CFLAGS&#125;
LDFLAGS_FOR_TARGET = $&#123;MULTILIB&#125; $&#123;NEWLIB_LDFLAGS&#125;
AR_FLAGS = qc

.c.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS_FOR_TARGET&#41; -O2 $&#40;INCLUDES&#41; -c $&#40;CFLAGS&#41; $<

.C.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS_FOR_TARGET&#41; -O2 $&#40;INCLUDES&#41; -c $&#40;CFLAGS&#41; $<
.s.o&#58;
	$&#40;AS&#41; $&#40;ASFLAGS_FOR_TARGET&#41; $&#40;INCLUDES&#41; $&#40;ASFLAGS&#41; -o $*.o $<

#
# GCC knows to run the preprocessor on .S files before it assembles them.
#
.S.o&#58;
	$&#40;CC&#41; $&#40;CFLAGS_FOR_TARGET&#41; $&#40;INCLUDES&#41; $&#40;CFLAGS&#41; -c $<

#
# this is a bogus target that'll produce an assembler from the
# C source with the right compiler options. this is so we can
# track down code generation or debug symbol bugs.
#
.c.s&#58;
	$&#40;CC&#41; $&#40;CFLAGS_FOR_TARGET&#41; -S $&#40;INCLUDES&#41; $&#40;CFLAGS&#41; $<

all&#58; $&#123;OUTPUTS&#125;

#
# here's where we build the library for each target
#

libgloss.a&#58; $&#40;EVALOBJS&#41;
	$&#123;AR&#125; $&#123;ARFLAGS&#125; $@ $&#40;EVALOBJS&#41;
	$&#123;RANLIB&#125; $@

# C Runtime Library startup code.
crti.o&#58;
	$&#40;CC&#41; $&#40;srcdir&#41;/crti.S -c -o crti.o 

crtn.o&#58;
	$&#40;CC&#41; $&#40;srcdir&#41;/crtn.S -c -o crtn.o 

crt1.o&#58;
	$&#40;CC&#41; $&#40;srcdir&#41;/crt0.S -c -o crt1.o

crt2.o&#58;
	$&#40;CC&#41; $&#40;srcdir&#41;/crt0.S -D_STD_MAIN -c -o crt2.o

doc&#58;	

clean mostlyclean&#58;
	rm -f $&#40;OUTPUTS&#41; *.i *~ *.o *-test *.srec *.dis *.map *.x

distclean maintainer-clean realclean&#58; clean
	rm -f Makefile config.status $&#40;OUTPUTS&#41;

.PHONY&#58; install info install-info clean-info
install&#58;
	for outputs in $&#123;OUTPUTS&#125;; do\
	 $&#123;INSTALL_DATA&#125; $$&#123;outputs&#125; $&#40;DESTDIR&#41;/$&#123;tooldir&#125;/lib$&#123;MULTISUBDIR&#125;/$$&#123;outputs&#125;; \
	done

info&#58;
install-info&#58;
clean-info&#58;

Makefile&#58; Makefile.in config.status ../../../../libgloss/ppu/../config/ppc.mh
	$&#40;SHELL&#41; config.status

config.status&#58; configure
	$&#40;SHELL&#41; config.status --recheck

# syscalls.o close.o fstat.o lseek.o open.o read.o stat.o unlink.o write.o&#58; jsre.h
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

you change

Code: Select all

prefix = /usr/local/ps3dev/ppu 
to

Code: Select all

prefix = usr/local/ps3dev/ppu
and run make install. Thats what I did for the spu toolchain at least (ppu worked just fine)
Den_John
Posts: 6
Joined: Mon Jun 18, 2007 6:01 am

Post by Den_John »

Hi,

I had some problems with the ncursus but now I have another problem:

Code: Select all

config.status&#58; creating Makefile
make&#91;1&#93;&#58; Entering directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils
-2.17.50/build-ppu'
make&#91;1&#93;&#58; Nothing to be done for `clean-target'.
make&#91;1&#93;&#58; Leaving directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils-
2.17.50/build-ppu'
rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
make&#91;1&#93;&#58; Entering directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils
-2.17.50/build-ppu'
mkdir -p -- ./libiberty
mkdir -p -- ./intl
Configuring in ./libiberty
Configuring in ./intl
/bin/sh&#58; /home/Jonathan&#58; No such file or directory
/bin/sh&#58; /home/Jonathan&#58; No such file or directory
make&#91;1&#93;&#58; *** &#91;configure-intl&#93; Error 1
make&#91;1&#93;&#58; *** Waiting for unfinished jobs....
make&#91;1&#93;&#58; *** &#91;configure-libiberty&#93; Error 1
make&#91;1&#93;&#58; Leaving directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils-
2.17.50/build-ppu'
make&#58; *** &#91;all&#93; Error 2
../scripts/001-binutils-2.17.50-ppu.sh&#58; Failed.
User avatar
emoon
Posts: 91
Joined: Sun Jan 18, 2004 10:03 pm
Location: Stockholm, Sweden
Contact:

Post by emoon »

Make sure to have a home directory with no spaces in it.

Like Jonathan_Heirbaut instead of "Jonathan Heirbaut"
Den_John
Posts: 6
Joined: Mon Jun 18, 2007 6:01 am

Post by Den_John »

emoon wrote:Make sure to have a home directory with no spaces in it.

Like Jonathan_Heirbaut instead of "Jonathan Heirbaut"
Done that and it worked but is it normal that the installation takes more then 4hours?
I see this for more then one hour, that's not normal isn't it
?

Code: Select all

/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2   -o gprof.exe  basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o spar
c.o mips.o flat_bl.o bsd_callg_bl.o fsf_callg_bl.o ../bfd/libbfd.la ../libiberty/libiberty.a
mkdir .libs
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -o gprof.exe basic_blocks.o call_graph.o cg_arcs.o cg_dfn.o cg_print.o corefile.o gmon_io.o gprof.o hertz.o hist.o source.o search_list.o symtab.o sym_ids.o utils.o i386.o alpha.o vax.o tahoe.o sparc.o mips.o flat_bl.o bsd_callg_bl
.o fsf_callg_bl.o  ../bfd/.libs/libbfd.a ../libiberty/libiberty.a
make&#91;4&#93;&#58; Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
make&#91;3&#93;&#58; Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
make&#91;2&#93;&#58; Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
nirving
Posts: 12
Joined: Wed Sep 20, 2006 6:35 am

Post by nirving »

Windows Cygwin, I also had to install the following
  • libmpfr-devl
    libmpfr0
    libmpfr1
    libgmp-devel
    libgmp3
This was missing from the readme.txt file. Seem the second posting mentions this for Linux.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Dependency checking for those two libraries is already in the repository, but I missed updating the readme. Thanks for pointing it out.
Post Reply