Recent

Author Topic: FreePascal version of gcc and friends  (Read 1404 times)

srvaldez

  • Full Member
  • ***
  • Posts: 117
FreePascal version of gcc and friends
« on: December 07, 2024, 10:56:45 am »
why is FPC distributed with a version of gcc that's 25 years old?
I am guessing that the libraries that are included in the Units are about the same age? (maybe not)
what would it take to recompile FPC from source with a much more up-to-date version of the GNU tools and libraries ?

rvk

  • Hero Member
  • *****
  • Posts: 6641
Re: FreePascal version of gcc and friends
« Reply #1 on: December 07, 2024, 11:06:43 am »
what would it take to recompile FPC from source with a much more up-to-date version of the GNU tools and libraries ?
gcc isn't distributed with the source of FPC.
So if you compile FPC from source then you can just use the latest gcc (and other utils and loo ibraries).


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11985
  • FPC developer.
Re: FreePascal version of gcc and friends
« Reply #2 on: December 07, 2024, 12:05:57 pm »
On non Unix systems a dummy "gcc" is distributed to keep the resource compiler windres going. (which uses gcc for its limited preprocessing).

In time windres will be replaced by fpcres, and this will be gone.


Thaddy

  • Hero Member
  • *****
  • Posts: 16344
  • Censorship about opinions does not belong here.
Re: FreePascal version of gcc and friends
« Reply #3 on: December 07, 2024, 12:41:41 pm »
why is FPC distributed with a version of gcc that's 25 years old?
Wait for it,
The reason is that newer versions of the preprocessor are way more restrictive and would not work. And I believe you mean the cpp part.
You can't use newer or latest versions of the preprocessor anymore to process arbitrary data.
So since fpc relies on that (it is not a gnu language), newer versions won't work.

If you take the time to read this https://gcc.gnu.org/onlinedocs/gcc-4.3.2//cpp/Differences-from-previous-versions.html with attention you would understand it.
There is nothing wrong with being blunt. At a minimum it is also honest.

rvk

  • Hero Member
  • *****
  • Posts: 6641
Re: FreePascal version of gcc and friends
« Reply #4 on: December 07, 2024, 12:47:29 pm »
The reason is that newer versions of the preprocessor are way more restrictive and would not work. And I believe you mean the cpp part.
So how does this work on Linux when compiling from trunk?
There is no 'old' version distributed with trunk source.

Thaddy

  • Hero Member
  • *****
  • Posts: 16344
  • Censorship about opinions does not belong here.
Re: FreePascal version of gcc and friends
« Reply #5 on: December 07, 2024, 12:53:59 pm »
Yes, there is, only cpp.
(there was, not in trunk from today, just checked.)
in trunk fpcres is the default so cpp is not needed anymore as per Marcov's response.
« Last Edit: December 07, 2024, 12:57:46 pm by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5802
  • Compiler Developer
Re: FreePascal version of gcc and friends
« Reply #6 on: December 09, 2024, 09:45:02 pm »
in trunk fpcres is the default so cpp is not needed anymore as per Marcov's response.

fpcres is not yet the default, because that waits for the 3.2.4 release which will be the first with a fpcres capable of compiling rc files.

 

TinyPortal © 2005-2018