Welcome, Guest. Please login or register.

Author Topic: gcc and precompiled header  (Read 4053 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show all replies
Re: gcc and precompiled header
« on: September 04, 2013, 04:37:23 PM »
Quote from: ciVic;747001

since the gcc is very slow on an A4000/040, especially when using the STL, I tried to use precompiled header with the m68k gcc 3.4. Unfortunately I can only see an error message "PCH not supported". I'm wondering why, since it works doing the same on a linux machine and 3.4 should support precompiled header.


The Amiga GCC 3.4 68k version is an unofficial version of GCC 3.4. It also seems to be a work in progress that is not as finished or polished as the last 2.x version. I don't know why the PCH support is not supported, specifically. You should make sure you installed and are using the 020 versions of GCC 3.4. Other ways that may speedup compilation:

o If you have enough memory, you could copy the most common header files to a recoverable ram disk.
o PFS (Aminet)
o TLSFMem (from Aminet)
o Move kickstart and SSP to fast memory (Mu libs and 68040.library from Aminet)
o CopyMem040 (CopyMem from Aminet)
o Don't use C++ :P.

I find the speed of GCC 3.4 68k on C only code to be reasonably fast on my CSMK3 68060@75MHz with UltraSCSI 15k RPM drive and 68060 versions of the above suggestions for the 68060.

Quote from: ciVic;747001

Maybe somebody knows a solution or a newer gcc version for classic Amigas?


Anything newer will be slower. There aren't any better alternatives than GCC for C++ on the 68k Amiga either. Cross compiling to 68k with a newer version of GCC can be fast but GCC 4.x generates ELF instead of HUNK format executables. ELF is not a problem if you are using AROS though.