WIP updated homebrew toolchain for PS2

Discussion in 'General PS2 Discussion' started by uyjulian, Aug 25, 2018.

  1. 52
    12
    37
    Anonamous

    Anonamous Member

    Joined:
    Aug 26, 2018
    Messages:
    52
    Likes Received:
    12
    Trophy Points:
    37
    Occupation:
    Electrical Engineering Student
    Don't kill yourself with too much lol. I'll be around over the summer to help out.
     
  2. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    GCC 9.1 is out. I'm going to see how much has changed.
     
    TnA, jolek and Anonamous like this.
  3. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    I've rebased on top of binutils 2.32/gcc 9.1.0/newlib 3.1.0. In the process, I removed the EE core extension/MMI patches and DVP support temporarily.

    IOP modules are not working correctly. I need to figure out why.
     
    Last edited: May 28, 2019
    TnA, akuhak and jolek like this.
  4. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    IOP module problem was fixed by downgrading to binutils 2.31.1. It seems like something related with MIPS ELF relocation has changed in binutils 2.32. Also, related support code required for the DVP assembler was removed in binutils 2.32.
     
    fjtrujy, akuhak, jolek and 1 other person like this.
  5. 2
    3
    7
    fjtrujy

    fjtrujy Developer

    Joined:
    Sep 29, 2018
    Messages:
    2
    Likes Received:
    3
    Trophy Points:
    7
    Gender:
    Male
    Thanks for your advances!!
    I'm going to give a try right now.
     
    TnA likes this.
  6. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    Before I forget to mention: GNU sed needs to be used instead of BSD sed, since BSD sed doesn't support functions used by the building of the toolchain.

    Otherwise, you get this error:
    xgcc: error: addsf3: No such file or directory

    Make sure "sed" points to GNU sed, not BSD sed.
     
    Last edited: Aug 15, 2019
  7. 2
    3
    7
    fjtrujy

    fjtrujy Developer

    Joined:
    Sep 29, 2018
    Messages:
    2
    Likes Received:
    3
    Trophy Points:
    7
    Gender:
    Male
    Hello,
    First of all thanks uyjulian for your effort, this is amazing!

    I have noticed that the floats are not working fine in the toolchain

    printf("Hello, world!\n");
    float hello = 1.0f;
    printf("Hello, world! %f\n", hello);

    This example works fine with old toolchain but is crashing with the new one. I don't know if I did something wrong during the installation.
    Here you have the "hello world repo"

    Thanks
     
    TnA and akuhak like this.
  8. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    I may disable hardware floating support to work around the issue.
     
  9. 37
    50
    62
    akuhak

    akuhak Member

    Joined:
    Jul 4, 2017
    Messages:
    37
    Likes Received:
    50
    Trophy Points:
    62
    I just would like to mention that in gcc v6 float sample is working fine but in gcc v7 float sample stopped to work.
     
    TnA likes this.
  10. 121
    193
    97
    uyjulian

    uyjulian Developer

    Joined:
    May 27, 2017
    Messages:
    121
    Likes Received:
    193
    Trophy Points:
    97
    Gender:
    Male
    It may be a standard library issue, not a compiler issue. The issue may have manifested itself by incorrect output in gcc 6.x and error in gcc 7.x.

    Edit: It IS a compiler issue. Floating point never really worked correctly, even on GCC 6.x.
    The code below will error in libgcc/fp-bit.c

    Code:
    #include <stdio.h>
    int main(int, char*[]) {
    volatile float hello;
    hello = 1.0f;
    printf("Hello, world! %f\n", hello);
    return 0;
    }
    
     
    Last edited: Aug 25, 2019
    akuhak likes this.

Share This Page