Dehydra and gcc-4.5 on Ubuntu Lucid Lynx

by groleo

gcc-4.5 haven’t reached Ubuntu Lucid repositories just yet.
So I had to grab it from Debian. You can do this by
placing this line in your /etc/apt/sources.list,

deb http://ftp.debian.org/debian/ experimental main

After this, I updated my package list and downloaded dehydra source code from Mozilla, since
the Debian package still have some errors.

sudo apt-get update
sudo apt-get install gcc-4.5
sudo apt-get install gcc-4.5-plugin-dev
sudo apt-get install xulrunner-1.9.2-dev


hg clone http://hg.mozilla.org/rewriting-and-analysis/dehydra/
cd dehydra
CXX=g++-4.5 CC=gcc-4.5 ./configure --js-headers=/usr/include/xulrunner-1.9.2.3/ --js-libs=/usr/lib/xulrunner-1.9.2.3/
CXX=g++-4.5 CC=gcc-4.5 make
CXX=g++-4.5 CC=gcc-4.5 make check_dehydra

Now I can start using dehydra. I looked inside test/unit_test_harness.py to see how I can call gcc with plugins.
This is what I found this:
/usr/lib/gcc/i486-linux-gnu/4.5.0/cc1plus -fplugin=./gcc_dehydra.so -o /dev/null -fplugin-arg-gcc_dehydra-=./test/test_virtual_inheritance.js ./test/virtual_inheritance.cc
C* getC()
Analyzing compilation unit
Performing interprocedural optimizations
Assembling functions:
C* getC()class C : private A,private virtual B
t.bases[0].isVirtual: undefined

Execution times (seconds)
parser : 0.01 (100%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 288 kB (31%) ggc
TOTAL : 0.01 0.01 0.01 919 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
OK


[1]: https://bugzilla.mozilla.org/show_bug.cgi?id=535696
[2]: https://developer.mozilla.org/En/Dehydra/Installing_Dehydra#Usage

Advertisements