Is possible to get rid of the entire GCC thing?

General FreeBASIC programming questions.
Julcar
Posts: 45
Joined: Oct 19, 2010 18:52

Is possible to get rid of the entire GCC thing?

Postby Julcar » Oct 30, 2019 9:16

Hello,

I am trying FB on linux and one of the handicaps I've found is the fact that FB depends on an existing GCC installation (taking in account the huge space needed) to work properly...

Looking at the FB's code, I think that GCC is needed because his binutils as Gas, Ar, Ld, etc, something very understandable, but I was thinking also, why not using instead the same functionality provided by alternative compilers such as TCC (which integrates a linker and an assembler) and saving a lot of space?

I mean, FB is self-compiled, and the same TCC could be used to compile the runtime lib when needed.

Let me know your thoughts
jj2007
Posts: 1262
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Is possible to get rid of the entire GCC thing?

Postby jj2007 » Oct 30, 2019 11:02

I perfectly understand your thoughts. It would indeed be a good idea to reduce the confusion, and concentrate on one installation that really works. The question is: which one? C compilers tend to be big behemoths nowadays. Should we pick one that is relatively small, but is very slow? Or the other way round?
aurelVZAB
Posts: 291
Joined: Jul 02, 2008 14:55
Location: Croatia
Contact:

Re: Is possible to get rid of the entire GCC thing?

Postby aurelVZAB » Oct 30, 2019 16:58

Self-compiled...how is that possible if need GCC compiler ?
By the way i don't think that TCC is slow ..on Windows is not but to use one ..hmmm that would be nice because
TCC work well on Windows i don't know how respond on Linux even i have in plan to try FB on linux distro.
caseih
Posts: 1390
Joined: Feb 26, 2007 5:32

Re: Is possible to get rid of the entire GCC thing?

Postby caseih » Oct 30, 2019 18:19

Except that GCC is standard equipment for Linux. It's always there if you have any development tools installed. By the way, the linking tools are separate from GCC. They come from the binutils package on most distros, which has no dependencies on gcc at all. Of course on 64-bit Linux, gcc is required because FBC uses it as a code backend, which is sensible. GCC will produce better and faster code than a native FBC assembler emitter would.

The real question one might ask is, are there advantages to using llvm as the compiler backend instead of gcc. Theoretically the intermediate C code step could be skipped entirely if FBC was a FB frontend for the llvm compiler.

Return to “General”

Who is online

Users browsing this forum: Stonemonkey and 3 guests