Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!nerds-end From: Sven Barth Newsgroups: comp.compilers Subject: Re: Statistics on compiling the Free Pascal compiler for Win32 Date: Tue, 17 Jan 2012 10:00:42 +0100 Organization: Compilers Central Lines: 52 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <12-01-035@comp.compilers> References: <12-01-032@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: leila.iecc.com 1326817332 696 64.57.183.58 (17 Jan 2012 16:22:12 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Tue, 17 Jan 2012 16:22:12 +0000 (UTC) Keywords: Pascal, performance Posted-Date: 17 Jan 2012 11:22:12 EST X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: x330-a1.tempe.blueboxinc.net comp.compilers:434 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