[fpc-pascal] fpc and intel vtune (now about gprof)

Пётр Косаревский ppkk at mail.ru
Wed Apr 26 10:57:54 CEST 2006

> > Yes. Hint, link and package/link to smallest possible set of libraries
> > would be better. I am not experienced with many things, so this was pretty
> > confusing ("can't find -lc" --- maybe I'd decipher libc, but "-"...).
> The compiler can also generate code for e.g. FreeBSD,Darwin and Linux.
> Should we also deliver all FreeBSD,Darwin and Linux libs?

You do it: I can download from FPC site sources and binaries for needed libraries.
> >> >        4. -pg is a compiler option, not some external feature
> >> > implying installation of something
> >> There is no other way than to have it as a compiler option, since the
> >> compiler must generate special code for it. Similarly, -gv implies
> >> that you will use Valgrind, but that does not mean we're going to
> >> ship Valgrind with the compiler.
> >>    2. confusing linker error "cannot find -lc" with "-pg"
> >>     -- well, I can't use gprof without cygwin anyhow
> >>        (while gprof.exe itself does not use extras except shipped
> >>        cygwin1.dll)
> It is not confusing. It is expected that you know what you are doing when
> using low-level tools like gprof for profiling.

Yes. I have already read that "The -pg option also links in versions of the library routines that are compiled for profiling" (gprof man page). I really didn't think these versions are so external to FPC.

 1. when cygwin (with binutils) is installed, e.g. libgcc.a may be not installed.
 2. when cygwin is installed, you have to copy/make accessible libraries to FPC ld.exe (and cygwin itself has newer version of ld.exe).
 3. the packages of cygwin to install for gprof functionality are not obvious
 4. archived (libc.a, libgcc.a, libgmon.a, libkernel32.a, libmsvcrt.a and libmoldname.a) use only 200 Kb of space (and I am not sure that all of them are needed).

(to the contrast, the single cygwin1.dll uses more than 400 Kb and is shipped with FPC.)

More information about the fpc-pascal mailing list