(toppers-users 4075) Re: asp_stbee_gccのmake dependとCodeSourceryの疑問

Hiroaki TAKADA hiro @ ertl.jp
2013年 4月 14日 (日) 10:25:32 JST


こいさん

> 1 make dependで以下のメッセージが出ます

新しい perl で do を使うとこういうエラーメッセージが出るようになった
のが原因です。単に "do" を削除すれば警告は出なくなります。なお、
ASP Release 1.8.0 で修正済みです。

> 2. CodeSourceryの新しいバージョンはツールプリフィックスがarm-none-
> eabiからarm-none-linux-gnueabiに変わっています
> Makefile.targetのGCC_TARGETの修正でコンパイル通りますが、リンカでエラー
> (undefined reference to `__aeabi_unwind_cpp_pr0')になります。

これははじめて聞く問題です。で、__aeabi_unwind_cpp_pr0 を検索してみ
たところ、同じ問題で引っかかっている質問が数件出てきます。

u-boot では、__aeabi_unwind_cpp_pr0 を空の関数として定義して回避して
いるようです(下のURL)。

http://lists.denx.de/pipermail/u-boot/2010-May/071363.html

とりあえずは、これで回避できると思います。

もちろん、本質的な解決には、__aeabi_unwind_cpp_pr0 が何者であるかを
探る必要があります。以下のURLには、この関数は、"part of the standard
ARM exception handling code and helps in unwinding the stack frame
when an exception occurs" とあります。また、libgcc_eh.a に含まれて
いるはずだと書いてあります。

http://lists.linaro.org/pipermail/linaro-toolchain/2011-April/001101.html

とりあえず、ここまで調べましたという報告です。

高田広章
名古屋大学

(13/04/14 1:09), koizumi yoshiyuki wrote:
>  こいさんです
>  Buildの環境を新しくしたところ疑問が出ました。(CygwinとCodeSourceryを 
> 最新に入れ替えた)
> 1 make dependで以下のメッセージが出ます
> Generating Makefile.depend.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 65.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 91.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 157.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 162.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 166.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 178.
> Legacy library getopt.pl <http://getopt.pl> will be removed from the 
> Perl core distribution in the
> next major release. Please install it from the CPAN distribution 
> Perl4::CoreLibs
> . It is being used at ../utils/makedep, line 43.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 65.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 91.
> Use of "do" to call subroutines is deprecated at ../utils/makedep line 157.
> utils\makedepの3箇所修正で回避できていますが良いのでしょうか。
> a.
> #require "getopt.pl <http://getopt.pl>";    元のソース
> use Getopt::Std;      修正分
> b.
> #Getopt("COTDR");
> getopt("COTDR");
> c. doの後を{}で括る
> #@uname = do uname();
> @uname = do { uname(); };
>  doは他にも5箇所ほどあり。
> メーリングリストに下記の情報があり、一度は議論された問題のように見えます 
> が、関連があるのでしょうか。
> (toppers-users 3568) Re: ASPのmakedepでuse POSIXしている理由は?
> 2. CodeSourceryの新しいバージョンはツールプリフィックスがarm-none- 
> eabiからarm-none-linux-gnueabiに変わっています
> Makefile.targetのGCC_TARGETの修正でコンパイル通りますが、リンカでエラー 
> (undefined reference to `__aeabi_unwind_cpp_pr0')になります。
> リンカのコマンドオプションに-nostartfiles を追加し、すでに2つ追加されて 
> いる-nostdlibを削除することで回避できています。
> GCCをCodeSourceryではなくGNU Tools ARM Embeddedを使えば(こちらはarm- 
> none-eabi)良いのですが、arm-none-linux-gnueabiは使ってはいけないのでしょ 
> うか。
>  ツール周りなのでここに問い合わせるは違っているような気もしますが、ご存 
> 知の方が居られましたら宜しくお願いします。
>  以上