トップ «前の日記(2005年07月21日) 最新 次の日記(2005年07月26日)» 編集
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|10|12|
2009|02|03|06|07|10|11|12|
2010|01|02|03|04|07|09|10|11|12|
2011|01|03|04|05|06|07|08|10|
2012|01|06|08|09|10|12|
2013|01|02|03|04|07|09|11|12|
2014|01|03|04|05|06|09|
2015|04|
2016|01|08|
ここは旧えびめもです。えびめも2に移行します(2016/12/1)

2005年07月25日

風邪

金曜日にレントゲン撮ったら肺炎と言われた。どーりで熱が下がらないわけだ。頭いたいし。もう10日目。

仕事

PC上でのsh4-linux-gccクロスコンパイラの.debのビルド
gcc-3.4-3.4.3/debian/README.crossより抜粋
 
1.1. dpkg-cross package
 
Dpkg-cross package contains several tools to manage cross-compile environment.
 
It can convert native debian library and lib-dev packages for the target
architecture to binary-all packages that keep libraries and headers under
/usr/$(TARGET)/.
 
Also it contains helper tools for cross-compiling debian packages. Some of
these tools are used while building libgcc1 and libstdc++ library packages.
The resulting library packages follow the same convensions as library packages
converted by dpkg-cross.
 
Currently, at least version 1.18 of dpkg-cross is needed for cross-gcc
package build.
 
2. Building cross-compiler packages
 
Get gcc-3.4 source package.
 
Unpack it using dpkg-source -x, and cd to the package directory.
 
Set GCC_TARGET environment variable to the target architectire name. Note
that currently you should use debian architecture name (i.e 'powerpc' or 'arm'),
not GNU system type (i.e. 'powerpc-linux' or 'arm-linux'). Setting GCC_TARGET
to GNU system type will cause cross-compiler build to fail.
 
Instead of setting GCC_TARGET, target architecture name may be put into
debian/target file. If both GCC_TARGET is defined and debian/target file
exists, GCC_TARGET is used.
 
Run debian/rules control. This will change debian/control file, adjusting
build-depends.
 
Build the package using dpkg-buildpackage.
ということなので
 # apt-get install dpkg-cross
 # dpkg-source -x gcc-3.4_3.4.3-12.dsc
 # cd gcc-3.4-3.4.3
 # export GCC_TARGET=sh4    (ここが肝心だがsh4-linuxではNGだった...!?)
 # ./debian/rules control
 # time dpkg-buildpackage -us -uc
 :
 :ずっと略
 :
/root/build/gcc-3.4-3.4.3/build/gcc/xgcc -B/root/build/gcc-3.4-3.4.3/build/gcc/ -B/usr/sh4-linux/bin/ -B/usr/
sh4-linux/lib/ -isystem /usr/sh4-linux/include -isystem /usr/sh4-linux/sys-include -O2  -DIN_GCC -DCROSS_COMP
ILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./in
clude  -fpic -DNO_FPSCR_VALUES -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I
. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include  -fexceptions -c ../../src/gcc/unwind-dw2.
c -o libgcc/./unwind-dw2.o
../../src/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../src/gcc/unwind-dw2.c:1017: warning: implicit declaration of function `memset'
../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpregs'
../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_xfpregs'
../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpul'
../../src/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_fpscr'
../../src/gcc/unwind-dw2.c: In function `uw_install_context_1':
../../src/gcc/unwind-dw2.c:1345: warning: implicit declaration of function `memcpy'
make[4]: *** [libgcc/./unwind-dw2.o] Error 1
make[4]: Leaving directory `/root/build/gcc-3.4-3.4.3/build/gcc'
make[3]: *** [stmp-multilib] Error 2
make[3]: Leaving directory `/root/build/gcc-3.4-3.4.3/build/gcc'
make[2]: *** [all-gcc] Error 2
make[2]: Leaving directory `/root/build/gcc-3.4-3.4.3/build'
s=`cat status`; rm -f status; test $s -eq 0
make[1]: *** [stamps/05-build-stamp] Error 1
make[1]: Leaving directory `/root/build/gcc-3.4-3.4.3'
make: *** [stamps/05-build-stamp] Error 2
む。あえなく撃沈。エラーのある行
   1031       MD_FALLBACK_FRAME_STATE_FOR (context, fs, success);
とりあえずgrep
 $ cd src/gcc/config
 $ grep MD_FALLBACK_FRAME_STATE_FOR * -r
alpha/gnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR
alpha/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)         \
alpha/vms.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)           \
i386/gnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR
i386/kfreebsdgnu.h:#undef MD_FALLBACK_FRAME_STATE_FOR
i386/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)          \
i386/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)                \
i386/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)                \
ia64/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)          \
ia64/unwind-ia64.c:#ifdef MD_FALLBACK_FRAME_STATE_FOR
ia64/unwind-ia64.c:      MD_FALLBACK_FRAME_STATE_FOR (context, fs, success);
mips/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)            \
pa/pa32-linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)               \
rs6000/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)                \
rs6000/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)              \
rs6000/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)              \
s390/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)          \
sh/linux.h:/* MD_FALLBACK_FRAME_STATE_FOR is not yet defined for SHMEDIA.  */              ← あ・や・し・い
sh/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)            \
sh/linux.h:   in MD_FALLBACK_FRAME_STATE_FOR and its content will be read with
sparc/linux.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)         \
sparc/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)               \
sparc/linux64.h:#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)               \
sh/ 向けに MD_FALLBACK_FRAME_STATE_FOR の define が弱いよーな予感。
もーこれ以上は頭動かないので今日はここまで(熱あるし)