[LLVMdev] Proposal for GSoC project for improving llvm-test testsuite

Evan Cheng evan.cheng at apple.com
Wed Mar 19 19:24:23 PDT 2008


Let's use llvm to build more games! :-) How about Marathon?

http://source.bungie.org/

Evan

On Mar 19, 2008, at 1:09 PM, Holger Schurig wrote:

>> "Didn't work" means... what? Compilation failed? Program doesn't  
>> work?
>> Either way: what mesages do you get?
>
> The graphical screen was just blank. darkplaces emits some log  
> messages as usual. But step by step...
>
>
> Used LLVM-GCC
> -------------
> The used llvm-gcc, when run with "llmv-gcc --version" shows "llvm- 
> gcc (GCC) 4.2.1 (Based on Apple Inc. build 5546) (LLVM build 47212)".
>
> So it has been a month ago when I did this test.
>
> I'm building llvm and llvm-gcc with the attached Makefile. There you  
> can see what I'm using for configure, but I guess that's nothing too  
> fancy.
>
>
> Used Darkplaces
> ---------------
> I'm used darkplaces from SVN. Not sure what SVN revision it was a  
> month ago, but the same problem happens with the current one. To get  
> exactly the same engine source code that I currently have, do
>
>  $ svn co -r8212 svn://svn.icculus.org/twilight/trunk/darkplaces
>
> Now apply the following attached "llvm.patch" to it. The patch  
> changes:
>
> * DO_CC to be "llvm-gcc --emit-llvm"
> * DO_LD to be "llvm-ld -O2 -native -time-passes"
> * CPUOPTIMIZATIONS=-march=athlon
> * don't compile builddate.c on-the-fly at link time, because
>  llvm-ld can't do that
> * don't set LDFLAGS_RELEASE to be the same as the compiler
>  optimization flags
>
> Now do "make cl-release" and you should get an executable named  
> "darkplaces-glx".
>
>
> Used Nexuiz data files
> ----------------------
> Finally you need the nexuiz data files. They are rather huge, a  
> whopping 363 MB. Get them like this from http://mesh.dl.sourceforge.net/sourceforge/nexuiz/nexuiz-24.zip 
> . Extract it, e.g. with "unzip -x nexuiz-24.zip"
>
>
> Run the whole thing
> -------------------
> I call the engine this way:
>
>  $ ./darkplaces-glx \
>      -window
>      -developer
>      -nexuiz
>      -basedir /usr/src/darkplaces/Nexuiz
>
> "-window" makes the program not use fullscreen, then you can still  
> see the log output. "-developer" turns additional messages and  
> warnings on. "-nexuiz" switches the engine into nexuiz mode, the  
> mode must suit the data files. And for "-basedir" add the full path  
> to the data files you downloaded and extract.
>
> Once started, the game will emit lot's of log output:
>
>  Console initialized.
>  Nexuiz Linux 20:12:44 Mar 19 2008
>  Trying to load library... "libz.so.1" - loaded.
> ...
>  ========Initialized=========
>  Client using an automatically assigned port
>  Client opened a socket on address local:2
>  Client opened a socket on address 0.0.0.0:56687
>
> Besides the log output to stdout, it also opens a graphical window.  
> Then the engine should display a graphical, stylized "n" shortly  
> before it emits the "Initialized" line. And this is the first  
> difference between the llvm-gcc darkplaces-glx and the gcc-4.2  
> darkplaces. Later it should show another uglier "n", then three  
> screens where you can use the mouse to select things.
>
> However, with the llvm-gcc version I just see a dark screen. And  
> here it hangs and eat's CPU time. I must admit that I was too lazy  
> to simply run the program under gdb's auspice and interrupt/ 
> backtrace it :-/
>
>
>
> Used gcc-4.2 darkplace engine
> -----------------------------
> To get a working engine from SVN, I keep the makefile/makefile.inc  
> in it's (almost) original form and just make sure that
>
>  CC=gcc-4.2
>  CPUOPTIMIZATIONS=-march=athlon
>
> Now I also compile with "make cl-release". The used compiler show  
> fors "gcc-4.2 --version" the text "gcc-4.2 (GCC) 4.2.3 (Debian  
> 4.2.3-2)".
>
> With this version, there is a graphical output, a stylized n,  
> displayed even before the line "========Initialized========="  
> appears in the log.
>
> The gcc-compiled one emits some more messages to log:
>
>  ========Initialized=========
>  Client using an automatically assigned port
>  Client opened a socket on address local:2
>  Client opened a socket on address 0.0.0.0:56687
>  Map farewell provides unknown info item author_email, ignored
>  Map farewell provides unknown info item author_www, ignored
>  Map warfare provides unknown info item author_email, ignored
>  Map warfare provides unknown info item author_www, ignored
>  Attempted division by zero in menu
>  Attempted division by zero in menu
>  Attempted division by zero in menu
>  Attempted division by zero in menu
>  ln: 5 iterations
>  Sending extended response requests...
>  Fake CD track 1 playing...
>
> At this time, I see the game menu and can select any options.
> <Makefile><llvm.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list