Using gcc 4.0.2

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Using gcc 4.0.2

Post by J.F. »

Has the toolchain been checked that it compiles with 4.0.2? I get huge number of warnings and lots of errors trying to build the toolchain.

Here's the last bit:

In file included from ../../bfd/merge.c:25:
../../bfd/sysdep.h:48: warning: function declaration isn’t a prototype
../../bfd/sysdep.h:49: warning: function declaration isn’t a prototype
../../bfd/merge.c: In function ‘sec_merge_hash_lookup’:
../../bfd/merge.c:228: warning: implicit declaration of function ‘memcmp’
../../bfd/merge.c: In function ‘sec_merge_init’:
../../bfd/merge.c:277: warning: implicit declaration of function ‘free’
../../bfd/merge.c: In function ‘_bfd_merge_section’:
../../bfd/merge.c:410: warning: implicit declaration of function ‘strcmp’
../../bfd/merge.c: In function ‘record_section’:
../../bfd/merge.c:564: warning: pointer targets in passing argument 2 of ‘sec_merge_add’ differ in signedness
../../bfd/merge.c:596: warning: pointer targets in passing argument 2 of ‘sec_merge_add’ differ in signedness
../../bfd/merge.c:609: warning: pointer targets in passing argument 2 of ‘sec_merge_add’ differ in signedness
../../bfd/merge.c: In function ‘merge_strings’:
../../bfd/merge.c:647: warning: implicit declaration of function ‘qsort’
../../bfd/merge.c:651: error: ‘calloc’ undeclared (first use in this function)
../../bfd/merge.c:651: error: (Each undeclared identifier is reported only once
../../bfd/merge.c:651: error: for each function it appears in.)
../../bfd/merge.c:651: error: ‘free’ undeclared (first use in this function)
../../bfd/merge.c: In function ‘_bfd_merged_section_offset’:
../../bfd/merge.c:935: warning: pointer targets in passing argument 2 of ‘sec_merge_hash_lookup’ differ in signedness
gmake[3]: *** [merge.lo] Error 1
gmake[3]: Leaving directory `/tmp/ps2dev/binutils-2.14/build-ee/bfd'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/tmp/ps2dev/binutils-2.14/build-ee/bfd'
gmake[1]: *** [all-recursive-am] Error 2
gmake[1]: Leaving directory `/tmp/ps2dev/binutils-2.14/build-ee/bfd'
gmake: *** [all-bfd] Error 2
ERROR BUILDING BINUTILS (binutils-2.14 ee)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I recently switched to Fedora Core 4. It comes with 4.0.1, which also fails to build the toolchain. However, FC4 also comes with 3.2.3 which DOES build the toolchain. So until gcc4 is supported, just do:

CC=gcc32 ./toolchain.sh
User avatar
sherpya
Posts: 61
Joined: Mon Oct 03, 2005 5:49 pm

Post by sherpya »

Debian sid, works fine
gcc version 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Thanks for the info. I'll try it again when 4.0.3 hits the FC repos.
User avatar
sherpya
Posts: 61
Joined: Mon Oct 03, 2005 5:49 pm

Post by sherpya »

the version in sid is a 4.0.2 with some patches from cvs of 4.0.3, it worked also with 4.0.2, but I suppose the gcc on debian has a lot of patches to avoid breaking compilation on multiple architectures (fbts) that can make toolchain work on gcc 4.
You can try my builds http://forums.ps2dev.org/viewtopic.php? ... highlight=
they should work if the fc4 uses gcc4
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I give it a try, but perhaps the trouble is 64bit related - I'm running AMD64 edition of linux on a dual opteron system. I know that some 64bit packages lag behind the same one for 32bit. Guess I'll have to try it to see.
Post Reply