diff options
-rw-r--r-- | bootstrap/README.MirBSD | 43 | ||||
-rwxr-xr-x | bootstrap/bootstrap | 31 | ||||
-rw-r--r-- | devel/bmake/files/Makefile.in | 6 | ||||
-rwxr-xr-x | devel/bmake/files/machine.sh | 5 | ||||
-rw-r--r-- | lang/perl5/Makefile | 4 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 14 | ||||
-rw-r--r-- | mk/configure/gnu-configure.mk | 47 | ||||
-rw-r--r-- | mk/platform/MirBSD.mk | 95 | ||||
-rw-r--r-- | mk/pthread.builtin.mk | 4 | ||||
-rw-r--r-- | mk/tools/tools.MirBSD.mk | 77 | ||||
-rw-r--r-- | mk/wrapper/transform-gcc | 4 | ||||
-rw-r--r-- | pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk | 213 |
12 files changed, 532 insertions, 11 deletions
diff --git a/bootstrap/README.MirBSD b/bootstrap/README.MirBSD new file mode 100644 index 00000000000..9df7117f148 --- /dev/null +++ b/bootstrap/README.MirBSD @@ -0,0 +1,43 @@ +$NetBSD: README.MirBSD,v 1.1 2011/01/23 19:07:24 agc Exp $ + +Please read the general README file as well. + +pkgsrc will install the portable NetBSD make as "bmake". The standard +make(1) from MirBSD is incompatible with pkgsrc. + +Unless you bootstrap pkgsrc with the --unprivileged option, sudo(8) will +be used to gain root privileges. + +MirPorts and pkgsrc can be installed in parallel. The MirPorts framework +uses /usr/mpkg as its default prefix and /usr/mpkg/db/pkg as its package +database directory. Thus, its paths do not clash with the default +choices of pkgsrc, which are /usr/pkg and /var/db/pkg respectively. We +suggest however that you place the package database for pkgsrc below its +prefix, for example by specifying the + + --pkgdbdir /usr/pkg/db + +option to bootstrap. Please note that the package tools from MirPorts +and pkgsrc have the same names (e.g. pkg_add) but are incompatible. This +leads to strage behavior when building or installing packages if both +frameworks are in your PATH. + +Thus, before you start the bootstrap, you must make sure that +/usr/mpkg/bin and /usr/mpkg/sbin are NOT in your PATH if MirPorts is +already installed. Use a command like the following: + + export PATH=${HOME}/.etc/bin:/usr/local/bin:/usr/pkg/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/sbin:/sbin:/usr/pkg/sbin:/usr/games + +Other environment variables that you may want to set are MANPATH, +INFOPATH and XAPPLRESDIR. There should be no need to set the +LD_LIBRARY_PATH environment variable. + +The default mk.conf will be installed in /usr/pkg/etc. It mirrors the +values for CFLAGS, CPPFLAGS, and LDFLAGS retrieved from the native +make(1) at bootstrap time, instead of including /etc/make.cfg and the +native <bsd.own.mk>. If you change values in /etc/make.cfg, you will +also have to adjust the mk.conf used by bmake. + +The standard compiler is mgcc; if you have more than one native compiler +installed (assuming all are GCC variants), export CC=gcc-1.2.3 before +using pkgsrc and possibly adjust /usr/pkg/etc/mk.conf accordingly. diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 2871e197c81..2d5983c5ff5 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.162 2010/12/26 11:24:21 adam Exp $ +# $NetBSD: bootstrap,v 1.163 2011/01/23 19:07:25 agc Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -622,6 +622,35 @@ Linux) set_opsys=no machine_arch=`uname -m | sed -e 's/i.86/i386/'` ;; +MirBSD) + root_group=wheel + need_pax=yes + need_mtree=no + need_bsd_install=no + need_awk=no + need_sed=no + set_opsys=no + check_prog mtreeprog mtree + machine_arch=`arch -s` + [ -z "$fetch_cmd" ] && fetch_cmd=/usr/bin/ftp + # there is no /usr/bin/cc, so use mgcc if unset + test -n "$CC" || { CC=mgcc; export CC; } + # get some variables from the native make if unset + for var in CFLAGS CPPFLAGS LDFLAGS; do + # check if variable is already set + eval _tmp=\"\$$var\" + [ "x$_tmp" != x ] && continue + # ask the native make (EXPERIMENTAL = don't add -Werror) + # the -I${.CURDIR} dance is to prevent junk in CPPFLAGS + _tmp=`printf '%s\nall:\n\t@%s %%s %s=${%s:M*:Q:Q}\n%s\n%s\n' \ + $var'+=-I${.CURDIR}' printf $var $var':S/-I${.CURDIR}//' \ + EXPERIMENTAL=yes '.include <bsd.prog.mk>' | \ + (unset MAKECONF; /usr/bin/make -f - all 2>/dev/null) | \ + sed 's/^x//'` + eval $_tmp + eval export $var + done + ;; NetBSD) root_group=wheel need_bsd_install=no diff --git a/devel/bmake/files/Makefile.in b/devel/bmake/files/Makefile.in index cc83ce533b5..d9267ba7835 100644 --- a/devel/bmake/files/Makefile.in +++ b/devel/bmake/files/Makefile.in @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.in,v 1.18 2010/09/07 14:28:00 joerg Exp $ +# $NetBSD: Makefile.in,v 1.19 2011/01/23 19:07:25 agc Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 -# $Id: Makefile.in,v 1.18 2010/09/07 14:28:00 joerg Exp $ +# $Id: Makefile.in,v 1.19 2011/01/23 19:07:25 agc Exp $ PROG= bmake SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ @@ -47,7 +47,7 @@ OS!= uname -s ARCH!= uname -p 2>/dev/null || uname -m # list of OS's which are derrived from BSD4.4 -isBSD44= NetBSD FreeBSD OpenBSD DragonFly +isBSD44= NetBSD FreeBSD OpenBSD DragonFly MirBSD .if ${OS} == "NetBSD" # Don't set these for anyone else since we don't know what the effect may be. diff --git a/devel/bmake/files/machine.sh b/devel/bmake/files/machine.sh index 501a0653747..00cdfb5b68c 100755 --- a/devel/bmake/files/machine.sh +++ b/devel/bmake/files/machine.sh @@ -2,7 +2,7 @@ # derrived from /etc/rc_d/os.sh # RCSid: -# $Id: machine.sh,v 1.2 2008/03/09 19:54:29 joerg Exp $ +# $Id: machine.sh,v 1.3 2011/01/23 19:07:25 agc Exp $ # # @(#) Copyright (c) 1994-2002 Simon J. Gerraty # @@ -42,6 +42,9 @@ Which() { } case $OS in +MirBSD) + MACHINE=$OS$OSMAJOR.$machine + ;; OpenBSD) MACHINE=$OS$OSMAJOR.$machine arch=`Which arch /usr/bin:/usr/ucb:$PATH` diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile index 221c85c6385..4291d5cc50e 100644 --- a/lang/perl5/Makefile +++ b/lang/perl5/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.168 2010/12/29 22:25:17 wiz Exp $ +# $NetBSD: Makefile,v 1.169 2011/01/23 19:07:26 agc Exp $ .include "license.mk" .include "Makefile.common" @@ -121,6 +121,7 @@ LIBSWANTED.HPUX= cl pthread $$libswanted # see Perl's README.hpux LIBSWANTED.IRIX= m crypt LIBSWANTED.Interix= m dl LIBSWANTED.Linux= m crypt dl nsl +LIBSWANTED.MirBSD= m crypt LIBSWANTED.NetBSD= m crypt LIBSWANTED.OpenBSD= m crypt LIBSWANTED.SunOS= m crypt dl socket nsl @@ -136,6 +137,7 @@ SYSLIBPATH.Darwin= /usr/lib SYSLIBPATH.DragonFly= /usr/lib SYSLIBPATH.FreeBSD= /usr/lib SYSLIBPATH.Interix= /usr/lib +SYSLIBPATH.MirBSD= /usr/lib SYSLIBPATH.NetBSD= /usr/lib SYSLIBPATH.OpenBSD= /usr/lib SYSLIBPATH.SunOS= /usr/lib diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 445b6f839a1..d6f55ab373e 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.311 2010/08/24 19:08:28 bad Exp $ +# $NetBSD: bsd.prefs.mk,v 1.312 2011/01/23 19:07:25 agc Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -198,6 +198,15 @@ OS_VERSION= 3.0 . endif . endif +.elif ${OPSYS} == "MirBSD" +LOWER_OPSYS?= mirbsd +LOWER_OS_VERSION= ${OS_VERSION} +LOWER_OPSYS_VERSUFFIX= ${OS_VERSION} +LOWER_ARCH!= arch -s +LOWER_VENDOR?= unknown +MACHINE_ARCH= ${LOWER_ARCH} +MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} + .elif !empty(OPSYS:MIRIX*) LOWER_ARCH!= ${UNAME} -p LOWER_OPSYS?= irix @@ -343,6 +352,9 @@ OBJECT_FMT?= a.out . endif .elif ${OPSYS} == "DragonFly" OBJECT_FMT= ELF +.elif ${OPSYS} == "MirBSD" +OBJECT_FMT= ELF +MKPROFILE= no .elif ${OPSYS} == "AIX" OBJECT_FMT= XCOFF .elif ${OPSYS} == "OSF1" diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk index ccade7315c3..1734fa167a9 100644 --- a/mk/configure/gnu-configure.mk +++ b/mk/configure/gnu-configure.mk @@ -1,4 +1,4 @@ -# $NetBSD: gnu-configure.mk,v 1.9 2009/09/12 00:52:45 joerg Exp $ +# $NetBSD: gnu-configure.mk,v 1.10 2011/01/23 19:07:25 agc Exp $ _VARGROUPS+= gnu-configure _USER_VARS.gnu-configure= # none @@ -21,6 +21,10 @@ CONFIGURE_ENV+= ac_given_INSTALL=${INSTALL:Q}\ -c\ -o\ ${BINOWN}\ -g\ ${BINGRP} CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN_CMD:sh} .endif +.if ${OPSYS} == "MirBSD" +CONFIGURE_ENV+= lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$$' +.endif + GNU_CONFIGURE_PREFIX?= ${PREFIX} CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX:Q} @@ -110,3 +114,44 @@ configure-scripts-override: depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern"; \ done .endif + +###################################################################### +### configure-scripts-osdep (PRIVATE) +###################################################################### +### configure-scripts-osdep modifies the GNU configure scripts in +### ${WRKSRC} to support operating systems without upstream support +### in for example libtool. +### +do-configure-pre-hook: configure-scripts-osdep + +.if ${OPSYS} == "MirBSD" +# awk script by Benny Siegert <bsiegert@mirbsd.de> +_SCRIPT.configure-scripts-osdep= \ + ${AWK} 'BEGIN { found = 0 } \ + /dynamic linker characteristics.../ { found = 1 } \ + /^netbsd/ { \ + if (found) { \ + sub("netbsd","mirbsd*|netbsd"); \ + found = 0; \ + } \ + } \ + { print $0 }' $$file >$$file.override; \ + ${CHMOD} +x $$file.override; \ + ${MV} -f $$file.override $$file +.endif + +.PHONY: configure-scripts-osdep +configure-scripts-osdep: +.if defined(_SCRIPT.configure-scripts-osdep) && !empty(_SCRIPT.configure-scripts-osdep) + @${STEP_MSG} "Modifying GNU configure scripts for OS dependent support" + ${_PKG_SILENT}${_PKG_DEBUG}set -e; \ + cd ${WRKSRC}; \ + depth=0; pattern=${CONFIGURE_SCRIPT:T}; \ + while ${TEST} $$depth -le ${OVERRIDE_DIRDEPTH.configure}; do \ + for file in $$pattern; do \ + ${TEST} -f "$$file" || continue; \ + ${_SCRIPT.${.TARGET}}; \ + done; \ + depth=`${EXPR} $$depth + 1`; pattern="*/$$pattern"; \ + done +.endif diff --git a/mk/platform/MirBSD.mk b/mk/platform/MirBSD.mk new file mode 100644 index 00000000000..0d22a849ddf --- /dev/null +++ b/mk/platform/MirBSD.mk @@ -0,0 +1,95 @@ +# $NetBSD: MirBSD.mk,v 1.1 2011/01/23 19:07:26 agc Exp $ +# +# Variable definitions for the MirOS BSD operating system. + +ECHO_N?= ${ECHO} -n +IMAKE_MAKE?= ${MAKE} # program which gets invoked by imake +PKGLOCALEDIR?= share +PS?= /bin/ps +RSH?= /usr/bin/false # not delivered with MirOS any more +SU?= /usr/bin/su +TYPE?= type # Shell builtin + +USERADD?= ${LOCALBASE}/sbin/useradd +GROUPADD?= ${LOCALBASE}/sbin/groupadd +_USER_DEPENDS= user>=20000313:../../sysutils/user #XXX make this work + +CPP_PRECOMP_FLAGS?= # unset +DEF_UMASK?= 0022 +EXPORT_SYMBOLS_LDFLAGS?=-Wl,-E # add symbols to the dynamic symbol table +MOTIF_TYPE_DEFAULT?= openmotif +NOLOGIN?= /sbin/nologin +PKG_TOOLS_BIN?= ${LOCALBASE}/sbin +ROOT_CMD?= /usr/bin/sudo /bin/mksh -c +ROOT_USER?= root +ROOT_GROUP?= wheel +ULIMIT_CMD_datasize?= ulimit -d `ulimit -H -d` +ULIMIT_CMD_stacksize?= ulimit -s `ulimit -H -s` +ULIMIT_CMD_memorysize?= ulimit -m `ulimit -H -m` + +# imake installs manpages in weird places +# these values from /usr/X11R6/lib/X11/config/OpenBSD.cf +# XXX verify against MirBSD.cf defns +IMAKE_MAN_SOURCE_PATH= man/cat +IMAKE_MANNEWSUFFIX= 0 +IMAKE_MAN_SUFFIX= ${IMAKE_MANNEWSUFFIX} +IMAKE_LIBMAN_SUFFIX= ${IMAKE_MANNEWSUFFIX} +IMAKE_FILEMAN_SUFFIX= ${IMAKE_MANNEWSUFFIX} +IMAKE_GAMEMAN_SUFFIX= ${IMAKE_MANNEWSUFFIX} +IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1 +IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3 +IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5 +IMAKE_GAMEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}6 +IMAKE_MANINSTALL?= maninstall catinstall + +_OPSYS_HAS_INET6= yes # IPv6 is standard +_OPSYS_HAS_JAVA= no # Java is not standard +_OPSYS_HAS_MANZ= no # MANZ controls gzipping of man pages +_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available +_OPSYS_LIBTOOL_REQD= 1.5.22nb5 +_OPSYS_PERL_REQD= # no base version of perl required +_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads +_OPSYS_SHLIB_TYPE= ELF # shared lib type +_PATCH_CAN_BACKUP= yes # native patch(1) can make backups +_PATCH_BACKUP_ARG?= -V simple -z # switch to patch(1) for backup suffix +_USE_RPATH= yes # add rpath to LDFLAGS + +# flags passed to the linker to extract all symbols from static archives. +# this is GNU ld. +_OPSYS_WHOLE_ARCHIVE_FLAG= -Wl,--whole-archive +_OPSYS_NO_WHOLE_ARCHIVE_FLAG= -Wl,--no-whole-archive + +_STRIPFLAG_CC?= ${_INSTALL_UNSTRIPPED:D:U-s} # cc(1) option to strip +_STRIPFLAG_INSTALL?= ${_INSTALL_UNSTRIPPED:D:U-s} # install(1) option to strip + +.if (${MACHINE_ARCH} == "i386") +DEFAULT_SERIAL_DEVICE?= /dev/tty00 +SERIAL_DEVICES?= /dev/tty00 \ + /dev/tty01 +.elif (${MACHINE_ARCH} == "sparc") +DEFAULT_SERIAL_DEVICE?= /dev/ttya +SERIAL_DEVICES?= /dev/ttya \ + /dev/ttyb +.else +DEFAULT_SERIAL_DEVICE?= /dev/null +SERIAL_DEVICES?= /dev/null +.endif + +PKG_HAVE_KQUEUE= # defined + +_OPSYS_CAN_CHECK_SHLIBS= no # can't use readelf in check/bsd.check-vars.mk + +# check for maximum command line length and set it in configure's environment, +# to avoid a test required by the libtool script that takes forever. +_OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax + +# If games are to be installed setgid, then SETGIDGAME is set to 'yes' +# (it defaults to 'no' as per defaults/mk.conf). +# Set the group and mode to meaningful values in that case (defaults to +# BINOWN, BINGRP and BINMODE as per defaults/mk.conf). +.if !(empty(SETGIDGAME:M[yY][eE][sS])) +GAMEOWN= games +GAMEGRP= games +GAMEMODE= 2555 +GAMEDIRMODE= 0775 +.endif diff --git a/mk/pthread.builtin.mk b/mk/pthread.builtin.mk index 1b39ac23e22..9a25a83bbe4 100644 --- a/mk/pthread.builtin.mk +++ b/mk/pthread.builtin.mk @@ -1,4 +1,4 @@ -# $NetBSD: pthread.builtin.mk,v 1.10 2007/04/12 18:42:02 tnn Exp $ +# $NetBSD: pthread.builtin.mk,v 1.11 2011/01/23 19:07:25 agc Exp $ BUILTIN_PKG:= pthread @@ -53,7 +53,7 @@ BUILDLINK_LDFLAGS.pthread= # empty # XXX # XXX This should really be a check for GCC! # XXX -BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux NetBSD +BUILDLINK_OPSYS_SUPPORT_PTHREAD= DragonFly FreeBSD Linux MirBSD NetBSD . if !empty(BUILDLINK_OPSYS_SUPPORT_PTHREAD:M${OPSYS}) BUILDLINK_CFLAGS.pthread+= -pthread BUILDLINK_LDFLAGS.pthread+= -pthread diff --git a/mk/tools/tools.MirBSD.mk b/mk/tools/tools.MirBSD.mk new file mode 100644 index 00000000000..104b8b0c9fe --- /dev/null +++ b/mk/tools/tools.MirBSD.mk @@ -0,0 +1,77 @@ +# $NetBSD: tools.MirBSD.mk,v 1.1 2011/01/23 19:07:26 agc Exp $ +# +# System-supplied tools for the MirOS operating system. + +TOOLS_PLATFORM.[?= [ # shell builtin +TOOLS_PLATFORM.awk?= /usr/bin/awk +TOOLS_PLATFORM.basename?= /usr/bin/basename +TOOLS_PLATFORM.byacc?= /usr/bin/yacc +TOOLS_PLATFORM.cat?= /bin/cat +TOOLS_PLATFORM.chgrp?= /bin/chgrp +TOOLS_PLATFORM.chmod?= /bin/chmod +TOOLS_PLATFORM.chown?= /sbin/chown +TOOLS_PLATFORM.cmp?= /usr/bin/cmp +TOOLS_PLATFORM.cp?= /bin/cp +TOOLS_PLATFORM.cut?= /usr/bin/cut +TOOLS_PLATFORM.date?= /bin/date +TOOLS_PLATFORM.diff?= /usr/bin/diff +TOOLS_PLATFORM.diff3?= /usr/bin/diff3 +TOOLS_PLATFORM.dirname?= /usr/bin/dirname +TOOLS_PLATFORM.echo?= echo # shell builtin +TOOLS_PLATFORM.egrep?= /usr/bin/egrep +TOOLS_PLATFORM.env?= /usr/bin/env +TOOLS_PLATFORM.expr?= /bin/expr +TOOLS_PLATFORM.false?= exit 1 +TOOLS_PLATFORM.fgrep?= /usr/bin/fgrep +TOOLS_PLATFORM.file?= /usr/bin/file +TOOLS_PLATFORM.find?= /usr/bin/find +TOOLS_PLATFORM.flex?= /usr/bin/lex +TOOLS_PLATFORM.grep?= /usr/bin/grep +TOOLS_PLATFORM.gunzip?= /usr/bin/gunzip -f +TOOLS_PLATFORM.gzcat?= /usr/bin/gzcat +TOOLS_PLATFORM.gzip?= /usr/bin/gzip -nf ${GZIP} +TOOLS_PLATFORM.head?= /usr/bin/head +TOOLS_PLATFORM.hostname?= /bin/hostname +TOOLS_PLATFORM.id?= /usr/bin/id +TOOLS_PLATFORM.install?= /usr/bin/install +TOOLS_PLATFORM.install-info?= /usr/bin/install-info +TOOLS_PLATFORM.ldconfig?= /sbin/ldconfig +TOOLS_PLATFORM.ksh?= /bin/mksh +TOOLS_PLATFORM.lex?= /usr/bin/lex +TOOLS_PLATFORM.ln?= /bin/ln +TOOLS_PLATFORM.ls?= /bin/ls +TOOLS_PLATFORM.m4?= /usr/bin/m4 +TOOLS_PLATFORM.mail?= /usr/bin/mail +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +TOOLS_PLATFORM.mkdir?= /bin/mkdir -p +TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp +TOOLS_PLATFORM.mtree?= /usr/sbin/mtree +TOOLS_PLATFORM.mv?= /bin/mv +TOOLS_PLATFORM.nice?= /usr/bin/nice +TOOLS_PLATFORM.nroff?= /usr/bin/nroff +TOOLS_PLATFORM.openssl?= /usr/sbin/openssl +TOOLS_PLATFORM.patch?= /usr/bin/patch +TOOLS_PLATFORM.pax?= /bin/pax +TOOLS_PLATFORM.printf?= /usr/bin/printf +TOOLS_PLATFORM.pwd?= /bin/pwd +TOOLS_PLATFORM.rm?= /bin/rm +TOOLS_PLATFORM.rmdir?= /bin/rmdir +TOOLS_PLATFORM.sdiff?= /usr/bin/sdiff +TOOLS_PLATFORM.sed?= /usr/bin/sed +TOOLS_PLATFORM.sh?= /bin/sh +TOOLS_PLATFORM.sleep?= /bin/sleep +TOOLS_PLATFORM.soelim?= /usr/bin/soelim +TOOLS_PLATFORM.sort?= /usr/bin/sort +TOOLS_PLATFORM.strip?= /usr/bin/strip +TOOLS_PLATFORM.tail?= /usr/bin/tail +TOOLS_PLATFORM.tar?= /bin/tar +TOOLS_PLATFORM.tbl?= /usr/bin/tbl +TOOLS_PLATFORM.tee?= /usr/bin/tee +TOOLS_PLATFORM.test?= test # shell builtin +TOOLS_PLATFORM.touch?= /usr/bin/touch +TOOLS_PLATFORM.tr?= /usr/bin/tr +TOOLS_PLATFORM.true?= : +TOOLS_PLATFORM.tsort?= /usr/bin/tsort +TOOLS_PLATFORM.wc?= /usr/bin/wc +TOOLS_PLATFORM.xargs?= /usr/bin/xargs -r +TOOLS_PLATFORM.yacc?= /usr/bin/yacc diff --git a/mk/wrapper/transform-gcc b/mk/wrapper/transform-gcc index 8138f4d4ec5..7e1e3b601e6 100644 --- a/mk/wrapper/transform-gcc +++ b/mk/wrapper/transform-gcc @@ -1,4 +1,4 @@ -# $NetBSD: transform-gcc,v 1.20 2009/08/15 13:36:48 joerg Exp $ +# $NetBSD: transform-gcc,v 1.21 2011/01/23 19:07:26 agc Exp $ # # This file handles the transformations needed for gcc that can be done # looking at only one argument at a time. @@ -28,6 +28,7 @@ case $arg in -fexpensive-optimizations |\ -ffast-math |\ -ffloat-store |\ +-fhonour-copts |\ -finline-functions |\ -fno-builtin* |\ -fno-common |\ @@ -68,6 +69,7 @@ case $arg in -W |\ -W[cLlS],* |\ -Wall |\ +-Wbounded |\ -Wcast-align |\ -Wcast-qual |\ -Wchar-subscripts |\ diff --git a/pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk b/pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk new file mode 100644 index 00000000000..e539706ebe2 --- /dev/null +++ b/pkgtools/bootstrap-mk-files/files/mods/MirBSD.sys.mk @@ -0,0 +1,213 @@ +# $NetBSD: MirBSD.sys.mk,v 1.1 2011/01/23 19:07:26 agc Exp $ +# $MirOS: src/share/mk/sys.mk,v 1.103 2007/04/28 00:12:46 tg Exp $ +# @(#)sys.mk 5.11 (Berkeley) 3/13/91 + +unix?= We run MirOS BSD. + +.SUFFIXES: .out .a .ln .o .s .S .c .m .cc .cxx .cpp .C .F .f .r .y .l .cl .p .i .h .sh .m4 +.LIBS: .a + +AR?= ar +ARFLAGS?= rl +RANLIB?= ranlib +NM?= nm +LORDER?= lorder + +AS?= as +CC?= mgcc +HOST_CC?= mgcc +CPP?= ${CC} -E + +CPPFLAGS?= + +AFLAGS?= ${DEBUG} +COMPILE.s?= ${CC} -D_ASM_SOURCE ${AFLAGS} -c +LINK.s?= ${CC} -D_ASM_SOURCE ${AFLAGS} ${LDFLAGS} +COMPILE.S?= ${CC} -D_ASM_SOURCE ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp +LINK.S?= ${CC} -D_ASM_SOURCE ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} + +DBG?= -O2 -pipe +CFLAGS?= ${DBG} ${DEBUG} +COMPILE.c?= ${CC} ${CFLAGS:M*} ${CPPFLAGS} -c +LINK.c?= ${CC} ${CFLAGS:M*} ${CPPFLAGS} ${LDFLAGS} + +CXX?= c++ +CXXFLAGS?= ${CFLAGS} +COMPILE.cc?= ${CXX} ${CXXFLAGS:M*} ${CPPFLAGS} -c +LINK.cc?= ${CXX} ${CXXFLAGS:M*} ${CPPFLAGS} ${LDFLAGS} + +OBJC?= ${CC} +OBJCFLAGS?= ${CFLAGS} +COMPILE.m?= ${CC} ${OBJCFLAGS:M*} ${CPPFLAGS} -c +LINK.m?= ${CC} ${OBJCFLAGS:M*} ${CPPFLAGS} ${LDFLAGS} + +FC?= f77 +FFLAGS?= -O +RFLAGS?= +COMPILE.f?= ${FC} ${FFLAGS} -c +LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} + +LEX?= lex +LFLAGS?= +LEX.l?= ${LEX} ${LFLAGS} + +LD?= ld +LDFLAGS+= ${DEBUG} + +LINT?= lint +LINTFLAGS?= -chapbxzF + +MAKE?= make + +PC?= pc +PFLAGS?= +COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} + +SHELL?= /bin/mksh + +SIZE?= size + +TSORT?= tsort -q + +YACC?= yacc +YFLAGS?= +YACC.y?= ${YACC} ${YFLAGS} + +INSTALL?= install + +CTAGS?= /usr/bin/ctags + +# C +.c: + ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.c.o: + ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} ${.IMPSRC} +.c.i: + ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC} +.c.a: + ${COMPILE.c} ${CFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o +.c.ln: + ${LINT} ${LINTFLAGS} ${CFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} \ + -i ${.IMPSRC} + +# Objective-C +.m: + ${LINK.m} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.m.o: + ${COMPILE.m} ${OBJCFLAGS_${.TARGET}:M*} ${.IMPSRC} +.m.i: + ${COMPILE.m} ${OBJCFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC} +.m.a: + ${COMPILE.m} ${OBJCFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o +.m.ln: + ${LINT} ${LINTFLAGS} ${OBJCFLAGS:M-[IDU]*} ${CPPFLAGS:M-[IDU]*} \ + -i ${.IMPSRC} + +# C++ +.cc .cxx .cpp .C: + ${LINK.cc} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.cc.o .cxx.o .cpp.o .C.o: + ${COMPILE.cc} ${CXXFLAGS_${.TARGET}:M*} ${.IMPSRC} +.cc.i .cxx.i .cpp.i .C.i: + ${COMPILE.cc} ${CXXFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC} +.cc.a .cxx.a .cpp.a .C.a: + ${COMPILE.cc} ${CXXFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +# Fortran/Ratfor +.f: + ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.f.o: + ${COMPILE.f} ${.IMPSRC} +.f.a: + ${COMPILE.f} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +.F: + ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.F.o: + ${COMPILE.F} ${.IMPSRC} +.F.a: + ${COMPILE.F} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +.r: + ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.r.o: + ${COMPILE.r} ${.IMPSRC} +.r.a: + ${COMPILE.r} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +# Pascal +.p: + ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.p.o: + ${COMPILE.p} ${.IMPSRC} +.p.a: + ${COMPILE.p} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +# Assembly +.s: + ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.s.o: + ${COMPILE.s} ${AFLAGS_${.TARGET}:M*} ${.IMPSRC} +.s.a: + ${COMPILE.s} ${AFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +.S: + ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS} +.S.o: + ${COMPILE.S} ${AFLAGS_${.TARGET}:M*} ${.IMPSRC} +.S.i: + ${COMPILE.S} ${AFLAGS_${.TARGET}:M*} -o ${.TARGET} -E ${.IMPSRC} +.S.a: + ${COMPILE.S} ${AFLAGS_${.TARGET:S/.a$/.o/}:M*} ${.IMPSRC} + ${AR} ${ARFLAGS} $@ $*.o + rm -f $*.o + +# Lex +.l: + ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} + ${LINK.c} -o ${.TARGET} ${.TARGET:R}.yy.c ${LDLIBS} -ll + rm -f ${.TARGET:R}.yy.c +.l.c: + ${LEX.l} -o${.TARGET} ${.IMPSRC} +.l.o: + ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} + ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} ${.TARGET:R}.yy.c + rm -f ${.TARGET:R}.yy.c + +# Yacc +.y: + ${YACC.y} -o ${.TARGET:R}.tab.c ${.IMPSRC} + ${LINK.c} -o ${.TARGET} ${.TARGET:R}.tab.c ${LDLIBS} + rm -f ${.TARGET:R}.tab.c +.y.c: + ${YACC.y} -o ${.TARGET} ${.IMPSRC} +.y.o: + ${YACC.y} -o ${.TARGET:R}.tab.c ${.IMPSRC} + ${COMPILE.c} ${CFLAGS_${.TARGET}:M*} -o ${.TARGET} ${.TARGET:R}.tab.c + rm -f ${.TARGET:R}.tab.c + +# Shell +.sh: + rm -f ${.TARGET} + cp ${.IMPSRC} ${.TARGET} |