Error in compilation of gcc 8 under gcc 6 (SDK 3.12)
  • Just looking around
    Posts: 7 from 2013/7/24
    Is it possible to compile gcc 8 from the latest sdk source with the previous sdk installed with gcc 6?

    It errors (after hours.....) on cfi assembly directives with an unknown pseudo-op errors (.hidden .cfi_startproc .cfi_endproc)

    Wondering if I did something wrong, or it only compiles under the latest sdk installed.

    [ Edited by Hedeon 25.06.2020 - 09:18 ]
  • »25.06.20 - 09:17
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2094 from 2003/3/5
    From: Canada
    GCC6 sounds like you have a pretty old SDK. Don't think it'd be possible to build 8 with 6. 7 should be able to do it.
  • »25.06.20 - 12:52
    Profile Visit Website
  • Just looking around
    Posts: 7 from 2013/7/24
    Indeed. I re-enabled some newer SDK I had installed and all compiled fine. Minor stuff like make not being able to find the gmp, mpc and mpfr libs. but ok. It compiled gcc 8.3.0

    Then I saw that the SDK already again had 2 updates since I last checked. I was using the October 2019 one. (After a tip that gcc 8 should have been 8.4.0 and not 8.3.0)

    So now I downloaded the April 2020 one. Had to upgrade from MOS 3.12 to 3.13 as that SDK would not install without it. Did a clean SDK install. This time the gmp.h mpc.h etc files were missing. Saw a bunch of -fPIC warnings. Saw that an fpic.diff was added to all gcc versions (but not referenced?) Only to find out during stdc++ compilation of 8.4.0 -static flag support was indicated as no and it errored (NO_GCC_EXECUTABLES)

    Tried to compile 9.3. make references to 9.2 so failed. Ok that is easy fixable, but not wanting to wait hours to hit another error I gave up for now and went back to the October SDK source.

    And where was GCCSelect?
  • »30.06.20 - 20:18
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2094 from 2003/3/5
    From: Canada
    There's another SDK update in the works. I'll see to it that it's easier to build the compilers in the next release...

    GCCSelect is gone since it caused too much confusion. There's no need for it, really. If you need to use a specific version, just use CC=ppc-morphos-gcc-9 or so. 'gcc' defaults to 9 now.
  • »01.07.20 - 02:21
    Profile Visit Website
  • Just looking around
    Posts: 7 from 2013/7/24
    OK, thanks. In short:

    Used 8.30 with MOS3.12 and SDK20191006 to compile 8.3.0, that works
    Compiling 9.3.0 (did it anyway) or 8.4.0 under MOS3.13 with SDK20200422 both fail in stdc++ with NO_GCC_EXECUTABLES (-static flag supports fails, that is the difference with the 8.3.0 config log)

    Not sure if I am doing something wrong. But I am seeing some small mistakes here and there in de sdk source too.

    I'll await the new SDK :-)



    [ Edited by Hedeon 01.07.2020 - 08:21 ]
  • »01.07.20 - 08:20
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2094 from 2003/3/5
    From: Canada
    This should all be corrected now, including the build of required libs. Will hopefully be able to release within the next 2 weeks or so.
  • »01.07.20 - 23:19
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2094 from 2003/3/5
    From: Canada
    So I've had a deeper look and tried to compile GCC (10) under MorphOS. Then I ran into the same libstdc++ problem. That stubborn thing really doesn't want to compile natively. We could hack the configure to make it think it's crosscompiling (the only way to disable dlopen dependency there without bigger changes), but don't think it's worth it. I'll look into making sure the thing is relatively easy to cross-compile but that's it.
  • »02.07.20 - 14:35
    Profile Visit Website
  • Just looking around
    Posts: 7 from 2013/7/24
    But why did it work for older SDKs? I compiled in the past GCC4, 5 and 6. And with the 2019 SDK I did 8.3.0 without problems. What did change?
  • »02.07.20 - 15:27
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2094 from 2003/3/5
    From: Canada
    Quote:

    Hedeon wrote:
    But why did it work for older SDKs? I compiled in the past GCC4, 5 and 6. And with the 2019 SDK I did 8.3.0 without problems. What did change?


    I guess it may still work for older GCCs, but these are being retired from the SDK (next one will drop 8 to make room for 10). I've stopped compiling them on MorphOS since it takes hours per compiler version while I can do the same in 5 minutes on an i7.
  • »02.07.20 - 19:06
    Profile Visit Website