GCC 2.95 backslashes and GCC 4.x
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    Hi

    I have a small problem with GCC. It seems that it doesn't recognize correcly lines finished with a "\" symbol (used to continue in the next line. It's used by some people in #defines with multiple lines. Is there any parameter to make it recognize backslashes correctly??I tried -traditional-cpp (or something like that) and it didn't help.

    I had a similar problem in the past with GCC 2.95 m68k and the problem dissapeared using GCC 3.x. I also tried installing 2.95.4-7 and it doesn't fix the problem. Is there any easy way to install GCC4.x??I just tried to install Morgoth GCC4.x but it's a little unclear to me. It seems it doesn't like certain options defined in the specs file like "auxbase-strip" so I'm unable to compile.

    I guess there's something wrong in my config because the stuff I put in the directory usr/ doesn't seem to be recognized, but it's not recognized even with an SDK fresh install.

    From my ignorant point of view GCC could be slightly more user friendly.

    BTW, I have a newbie question... is it possible to mix static libraries compiled with gcc 2.95 with others compiled with GCC 3.x or GCC4.x?

    @CISC
    when do you plan to update the SDK? and what about native ARexx?

    [ Edited by Crumb on 2010/1/27 19:28 ]
  • »27.01.10 - 18:26
    Profile Visit Website
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:


    I have a small problem with GCC. It seems that it doesn't recognize correcly lines finished with a "\" symbol (used to continue in the next line. It's used by some people in #defines with multiple lines. Is there any parameter to make it recognize backslashes correctly??I tried -traditional-cpp (or something like that) and it didn't help.



    GCC2 definitely supports multiline macros finishing with a backslash (\). But I have got the same problem and I recall it was due to \r\n sequence at the end of line.

    Quote:



    BTW, I have a newbie question... is it possible to mix static libraries compiled with gcc 2.95 with others compiled with GCC 3.x or GCC4.x?



    As long as it is not C++ link lib you can.
    1 + 1 = 3 with very large values of 1
  • »27.01.10 - 18:53
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    Quote:

    GCC2 definitely supports multiline macros finishing with a backslash (\). But I have got the same problem and I recall it was due to \r\n sequence at the end of line.


    I read about the \r\n bug in the changelog but erasing all the characters at the end of the line and rewritting them theorically without the msdos extra characters didn't fix the problem in the tests I performed.
  • »27.01.10 - 23:39
    Profile Visit Website
  • Butterfly
    Butterfly
    Posts: 98 from 2004/6/4
    From: Ivanovo, Russia
    Pity that we don't have any official gcc higher than 2.95. Some ppl think that those versions have too many troubles on powerpc, but all the Debian linux, compiled with the latest gcc4 proves that everything is not THAT bad.
    WBR, Vladimir Berezenko
  • »28.01.10 - 06:44
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    @Crumb

    Btw when using GCC4 you must unresident GCC2.

    Anyway if there are still problems with multiline macros maybe there is some unprintable character... but I also recall having stupid problem with this and not having solution but changing multiline macros to single line. But there are still multiline macros in MorphOS SDK and they work...
    1 + 1 = 3 with very large values of 1
  • »28.01.10 - 07:20
    Profile
  • Butterfly
    Butterfly
    munk
    Posts: 94 from 2006/3/27
    Quote:

    Crumb wrote:
    I have a small problem with GCC. It seems that it doesn't recognize correcly lines finished with a "\" symbol (used to continue in the next line. It's used by some people in #defines with multiple lines.

    These defines are probably fine unless these are multiline strings and you are using GCC3+.

    Quote:

    I had a similar problem in the past with GCC 2.95 m68k and the problem dissapeared using GCC 3.x.

    Then it is the "famous" line ending problem. Replace all "\r\n" with "\n" and the preprocessor should be happy.

    Quote:

    I also tried installing 2.95.4-7 and it doesn't fix the problem.

    When using GCC2 stick to the official SDK version! That 2.95.4 doesn't have any benefits over the SDK version.

    Quote:

    is it possible to mix static libraries compiled with gcc 2.95 with others compiled with GCC 3.x or GCC4.x?

    Already answered by itix but anyway: C link libraries should work. C++ will not work because name mangling changed with GCC3+.
  • »28.01.10 - 08:35
    Profile
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    Quote:

    @CISC
    when do you plan to update the SDK? and what about native ARexx?


    I am no longer maintaining the SDK (and I don't know if anyone has stepped up to the plate to do so yet either; probably not).

    As for ARexx time will tell if I ever get enough spare time to finish the interpreter (the only remaining bit (I have quite a bit of code done already, but in an unusable state))...


    - CISC
  • »28.01.10 - 10:42
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    CISC wrote:

    I am no longer maintaining the SDK (and I don't know if anyone has stepped up to the plate to do so yet either; probably not).


    OUCH! So then, what do you, MorphOS developers, use to develop on MorphOS? Couldn't you release that? Or is it just the existing SDK, plus the 2.x includes?

    Glad to see progress in ARexx, even if it's very slow.
  • »28.01.10 - 12:08
    Profile
  • MorphOS Developer
    CISC
    Posts: 619 from 2005/8/27
    From: the land with ...
    Quote:

    OUCH! So then, what do you, MorphOS developers, use to develop on MorphOS? Couldn't you release that? Or is it just the existing SDK, plus the 2.x includes?


    Well, the problem is it takes quite a bit of packaging to make a userfriendly SDK install, and that's what's missing. For core developers userfriendly doesn't matter (we build everything ourselves straight from CVS).


    - CISC
  • »29.01.10 - 11:20
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Crumb
    Posts: 732 from 2003/2/24
    From: aGaS & CUAZ Al...
    I noticed that I had to remove the soft links and modify the scripts to make the commands resident located at GG:sys/s/ so I?got GCC4 working and... it complained about the includes and the second time I?launched it a ixemul error window appears. I gave it much more stack but it didn't help. With MorphOS2.x includes it seems to be useless. I guess I'm back to my loved/hated GCC2.95.3.

    @CISC

    choose the easier path, just one lha package (your GG compressed directory) with everything installed in that directory and the script/installer would just have to create the assigns and the soft links. I could help you if you don't have the time.
  • »29.01.10 - 13:10
    Profile Visit Website