port systemc to mac os x

很遗憾,systemc官方提供的SDK并不能直接在 mac os x 下用 gcc编译链接。

需要做如下 修改 :

1、为configure添加编译环境支持,简单的说,就是修改config/config.sub,加入i686-apple-darwin10编译环境。不同操作系统版本下,这个字串从/usr/bin/*-*-*-gcc-*中可以看出;关键语句如下:

maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` #e.g., apple-darwin10 case $maybe_os in linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; apple-*) vendor=apple basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` # i686 os=`echo $1 | sed 's/.*-/-/'` # -darwin10 ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac

-darwin*) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\'system \`$os\' not recognized 1>&2 exit 1 ;; esac

3、在configure、configure.in脚本中添加i686-apple-darwin10的编译器配置:

case "$target" in i[3456789]86-apple-darwin*) case "$CXX_COMP" in CC) EXTRA_CXXFLAGS="" DEBUG_CXXFLAGS="-g" OPT_CXXFLAGS="-O3" TARGET_ARCH="darwin10" AR_TOOL="$CXX -xar -o" CC="$CXX" CFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS" ;; c++ | g++) EXTRA_CXXFLAGS="-Wall" DEBUG_CXXFLAGS="-g" OPT_CXXFLAGS="-O3" TARGET_ARCH="darwin10" AR_TOOL="$ar -ruv" CC="$CXX" CFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS" ;; *) { { echo "$as_me:2730: error: \"sorry...compiler not supported\"" >&5 echo "$as_me: error: \"sorry...compiler not supported\"" >&2;} { (exit 1); exit 1; }; } ;; esac AS=as QT_ARCH="i686-apple-darwin10" ;;

并修改一个“硬编码”问题:am__api_version="1.6",将1.6修改为aclocal的实际版本号。

2、add #include <sys/typedef.h> in filerc//sysc/kernel/sc_cor_qt.cpp

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值