Re: Statistics on compiling the Free Pascal compiler for Win32

Sven Barth <pascaldragon@googlemail.com>
Tue, 17 Jan 2012 10:00:42 +0100

          From comp.compilers

Related articles
push lexer? detlef.bosau@web.de (Detlef Bosau) (2012-01-17)
Statistics on compiling the Free Pascal compiler for Win32 paul@paul-robinson.us (Paul Robinson) (2012-01-17)
Re: Statistics on compiling the Free Pascal compiler for Win32 pascaldragon@googlemail.com (Sven Barth) (2012-01-17)
| List of all articles for this month |

From: Sven Barth <pascaldragon@googlemail.com>
Newsgroups: comp.compilers
Date: Tue, 17 Jan 2012 10:00:42 +0100
Organization: Compilers Central
References: 12-01-032
Keywords: Pascal, performance
Posted-Date: 17 Jan 2012 11:22:12 EST

Am 17.01.2012 05:19, schrieb Paul Robinson:
> Compiling using the DOS IDE, I brought up the file PP.PAS, declared it
> as the primary file, for compiler switches, I entered into the IDE the
> following:
>
> Win32 I386 cpu32bitaddr
>
> Each time it did not find a Pascal Unit I cheated, looked for the file
> and copied it into the 'compiler' dir
ectory rather than try to set the
> directories in the IDE because I was having trouble or doing something
> wrong and it didn't find the files. So then, once it stopped
> complaining, I had it do a 'build' to do a complete scratch build of the
> compiler.


The following command is sufficient to build a compiler for the i386
platform (from inside cmd.exe):


fpc -FUlib -otestpp.exe -FE. -Fusystems -Fui386 -Fux86 -Fii386 -di386 pp.pas


"-FUlib" specifies that all *.o and *.ppu files are generated in
directory "lib" (which you need to create first)
"-otestpp.exe" specifies that the resulting executable should be named
"testpp.exe"
"-FE." tells the compiler that the resulting executable should be
created in teh current directory
"-FuXXX" are the directories which contain other used units
"-FiXXX" specifies directories which contain include files
"-di368" will generate a compiler for "i386". Other possibilities can be
seen in the comments of pp.pas


If you have already compiled the compiler using the Makefile ("make all"
in the top level directory of the FPC source or "make cycle" in the
directory of the compiler) then you can use the "manually" created
compiler to compile itself again using the following command:


testpp.exe -n -Fu{YOURSOURCEDIRECTORY}\rtl\units\i386-win32 -B -FUlib
"-otestpp2.exe" "-FE." -Fusystems -Fui386 -Fux86 -Fii386 -di386 -vinw pp.pas


"-n" tells the compiler not to use its default configuration file
The parameter containing {YOURSOURCEDIRECTORY} is the directory where
the Makefile (see above) compiled the RTL (RunTime Library) to (we need
that now that we don't use the default configuration).
"-B" tells the compiler to recompile all units.
We also use a different name, as "testpp.exe" can not be overriden while
it's running.
"-vinw" tells the compiler to display general information (like
"Compiling blabla.pas"), notes and warnings (this is normally also
included in the default configuration).


Regards,
Sven


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.