[hellogcc] Re: [hellogcc] OpenRisc的gcc需要-mor32-newlib参数,在./gcc/config/or32/or32.opt里面有具体描述。

  • From: Yao Qi <qiyaoltc@xxxxxxxxx>
  • To: hellogcc@xxxxxxxxxxxxx
  • Date: Thu, 7 Apr 2011 22:25:45 +0800

>
> LIB_SPEC其实就是规定,在不同的参数下,link的时候使用什么lib。
>
> 例如config/xtensa/elf.h
>
> #define LINK_SPEC \
>  "%{shared:-shared} \
>  %{!shared: \
>    %{!static: \
>      %{rdynamic:-export-dynamic} \
>    %{static:-static}}}"
>

sorry, LINK_SPEC 和 LIB_SPEC是两个东西,我这里用LINK_SPEC举例。

> 这个意思就是,如果是shared, 就在link的时候加上 -shared; 如果不是shared,也不是static,link的时候,加
> -export-dynamic; 如果是static, link的时候加 -static
>

-- 
Yao Qi <qiyaoltc AT gmail DOT com>
http://sites.google.com/site/duewayqi/

Other related posts: