2013年6月12日水曜日

SystemC-2.3 with Clang

Clang is a compiler which features fast compile, friendly error messages and high-compatibility with the latest C++ standard.
SystemC-2.2 can not be compiled with clang due to syntax violation of SystemC library.
Such violations are fixed in SystemC-2.3 but not perfect.
Clang emits warnings with -Wall and -Wextra option.
It is important to set the warning level higher to keep code clean.
If warnings are emitted at the library, warnings of user code may be concealed by them.
This is why libraries must be warning-free.

I wrote small patch to suppress such warnings.
https://github.com/yTakatsukasa/misc/tree/master/systemc-2.3_clang

Apply systemc-2.3_clang.patch before configure., then build it as usual.
 
  1. tar zxvf systemc-2.3.0.tgz
  2. patch -p0 < systemc-2.3_clang.patch
  3. cd systemc-2.3.0
  4. env CC=clang CXX=clang++ CPP="clang -E" ./configure
  5. make
  6. make install

0 件のコメント:

コメントを投稿