トップ «前の日記(2014-12-19) 最新 次の日記(2014-12-21)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|

2014-12-20 :-)

_ 午前

0930 起床

1020 おひる。うどん

1030 コーヒー

1100 読書

_ 午後

1300 アニメ消化

1500 読書

_

1700 gccうーん

2100 飯

_ NetBSD で h8300-hms な gcc クロスコンパイラを作る (NetBSD)

pkgsrc にある。

cd pkgsrc/cross/h8300-hms-gcc/
make install clean clean-depends

_ cygwin で h8300-hms な gcc クロスコンパイラを作る (1) (挫折)

最新のツールを使おうとすると「サポートしてない」と言われる。挫折。

Libs

gcc のビルドに必要なライブラリは cygwin パッケージにある。パッケージの Devel と Libs を全部インストールしておけば事足りるだろう。

  • GMP
  • MPFR
  • MPC
  • PPL
  • cloog-ppl

binutils newlib gcc

ダウンロードして展開しておく。

http://ftp.gnu.org/gnu/binutils/

ftp://sources.redhat.com/pub/newlib/index.html

http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/

% for f in *.gz; do echo $f; done
binutils-2.24.tar.gz
gcc-4.9.2.tar.gz
newlib-2.2.0.tar.gz
% for f in *.gz; do tar xzf $f; done

binutils

configure して make

../configure --target=h8300-hms --disable-nls --prefix=/usr/local/cross
make

 :

checking whether byte ordering is bigendian... no
This target is no longer supported in gas
Makefile:4665: recipe for target 'configure-gas' failed
make[1]: *** [configure-gas] Error 1
make[1]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/binutils-2.24/build'
Makefile:833: recipe for target 'all' failed
make: *** [all] Error 2

h8300-hms はオワコン と言われた。諦める。続く

_ cygwin で h8300-hms な gcc クロスコンパイラを作る (2) (挫折)

最新のツールはダメらしい。公式によると古いやつを使えとのこと。

Downloading necessary files

Download the following files and put them under one directory (or you can have linkes to them in one directory).

    binutils-2.13.2.tar.bz2
    gcc-3.2.1-core.tar.bz2
    h8300-hms-gcc-3.1-1.patch
    newlib-1.11.0.tar.gz
    gdb-5.2.1.tar.bz2

これ

http://ftp.gnu.org/gnu/binutils/binutils-2.13.2.tar.gz

http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-3.2.1/gcc-3.2.1.tar.gz

http://prdownloads.sourceforge.net/h8300-hms/h8300-hms-gcc-3.1-1.patch

ftp://sourceware.org/pub/newlib/newlib-1.11.0.tar.gz

http://ftp.gnu.org/gnu/gdb/gdb-5.2.1.tar.gz

binutils

configure は --host を指定しないと怒られる。make install でエラーになった。

../configure --prefix=/usr/local/cross --host=x86_64-cygwin --target=h8300-hms
make CFLAGS="-O2 -fomit-frame-pointer" all
make install

 :

../../../gas/doc/c-i386.texi:608: warning: node next `i386-16bit' in menu `i386-Arch' and in sectioning `i386-Bugs' differ
../../../gas/doc/c-i386.texi:659: warning: node next `i386-Bugs' in menu `i386-Notes' and in sectioning `i386-Arch' differ
../../../gas/doc/c-i386.texi:659: warning: node prev `i386-Bugs' in menu `i386-Arch' and in sectioning `i386-16bit' differ
../../../gas/doc/c-i386.texi:680: warning: node next `i386-Arch' in menu `i386-Bugs' and in sectioning `i386-Notes' differ
../../../gas/doc/c-i386.texi:680: warning: node prev `i386-Arch' in menu `i386-16bit' and in sectioning `i386-Bugs' differ
../../../gas/doc/c-i386.texi:728: warning: node prev `i386-Notes' in menu `i386-Bugs' and in sectioning `i386-Arch' differ
../../../gas/doc/c-mmix.texi:7: warning: node next `MMIX-Dependent' in menu `SH-Dependent' and in sectioning `PDP-11-Dependent' differ
../../../gas/doc/c-pdp11.texi:6: warning: node prev `PDP-11-Dependent' in menu `SH64-Dependent' and in sectioning `MMIX-Dependent' differ
../../../gas/doc/c-ppc.texi:7: warning: node next `PPC-Dependent' in menu `Sparc-Dependent' and in sectioning `SH-Dependent' differ
../../../gas/doc/c-sh.texi:6: warning: node prev `SH-Dependent' in menu `MMIX-Dependent' and in sectioning `PPC-Dependent' differ
../../../gas/doc/c-sh64.texi:5: warning: node next `SH64-Dependent' in menu `PDP-11-Dependent' and in sectioning `Sparc-Dependent' differ
../../../gas/doc/c-sparc.texi:7: warning: node next `Sparc-Dependent' in menu `V850-Dependent' and in sectioning `Z8000-Dependent' differ
../../../gas/doc/c-sparc.texi:7: warning: node prev `Sparc-Dependent' in menu `PPC-Dependent' and in sectioning `SH64-Dependent' differ
../../../gas/doc/c-z8k.texi:6: warning: node prev `Z8000-Dependent' in menu `V850-Dependent' and in sectioning `Sparc-Dependent' differ
../../../gas/doc/c-vax.texi:7: warning: node `V850-Dependent' is next for `Vax-Dependent' in sectioning but not in menu
../../../gas/doc/c-v850.texi:5: warning: node `Z8000-Dependent' is next for `V850-Dependent' in menu but not in sectioning
../../../gas/doc/c-v850.texi:5: warning: node prev `V850-Dependent' in menu `Sparc-Dependent' and in sectioning `Vax-Dependent' differ
Makefile:229: recipe for target 'as.info' failed
make[2]: *** [as.info] Error 1
make[2]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/binutils-2.13.2/objdir/gas/doc'
Makefile:2521: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/binutils-2.13.2/objdir/gas'
Makefile:1345: recipe for target 'install-gas' failed
make: *** [install-gas] Error 2

gas だけでなくサブディレクトリすべての texinfo やら texi やらでどうようのエラーになるので面倒くさいので片っ端から Makefile の該当箇所をコメントアウトしてビルド対象外とした。

bfd/Makefile

#SUBDIRS = doc po
SUBDIRS = po

gas/Makefile

#SUBDIRS = doc po
SUBDIRS = po

ld/Makefile

#install: install-info

再度 make install すれば入る。

gcc and newlib

手順通りやる。make install でエラーになる。

export PATH=$PATH:/usr/local/cross/bin
tar xfj gcc-3.2.1-core.tar.bz2
tar xfz newlib-1.11.0.tar.gz
cd gcc-3.2.1
ln -s ../newlib-1.11.0/newlib .
patch -p1 < ../h8300-hms-gcc-3.1-1.patch
mkdir objdir
cd objdir
$ ../configure  --prefix=/usr/local/cross  --host=i686-pc-cygwin  --target=h8300-hms  --enable-languages=c --with-newlib
make CFLAGS="-O2 -fomit-frame-pointer" all
make install

 :

make[3]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib'
Making all in libc
make[3]: Entering directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/libc'
Making all in argz
make[4]: Entering directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/libc/argz'
/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/gcc/xgcc -B/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/gcc/ -nostdinc -B/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/ -isystem /cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/targ-include -isystem /cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/newlib/libc/include -B/usr/local/cross/h8300-hms/bin/ -B/usr/local/cross/h8300-hms/lib/ -isystem /usr/local/cross/h8300-hms/include -DPACKAGE=\"newlib\" -DVERSION=\"1.11.0\"  -I. -I../../../../../newlib/libc/argz  -O2 -DSMALL_DTOA -DSMALL_MEMORY -fno-builtin      -O2 -O2 -fomit-frame-pointer -c ../../../../../newlib/libc/argz/dummy.c
make[4]: /cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/gcc/xgcc: コマンドが見つかりませんでした
Makefile:207: recipe for target 'dummy.o' failed
make[4]: *** [dummy.o] Error 127
make[4]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/libc/argz'
Makefile:452: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib/libc'
Makefile:476: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib'
Makefile:627: recipe for target 'all-recursive-am' failed
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory '/cygdrive/c/home/public/h8-300-hms/gcc-3.2.1/objdir/h8300-hms/newlib'
Makefile:1520: recipe for target 'all-target-newlib' failed
make: *** [all-target-newlib] Error 2

もうやだ。

_ TOPPERS/JSP のサンプルを動作させる (挫折)

NetBSD で h8300-hms クロスコンパイラは入ったので NetBSD で作業してみる。挫けた。

% cd jsp-1.4.4.1-full/sample
% ../configure -C h8 -S akih8_3069f
zsh: ../configure: bad interpreter: /usr/bin/perl: no such file or directory

configure のシェバングを /usr/pkg/bin/perl に変更する。

再度 configure する。

% ../configure -C h8 -S akih8_3069f
Use of "do" to call subroutines is deprecated at ../configure line 71.
Use of "do" to call subroutines is deprecated at ../configure line 84.
Use of "do" to call subroutines is deprecated at ../configure line 95.
Use of "do" to call subroutines is deprecated at ../configure line 163.
Use of "do" to call subroutines is deprecated at ../configure line 169.
Use of "do" to call subroutines is deprecated at ../configure line 176.
Use of "do" to call subroutines is deprecated at ../configure line 182.
Use of "do" to call subroutines is deprecated at ../configure line 224.
Use of "do" to call subroutines is deprecated at ../configure line 253.
Use of "do" to call subroutines is deprecated at ../configure line 254.
Use of "do" to call subroutines is deprecated at ../configure line 255.
Use of "do" to call subroutines is deprecated at ../configure line 256.
Use of "do" to call subroutines is deprecated at ../configure line 257.
Can't locate getopt.pl in @INC (@INC contains: /home/rin/usr/local/lib/perl /usr/pkg/lib/perl5/site_perl/5.18.0/i386-netbsd-thread-multi /usr/pkg/lib/perl5/site_perl/5.18.0 /usr/pkg/lib/perl5/vendor_perl/5.18.0/i386-netbsd-thread-multi /usr/pkg/lib/perl5/vendor_perl/5.18.0 /usr/pkg/lib/perl5/5.18.0/i386-netbsd-thread-multi /usr/pkg/lib/perl5/5.18.0 .) at ../configure line 40.

getopt.pl はレガシーだった。cpan だとどれが該当するんだ....