Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/playstation2/conf Adapt to current (and new pkgsrc ...



details:   https://anonhg.NetBSD.org/src/rev/a3efecf59a5f
branches:  trunk
changeset: 328328:a3efecf59a5f
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Mar 31 11:43:53 2014 +0000

description:
Adapt to current (and new pkgsrc toolchain)

diffstat:

 sys/arch/playstation2/conf/Makefile.playstation2.inc |  39 +++++++++++--------
 sys/arch/playstation2/conf/build.playstation2.sh     |  31 +++------------
 sys/arch/playstation2/conf/config.playstation2       |   3 +-
 sys/arch/playstation2/conf/files.playstation2        |   4 +-
 sys/arch/playstation2/conf/std.playstation2          |   2 +-
 5 files changed, 33 insertions(+), 46 deletions(-)

diffs (143 lines):

diff -r 776add1d2b24 -r a3efecf59a5f sys/arch/playstation2/conf/Makefile.playstation2.inc
--- a/sys/arch/playstation2/conf/Makefile.playstation2.inc      Mon Mar 31 11:42:17 2014 +0000
+++ b/sys/arch/playstation2/conf/Makefile.playstation2.inc      Mon Mar 31 11:43:53 2014 +0000
@@ -1,20 +1,25 @@
-#      $NetBSD: Makefile.playstation2.inc,v 1.4 2014/03/31 11:25:49 martin Exp $
+#      $NetBSD: Makefile.playstation2.inc,v 1.5 2014/03/31 11:43:53 martin Exp $
+
+.if !defined(TOOLCHAIN_MISSING) || ${TOOLCHAIN_MISSING}=="no"
+.error please do not run "make" directly, use sh ../../conf/build.playstation2.sh instead
+.endif
 
-EETOOLDIR      =       /usr/pkg/cross-ps2
-TARGET =       mipsEEel-netbsd
+# working around makesystem bugs: redefine CC and friends here or it does
+# not properly get picked up by mkdep in sub-makes for "make depend" of
+# libkern and friends - XXX fix this
+PREFIX=/usr/pkg
+PLATFORM=mips--netbsdelf
 
-CC     =       ${EETOOLDIR}/bin/${TARGET}-gcc
-LD     =       ${EETOOLDIR}/bin/${TARGET}-ld
-CXX    =       ${EETOOLDIR}/bin/${TARGET}-g++
-AS     =       ${EETOOLDIR}/bin/${TARGET}-as
-CPP    =       ${EETOOLDIR}/bin/${TARGET}-cpp
-RANLIB =       ${EETOOLDIR}/bin/${TARGET}-ranlib
-AR     =       ${EETOOLDIR}/bin/${TARGET}-ar
-NM     =       ${EETOOLDIR}/bin/${TARGET}-nm
-SIZE   =       ${EETOOLDIR}/bin/${TARGET}-size
-STRIP  =       ${EETOOLDIR}/bin/${TARGET}-strip
+CC=${PREFIX}/bin/${PLATFORM}-gcc
+CPP=${PREFIX}/bin/${PLATFORM}-cpp
+AS=${PREFIX}/bin/${PLATFORM}-as
+AR=${PREFIX}/bin/${PLATFORM}-ar
+LD=${PREFIX}/bin/${PLATFORM}-ld
+RANLIB=${PREFIX}/bin/${PLATFORM}-ranlib
+NM=${PREFIX}/bin/${PLATFORM}-nm
+SIZE=${PREFIX}/bin/${PLATFORM}-size
+STRIP=${PREFIX}/bin/${PLATFORM}-strip
 
-CFLAGS+= -mcpu=r5900 -mips1 -fno-pic \
-               -D__NetBSD__ -Ulinux -U__linux__ -U__linux
-AFLAGS+= -mcpu=r5900 -mips1 -fno-pic \
-               -D__NetBSD__ -Ulinux -U__linux__ -U__linux
+# Playstation2 uses 128 bit access, which currently requires n32 ABI
+CFLAGS+= -mabi=n32 -march=r5900 -fno-pic
+AFLAGS+= -mabi=n32 -march=r5900 -fno-pic
diff -r 776add1d2b24 -r a3efecf59a5f sys/arch/playstation2/conf/build.playstation2.sh
--- a/sys/arch/playstation2/conf/build.playstation2.sh  Mon Mar 31 11:42:17 2014 +0000
+++ b/sys/arch/playstation2/conf/build.playstation2.sh  Mon Mar 31 11:43:53 2014 +0000
@@ -1,17 +1,14 @@
 #!/bin/sh
-DESTDIR=/work/playstation2/root;       export DESTDIR
-RELEASEDIR=/work/playstation2/release; export RELEASEDIR
-root=/usr/pkg/cross-ps2
-target=mipsEEel-netbsd
 
-PATH=\
-$PATH:\
-${root}/${target}/bin:\
-${root}/bin
-export PATH
+# This assumes the compiler comes from pkgsrc/cross/gcc-mips-current
+# (as R5900 support is not available on other branches of gcc yet)
+root=/usr/pkg
+target=mips--netbsdelf
 
+TOOLCHAIN_MISSING=yes;                 export TOOLCHAIN_MISSING
+
+LD=${root}/bin/${target}-ld;           export LD
 CC=${root}/bin/${target}-gcc;          export CC
-LD=${root}/bin/${target}-ld;           export LD
 CXX=${root}/bin/${target}-g++;         export CXX
 AS=${root}/bin/${target}-as;           export AS
 CPP=${root}/bin/${target}-cpp;         export CPP
@@ -21,21 +18,7 @@
 SIZE=${root}/bin/${target}-size;       export SIZE
 STRIP=${root}/bin/${target}-strip;     export STRIP
 
-STRIPFLAGS="--strip-debug";            export STRIPFLAGS
-STRIPPROG=${target}-strip;             export STRIPPROG
-
-HOSTED_CC=cc;                          export HOSTED_CC
-
-TARGET=mipsel;                         export TARGET
-MACHINE=playstation2;                  export MACHINE
-MACHINE_ARCH=mipsel;                   export MACHINE_ARCH
-MACHINE_CPU=mips;                      export MACHINE_CPU
-
-DESTDIR=${bsd_root};                   export DESTDIR
-
 MAKE="make";                            export MAKE
-#MAKE="make -f /work/cvsrep/sharesrc/share/mk/sys.mk -f Makefile"; export MAKE
-#MAKEFLAGS="-I /work/cvsrep/sharesrc/share/mk";        export MAKEFLAGS
 
 set -x
 exec $MAKE "$@"
diff -r 776add1d2b24 -r a3efecf59a5f sys/arch/playstation2/conf/config.playstation2
--- a/sys/arch/playstation2/conf/config.playstation2    Mon Mar 31 11:42:17 2014 +0000
+++ b/sys/arch/playstation2/conf/config.playstation2    Mon Mar 31 11:43:53 2014 +0000
@@ -1,7 +1,7 @@
 #
 # deafult config file.
 #
-#      $NetBSD: config.playstation2,v 1.24 2014/03/31 11:25:49 martin Exp $
+#      $NetBSD: config.playstation2,v 1.25 2014/03/31 11:43:53 martin Exp $
 #
 
 maxusers       16
@@ -79,7 +79,6 @@
 pseudo-device  ipfilter                # IP filter, NAT
 
 pseudo-device  vnd                     # virtual disk ick
-pseudo-device  rnd                     # /dev/random and in-kernel generator
 pseudo-device  clockctl                # user control of clock subsystem
 
 pseudo-device  gif                     # IPv[46] over IPv[46] tunnel (RFC1933)
diff -r 776add1d2b24 -r a3efecf59a5f sys/arch/playstation2/conf/files.playstation2
--- a/sys/arch/playstation2/conf/files.playstation2     Mon Mar 31 11:42:17 2014 +0000
+++ b/sys/arch/playstation2/conf/files.playstation2     Mon Mar 31 11:43:53 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.playstation2,v 1.20 2014/03/31 11:25:49 martin Exp $
+#      $NetBSD: files.playstation2,v 1.21 2014/03/31 11:43:53 martin Exp $
 
 maxpartitions 8
 
@@ -25,7 +25,7 @@
 file arch/playstation2/playstation2/sifbios.c
 file arch/mips/mips/mips3_clock.c
 
-file common/bus_dma/bus_dmamem_common.c
+file dev/bus_dma/bus_dmamem_common.c
 
 file dev/kloader.c                                     kloader
 file arch/playstation2/playstation2/kloader_machdep.c  kloader
diff -r 776add1d2b24 -r a3efecf59a5f sys/arch/playstation2/conf/std.playstation2
--- a/sys/arch/playstation2/conf/std.playstation2       Mon Mar 31 11:42:17 2014 +0000
+++ b/sys/arch/playstation2/conf/std.playstation2       Mon Mar 31 11:43:53 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: std.playstation2,v 1.10 2014/03/31 11:25:49 martin Exp $
+#      $NetBSD: std.playstation2,v 1.11 2014/03/31 11:43:53 martin Exp $
 
 machine playstation2 mips
 include                "conf/std"      # MI standard options



Home | Main Index | Thread Index | Old Index