Cross compile on minix support
* Remade patch so it works with minix patch tool. * New MINIX tar support -ox, so revert back to it In fetch scripts, tar had been replaced by bsdtar as the prebvious tar did not support the -o flag under minix, which is required to prevent usage of tar file stored user and group information. This introduces portability problems. As our new tar tool now support that flag revert back to improve portability.
This commit is contained in:
parent
6227378147
commit
b8a678ef1d
32 changed files with 21644 additions and 31161 deletions
5
build.sh
5
build.sh
|
@ -763,6 +763,8 @@ nobomb_getmakevar()
|
||||||
"${make}" -m ${TOP}/share/mk -s -B -f- _x_ <<EOF || return 1
|
"${make}" -m ${TOP}/share/mk -s -B -f- _x_ <<EOF || return 1
|
||||||
_x_:
|
_x_:
|
||||||
echo \${$1}
|
echo \${$1}
|
||||||
|
# LSC FIXME: We are cross compiling, so overwrite default and build tools
|
||||||
|
USETOOLS:=yes
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
.include <bsd.kernobj.mk>
|
.include <bsd.kernobj.mk>
|
||||||
EOF
|
EOF
|
||||||
|
@ -1693,10 +1695,9 @@ EOF
|
||||||
eval cat <<EOF
|
eval cat <<EOF
|
||||||
MAKEWRAPPERMACHINE=${makewrappermachine:-${MACHINE}}; export MAKEWRAPPERMACHINE
|
MAKEWRAPPERMACHINE=${makewrappermachine:-${MACHINE}}; export MAKEWRAPPERMACHINE
|
||||||
USETOOLS=yes; export USETOOLS
|
USETOOLS=yes; export USETOOLS
|
||||||
MKGCC=yes; export MKGCC
|
|
||||||
MKGDB=no; export MKGDB
|
|
||||||
# LSC We are cross compiling, so do not install to root!
|
# LSC We are cross compiling, so do not install to root!
|
||||||
MKINSTALLBOOT=no; export MKINSTALLBOOT
|
MKINSTALLBOOT=no; export MKINSTALLBOOT
|
||||||
|
MKGCC=yes; export MKGCC
|
||||||
EOF
|
EOF
|
||||||
} | eval sort -u "${makewrapout}"
|
} | eval sort -u "${makewrapout}"
|
||||||
eval cat <<EOF "${makewrapout}"
|
eval cat <<EOF "${makewrapout}"
|
||||||
|
|
|
@ -89,6 +89,7 @@ expand.c: arith.h
|
||||||
trap.c: signames.h
|
trap.c: signames.h
|
||||||
cd.c complete.c eval.c exec.c expand.c jobs.c main.c options.c parser.c redir.c show.c trap.c var.c: nodes.h
|
cd.c complete.c eval.c exec.c expand.c jobs.c main.c options.c parser.c redir.c show.c trap.c var.c: nodes.h
|
||||||
eval.c exec.c expand.c input.c input.h jobs.c mystring.c output.c parser.c trap.c var.c: syntax.h
|
eval.c exec.c expand.c input.c input.h jobs.c mystring.c output.c parser.c trap.c var.c: syntax.h
|
||||||
|
cd.c eval.c exec.c histedit.cjobs.c main.c miscbltin.c options.c trap.c var.c: builtins.h
|
||||||
|
|
||||||
# LSC: Seems that this file is implicitly taken into account by NetBSD's make,
|
# LSC: Seems that this file is implicitly taken into account by NetBSD's make,
|
||||||
# still seems to be ignored / not found currently.
|
# still seems to be ignored / not found currently.
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# LSC For now...
|
|
||||||
NOGCCERROR:= yes
|
|
||||||
PROG= getty
|
PROG= getty
|
||||||
BINDIR= /bin
|
BINDIR= /bin
|
||||||
MAN=
|
MAN=
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -300,7 +300,9 @@ FILESMODE_minfree= 600
|
||||||
CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \
|
CONFIGSYMLINKS+= ${TZDIR}/${LOCALTIME} /etc/localtime \
|
||||||
/usr/sbin/rmt /etc/rmt
|
/usr/sbin/rmt /etc/rmt
|
||||||
.else
|
.else
|
||||||
CONFIGSYMLINKS+= /usr/log /var/log \
|
CONFIGSYMLINKS+= \
|
||||||
|
/usr/lib/cpp /lib/cpp \
|
||||||
|
/usr/log /var/log \
|
||||||
/usr/tmp /var/tmp \
|
/usr/tmp /var/tmp \
|
||||||
/usr/pkg/bin/clang /usr/bin/cc \
|
/usr/pkg/bin/clang /usr/bin/cc \
|
||||||
/usr/pkg/bin/strip /usr/bin/strip \
|
/usr/pkg/bin/strip /usr/bin/strip \
|
||||||
|
|
2
external/gpl3/binutils/fetch.sh
vendored
2
external/gpl3/binutils/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar -oxjf binutils-2.21.1.tar.bz2 && \
|
tar -oxjf binutils-2.21.1.tar.bz2 && \
|
||||||
mv binutils-2.21.1 dist && \
|
mv binutils-2.21.1 dist && \
|
||||||
cd dist && \
|
cd dist && \
|
||||||
cat ../patches/* | patch -p1
|
cat ../patches/* | patch -p1
|
||||||
|
|
File diff suppressed because it is too large
Load diff
11
external/gpl3/binutils/patches/0002-minix-on-minix.patch
vendored
Normal file
11
external/gpl3/binutils/patches/0002-minix-on-minix.patch
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
diff -rNU3 dist/binutils/dwarf.c dist.new/binutils/dwarf.c
|
||||||
|
--- dist/binutils/dwarf.c Wed Nov 7 17:24:51 2012
|
||||||
|
+++ dist.new/binutils/dwarf.c Wed Nov 7 15:50:59 2012
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#include "elf/common.h"
|
||||||
|
#include "dwarf2.h"
|
||||||
|
#include "dwarf.h"
|
||||||
|
+#include "getopt.h"
|
||||||
|
|
||||||
|
static const char *regname (unsigned int regno, int row);
|
||||||
|
|
2
external/gpl3/gcc/fetch.sh
vendored
2
external/gpl3/gcc/fetch.sh
vendored
|
@ -32,7 +32,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar -oxjf gcc-4.5.3.tar.bz2 && \
|
tar -oxjf gcc-4.5.3.tar.bz2 && \
|
||||||
mv gcc-4.5.3 dist && \
|
mv gcc-4.5.3 dist && \
|
||||||
cd dist && \
|
cd dist && \
|
||||||
rm -rf $DELETEDIRS && \
|
rm -rf $DELETEDIRS && \
|
||||||
|
|
49177
external/gpl3/gcc/patches/0000-gcc_nbsd.patch
vendored
49177
external/gpl3/gcc/patches/0000-gcc_nbsd.patch
vendored
File diff suppressed because it is too large
Load diff
12
external/gpl3/gcc/patches/0002-minix-on-minix.patch
vendored
Normal file
12
external/gpl3/gcc/patches/0002-minix-on-minix.patch
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -rNU3 gcc-4.5.3/configure dist/configure
|
||||||
|
--- gcc-4.5.3/configure Wed Nov 7 20:12:53 2012
|
||||||
|
+++ dist/configure Wed Nov 7 19:25:20 2012
|
||||||
|
@@ -5321,7 +5321,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
# Check for GMP, MPFR and MPC
|
||||||
|
-gmplibs="-lmpc -lmpfr -lgmp"
|
||||||
|
+gmplibs="-lmpc -lmpfr -lgmp -lm"
|
||||||
|
gmpinc=
|
||||||
|
have_gmp=no
|
||||||
|
|
2
external/lgpl2/mpc/fetch.sh
vendored
2
external/lgpl2/mpc/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar -oxzf mpc-0.9.tar.gz
|
tar -oxzf mpc-0.9.tar.gz
|
||||||
mv mpc-0.9 dist
|
mv mpc-0.9 dist
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
2
external/lgpl3/gmp/fetch.sh
vendored
2
external/lgpl3/gmp/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar -oxjf gmp-5.0.2.tar.bz2
|
tar -oxjf gmp-5.0.2.tar.bz2
|
||||||
mv gmp-5.0.2 dist && \
|
mv gmp-5.0.2 dist && \
|
||||||
cd dist && \
|
cd dist && \
|
||||||
cat ../patches/* |patch -p1
|
cat ../patches/* |patch -p1
|
||||||
|
|
2
external/lgpl3/mpfr/fetch.sh
vendored
2
external/lgpl3/mpfr/fetch.sh
vendored
|
@ -23,7 +23,7 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bsdtar -oxjf mpfr-3.0.1.tar.bz2
|
tar -oxjf mpfr-3.0.1.tar.bz2
|
||||||
mv mpfr-3.0.1 dist && \
|
mv mpfr-3.0.1 dist && \
|
||||||
cd dist && \
|
cd dist && \
|
||||||
cat ../patches/* |patch -p1
|
cat ../patches/* |patch -p1
|
||||||
|
|
|
@ -10,7 +10,7 @@ MDEC= /usr/mdec
|
||||||
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
|
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
|
||||||
|
|
||||||
# LSC detect where were built the objects files
|
# LSC detect where were built the objects files
|
||||||
PROGROOT:= ../..
|
PROGROOT:= ..
|
||||||
.if "${MAKEOBJDIR:S,${.CURDIR},,}" != ""
|
.if "${MAKEOBJDIR:S,${.CURDIR},,}" != ""
|
||||||
PROGROOT:= ${MAKEOBJDIR:S,releasetools,,}
|
PROGROOT:= ${MAKEOBJDIR:S,releasetools,,}
|
||||||
.endif
|
.endif
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
|
|
||||||
.if ${MKSHARE} != "no" || \
|
.if ${MKSHARE} != "no" || \
|
||||||
make(clean) || make(cleandir) || make(distclean) || make(obj)
|
make(clean) || make(cleandir) || make(distclean) || make(obj)
|
||||||
SUBDIR= mk terminfo zoneinfo misc
|
SUBDIR= misc mk \
|
||||||
|
terminfo zoneinfo
|
||||||
.if ${MKNLS} != "no"
|
.if ${MKNLS} != "no"
|
||||||
SUBDIR+=i18n locale nls
|
SUBDIR+=i18n locale nls
|
||||||
.endif
|
.endif
|
||||||
|
|
|
@ -16,8 +16,7 @@ FILES= bsd.README bsd.clang-analyze.mk bsd.clean.mk bsd.dep.mk bsd.doc.mk \
|
||||||
bsd.subdir.mk bsd.sys.mk bsd.test.mk bsd.x11.mk sys.mk
|
bsd.subdir.mk bsd.sys.mk bsd.test.mk bsd.x11.mk sys.mk
|
||||||
|
|
||||||
# MINIX-specific files
|
# MINIX-specific files
|
||||||
FILES+= minix.bootprog.mk minix.service.mk \
|
FILES+= minix.bootprog.mk minix.service.mk minix.gcov.mk
|
||||||
minix.gcc.mk minix.gcov.mk pkgsrchooks.mk
|
|
||||||
|
|
||||||
FILESDIR=/usr/share/mk
|
FILESDIR=/usr/share/mk
|
||||||
.endif
|
.endif
|
||||||
|
|
|
@ -23,4 +23,22 @@ _GCC_CRTDIR?= ${DESTDIR}/usr/lib
|
||||||
_GCC_LIBGCCDIR?= ${DESTDIR}/usr/lib
|
_GCC_LIBGCCDIR?= ${DESTDIR}/usr/lib
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if defined(__MINIX)
|
||||||
|
AFLAGS+=-D__ASSEMBLY__
|
||||||
|
CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
|
||||||
|
|
||||||
|
.if ${MACHINE_ARCH} == "i386"
|
||||||
|
CPPFLAGS+= -march=i586
|
||||||
|
.elif ${MACHINE_ARCH} == "arm"
|
||||||
|
CPPFLAGS+= -march=armv7-a
|
||||||
|
CPPFLAGS+= -D__minix
|
||||||
|
.endif
|
||||||
|
|
||||||
|
# LSC In the current state there is too much to be done
|
||||||
|
# Some package have been identified by directly adding NOGCCERROR
|
||||||
|
# To their Makefiles
|
||||||
|
NOGCCERROR:= yes
|
||||||
|
NOCLANGERROR:= yes
|
||||||
|
.endif # defined(__MINIX)
|
||||||
|
|
||||||
.endif # ! defined(_BSD_GCC_MK_)
|
.endif # ! defined(_BSD_GCC_MK_)
|
||||||
|
|
|
@ -510,9 +510,12 @@ _INSTRANLIB=${empty(PRESERVE):?-a "${RANLIB} -t":}
|
||||||
__archivebuild: .USE
|
__archivebuild: .USE
|
||||||
${_MKTARGET_BUILD}
|
${_MKTARGET_BUILD}
|
||||||
rm -f ${.TARGET}
|
rm -f ${.TARGET}
|
||||||
# LSC MINIX: We do not have yet imported tsort nor lorder
|
.if defined(__MINIX)
|
||||||
# ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
|
# LSC FIXME MINIX: We do not have yet imported tsort nor lorder
|
||||||
${AR} ${_ARFL} ${.TARGET} ${.ALLSRC:M*o}
|
${AR} ${_ARFL} ${.TARGET} ${.ALLSRC:M*o}
|
||||||
|
.else
|
||||||
|
${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
|
||||||
|
.endif # defined(__MINIX)
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(__archiveinstall)
|
.if !target(__archiveinstall)
|
||||||
|
@ -566,7 +569,8 @@ DPLIBC ?= ${DESTDIR}${LIBC_SO}
|
||||||
.else
|
.else
|
||||||
LDLIBC ?= -nodefaultlibs
|
LDLIBC ?= -nodefaultlibs
|
||||||
.if ${LIB} == "c"
|
.if ${LIB} == "c"
|
||||||
LDADD+= -lgcc
|
LDADD+= ${${ACTIVE_CC} == "gcc":?-lgcc:}
|
||||||
|
LDADD+= ${${ACTIVE_CC} == "clang":?-L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic:}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
@ -821,6 +825,5 @@ LINKSMODE?= ${LIBMODE}
|
||||||
.include <bsd.dep.mk>
|
.include <bsd.dep.mk>
|
||||||
.include <bsd.clang-analyze.mk>
|
.include <bsd.clang-analyze.mk>
|
||||||
.include <bsd.clean.mk>
|
.include <bsd.clean.mk>
|
||||||
.include <minix.gcc.mk>
|
|
||||||
|
|
||||||
${TARGETS}: # ensure existence
|
${TARGETS}: # ensure existence
|
||||||
|
|
|
@ -8,23 +8,31 @@
|
||||||
.if !defined(_BSD_OWN_MK_)
|
.if !defined(_BSD_OWN_MK_)
|
||||||
_BSD_OWN_MK_=1
|
_BSD_OWN_MK_=1
|
||||||
|
|
||||||
# LSC SAVE SOME TIME...
|
|
||||||
MKCLEANVERIFY:= no
|
|
||||||
|
|
||||||
.ifndef HOSTPROG
|
|
||||||
# LSC Needed at a lot of places for MINIX
|
|
||||||
CPPFLAGS+= -isystem ${DESTDIR}/usr/include
|
|
||||||
MKDYNAMICROOT:= no
|
|
||||||
|
|
||||||
# Override MACHINE as the native host make will set it to i686
|
|
||||||
_uname_s!= uname -s
|
|
||||||
.if ${_uname_s} == "Minix" && ${MACHINE_ARCH} == "i386"
|
|
||||||
MACHINE:= i386
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if defined(__MINIX)
|
.if defined(__MINIX)
|
||||||
|
|
||||||
|
# LSC FIXME: Useless difference, Should use the mk.conf
|
||||||
|
MAKECONF?= /etc/make.conf
|
||||||
|
|
||||||
|
# Some Minix deviations from NetBSD
|
||||||
|
LDSTATIC?= -static
|
||||||
|
MKDYNAMICROOT?= no
|
||||||
|
|
||||||
|
BINMODE?= 755
|
||||||
|
NONBINMODE?= 644
|
||||||
|
MANDIR?= /usr/man
|
||||||
|
BINGRP?= operator
|
||||||
|
MANGRP?= operator
|
||||||
|
INFOGRP?= operator
|
||||||
|
DOCGRP?= operator
|
||||||
|
|
||||||
MACHINE_GNU_PLATFORM?=${MACHINE_ARCH}-elf32-minix
|
MACHINE_GNU_PLATFORM?=${MACHINE_ARCH}-elf32-minix
|
||||||
.endif # defined(__MINIX)
|
|
||||||
|
MKBINUTILS:= no
|
||||||
|
MKGDB:= no
|
||||||
|
MKGCC?= no
|
||||||
|
|
||||||
|
# LSC To check if works
|
||||||
|
#DESTDIR?= /usr/destdir.${MACHINE_ARCH}
|
||||||
|
|
||||||
# LSC MINIX SMP Support?
|
# LSC MINIX SMP Support?
|
||||||
.ifdef CONFIG_SMP
|
.ifdef CONFIG_SMP
|
||||||
|
@ -35,9 +43,26 @@ SMP_FLAGS += -DCONFIG_MAX_CPUS=${CONFIG_MAX_CPUS}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
CPPFLAGS+= ${SMP_FLAGS}
|
CPPFLAGS+= ${SMP_FLAGS}
|
||||||
.endif
|
|
||||||
|
|
||||||
MAKECONF?= /etc/make.conf
|
__uname_s!= uname -s
|
||||||
|
.if ${__uname_s:Uunknown} == "Minix"
|
||||||
|
USETOOLS?= never
|
||||||
|
. if ${USETOOLS:Uno} != "yes"
|
||||||
|
#HAVE_LLVM?=2.9
|
||||||
|
HAVE_LLVM?=3.1
|
||||||
|
. endif
|
||||||
|
. if !defined(HOSTPROG) && !defined(HOSTLIB)
|
||||||
|
# LSC FIXME: Override MACHINE as the native minix host make command will set
|
||||||
|
# it to i686.
|
||||||
|
. if ${MACHINE_ARCH} == "i386"
|
||||||
|
MACHINE:= i386
|
||||||
|
. endif
|
||||||
|
. endif # !defined(HOSTPROG) && !defined(HOSTLIB)
|
||||||
|
.endif # __uname_s == "Minix"
|
||||||
|
|
||||||
|
.else
|
||||||
|
MAKECONF?= /etc/mk.conf
|
||||||
|
.endif # defined(__MINIX)
|
||||||
.-include "${MAKECONF}"
|
.-include "${MAKECONF}"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -551,10 +576,10 @@ BSDSRCDIR?= /usr/src
|
||||||
BSDOBJDIR?= /usr/obj
|
BSDOBJDIR?= /usr/obj
|
||||||
NETBSDSRCDIR?= ${BSDSRCDIR}
|
NETBSDSRCDIR?= ${BSDSRCDIR}
|
||||||
|
|
||||||
BINGRP?= operator
|
BINGRP?= wheel
|
||||||
BINOWN?= root
|
BINOWN?= root
|
||||||
BINMODE?= 755
|
BINMODE?= 555
|
||||||
NONBINMODE?= 644
|
NONBINMODE?= 444
|
||||||
|
|
||||||
# These are here mainly because we don't want suid root in case
|
# These are here mainly because we don't want suid root in case
|
||||||
# a Makefile defines BINMODE.
|
# a Makefile defines BINMODE.
|
||||||
|
@ -563,14 +588,14 @@ RUMPBINOWN?= root
|
||||||
RUMPBINMODE?= 555
|
RUMPBINMODE?= 555
|
||||||
RUMPNONBINMODE?=444
|
RUMPNONBINMODE?=444
|
||||||
|
|
||||||
MANDIR?= /usr/man
|
MANDIR?= /usr/share/man
|
||||||
MANGRP?= operator
|
MANGRP?= wheel
|
||||||
MANOWN?= root
|
MANOWN?= root
|
||||||
MANMODE?= ${NONBINMODE}
|
MANMODE?= ${NONBINMODE}
|
||||||
MANINSTALL?= ${_MANINSTALL}
|
MANINSTALL?= ${_MANINSTALL}
|
||||||
|
|
||||||
INFODIR?= /usr/share/info
|
INFODIR?= /usr/share/info
|
||||||
INFOGRP?= operator
|
INFOGRP?= wheel
|
||||||
INFOOWN?= root
|
INFOOWN?= root
|
||||||
INFOMODE?= ${NONBINMODE}
|
INFOMODE?= ${NONBINMODE}
|
||||||
|
|
||||||
|
@ -583,7 +608,7 @@ LIBMODE?= ${NONBINMODE}
|
||||||
|
|
||||||
DOCDIR?= /usr/share/doc
|
DOCDIR?= /usr/share/doc
|
||||||
HTMLDOCDIR?= /usr/share/doc/html
|
HTMLDOCDIR?= /usr/share/doc/html
|
||||||
DOCGRP?= operator
|
DOCGRP?= wheel
|
||||||
DOCOWN?= root
|
DOCOWN?= root
|
||||||
DOCMODE?= ${NONBINMODE}
|
DOCMODE?= ${NONBINMODE}
|
||||||
|
|
||||||
|
@ -839,6 +864,7 @@ MKZFS?= yes
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Some tough Minix defaults
|
# Some tough Minix defaults
|
||||||
|
MKCOVERAGE?= no
|
||||||
MKPROFILE?= no
|
MKPROFILE?= no
|
||||||
MKSTATICLIB:= yes
|
MKSTATICLIB:= yes
|
||||||
MKLINT:= no
|
MKLINT:= no
|
||||||
|
@ -848,7 +874,6 @@ USE_FORT:= no
|
||||||
MKYP:= no
|
MKYP:= no
|
||||||
MKPF:= no
|
MKPF:= no
|
||||||
MKNLS:= no
|
MKNLS:= no
|
||||||
MKCOVERAGE?= no
|
|
||||||
MKHESIOD:= no
|
MKHESIOD:= no
|
||||||
MKPOSTFIX:= no
|
MKPOSTFIX:= no
|
||||||
MKKMOD:= no
|
MKKMOD:= no
|
||||||
|
@ -868,8 +893,6 @@ MKIPFILTER:= no
|
||||||
MKINET6:= no
|
MKINET6:= no
|
||||||
MKGROFF:= no
|
MKGROFF:= no
|
||||||
MKHTML:= no
|
MKHTML:= no
|
||||||
MKBINUTILS:= no
|
|
||||||
MKGDB:= no
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# MK* options which default to "yes".
|
# MK* options which default to "yes".
|
||||||
|
@ -1033,12 +1056,12 @@ COPY?= -c
|
||||||
.if ${MKUPDATE} == "no"
|
.if ${MKUPDATE} == "no"
|
||||||
PRESERVE?=
|
PRESERVE?=
|
||||||
.else
|
.else
|
||||||
#XXX: Not supported by MINIX install
|
#LSC: Not supported by MINIX install
|
||||||
PRESERVE?= -p
|
PRESERVE?= -p
|
||||||
.endif
|
.endif
|
||||||
#XXX: Not supported by MINIX install
|
#XXX: Not supported by MINIX install
|
||||||
RENAME?= -r
|
RENAME?= -r
|
||||||
.endif
|
.endif # != "Minix"
|
||||||
HRDLINK?= -l h
|
HRDLINK?= -l h
|
||||||
SYMLINK?= -l s
|
SYMLINK?= -l s
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
.include <bsd.init.mk>
|
.include <bsd.init.mk>
|
||||||
.include <bsd.shlib.mk>
|
.include <bsd.shlib.mk>
|
||||||
.include <bsd.gcc.mk>
|
.include <bsd.gcc.mk>
|
||||||
#.include <minix.gcov.mk>
|
.include <minix.gcov.mk>
|
||||||
.include <minix.gcc.mk>
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Definitions and targets shared among all programs built by a single
|
# Definitions and targets shared among all programs built by a single
|
||||||
|
@ -120,9 +119,6 @@ LIB${_lib:tu}= ${DESTDIR}/usr/lib/lib${_lib:S/xx/++/:S/atf_c/atf-c/}.a
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
#LSC Add minix base library, required for libc to work.
|
|
||||||
LDADD+= -L=/usr/lib -lminlib
|
|
||||||
|
|
||||||
# PAM applications, if linked statically, need more libraries
|
# PAM applications, if linked statically, need more libraries
|
||||||
.if (${MKPIC} == "no")
|
.if (${MKPIC} == "no")
|
||||||
.if (${MKCRYPTO} != "no")
|
.if (${MKCRYPTO} != "no")
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
.if !defined(_BSD_SYS_MK_)
|
.if !defined(_BSD_SYS_MK_)
|
||||||
_BSD_SYS_MK_=1
|
_BSD_SYS_MK_=1
|
||||||
|
|
||||||
|
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix"
|
||||||
|
HOST_CPP?= /usr/lib/cpp
|
||||||
|
.endif
|
||||||
|
|
||||||
.if ${MKREPRO:Uno} == "yes"
|
.if ${MKREPRO:Uno} == "yes"
|
||||||
CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
CPPFLAGS+= -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
|
||||||
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
|
||||||
|
@ -33,7 +37,9 @@ CFLAGS+= -Wno-sign-compare
|
||||||
CFLAGS+= ${${ACTIVE_CC} != "clang":? -Wno-traditional :}
|
CFLAGS+= ${${ACTIVE_CC} != "clang":? -Wno-traditional :}
|
||||||
.if !defined(NOGCCERROR)
|
.if !defined(NOGCCERROR)
|
||||||
# Set assembler warnings to be fatal
|
# Set assembler warnings to be fatal
|
||||||
CFLAGS+= -Wa,--fatal-warnings
|
#CFLAGS+= -Wa,--fatal-warnings
|
||||||
|
# LSC Clang version 2.9 those not support this flag
|
||||||
|
CFLAGS+= ${${HAVE_LLVM:U} != "2.9":? -Wa,--fatal-warnings:}
|
||||||
.endif
|
.endif
|
||||||
# Set linker warnings to be fatal
|
# Set linker warnings to be fatal
|
||||||
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
|
# XXX no proper way to avoid "FOO is a patented algorithm" warnings
|
||||||
|
@ -109,7 +115,11 @@ CPPFLAGS+= -D_FORTIFY_SOURCE=2
|
||||||
.if (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
|
.if (${USE_SSP:Uno} != "no") && (${BINDIR:Ux} != "/usr/mdec")
|
||||||
.if ${HAS_SSP} == "yes"
|
.if ${HAS_SSP} == "yes"
|
||||||
COPTS+= -fstack-protector -Wstack-protector
|
COPTS+= -fstack-protector -Wstack-protector
|
||||||
|
.if defined(__MINIX)
|
||||||
COPTS+= ${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :}
|
COPTS+= ${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :}
|
||||||
|
.else
|
||||||
|
COPTS+= ${${ACTIVE_CC} == "clang":? --param ssp-buffer-size=1 :}
|
||||||
|
.endif # defined(__MINIX)
|
||||||
COPTS+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
|
COPTS+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
LDSTATIC?= -static
|
|
||||||
|
|
||||||
AFLAGS+=-D__ASSEMBLY__
|
|
||||||
CPPFLAGS+= -fno-builtin -Wall -Wno-sign-compare
|
|
||||||
.if ${MACHINE_ARCH} == "i386"
|
|
||||||
CPPFLAGS+= -march=i586
|
|
||||||
.elif ${MACHINE_ARCH} == "arm"
|
|
||||||
CPPFLAGS+= -march=armv7-a
|
|
||||||
CPPFLAGS+= -D__minix
|
|
||||||
.endif
|
|
||||||
|
|
||||||
# LSC In the current state there is too much to be done
|
|
||||||
# Some package have been identified by directly adding NOGCCERROR
|
|
||||||
# To their Makefiles
|
|
||||||
NOGCCERROR:= yes
|
|
||||||
NOCLANGERROR:= yes
|
|
|
@ -1,5 +0,0 @@
|
||||||
#
|
|
||||||
|
|
||||||
.if !defined(_MINIX_PKGSRC_HOOKS_)
|
|
||||||
_MINIX_PKGSRC_HOOKS_=1
|
|
||||||
.endif # !defined(_MINIX_PKGSRC_HOOKS_)
|
|
|
@ -1,19 +1,25 @@
|
||||||
# $NetBSD: sys.mk,v 1.110 2012/10/06 20:54:58 christos Exp $
|
# $NetBSD: sys.mk,v 1.110 2012/10/06 20:54:58 christos Exp $
|
||||||
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
|
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
|
||||||
|
|
||||||
unix?= We run MINIX.
|
|
||||||
|
|
||||||
# This variable should be used to differentiate Minix builds in Makefiles.
|
# This variable should be used to differentiate Minix builds in Makefiles.
|
||||||
__MINIX= yes
|
__MINIX= yes
|
||||||
|
|
||||||
COMPILER_TYPE=gnu
|
.if defined(__MINIX)
|
||||||
NBSD_LIBC= yes
|
.if ${MKSMALL:U} == "yes"
|
||||||
|
|
||||||
.if defined(MKSMALL) && ${MKSMALL} == "yes"
|
|
||||||
DBG= -Os
|
DBG= -Os
|
||||||
CFLAGS+= -DNDEBUG
|
CFLAGS+= -DNDEBUG
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
unix?= We run MINIX.
|
||||||
|
|
||||||
|
COMPILER_TYPE=gnu
|
||||||
|
NBSD_LIBC= yes
|
||||||
|
|
||||||
|
DBG?= -O
|
||||||
|
CPP?= /usr/lib/cpp
|
||||||
|
.endif # defined(__MINIX)
|
||||||
|
unix?= We run NetBSD.
|
||||||
|
|
||||||
.SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh
|
.SUFFIXES: .a .o .ln .s .S .c .cc .cpp .cxx .C .f .F .r .p .l .y .sh
|
||||||
|
|
||||||
.LIBS: .a
|
.LIBS: .a
|
||||||
|
@ -30,8 +36,7 @@ _ASM_TRADITIONAL_CPP= -x assembler-with-cpp
|
||||||
COMPILE.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${_ASM_TRADITIONAL_CPP} -c
|
COMPILE.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${_ASM_TRADITIONAL_CPP} -c
|
||||||
LINK.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${LDFLAGS}
|
LINK.S?= ${CC} ${AFLAGS} ${AFLAGS.${<:T}} ${CPPFLAGS} ${LDFLAGS}
|
||||||
|
|
||||||
CC?= clang
|
CC?= cc
|
||||||
|
|
||||||
.if ${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb"
|
.if ${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb"
|
||||||
# -O2 is too -falign-* zealous for low-memory sh3 machines
|
# -O2 is too -falign-* zealous for low-memory sh3 machines
|
||||||
DBG?= -Os -freorder-blocks
|
DBG?= -Os -freorder-blocks
|
||||||
|
@ -41,9 +46,7 @@ DBG?= -Os
|
||||||
.elif ${MACHINE_ARCH} == "vax"
|
.elif ${MACHINE_ARCH} == "vax"
|
||||||
DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload
|
DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload
|
||||||
.else
|
.else
|
||||||
#MINIX: use -O for now
|
DBG?= -O2
|
||||||
#DBG?= -O2
|
|
||||||
DBG?= -O
|
|
||||||
.endif
|
.endif
|
||||||
CFLAGS?= ${DBG}
|
CFLAGS?= ${DBG}
|
||||||
LDFLAGS?=
|
LDFLAGS?=
|
||||||
|
|
|
@ -77,6 +77,7 @@ GCC_CPPFLAGS= -DNETBSD_TOOLS -DTARGET_SYSTEM_ROOT=0 \
|
||||||
|
|
||||||
.if ${HOST_OSTYPE:C/\-.*//} == "Minix"
|
.if ${HOST_OSTYPE:C/\-.*//} == "Minix"
|
||||||
GCC_CPPFLAGS+= -D_NETBSD_SOURCE -D_POSIX_SOURCE -D_COMPAT_MINIX
|
GCC_CPPFLAGS+= -D_NETBSD_SOURCE -D_POSIX_SOURCE -D_COMPAT_MINIX
|
||||||
|
CONFIGURE_ENV+= LDFLAGS=-lm
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
|
MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
|
||||||
|
|
|
@ -13,6 +13,7 @@ PROG= passwd
|
||||||
SRCS= local_passwd.c passwd.c
|
SRCS= local_passwd.c passwd.c
|
||||||
MAN= passwd.1
|
MAN= passwd.1
|
||||||
|
|
||||||
|
# LSC No LOGIN_CAP on Minix?
|
||||||
CPPFLAGS+=-I${.CURDIR} #-DLOGIN_CAP
|
CPPFLAGS+=-I${.CURDIR} #-DLOGIN_CAP
|
||||||
|
|
||||||
.if (${USE_YP} != "no")
|
.if (${USE_YP} != "no")
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
PROG= sed
|
PROG= sed
|
||||||
SRCS= compile.c main.c misc.c process.c
|
SRCS= compile.c main.c misc.c process.c
|
||||||
|
|
||||||
|
# LSC FIXME Still required?
|
||||||
SYMLINKS?= ${BINDIR}/sed /bin/sed
|
SYMLINKS?= ${BINDIR}/sed /bin/sed
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
|
@ -7,7 +7,7 @@ CPPFLAGS+= -I${.CURDIR}/../../lib/libterminfo
|
||||||
|
|
||||||
.ifndef HOSTPROG
|
.ifndef HOSTPROG
|
||||||
LDADD+= -lterminfo -lutil
|
LDADD+= -lterminfo -lutil
|
||||||
DPADD+= ${LIBTERMINFO} #${LIBUTIL}
|
DPADD+= ${LIBTERMINFO} ${LIBUTIL}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
|
@ -3,9 +3,6 @@
|
||||||
|
|
||||||
.include <bsd.own.mk>
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
# LSC Until it compiles cleanly...
|
|
||||||
NOGCCERROR:=yes
|
|
||||||
|
|
||||||
PROG= xinstall
|
PROG= xinstall
|
||||||
SRCS= xinstall.c getid.c
|
SRCS= xinstall.c getid.c
|
||||||
MAN= install.1
|
MAN= install.1
|
||||||
|
|
|
@ -252,8 +252,7 @@ main(int argc, char *argv[])
|
||||||
case 'p':
|
case 'p':
|
||||||
dopreserve = 1;
|
dopreserve = 1;
|
||||||
#ifdef __minix
|
#ifdef __minix
|
||||||
errx(1,
|
warn("Minix lacks support for futimes(3)/utimes(2)");
|
||||||
"Minix lacks support for futimes(3)/utimes(2)");
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
|
|
@ -8,7 +8,7 @@ CPPFLAGS+= -D_MINIX
|
||||||
# LSC Adding this to activate the getline renaming macro
|
# LSC Adding this to activate the getline renaming macro
|
||||||
CPPFLAGS+= -D__NBSD_LIBC
|
CPPFLAGS+= -D__NBSD_LIBC
|
||||||
|
|
||||||
.if ${HOST_OSTYPE:C/\-.*//} == "Minix" || !defined(HOSTPROGNAME)
|
.if ${HOST_OSTYPE:C/\-.*//:U} == "Minix" || !defined(HOSTPROGNAME)
|
||||||
LDADD+= -lminlib -lcompat_minix
|
LDADD+= -lminlib -lcompat_minix
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue