Free Pascal linking (Developers)
> > For sure there are more Windows machines than DOS ones. But I'm
> skeptical
> > that that 20k is static (probably requires MSVCRT).
>
> Depends on your definition. Of course FPC doesn't use MSVCRT, since it is
> not a (MS) C compiler?!?!?
Well, TCC (Tiny C) for Win32 outputs to PE .EXEs that depend on MSVCRT. And so does MinGW (right??). So, yes, some third-party compilers do use it.
> Nor does it use other DLLs, except for the two dlls that are effectively
> the interface to the kernel on windows: user32 and kernel32. However
> disallowing that would be like disallowing interrupts on Dos.
Sounds like an ideal candidate for HX!
> It does. FPC is also the compiler with the lowest memory use on the
> shootout, killing gcc. (though that is something different than binary
> size)
I don't know how much GCC uses minimum, but I know that 4.x has much greater optimizations, so -O2 can use a lot more than 3.x ever did.
> > It's even mentioned on their wiki as a known issue. I mean, for now,
> "UPX
> > is your friend" (sorry, Japheth, but it's true!).
>
> FPC does not recommend UPX, unless it is 100% required. And usually it is
> not, see http://wiki.freepascal.org/Size_Matters
For DOS, it's perfectly fine (very small decomp stub too). For Win32, there is the "no shared pages" crudola, but that only applies if you intend to run tons of instances (e.g. make or bash). And it's plenty fast. The only time I've seen it slow down is DOS-packed stuff on Windows (only noticable when e.g. DJGPP itself is fully packed, and that may be more of an NTVDM issue) or huge (> 1 MB) LZMA-packed .EXEs on my old 486. So again, those problems are rare, and it's perfectly valid otherwise.
> > Ideally, we should be comparing something like FreeBASIC or DJGPP
> > (GCC) or GPC vs. FreePascal (using the same LIBC, I assume).
>
> FPC doesn't use any libc. Not even on Unix. It is not a Unix/C compiler in
> disguise, but a multiplatform compiler.
FreeBASIC (DOS, at least) does use DJGPP's LIBC.A although it is not a GCC frontend (although plans to dually output C are in the works). Just like FPC, the compiler proper is written in itself. It does, however, use (G)AS and LD (from BinUtils) for its dirty work. But FreeBASIC is still not quite as portable as FPC (officially only three hosts/targets).
> However FPC doesn't really train on small binary size, it just has a
> slight example, specially with benchmarky programs like "hello world" due
> to its architecture.
The real whiners about size tend to be assembly programmers because they know what can be accomplished in the comparable amount of code. Sure, nobody cares as much anymore now that multi-gigabyte HDs are universal, but some people still have the ideal that it shouldn't take 10x more space than it used to take unless there's a really good reason.
Complete thread:
- BIG "C" compiler comparison thread - DOS386, 04.03.2008, 02:07 (Developers)
- BIG "C" compiler comparison thread - Steve, 04.03.2008, 05:08
- BIG "C" compiler comparison thread - DOS386, 09.03.2008, 02:11
- BIG "C" compiler comparison thread - Steve, 09.03.2008, 09:40
- BIG "C" compiler comparison thread - DOS386, 09.03.2008, 02:11
- BIG "C" compiler comparison thread - Japheth, 04.03.2008, 09:38
- BIG "C" compiler comparison thread - rr, 04.03.2008, 10:02
- BIG "C" compiler comparison thread - Rugxulo, 04.03.2008, 14:53
- BIG "C" compiler comparison thread - Japheth, 04.03.2008, 18:32
- BIG "C" compiler comparison thread - Rugxulo, 04.03.2008, 18:57
- No cheats please! - Japheth, 05.03.2008, 11:02
- No cheats please! - Rugxulo, 05.03.2008, 14:07
- No cheats please! - Japheth, 05.03.2008, 11:02
- BIG "C" compiler comparison thread - Rugxulo, 04.03.2008, 18:57
- BIG "C" compiler comparison thread - Japheth, 04.03.2008, 18:32
- BIG "C" compiler comparison thread - Steve, 04.03.2008, 20:41
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 01:11
- BIG "C" compiler comparison thread - Steve, 05.03.2008, 02:05
- BIG "C" compiler comparison thread - rr, 05.03.2008, 09:57
- BIG "C" compiler comparison thread - rr, 05.03.2008, 10:01
- BIG "C" compiler comparison thread - Steve, 05.03.2008, 02:05
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 01:11
- BIG "C" compiler comparison thread | evil TCC - DOS386, 09.03.2008, 02:17
- BIG "C" compiler comparison thread | evil TCC - Japheth, 09.03.2008, 08:41
- BIG "C" compiler comparison thread | evil TCC - rr, 09.03.2008, 22:20
- BIG "C" compiler comparison thread | evil TCC - Rugxulo, 10.03.2008, 03:29
- BIG "C" compiler comparison thread - marcov, 07.04.2008, 14:30
- BIG "C" compiler comparison thread - Rugxulo, 07.04.2008, 23:57
- BIG "C" compiler comparison thread - marcov, 15.04.2008, 10:43
- BIG "C" compiler comparison thread - Rugxulo, 25.07.2008, 06:55
- BIG "C" compiler comparison thread - Rugxulo, 25.07.2008, 23:15
- BIG "C" compiler comparison thread - Steve, 26.07.2008, 00:27
- BIG "C" compiler comparison thread - Rugxulo, 25.07.2008, 23:15
- BIG "C" compiler comparison thread - Rugxulo, 25.07.2008, 06:55
- BIG "C" compiler comparison thread - marcov, 15.04.2008, 10:43
- BIG "C" compiler comparison thread - Rugxulo, 07.04.2008, 23:57
- BIG "C" compiler comparison thread - Rugxulo, 04.03.2008, 14:53
- BIG "C" compiler comparison thread - Khusraw, 04.03.2008, 21:51
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 01:06
- BIG "C" compiler comparison thread - Steve, 05.03.2008, 01:50
- BIG "C" compiler comparison thread - Khusraw, 05.03.2008, 08:01
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 14:04
- BIG "C" compiler comparison thread - Khusraw, 05.03.2008, 15:46
- BIG "C" compiler comparison thread - Rugxulo, 06.03.2008, 04:40
- BIG "C" compiler comparison thread - Japheth, 06.03.2008, 07:52
- BIG "C" compiler comparison thread - tom, 08.03.2008, 21:50
- BIG "C" compiler comparison thread - Rugxulo, 09.03.2008, 00:53
- BIG "C" compiler comparison thread - Steve, 09.03.2008, 09:36
- BIG "C" compiler comparison thread - tom, 10.03.2008, 12:59
- BIG "C" compiler comparison thread - Rugxulo, 09.03.2008, 00:53
- BIG "C" compiler comparison thread | WC 1.52 - DOS386, 09.03.2008, 03:02
- BIG "C" compiler comparison thread | WC 1.52 - marcov, 07.04.2008, 14:39
- BIG "C" compiler comparison thread | WC 1.52 - Rugxulo, 08.04.2008, 00:09
- BIG "C" compiler comparison thread | WC 1.52 - marcov, 08.04.2008, 14:34
- BIG "C" compiler comparison thread | WC 1.52 - Rugxulo, 08.04.2008, 16:13
- Free Pascal linking - rr, 09.04.2008, 11:40
- Free Pascal linking - marcov, 10.04.2008, 10:40
- Free Pascal linking - rr, 10.04.2008, 12:18
- Free Pascal linking - Rugxulo, 11.04.2008, 06:32
- Free Pascal linking - marcov, 11.04.2008, 14:20
- Free Pascal linking - Rugxulo, 11.04.2008, 16:16
- Free Pascal linking - marcov, 11.04.2008, 20:14
- compression / size wars - Rugxulo, 12.04.2008, 01:13
- compression / size wars - DOS386, 01.05.2008, 04:49
- compression / size wars - Rugxulo, 01.05.2008, 05:32
- FAT OGG - DOS386, 01.05.2008, 05:44
- compression / size wars - Rugxulo, 01.05.2008, 05:32
- compression / size wars - DOS386, 01.05.2008, 04:49
- compression / size wars - Rugxulo, 12.04.2008, 01:13
- Free Pascal linking - marcov, 11.04.2008, 20:14
- Free Pascal linking - Japheth, 11.04.2008, 16:39
- Free Pascal linking - Steve, 12.04.2008, 05:19
- Free Pascal linking - marcov, 12.04.2008, 14:41
- Free Pascal linking - Steve, 12.04.2008, 16:09
- Free Pascal linking - marcov, 13.04.2008, 23:42
- Compression - Steve, 14.04.2008, 06:27
- Compression - marcov, 14.04.2008, 11:03
- Compression - Steve, 14.04.2008, 13:32
- Compression - Rugxulo, 14.04.2008, 20:00
- Compression - Steve, 14.04.2008, 20:16
- Compression - marcov, 15.04.2008, 10:40
- Compression - Steve, 15.04.2008, 12:24
- Compression - marcov, 15.04.2008, 15:43
- Compression - Steve, 16.04.2008, 11:32
- Compression - marcov, 15.04.2008, 15:43
- Compression - Steve, 15.04.2008, 12:24
- Compression - marcov, 15.04.2008, 10:40
- Compression - Steve, 14.04.2008, 20:16
- Compression - Rugxulo, 14.04.2008, 20:00
- Compression - Steve, 14.04.2008, 13:32
- Compression - Rugxulo, 14.04.2008, 19:55
- Compression - Steve, 14.04.2008, 20:44
- Compression - marcov, 15.04.2008, 09:59
- Compression - Steve, 15.04.2008, 11:55
- Compression - marcov, 15.04.2008, 15:24
- Compression - Rugxulo, 16.04.2008, 01:13
- Compression - Steve, 16.04.2008, 10:54
- Compression - marcov, 16.04.2008, 16:24
- Compression - Steve, 16.04.2008, 21:27
- Compression - marcov, 16.04.2008, 23:38
- Compression - Steve, 17.04.2008, 12:10
- Compression - marcov, 16.04.2008, 23:38
- Compression - Steve, 16.04.2008, 21:27
- Compression - marcov, 16.04.2008, 16:24
- Compression - marcov, 15.04.2008, 15:24
- Compression - Steve, 15.04.2008, 11:55
- Compression - marcov, 14.04.2008, 11:03
- Compression - Steve, 14.04.2008, 06:27
- Free Pascal linking - marcov, 13.04.2008, 23:42
- Free Pascal linking - Steve, 12.04.2008, 16:09
- Free Pascal linking - marcov, 12.04.2008, 14:41
- Free Pascal linking - Rugxulo, 11.04.2008, 16:16
- Free Pascal linking - marcov, 11.04.2008, 14:20
- Free Pascal linking - marcov, 10.04.2008, 10:40
- BIG "C" compiler comparison thread | WC 1.52 - marcov, 08.04.2008, 14:34
- BIG "C" compiler comparison thread | WC 1.52 - Rugxulo, 08.04.2008, 00:09
- BIG "C" compiler comparison thread | WC 1.52 - marcov, 07.04.2008, 14:39
- BIG "C" compiler comparison thread - tom, 08.03.2008, 21:50
- BIG "C" compiler comparison thread - Khusraw, 06.03.2008, 10:41
- BIG "C" compiler comparison thread - Japheth, 06.03.2008, 07:52
- BIG "C" compiler comparison thread - Rugxulo, 06.03.2008, 04:40
- BIG "C" compiler comparison thread - Khusraw, 05.03.2008, 15:46
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 14:04
- BIG "C" compiler comparison thread - Rugxulo, 05.03.2008, 01:06
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 09.03.2008, 02:49
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Japheth, 09.03.2008, 08:56
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 09.03.2008, 12:40
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Japheth, 10.03.2008, 09:04
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 10.03.2008, 13:52
- Ich nix verstehen - andere Baustelle! - Japheth, 10.03.2008, 14:43
- Ich nix verstehen - andere Baustelle! - Steve, 11.03.2008, 10:17
- Ich nix verstehen - andere Baustelle! - marcov, 07.04.2008, 14:44
- Ich nix verstehen - andere Baustelle! - Steve, 08.04.2008, 01:43
- Ich nix verstehen - andere Baustelle! - marcov, 08.04.2008, 14:36
- Ich nix verstehen - andere Baustelle! - Steve, 08.04.2008, 01:43
- Ich nix verstehen - andere Baustelle! - Japheth, 10.03.2008, 14:43
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 10.03.2008, 13:52
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Japheth, 10.03.2008, 09:04
- BIG "C" compiler cmp | the "scientific" facts ore out DW - rr, 09.03.2008, 22:10
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 10.03.2008, 03:39
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 10.03.2008, 09:08
- BIG "C" compiler cmp | the "scientific" facts ore out DW - rr, 10.03.2008, 12:31
- BIG "C" compiler cmp | DELTREE - DOS386, 01.05.2008, 04:32
- BIG "C" compiler cmp | DELTREE - rr, 02.05.2008, 16:20
- BIG "C" compiler cmp | DELTREE - DOS386, 01.05.2008, 04:32
- BIG "C" compiler cmp | the "scientific" facts ore out DW - rr, 10.03.2008, 12:31
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 10.03.2008, 06:24
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 11:39
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 10.03.2008, 12:07
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 10.03.2008, 13:58
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 01.05.2008, 05:30
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 02.05.2008, 00:47
- BIG "C" compiler cmp | the "scientific" facts ore out DW - rr, 02.05.2008, 16:22
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 03.05.2008, 08:16
- BIG "C" compiler cmp | the "scientific" facts ore out DW - rr, 02.05.2008, 16:22
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 02.05.2008, 00:47
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 01.05.2008, 05:30
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 17:55
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 10.03.2008, 20:49
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 21:41
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 07.04.2008, 14:52
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 10.03.2008, 20:49
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 10.03.2008, 13:58
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Khusraw, 10.03.2008, 16:00
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 17:42
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Khusraw, 10.03.2008, 17:50
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 17:56
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 07.04.2008, 14:55
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 08.04.2008, 00:02
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Khusraw, 10.03.2008, 17:50
- BIG "C" compiler cmp | the "scientific" facts ore out DW - RayeR, 10.03.2008, 17:42
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 10.03.2008, 12:07
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 11.03.2008, 19:29
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 12.03.2008, 08:01
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 12.03.2008, 20:13
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 13.03.2008, 04:10
- BIG "C" compiler cmp | INTEL - DOS386, 01.05.2008, 04:43
- BIG "C" compiler cmp | INTEL - Steve, 02.05.2008, 00:51
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 12.03.2008, 20:13
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 07.04.2008, 14:58
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 07.04.2008, 23:38
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 10.04.2008, 10:22
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 11.04.2008, 06:27
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 11.04.2008, 20:18
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 11.04.2008, 06:27
- BIG "C" compiler cmp | the "scientific" facts ore out DW - marcov, 10.04.2008, 10:22
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Rugxulo, 07.04.2008, 23:38
- BIG "C" compiler cmp | the "scientific" facts ore out DW - DOS386, 01.05.2008, 04:41
- BIG "C" compiler cmp | the "scientific" facts ore out DW - Steve, 12.03.2008, 08:01
- BIG "C" compiler cmp | new facts ore out: OW TCC CC386 - DOS386, 01.05.2008, 04:30
- BIG "C" compiler cmp | new facts ore out: OW TCC CC386 - Rugxulo, 01.05.2008, 05:27
- BIG "C" compiler comparison thread - Steve, 04.03.2008, 05:08