ps3dev / ps3toolchain

A script to autobuild an open source toolchain for the PS3.
BSD 2-Clause "Simplified" License
280 stars 92 forks source link

lv2 not default lib in ppu-gcc linker driver #38

Closed kraiskil closed 13 years ago

kraiskil commented 13 years ago

with the current ps3toolchain and psl1ght-v2, compiling trivial programs fail, as the linker cannot find what seems to be part of the c runtime. Try e.g. echo "int main(){return 0;}" | ppu-gcc -x c -o foo -

This is not expected, and confuses e.g. autotools ("C-compiler cannot create binaries" - linking is checked also in cross builds)

One way of fixing this is to add the necessary libs to the ppu-gcc linker driver specs file. This can be done with the following "one liner" at the end of script 4 (ppu stage2)

ppu-gcc -dumpspecs | \ awk -v psl1ght="-L$PSL1GHT/ppu/lib" '/link:/ {getline temp; print $0; print temp " " psl1ght;next}{print}' | \ awk '/lib:/ {getline temp; print $0; print "-lrt -llv2 " temp; next}{print}' \

$PS3DEV/ppu/lib/gcc/ppu/4.5.2/specs

kraiskil commented 13 years ago

Damn my browser for timeouting - this is a duplicate of issue #37. Closing this one