[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkgsrc/cross/mipse[bl]-netbsd patch (Re: ftp://ftp.netbsd.org/pub/NetBSD/arch/hpcmips/cross/i386-hpcmips/mipsel-netbsd.tgz)
筒井です。
<199912030152.KAA28140@shin1.sm.sony.co.jp>の記事において
takemura@netbsd.orgさんは書きました。
> 少し前に他の人から同じ疑問を個人的にメールでもらって調べたことが
> あります。その報告とそれに関する回答は以下のアーカイヴにあります。
確かにありますね。見落としてました。
> endian の本来の言葉通りの論争に発展しかねませんが、
> とりあえず invalid byte order でいいみたいです。
ということなのでとにかくパッチにまとめてみました。
pkgsrc/cross で patch -p < [添付のパッチ] すると
mipsel-netbsd と mipseb-netbsd と directory が
できますので後は
http://www.netbsd.org/Ports/bebox/cross.html
の説明通りにすればよいはずです。 *.orig のファイルは
事前に消しておいた方がいいでしょう。
また、最初は m4 やら autoconf やら pkglibtool やら
全部作ろうとするのでそれぞれ distfiles を用意できるように
しておく必要があります。
#gcc/config/mips/netbsd.h に mipseb の場合だけ別に
#patch あててるあたりがダサいのですが手抜きしてそのままです。
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp
--- binutils/Makefile.orig Thu Oct 7 20:45:31 1999
+++ binutils/Makefile Thu Oct 7 20:45:34 1999
@@ -29,7 +29,7 @@
i386-cygwin32 i386-elf i386-go32 i386-linux \
i386-netbsd i386-netware \
m68k-elf m68k-netbsd m68k-sunos4 \
- mips-dec-netbsd \
+ mipsel-netbsd mipseb-netbsd \
powerpc-eabi powerpcle-eabi \
sparc-netbsd sparc-solaris2 sparc-sunos4
--- /dev/null Thu Oct 7 13:08:36 1999
+++ binutils/patches/patch-al Thu Oct 7 20:35:30 1999
@@ -0,0 +1,30 @@
+--- config.sub.orig Thu Oct 7 01:50:14 1999
++++ config.sub Thu Oct 7 01:50:32 1999
+@@ -177,7 +177,7 @@
+ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 \
+- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
++ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+@@ -230,7 +230,7 @@
+ | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
+ | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | mips64-* | mipsel-* \
++ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+--- ld/configure.tgt.orig Thu Oct 7 01:51:22 1999
++++ ld/configure.tgt Thu Oct 7 01:55:30 1999
+@@ -148,6 +148,7 @@
+ mips*-*-ecoff*) targ_emul=mipsidt ;;
+ mips*-dec-bsd*) targ_emul=mipsbsd ;;
+-mips*-dec-netbsd*) targ_emul=elf32lmip ;;
++mips*el-*-netbsd*) targ_emul=elf32lmip ;;
++mips*eb-*-netbsd*) targ_emul=elf32ebmip ;;
+ mips*-*-bsd*) targ_emul=mipsbig ;;
+ mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
+ mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
--- /dev/null Thu Oct 7 13:08:36 1999
+++ COMMON/patches-binutils/patch-ac Thu Oct 7 02:05:25 1999
@@ -0,0 +1,40 @@
+--- gas/configure.orig Wed Oct 6 22:59:40 1999
++++ gas/configure Wed Oct 6 23:00:37 1999
+@@ -1545,6 +1545,7 @@
+
+ # don't change em like *-*-bsd does
+ mips-dec-netbsd*) fmt=elf endian=little ;;
++ mips-*-netbsd*) fmt=elf ;;
+ mips-dec-openbsd*) fmt=elf endian=little ;;
+ mips-dec-bsd*) fmt=aout ;;
+ mips-sony-bsd*) fmt=ecoff ;;
+--- config.sub.orig Thu Oct 7 01:50:14 1999
++++ config.sub Thu Oct 7 01:50:32 1999
+@@ -177,7 +177,7 @@
+ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 \
+- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
++ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+@@ -230,7 +230,7 @@
+ | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
+ | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | mips64-* | mipsel-* \
++ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+--- ld/configure.tgt.orig Thu Oct 7 01:51:22 1999
++++ ld/configure.tgt Thu Oct 7 01:55:30 1999
+@@ -148,6 +148,7 @@
+ mips*-*-ecoff*) targ_emul=mipsidt ;;
+ mips*-dec-bsd*) targ_emul=mipsbsd ;;
+-mips*-dec-netbsd*) targ_emul=elf32lmip ;;
++mips*el-*-netbsd*) targ_emul=elf32lmip ;;
++mips*eb-*-netbsd*) targ_emul=elf32ebmip ;;
+ mips*-*-bsd*) targ_emul=mipsbig ;;
+ mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
+ mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
--- /dev/null Thu Oct 7 13:08:36 1999
+++ COMMON/patches-egcs/patch-ah Wed Oct 6 23:16:53 1999
@@ -0,0 +1,21 @@
+--- config.sub.orig Wed Oct 6 22:53:14 1999
++++ config.sub Wed Oct 6 22:53:33 1999
+@@ -165,7 +165,7 @@
+ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 \
+- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
++ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+@@ -212,7 +212,7 @@
+ | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
+ | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | mips64-* | mipsel-* \
++ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/Makefile Wed Oct 6 23:34:58 1999
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+#
+
+DISTVERSION= 1.3.0.0
+DISTFILES= # none
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.netbsd.org/
+
+WRKSRC= ${WRKDIR}/${EGCS_DISTNAME}
+
+USE_CROSS_BINUTILS= yes
+BINUTILS_GNUTARGET= elf32-bigmips
+BINUTILS_LDEMULATION= elf32ebmip
+USE_CROSS_EGCS= yes
+EGCS_FAKE_RUNTIME= yes
+
+TARGET_ARCH= mipseb-netbsd
+
+.include "../COMMON/cross.mk"
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/files/md5 Wed Oct 6 22:22:28 1999
@@ -0,0 +1,5 @@
+$NetBSD: md5,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+
+MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
+MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af
+MD5 (egcs-1.1.1-NetBSD-19980104.diff.gz) = 8c4d952d999ead62f6604948c65c2454
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/patches/patch-aa Thu Oct 7 02:18:33 1999
@@ -0,0 +1,56 @@
+--- gcc/config/mips/netbsd.h.orig Wed Oct 6 22:55:48 1999
++++ gcc/config/mips/netbsd.h Wed Oct 6 22:56:24 1999
+@@ -20,7 +20,7 @@
+
+ /* Define default target values. */
+
+-#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_ENDIAN
+ #define TARGET_DEFAULT MASK_GAS
+
+ /* Get generic mips ELF definitions. */
+@@ -41,7 +41,7 @@
+
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES \
+- "-D__ANSI_COMPAT -DMIPSEL -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
++ "-D__ANSI_COMPAT -DMIPSEB -DR3000 -DSYSTYPE_BSD -D_SYSTYPE_BSD \
+ -D__NetBSD__ -D__ELF__ -Dmips -D__NO_LEADING_UNDERSCORES__ -D__GP_SUPPORT__ \
+ -D_R3000 -Asystem(unix) -Asystem(NetBSD) -Amachine(mips)"
+
+--- gcc/config.sub.orig Thu Oct 7 02:05:50 1999
++++ gcc/config.sub Thu Oct 7 02:06:14 1999
+@@ -154,7 +154,7 @@
+ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
++ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+@@ -182,7 +182,7 @@
+ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | mips64-* | mipsel-* \
++ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+--- gcc/configure.orig Thu Oct 7 02:14:18 1999
++++ gcc/configure Thu Oct 7 02:14:22 1999
+@@ -3866,6 +3866,13 @@
+ fixincludes=fixinc.wrap
+ tmake_file=t-netbsd
+ ;;
++ mipseb-*-netbsd*)
++ tm_file=mips/netbsd.h
++ xm_file=mips/xm-netbsd.h
++ # On NetBSD, the headers are already okay, except for math.h.
++ fixincludes=fixinc.wrap
++ tmake_file=t-netbsd
++ ;;
+ mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
+ tm_file="mips/news4.h ${tm_file}"
+ if [ x$stabs = xyes ]; then
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/pkg/COMMENT Thu Oct 7 20:32:44 1999
@@ -0,0 +1 @@
+Cross-compile environment for NetBSD/mipseb
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/pkg/DESCR Thu Oct 7 20:32:58 1999
@@ -0,0 +1 @@
+This cross-compile environment is for NetBSD/mipseb.
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/pkg/MESSAGE Thu Oct 7 20:33:25 1999
@@ -0,0 +1,12 @@
+=============================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+
+This pkg DOES NOT install headers or runtime link libraries. Only the
+compilers are installed.
+
+In order to have a complete development setup, you need to install
+includes and libraries in ${CROSSBASE}/mipseb-netbsd/include and
+${CROSSBASE}/mipseb-netbsd/lib respectively, or symlink these paths to
+the appropriate places.
+
+=============================================================================
--- /dev/null Thu Oct 7 13:08:36 1999
+++ mipseb-netbsd/pkg/PLIST Wed Oct 6 22:22:27 1999
@@ -0,0 +1 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/Makefile Fri Dec 3 00:16:07 1999
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+#
+
+DISTVERSION= 1.3.0.0
+DISTFILES= # none
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.netbsd.org/
+
+WRKSRC= ${WRKDIR}/${EGCS_DISTNAME}
+
+USE_CROSS_BINUTILS= yes
+BINUTILS_GNUTARGET= elf32-littlemips
+BINUTILS_LDEMULATION= elf32lmip
+USE_CROSS_EGCS= yes
+EGCS_FAKE_RUNTIME= yes
+
+TARGET_ARCH= mipsel-netbsd
+
+.include "../COMMON/cross.mk"
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/files/md5 Thu Oct 7 23:17:46 1999
@@ -0,0 +1,5 @@
+$NetBSD: md5,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+
+MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
+MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af
+MD5 (egcs-1.1.1-NetBSD-19980104.diff.gz) = 8c4d952d999ead62f6604948c65c2454
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/patches/patch-aa Fri Dec 3 00:16:59 1999
@@ -0,0 +1,36 @@
+--- gcc/config.sub.orig Thu Oct 7 02:05:50 1999
++++ gcc/config.sub Thu Oct 7 02:06:14 1999
+@@ -154,7 +154,7 @@
+ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
++ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
+ basic_machine=$basic_machine-unknown
+@@ -182,7 +182,7 @@
+ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+- | sparc64-* | mips64-* | mipsel-* \
++ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
+--- gcc/configure.orig Thu Oct 7 02:14:18 1999
++++ gcc/configure Thu Oct 7 02:14:22 1999
+@@ -3866,6 +3866,13 @@
+ fixincludes=fixinc.wrap
+ tmake_file=t-netbsd
+ ;;
++ mipsel-*-netbsd*)
++ tm_file=mips/netbsd.h
++ xm_file=mips/xm-netbsd.h
++ # On NetBSD, the headers are already okay, except for math.h.
++ fixincludes=fixinc.wrap
++ tmake_file=t-netbsd
++ ;;
+ mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
+ tm_file="mips/news4.h ${tm_file}"
+ if [ x$stabs = xyes ]; then
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/pkg/COMMENT Fri Dec 3 03:08:35 1999
@@ -0,0 +1 @@
+Cross-compile environment for NetBSD/mipsel
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/pkg/DESCR Fri Dec 3 03:08:40 1999
@@ -0,0 +1 @@
+This cross-compile environment is for NetBSD/mipsel.
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/pkg/MESSAGE Fri Dec 3 03:08:51 1999
@@ -0,0 +1,12 @@
+=============================================================================
+$NetBSD: MESSAGE,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $
+
+This pkg DOES NOT install headers or runtime link libraries. Only the
+compilers are installed.
+
+In order to have a complete development setup, you need to install
+includes and libraries in ${CROSSBASE}/mipsel-netbsd/include and
+${CROSSBASE}/mipsel-netbsd/lib respectively, or symlink these paths to
+the appropriate places.
+
+=============================================================================
--- /dev/null Fri Dec 3 03:30:37 1999
+++ mipsel-netbsd/pkg/PLIST Thu Oct 7 23:17:47 1999
@@ -0,0 +1 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/02/03 13:00:43 tv Exp $