僕もMacでbrickOS
(できるまで更新する)
基本、
Building brickOS tools on Mac OS X | Marc Abramowitz
の通りにやる。
binutils
configureのところで
% ../configure --prefix=/usr/local --target=h8300-hms Config.guess failed to determine the host type. You need to specify one. Usage: configure [OPTIONS] [HOST]
となった。Usage通り、
% ../configure --prefix=/usr/local h8300-hms
で良かった。
今度はコンパイルが駄目でして、
%make CFLAGS="-O2 -fomit-frame-pointer" all ... gcc -c -O2 -fomit-frame-pointer -I. -I../../libiberty/../include ../../libiberty/strerror.c ../../libiberty/strerror.c:465: error: conflicting type qualifiers for ‘sys_nerr’ /usr/include/stdio.h:273: error: previous declaration of ‘sys_nerr’ was here make[1]: *** [strerror.o] Error 1 make: *** [all-libiberty] Error 2
これはstrerror.cの465行目をコメントアウトしたら通った。
gcc
configureのTARGETの指定方法は、binutilsの時と同様。
make失敗
/Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:70:23: available.h: No such file or directory /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:72:20: _types.h: No such file or directory In file included from ../../../../../../gcc-3.2.1/newlib/libc/argz/argz_add.c:10: /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:90: parse error before "ct_rune_t" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:95: parse error before "rune_t" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:156: syntax error before "void" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:156: parse error before "__dead2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:157: parse error before "__pure2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:169: parse error before "__pure2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:170: parse error before "__dead2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:173: parse error before "__pure2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:174: parse error before "__pure2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:189: parse error before "__DARWIN_ALIAS" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:190: parse error before "__DARWIN_ALIAS" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:193: parse error before "__DARWIN_LDBL_COMPAT" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:204: parse error before "__DARWIN_ALIAS_C" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:209: parse error before "__dead2" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:233: parse error before "__DARWIN_ALIAS" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:239: parse error before "__DARWIN_ALIAS" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:243: parse error before "__DARWIN_ALIAS" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:268: syntax error before "dev_t" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:273: syntax error before "mode_t" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:278: parse error before "arc4random" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:294: parse error before "__DARWIN_1050" /Users/chinmo/build_gcc_h8300-hms/gcc/include/stdlib.h:294: parse error before "__AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5" ../../../../../../gcc-3.2.1/newlib/libc/argz/argz_add.c:12: syntax error before "error_t" make[7]: *** [argz_add.o] Error 1 make[6]: *** [all-recursive] Error 1 make[5]: *** [all-recursive] Error 1 make[4]: *** [all-recursive-am] Error 2 make[3]: *** [multi-do] Error 1 make[2]: *** [all-multi] Error 2 make[1]: *** [all-recursive-am] Error 2 make: *** [all-target-newlib] Error 2