[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross compiling pkgsrc



aurora@rr.iij4u.or.jp wrote:

 > i386 ¥Þ¥·¥ó(1.5.2) ¤Ëcross-mipsel-netbsd-1.3.0.0 ¤ò¥¤¥ó¥¹¥È¡¼¥ë

ËÜÂê¤È¤Ï´Ø·¸¤Ê¤¤¤Ç¤¹¤¬¡¢
current¤Î¥½¡¼¥¹¤Ç new toolchain¤ò»È¤Ã¤¿Êý¤¬Îɤ¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£
# ./build.sh -m hpcmips -D /home/netbsd/1.5.2/hpcmips \
	-T /home/netbsd/1.5.2/hpcmips_tools -t -u
¤Æ¤Ê´¶¤¸¤Ë¼Â¹Ô¤¹¤ì¤Ð
/home/netbsd/1.5.2/hpcmips_tools/bin/nbmake-hpcmips
¤È¤¤¤¦make¤Îwrapper script¤¬ºîÀ®¤µ¤ì¤Þ¤¹¤«¤é¡¢
hpcmips-make ¤ÎÊѤï¤ê¤Ë»ÈÍѤ¹¤ì¤Ðcross compile¤Ç¤­¤Þ¤¹¡£


 > buildlink.mk ¤ò»È¤Ã¤Æ¤¤¤ë¤â¤Î¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤è¤¦¤È¤¹¤ë¤È¡¤
 > work/.buildlink °Ê²¼¤Î¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤¬ /usr/pkg ¤Î¥é¥¤¥Ö¥é¥ê¤ò
 > ¤µ¤·¤Æ¤·¤Þ¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¤Ë¼ºÇÔ¤¹¤ë¡¥
 > BUILDLINK_PREFIX.xx ¤Ê¤É¤òÊѤ¨¤Æ¤ß¤Þ¤·¤¿¤¬¡¤¤É¤¦¤â¤¦¤Þ¤¯¤¤¤­¤Þ¤»¤ó¡¥
 > ²¿¤«´Ä¶­ÊÑ¿ô¤Î»ØÄ꤬­¤ê¤Ê¤¤¤Î¤Ç¤·¤ç¤¦¤«¡¥¡¥¡¥

¤¿¤Ö¤ó LOCALBASE ¤¬ /usr/pkg ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤«¤é¤À¤È»×¤¤¤Þ¤¹¡£
/etc/mk.conf ¤Ë
LOCALBASE=/home/netbsd/1.5.2/hpcmips/usr/pkg
X11BASE=/home/netbsd/1.5.2/hpcmips/usr/X11R6
¤È¤«½ñ¤¤¤Æ¤ª¤±¤Ð¤¤¤¤¤«¤Ê¤È¡£

¤¢¤È¡¢pkgsrc/mk/bsd.pkg.defaults.mk ¤ä pkgsrc/mk/defs.NetBSD.mk ¤Ê¤É¤Ç
¥Ç¥Õ¥©¥ë¥ÈÃͤòÀßÄꤷ¤Æ¤¤¤Þ¤¹¤«¤é¡¢/etc/mk.conf¤Ç¡¢
crossÍѤÎtool¤òÀßÄꤷ¤¿¤ê¡¢path¤òÀßÄꤹ¤ë¤ÈÎɤ¤¤È»×¤¤¤Þ¤¹¡£


 > pkgsrc ¤Î¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤ò¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¤
 > ¤É¤¦¤·¤Æ¤â¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Ê¤¤¤â¤Î¤¬¤¢¤ë¤Î¤Ç¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡¥

¸µ¡¹¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Ê¤¤¤â¤Î¤â¤¢¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¤ªµ¤¤òÉÕ¤±¤¯¤À¤µ¤¤¡£

make allÃæ¤Ëcompile¤·¤¿¼Â¹Ô¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤¹¤ë¾ì¹ç¤Ê¤É¤Ï¡¢
compile hostÍѤÎcompiler¤ò»È¤ï¤Ê¤¤¤È¤¤¤±¤Ê¤¤¤±¤É¡¢
Makefile¤Ç¤Ï¤½¤¦¤Ê¤Ã¤Æ¤Ê¤¤¡¢¤È¤«¤¤¤í¤¤¤íÍýͳ¤¬¤¢¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¡£

sakamoto