forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The first working ps3toolchain release!
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development
View previous topic :: View next topic  
Author Message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jun 14, 2007 1:38 pm    Post subject: The first working ps3toolchain release! Reply with quote

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...

...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!
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Jun 14, 2007 2:19 pm    Post subject: Reply with quote

<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
Back to top
View user's profile Send private message Visit poster's website
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Thu Jun 14, 2007 9:12 pm    Post subject: Reply with quote

I think I will worship you as a god... No less...
Back to top
View user's profile Send private message
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Fri Jun 15, 2007 3:59 am    Post subject: Reply with quote

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)
Back to top
View user's profile Send private message
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Fri Jun 15, 2007 4:12 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
ps2devman



Joined: 09 Oct 2006
Posts: 265

PostPosted: Fri Jun 15, 2007 5:20 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
ldesnogu



Joined: 17 Apr 2004
Posts: 95

PostPosted: Fri Jun 15, 2007 6:58 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Jun 15, 2007 8:05 am    Post subject: Reply with quote

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/gp2xdev-20060525.tar.bz2

The open2x project should probably have a more up to date toolchain, but it may have gp2x-specific patches by now.
Back to top
View user's profile Send private message Visit poster's website
ldesnogu



Joined: 17 Apr 2004
Posts: 95

PostPosted: Fri Jun 15, 2007 8:45 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jun 16, 2007 9:37 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jun 16, 2007 6:09 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sat Jun 16, 2007 6:29 pm    Post subject: Reply with quote

Try adding '--disable-nls' to the configure line for binutils.
Back to top
View user's profile Send private message Visit poster's website
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Sat Jun 16, 2007 7:38 pm    Post subject: Reply with quote

i got this under cygwin :P
Code:
/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: line 2: ex
ec: -m: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu-stage2/./gcc/as: line 2: ex
ec: -m: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
make[2]: *** [crtbegin.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [crtbeginS.o] Error 1
make[2]: Leaving directory `/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu
-stage2/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/0xiD3/ps3toolchain/scripts/gcc-4.2.0/build-ppu
-stage2'
make: *** [all] Error 2

_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jun 16, 2007 11:06 pm    Post subject: Reply with quote

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

Code:

configure:2370: /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: spu
Configured with: ../configure --prefix=/usr/local/ps3dev/spu --target=spu --enable-languages=c --with-newlib
Thread model: single
gcc version 4.3.0 20070608 (experimental)
configure:2373: $? = 0
configure:2375: /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: '-V' must come at the start of the command line
configure:2378: $? = 1
configure:2397: /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: line 60: exec: : not found
configure:2400: $? = 1
configure:2566: checking for suffix of object files
configure:2587: /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: line 60: exec: : not found
configure:2590: $? = 1
configure: failed program was:
| /* 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 ()
| {
|
|   ;
|   return 0;
| }
configure:2604: error: cannot compute suffix of object files: 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
Back to top
View user's profile Send private message Visit poster's website
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jun 16, 2007 11:08 pm    Post subject: Reply with quote

ooPo wrote:
Try adding '--disable-nls' to the configure line for binutils.


Alright. I will try that
Back to top
View user's profile Send private message Visit poster's website
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Sat Jun 16, 2007 11:50 pm    Post subject: Reply with quote

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

Code:

wget --continue ftp://sourceware.org/pub/gcc/snapshots/LATEST-4.3/gcc-4.3-20070608.tar.bz2 || { exit 1; }


you might want to change it to:

Code:

wget --continue ftp://sourceware.org/pub/gcc/snapshots/4.3-20070608/gcc-4.3-20070608.tar.bz2 || { exit 1; }
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Jun 17, 2007 4:58 am    Post subject: Reply with quote

Ok, will do.
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Sun Jun 17, 2007 10:15 am    Post subject: Reply with quote

Small update in the repository:

Quote:
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. :)
Back to top
View user's profile Send private message Visit poster's website
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Sun Jun 17, 2007 8:10 pm    Post subject: Reply with quote

how long will it take to install the tooclhain?
Back to top
View user's profile Send private message
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Sun Jun 17, 2007 10:31 pm    Post subject: Reply with quote

error
Code:

/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/li
gloss.a': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
i.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
n.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
1.o': No such host or network path
/usr/bin/install: cannot create regular file `//usr/local/ps3dev/ppu/ppu/lib/cr
2.o': No such host or network path
make[3]: *** [install] Error 1
make[3]: Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u/ppu/libgloss/ppu'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u/ppu/libgloss'
make[1]: *** [install-target-libgloss] Error 2
make[1]: Leaving directory `/home/Leen/ps3toolchain/build/newlib-1.15.0/build-p
u'
make: *** [install] Error 2
../scripts/003-newlib-1.15.0-ppu.sh: Failed.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Jun 18, 2007 2:06 am    Post subject: Reply with quote

Quote:
/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.
Back to top
View user's profile Send private message Visit poster's website
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Mon Jun 18, 2007 2:14 am    Post subject: Reply with quote

strange , i jost copied the this in cygwin

Quote:
export PS3DEV=/usr/local/ps3dev
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Mon Jun 18, 2007 5:05 am    Post subject: Reply with quote

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! :)
Back to top
View user's profile Send private message Visit poster's website
hallo007



Joined: 13 May 2006
Posts: 36

PostPosted: Mon Jun 18, 2007 5:55 am    Post subject: Reply with quote

wich one do I need to delete?
Code:

# Copyright (c) 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 = $(srcdir)/../..
objroot = $(objdir)/../..

prefix = /usr/local/ps3dev/ppu
exec_prefix = ${prefix}

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

bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
tooldir = $(exec_prefix)/$(target_alias)

# Multilib support variables.
# TOP is used instead of MULTI{BUILD,SRC}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='$(program_transform_name)'; echo objdump | sed -e $$t`
OBJCOPY = `t='$(program_transform_name)'; 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 = ${OBJS}

GCC_LDFLAGS = `if [ -d ${objroot}/../gcc ] ; \
   then echo -L${objroot}/../gcc ; fi`

CRTOBJS = crti.o crtn.o crt1.o crt2.o
OUTPUTS = libgloss.a $(CRTOBJS)

NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` -ffunction-sections -fdata-sections
NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi`

INCLUDES = -I. -I$(srcdir)/..

# Note that when building the library, ${MULTILIB} is not the way multilib
# options are passed; they're passed in $(CFLAGS).
CFLAGS_FOR_TARGET = ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS}
LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS}
AR_FLAGS = qc

.c.o:
   $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<

.C.o:
   $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $<
.s.o:
   $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $<

#
# GCC knows to run the preprocessor on .S files before it assembles them.
#
.S.o:
   $(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) $(CFLAGS) -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:
   $(CC) $(CFLAGS_FOR_TARGET) -S $(INCLUDES) $(CFLAGS) $<

all: ${OUTPUTS}

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

libgloss.a: $(EVALOBJS)
   ${AR} ${ARFLAGS} $@ $(EVALOBJS)
   ${RANLIB} $@

# C Runtime Library startup code.
crti.o:
   $(CC) $(srcdir)/crti.S -c -o crti.o

crtn.o:
   $(CC) $(srcdir)/crtn.S -c -o crtn.o

crt1.o:
   $(CC) $(srcdir)/crt0.S -c -o crt1.o

crt2.o:
   $(CC) $(srcdir)/crt0.S -D_STD_MAIN -c -o crt2.o

doc:   

clean mostlyclean:
   rm -f $(OUTPUTS) *.i *~ *.o *-test *.srec *.dis *.map *.x

distclean maintainer-clean realclean: clean
   rm -f Makefile config.status $(OUTPUTS)

.PHONY: install info install-info clean-info
install:
   for outputs in ${OUTPUTS}; do\
    ${INSTALL_DATA} $${outputs} $(DESTDIR)/${tooldir}/lib${MULTISUBDIR}/$${outputs}; \
   done

info:
install-info:
clean-info:

Makefile: Makefile.in config.status ../../../../libgloss/ppu/../config/ppc.mh
   $(SHELL) config.status

config.status: configure
   $(SHELL) config.status --recheck

# syscalls.o close.o fstat.o lseek.o open.o read.o stat.o unlink.o write.o: jsre.h
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Mon Jun 18, 2007 5:58 am    Post subject: Reply with quote

you change

Code:

prefix = /usr/local/ps3dev/ppu


to

Code:

prefix = usr/local/ps3dev/ppu


and run make install. Thats what I did for the spu toolchain at least (ppu worked just fine)
Back to top
View user's profile Send private message Visit poster's website
Den_John



Joined: 18 Jun 2007
Posts: 6

PostPosted: Mon Jun 18, 2007 6:05 am    Post subject: Reply with quote

Hi,

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

Code:
config.status: creating Makefile
make[1]: Entering directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils
-2.17.50/build-ppu'
make[1]: Nothing to be done for `clean-target'.
make[1]: Leaving directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils-
2.17.50/build-ppu'
rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log
make[1]: 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: /home/Jonathan: No such file or directory
/bin/sh: /home/Jonathan: No such file or directory
make[1]: *** [configure-intl] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [configure-libiberty] Error 1
make[1]: Leaving directory `/home/Jonathan Heirbaut/ps3toolchain/build/binutils-
2.17.50/build-ppu'
make: *** [all] Error 2
../scripts/001-binutils-2.17.50-ppu.sh: Failed.
Back to top
View user's profile Send private message
emoon



Joined: 18 Jan 2004
Posts: 91
Location: Stockholm, Sweden

PostPosted: Mon Jun 18, 2007 6:09 am    Post subject: Reply with quote

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

Like Jonathan_Heirbaut instead of "Jonathan Heirbaut"
Back to top
View user's profile Send private message Visit poster's website
Den_John



Joined: 18 Jun 2007
Posts: 6

PostPosted: Mon Jun 18, 2007 9:06 am    Post subject: Reply with quote

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:

/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[4]: Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
make[3]: Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
make[2]: Leaving directory `/home/ps3toolchain/build/binutils-2.17.50/build-ppu/gprof'
Back to top
View user's profile Send private message
nirving



Joined: 20 Sep 2006
Posts: 12

PostPosted: Mon Jun 18, 2007 1:01 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Mon Jun 18, 2007 1:44 pm    Post subject: Reply with quote

Dependency checking for those two libraries is already in the repository, but I missed updating the readme. Thanks for pointing it out.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS3 Development All times are GMT + 10 Hours
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group